Summary: | Shipping costs are inconsistent in where displayed | ||
---|---|---|---|
Product: | Koha | Reporter: | Kelly McElligott <kelly> |
Component: | Acquisitions | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrewfh, fridolin.somers, jonathan.druart, katrin.fischer, nick, severine.queune, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
With this patch the shipping costs added to an invoice are always counted as "spent". With this change the totals on the start page of the acquisition module will match the totals on the ordered and spent pages for a fund.
|
Version(s) released in: |
21.05.00,20.11.06,20.05.12
|
Attachments: |
Bug 23195: Unit tests
Bug 23195: Always count shipping costs as 'spent' Bug 23195: Unit tests Bug 23195: Always count shipping costs as 'spent' Bug 23195: Unit tests Bug 23195: Always count shipping costs as 'spent' Bug 23195: (follow-up) One text invoice should be open |
Description
Kelly McElligott
2019-06-24 16:22:24 UTC
Created attachment 119466 [details] [review] Bug 23195: Unit tests Created attachment 119467 [details] [review] Bug 23195: Always count shipping costs as 'spent' As shipping costs are created when an invoice is created, and creation of an invoice implies that items have been received, the shipment costs are always assumed to be 'spent' This logic is true in GetBudgetSpent/GetBudgetOrdered, however, GetBudgetHierarchy treats open invoices shipping costs as 'ordered' and closed invoice shipping costs as 'spent' This leads to inconsistencies in acqui-home vs spent.pl and ordered.pl To test: 1 - Find a vendor 2 - Click 'Receive shipments' 3 - Create a new invoice with a shipping cost on budget A 4 - Repeate and create a new invoice with a shipping cost on budget B 5 - Close the second invoice 6 - View acquisitions ome 7 - Note budget A includes the shipping under ordered 8 - Note budget B includes the shipping under spent 9 - Click the 'ordered' column on budget A - no shipping is listed on ordered page 10 - Click the spent column on budget A - the shipping is listed here 11 - Apply patch 12 - Both budgets list the shipping as 'spent' 13 - Both 'spent' pages include the shipping 14 - Neither 'ordered' page includes shipping Created attachment 119542 [details] [review] Bug 23195: Unit tests Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Created attachment 119543 [details] [review] Bug 23195: Always count shipping costs as 'spent' As shipping costs are created when an invoice is created, and creation of an invoice implies that items have been received, the shipment costs are always assumed to be 'spent' This logic is true in GetBudgetSpent/GetBudgetOrdered, however, GetBudgetHierarchy treats open invoices shipping costs as 'ordered' and closed invoice shipping costs as 'spent' This leads to inconsistencies in acqui-home vs spent.pl and ordered.pl To test: 1 - Find a vendor 2 - Click 'Receive shipments' 3 - Create a new invoice with a shipping cost on budget A 4 - Repeate and create a new invoice with a shipping cost on budget B 5 - Close the second invoice 6 - View acquisitions ome 7 - Note budget A includes the shipping under ordered 8 - Note budget B includes the shipping under spent 9 - Click the 'ordered' column on budget A - no shipping is listed on ordered page 10 - Click the spent column on budget A - the shipping is listed here 11 - Apply patch 12 - Both budgets list the shipping as 'spent' 13 - Both 'spent' pages include the shipping 14 - Neither 'ordered' page includes shipping Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> I never noticed that problem, very nice catch ! Thanks Nick for the good fix ! Pondering this: If I am reading this correctly, than shipping costs will always seen as "spent" immediately, independent of the invoice status. ... and after testing I realize that this is exactly how the costs from the order lines work as well. So this really makes sense. We had to "hunt" down for shipping costs on non-closed invoices in the past, as they remained as 'encumbered' when the budget was closed. So quite happy about this change. Created attachment 119797 [details] [review] Bug 23195: Unit tests Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 119798 [details] [review] Bug 23195: Always count shipping costs as 'spent' As shipping costs are created when an invoice is created, and creation of an invoice implies that items have been received, the shipment costs are always assumed to be 'spent' This logic is true in GetBudgetSpent/GetBudgetOrdered, however, GetBudgetHierarchy treats open invoices shipping costs as 'ordered' and closed invoice shipping costs as 'spent' This leads to inconsistencies in acqui-home vs spent.pl and ordered.pl To test: 1 - Find a vendor 2 - Click 'Receive shipments' 3 - Create a new invoice with a shipping cost on budget A 4 - Repeate and create a new invoice with a shipping cost on budget B 5 - Close the second invoice 6 - View acquisitions ome 7 - Note budget A includes the shipping under ordered 8 - Note budget B includes the shipping under spent 9 - Click the 'ordered' column on budget A - no shipping is listed on ordered page 10 - Click the spent column on budget A - the shipping is listed here 11 - Apply patch 12 - Both budgets list the shipping as 'spent' 13 - Both 'spent' pages include the shipping 14 - Neither 'ordered' page includes shipping Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> The tests are passing without the patch. Created attachment 119941 [details] [review] Bug 23195: (follow-up) One text invoice should be open Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.06 Pushed to 20.05.x for 20.05.12 Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. |