Bugzilla – Attachment 67822 Details for
Bug 19296
Tax is being subtracted from orders when vendor price does not include gst and ordering from a file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19296 - Allow all tax processing to happen in C4::Acquisition::populate_order_with_prices
Bug-19296---Allow-all-tax-processing-to-happen-in-.patch (text/plain), 4.17 KB, created by
Katrin Fischer
on 2017-10-08 13:29:41 UTC
(
hide
)
Description:
Bug 19296 - Allow all tax processing to happen in C4::Acquisition::populate_order_with_prices
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2017-10-08 13:29:41 UTC
Size:
4.17 KB
patch
obsolete
>From b8851ff5615eb66551b25bea337f1c195638054b Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 12 Sep 2017 16:57:47 +0000 >Subject: [PATCH] Bug 19296 - Allow all tax processing to happen in > C4::Acquisition::populate_order_with_prices > >To test: > 1 - Create an order file that includes prices and items >(MarcFieldsToOrder) > 2 - Stage the file > 3 - Set vendor to 'prices exclude tax' > 4 - Open a basket and add from the file > 5 - View the items in the basket > 6 - Prices are reduced by the tax rate and tax is calculated to return >prices to the value in the file > 7 - Apply patch > 8 - Repeat steps 1-6 > 9 - Prices should now calculate correctly >10 - Repeat with 'MarcItemFieldsToOrder' > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > acqui/addorderiso2709.pl | 40 ++++++++++------------------------------ > 1 file changed, 10 insertions(+), 30 deletions(-) > >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index 1aeaf3c..e45be78 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -267,22 +267,12 @@ if ($op eq ""){ > $orderinfo{tax_rate} = $bookseller->tax_rate; > my $c = $c_discount ? $c_discount : $bookseller->discount / 100; > $orderinfo{discount} = $c; >- if ( $bookseller->listincgst ) { >- if ( $c_discount ) { >- $orderinfo{ecost} = $price; >- $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c ); >- } else { >- $orderinfo{ecost} = $price * ( 1 - $c ); >- $orderinfo{rrp} = $price; >- } >+ if ( $c_discount ) { >+ $orderinfo{ecost} = $price; >+ $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c ); > } else { >- if ( $c_discount ) { >- $orderinfo{ecost} = $price / ( 1 + $orderinfo{tax_rate} ); >- $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c ); >- } else { >- $orderinfo{rrp} = $price / ( 1 + $orderinfo{tax_rate} ); >- $orderinfo{ecost} = $orderinfo{rrp} * ( 1 - $c ); >- } >+ $orderinfo{ecost} = $price * ( 1 - $c ); >+ $orderinfo{rrp} = $price; > } > $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate; > $orderinfo{unitprice} = $orderinfo{ecost}; >@@ -337,22 +327,12 @@ if ($op eq ""){ > $orderinfo{tax_rate} = $bookseller->tax_rate; > my $c = $c_discount ? $c_discount : $bookseller->discount / 100; > $orderinfo{discount} = $c; >- if ( $bookseller->listincgst ) { >- if ( $c_discount ) { >- $orderinfo{ecost} = $price; >- $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c ); >- } else { >- $orderinfo{ecost} = $price * ( 1 - $c ); >- $orderinfo{rrp} = $price; >- } >+ if ( $c_discount ) { >+ $orderinfo{ecost} = $price; >+ $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c ); > } else { >- if ( $c_discount ) { >- $orderinfo{ecost} = $price / ( 1 + $orderinfo{tax_rate} ); >- $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c ); >- } else { >- $orderinfo{rrp} = $price / ( 1 + $orderinfo{tax_rate} ); >- $orderinfo{ecost} = $orderinfo{rrp} * ( 1 - $c ); >- } >+ $orderinfo{ecost} = $price * ( 1 - $c ); >+ $orderinfo{rrp} = $price; > } > $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate; > $orderinfo{unitprice} = $orderinfo{ecost}; >-- >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 19296
:
67110
|
67822
|
68045
|
68046