]> git.koha-community.org Git - koha.git/commit
Bug 23195: Always count shipping costs as 'spent'
authorNick Clemens <nick@bywatersolutions.com>
Mon, 12 Apr 2021 18:13:47 +0000 (18:13 +0000)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Mon, 24 May 2021 16:44:16 +0000 (16:44 +0000)
commit34b27193154fca658e8badd18ddf6f7e82011448
tree6b1ca2f7b0ee4715a3441784b1c53682b5591fee
parent5100f3b92add6a94253727d78ad007e930dd8e15
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 83941d2ee18c4c94485b0feea510d5899c1ee050)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit abbdf0323373a1cbb45ae2671defaafe9cc308e2)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
C4/Budgets.pm