Summary: | Values are false in the generated pdf for basketgroups | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Acquisitions | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Katrin Fischer <katrin.fischer> |
Severity: | normal | ||
Priority: | P5 - low | CC: | mathsabypro |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Medium patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 5335 | ||
Bug Blocks: | |||
Attachments: |
Bug 9506: FIX GST values for the basketgroup print action
[SIGNED OFF] Bug 9506: FIX GST values for the basketgroup print action screenshot Bug 9506: FIX gst list values for each basket [PASSED QA] Bug 9506: FIX GST values for the basketgroup print action [PASSED QA] Bug 9506: FIX gst list values for each basket |
Description
Jonathan Druart
2013-01-30 11:35:44 UTC
Created attachment 14944 [details] [review] Bug 9506: FIX GST values for the basketgroup print action Due to the multi VAT development (Bug 5335), values are not well calculated in the pdf generated by the basketgroup print action. Test plan: - Add one or more basket to a basketgroup. - Close and print this basketgroup - Check that different values correspond to values in the basket detail page. Don't forget to test with different parameters (multiple vat, vendor include/don't include tax). Good work Jonathan ;-) I sign off. I like the replacement of the array by a hash too. It will be easier to edit basketgroup pdf templates! Maybe "Discount amount" would be better than "Discount price"? But I am not fluent in english... and it could be fixed latter. Details of my tests ; BEFORE applying the patch : I create a bookseller NOYES with : - List item price includes tax: No - Invoice item price includes tax: Yes - tax rate : 5.5 - discount : 9% I create a basket with : - a book costing 100 euros (vendor price) - a book costing 50 euros (vendor price), in 2 items I check basket.pl : all is correct : for the book costing 100 euros : - RP tax exc. : 100 - ecost tax exc : 91 - RP tax inc : 105.5 - ecost tax incl : 96 and half these values for the book costing 50 euros total correct (on discounted prices) - Total tax exc. (EUR) 182.00 - Total tax inc. (EUR) 192.00 - GST (EUR) 10.00 I close the basket, create a basketgroup, and print the basketgroup with layout3pages => WRONG prices 1st page : RRT GST Inc. : 200 Discount Price : 182 Total GST exc : 172,51 GST : 9,49 Total GST Inc. : 182 2d page, for the book costing 100 euros : RRT GST Inc : 100 Discount price GST Exc. : 86,26 Total GST Inc. : 91 AFTER applying the patch : I print again the same basketgroup with layout3pages => RIGHT prices 1st page : Total RRP tax exc : 200 Total RRP tax incl: 211 GST : 10 Total discount : 18 Total Tax exc : 182 Total Tax incl : 192 2d page, for the book costing 100 euros tax exc : RRP tax exc : 100 RRP tax inc : 105.5 Discount price : 9 Total tax exc. : 91 Total tax incl : 96 For the 2 items of the book costing 50 euros, everything is correct too. (Total tax exc. : 91 ; Total tax incl : 96) Same test with a 2d bookseller YESYES with : - List item price includes tax: Yes - Invoice item price includes tax: Yes => everything is OK after patch is applied : 2 items of a book with vendor price = 105,50 EUR tax inc : I print the basketgroup with layout3pages 1st page : Total RRP tax exc : 200 Total RRP tax incl: 211 GST : 10 Total discount : 18 Total Tax exc : 182 Total Tax incl : 192 2d page, for the book costing 105,5 euros tax inc : Qty : 2 RRP tax exc : 100 RRP tax inc : 105.5 Discount price : 9 Total tax exc. : 182 Total tax incl : 192 M. Saby Rennes 2 university Created attachment 15041 [details] [review] [SIGNED OFF] Bug 9506: FIX GST values for the basketgroup print action Due to the multi VAT development (Bug 5335), values are not well calculated in the pdf generated by the basketgroup print action. Test plan: - Add one or more basket to a basketgroup. - Close and print this basketgroup - Check that different values correspond to values in the basket detail page. Don't forget to test with different parameters (multiple vat, vendor include/don't include tax). Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr> Created attachment 16586 [details]
screenshot
The calculation looks alright to me, but there is a little problem when using pdfformat::layout3pages as PDF layout. On the second page that shows the baskets in the basket group there is a column "gst rate". It currently always shows a list with the gst rate for every order line of the first basket (see screenshot).
2 Problems here:
- First baskets gst rates are shown for all baskets
- The list of gst rates is not deduplicated - it's one entry for each order line. Maybe we should just say "Multiple" or something if there is more than one? Or maybe remove the columns altogether and just keep the sum in the next column?
Created attachment 16620 [details] [review] Bug 9506: FIX gst list values for each basket (In reply to comment #4) > 2 Problems here: > - First baskets gst rates are shown for all baskets Fixed, bad placed variable. > - The list of gst rates is not deduplicated - it's one entry for each order > line. Maybe we should just say "Multiple" or something if there is more than > one? Or maybe remove the columns altogether and just keep the sum in the > next column? Really strange behavior, appears just for 0 value. Now it is fixed. Created attachment 16705 [details] [review] [PASSED QA] Bug 9506: FIX GST values for the basketgroup print action Due to the multi VAT development (Bug 5335), values are not well calculated in the pdf generated by the basketgroup print action. Test plan: - Add one or more basket to a basketgroup. - Close and print this basketgroup - Check that different values correspond to values in the basket detail page. Don't forget to test with different parameters (multiple vat, vendor include/don't include tax). Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Created attachment 16706 [details] [review] [PASSED QA] Bug 9506: FIX gst list values for each basket Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Problems raised by QA for the basket list page in the 3 pages layout (pdfformat::layout3pages) fixed. GST column on the summary page now gives a list of all used GST rates for each individual basket. All tests and QA script pass. This patch has been pushed to master. |