Bugzilla – Attachment 56436 Details for
Bug 13323
Change the tax rate on receiving
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13323: Recalculate tax_value for partially received orders
Bug-13323-Recalculate-taxvalue-for-partially-recei.patch (text/plain), 2.52 KB, created by
Koha Team University Lyon 3
on 2016-10-13 15:47:56 UTC
(
hide
)
Description:
Bug 13323: Recalculate tax_value for partially received orders
Filename:
MIME Type:
Creator:
Koha Team University Lyon 3
Created:
2016-10-13 15:47:56 UTC
Size:
2.52 KB
patch
obsolete
>From 0638e30cf71bd27d53b83d818a9f3143766c827f Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 13 Oct 2016 14:48:38 +0200 >Subject: [PATCH] Bug 13323: Recalculate tax_value for partially received > orders > >Test plan: >1. Create an order with at least 2 items >2. Receive only 1 item >3. Check that the tax value of the received order line is correct on > the parcel and invoice pages >4. Check that the tax value of the original order line is correct (on > the basket page for example) >5. Cancel the receipt >6. Check that the tax value of the original order line is correct > >Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr> >--- > C4/Acquisition.pm | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 2201028..5e63ed5 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -1403,7 +1403,9 @@ sub ModReceiveOrder { > # Recalculate tax_value > $dbh->do(q| > UPDATE aqorders >- SET tax_value = quantity * ecost_tax_excluded * tax_rate >+ SET >+ tax_value_on_ordering = quantity * ecost_tax_excluded * tax_rate_on_ordering, >+ tax_value_on_receiving = quantity * unitprice_tax_excluded * tax_rate_on_receiving > WHERE ordernumber = ? > |, undef, $order->{ordernumber}); > >@@ -1411,7 +1413,8 @@ sub ModReceiveOrder { > $order->{budget_id} = ( $budget_id || $order->{budget_id} ); > $order->{quantity} = $quantrec; > $order->{quantityreceived} = $quantrec; >- $order->{tax_value} = $order->{quantity} * $order->{unitprice_tax_excluded} * $order->{tax_rate}; >+ $order->{tax_value_on_ordering} = $order->{quantity} * $order->{ecost_tax_excluded} * $order->{tax_rate_on_ordering}; >+ $order->{tax_value_on_receiving} = $order->{quantity} * $order->{unitprice_tax_excluded} * $order->{tax_rate_on_receiving}; > $order->{datereceived} = $datereceived; > $order->{invoiceid} = $invoice->{invoiceid}; > $order->{orderstatus} = 'complete'; >@@ -1571,7 +1574,9 @@ sub CancelReceipt { > # Recalculate tax_value > $dbh->do(q| > UPDATE aqorders >- SET tax_value = quantity * ecost_tax_excluded * tax_rate >+ SET >+ tax_value_on_ordering = quantity * ecost_tax_excluded * tax_rate_on_ordering, >+ tax_value_on_receiving = quantity * unitprice_tax_excluded * tax_rate_on_receiving > WHERE ordernumber = ? > |, undef, $parent_ordernumber); > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13323
:
33869
|
33870
|
33871
|
47495
|
47496
|
47499
|
48874
|
48875
|
48876
|
51982
|
51983
|
51984
|
56096
|
56097
|
56098
|
56387
|
56433
|
56434
|
56435
|
56436
|
56894
|
56895
|
56896
|
56897