Bug 31257 - Add a new English 1 page layout to export a basket as PDF
Summary: Add a new English 1 page layout to export a basket as PDF
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks: 33340
  Show dependency treegraph
 
Reported: 2022-07-28 22:13 UTC by Aleisha Amohia
Modified: 2023-12-28 20:43 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Medium patch
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/628
Text to go in the release notes:
This patch adds a new English 1 page layout to be used when exporting a basket group as PDF. It can be selected as a new option from the OrderPdfFormat system preference.
Version(s) released in:
22.11.00


Attachments
Bug 31257: WIP (12.40 KB, patch)
2022-07-28 22:37 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 31257: Add a new English 1 page layout to export basketgroup (47.15 KB, patch)
2022-08-01 09:31 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 31257: Add a new English 1 page layout to export basketgroup (47.17 KB, patch)
2022-09-14 23:35 UTC, David Nind
Details | Diff | Splinter Review
Example PDF output - Document column is very narrow (41.17 KB, application/pdf)
2022-09-14 23:40 UTC, David Nind
Details
Bug 31257: (follow-up) Fix display of PDF (1.92 KB, patch)
2022-10-04 03:35 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 31257: Add a new English 1 page layout to export basketgroup (47.22 KB, patch)
2022-10-04 13:06 UTC, David Nind
Details | Diff | Splinter Review
Bug 31257: (follow-up) Fix display of PDF (1.97 KB, patch)
2022-10-04 13:06 UTC, David Nind
Details | Diff | Splinter Review
Bug 31257: Add a new English 1 page layout to export basketgroup (47.27 KB, patch)
2022-10-08 12:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31257: (follow-up) Fix display of PDF (2.02 KB, patch)
2022-10-08 12:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31257: (QA follow-up) Fix some typos (2.01 KB, patch)
2022-10-08 12:59 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2022-07-28 22:13:12 UTC
We would like a new layout that puts library, vendor and order information on one page, that reads more like an invoice with a letter head.
Comment 1 Aleisha Amohia 2022-07-28 22:37:17 UTC
Created attachment 138236 [details] [review]
Bug 31257: WIP
Comment 2 Aleisha Amohia 2022-08-01 09:31:08 UTC
Created attachment 138454 [details] [review]
Bug 31257: Add a new English 1 page layout to export basketgroup

This patch adds a new English 1 page layout to be used when exporting a
basketgroup as PDF. This has been modelled after an example PDF from
another library system.

To test:
1) Go to Koha Administration -> Libraries. Ensure Library A has an
address, phone and fax.
2) Go to Koha Administration -> System preferences. Search for
OrderPdfFormat. Set this to the new English 1-page layout option.
3) Go to Acquisitions. Use an existing vendor or create a new one.
Ensure the vendor has a postal address, phone, fax and accout number.
4) Create a basket for this vendor. Add a few orders to the basket.
5) Close the basket and add it to a basket group of the same name.
6) Edit the basket group. Add an address in the delivery place, and a
delivery comment. Check the box to close the basket group and Save.
7) Click the button to Export as PDF.
8) View the exported PDF. Confirm all of the information displayed is
correct.
9) Reopen the basketgroup. Edit the details and remove the delivery
place text. Re-close the basketgroup.
10) Repeat steps 7 and 8.

Sponsored-by: Pymble Ladies' College
Comment 3 David Nind 2022-09-14 23:35:38 UTC
Created attachment 140644 [details] [review]
Bug 31257: Add a new English 1 page layout to export basketgroup

This patch adds a new English 1 page layout to be used when exporting a
basketgroup as PDF. This has been modelled after an example PDF from
another library system.

To test:
1) Go to Koha Administration -> Libraries. Ensure Library A has an
address, phone and fax.
2) Go to Koha Administration -> System preferences. Search for
OrderPdfFormat. Set this to the new English 1-page layout option.
3) Go to Acquisitions. Use an existing vendor or create a new one.
Ensure the vendor has a postal address, phone, fax and accout number.
4) Create a basket for this vendor. Add a few orders to the basket.
5) Close the basket and add it to a basket group of the same name.
6) Edit the basket group. Add an address in the delivery place, and a
delivery comment. Check the box to close the basket group and Save.
7) Click the button to Export as PDF.
8) View the exported PDF. Confirm all of the information displayed is
correct.
9) Reopen the basketgroup. Edit the details and remove the delivery
place text. Re-close the basketgroup.
10) Repeat steps 7 and 8.

Sponsored-by: Pymble Ladies' College

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2022-09-14 23:40:25 UTC
Created attachment 140645 [details]
Example PDF output - Document column is very narrow

I've signed off, but noted that:

1. The Document column is very narrow and the Qty column is very wide. Could this be fixed? Have attached an example.

2. I assume there is a limit on the number of lines for address fields, otherwise it displays "funny".

Also, should the WIP patch be obsoleted?
Comment 5 Aleisha Amohia 2022-10-04 03:35:17 UTC
Created attachment 141299 [details] [review]
Bug 31257: (follow-up) Fix display of PDF

This patch rearranges the Qty and Document columns and shifts the
vendor account number field lower to make room for address fields
Comment 6 Aleisha Amohia 2022-10-04 03:36:30 UTC
Thank you for your testing. I've left your signed off patch and attached a follow-up to address the two comments below.

(In reply to David Nind from comment #4)
> Created attachment 140645 [details]
> Example PDF output - Document column is very narrow
> 
> I've signed off, but noted that:
> 
> 1. The Document column is very narrow and the Qty column is very wide. Could
> this be fixed? Have attached an example.
> 

Switched these around.

> 2. I assume there is a limit on the number of lines for address fields,
> otherwise it displays "funny".

Shifted the account number field lower to make space for address fields. But yes if there are a lot of address lines then there will be overlap.

> 
> Also, should the WIP patch be obsoleted?

Yes! Have done so.

Ready for testing please
Comment 7 David Nind 2022-10-04 13:06:11 UTC
Created attachment 141304 [details] [review]
Bug 31257: Add a new English 1 page layout to export basketgroup

This patch adds a new English 1 page layout to be used when exporting a
basketgroup as PDF. This has been modelled after an example PDF from
another library system.

To test:
1) Go to Koha Administration -> Libraries. Ensure Library A has an
address, phone and fax.
2) Go to Koha Administration -> System preferences. Search for
OrderPdfFormat. Set this to the new English 1-page layout option.
3) Go to Acquisitions. Use an existing vendor or create a new one.
Ensure the vendor has a postal address, phone, fax and accout number.
4) Create a basket for this vendor. Add a few orders to the basket.
5) Close the basket and add it to a basket group of the same name.
6) Edit the basket group. Add an address in the delivery place, and a
delivery comment. Check the box to close the basket group and Save.
7) Click the button to Export as PDF.
8) View the exported PDF. Confirm all of the information displayed is
correct.
9) Reopen the basketgroup. Edit the details and remove the delivery
place text. Re-close the basketgroup.
10) Repeat steps 7 and 8.

Sponsored-by: Pymble Ladies' College

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2022-10-04 13:06:15 UTC
Created attachment 141305 [details] [review]
Bug 31257: (follow-up) Fix display of PDF

This patch rearranges the Qty and Document columns and shifts the
vendor account number field lower to make room for address fields

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 David Nind 2022-10-04 13:07:24 UTC
Thanks Aleisha for updating.

Have signed off.
Comment 10 David Nind 2022-10-04 13:09:46 UTC
Comment on attachment 140645 [details]
Example PDF output - Document column is very narrow

Obsoleted as layout now updated.
Comment 11 Katrin Fischer 2022-10-08 12:58:51 UTC
Created attachment 141551 [details] [review]
Bug 31257: Add a new English 1 page layout to export basketgroup

This patch adds a new English 1 page layout to be used when exporting a
basketgroup as PDF. This has been modelled after an example PDF from
another library system.

To test:
1) Go to Koha Administration -> Libraries. Ensure Library A has an
address, phone and fax.
2) Go to Koha Administration -> System preferences. Search for
OrderPdfFormat. Set this to the new English 1-page layout option.
3) Go to Acquisitions. Use an existing vendor or create a new one.
Ensure the vendor has a postal address, phone, fax and accout number.
4) Create a basket for this vendor. Add a few orders to the basket.
5) Close the basket and add it to a basket group of the same name.
6) Edit the basket group. Add an address in the delivery place, and a
delivery comment. Check the box to close the basket group and Save.
7) Click the button to Export as PDF.
8) View the exported PDF. Confirm all of the information displayed is
correct.
9) Reopen the basketgroup. Edit the details and remove the delivery
place text. Re-close the basketgroup.
10) Repeat steps 7 and 8.

Sponsored-by: Pymble Ladies' College

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2022-10-08 12:58:55 UTC
Created attachment 141552 [details] [review]
Bug 31257: (follow-up) Fix display of PDF

This patch rearranges the Qty and Document columns and shifts the
vendor account number field lower to make room for address fields

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2022-10-08 12:59:00 UTC
Created attachment 141553 [details] [review]
Bug 31257: (QA follow-up) Fix some typos

The QA tools highlighted some typos in the code comments that
this fixes: measurment and milimeter

Also removes a space befor colon form: Vendor note :

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Katrin Fischer 2022-10-08 13:22:28 UTC
This works and I can see how this simpler format will be helpful.

But at the same time I wish we had a better technical solution for the PDF printing. The combination of strings in .pm and .odt/.pdf makes every attempt to make these translatable pretty futile... Also no customizations of text etc. without programming :(

So I've filed bug 31723 to have a 'home' for that wish to evolve :)
Comment 15 Tomás Cohen Arazi 2022-10-11 14:21:35 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 16 Alex Buckley 2023-03-27 04:21:25 UTC
Hi all, 

We have a follow-up patch set for this enhancement on bug 33340 ready for testing!

Thanks,
Alex