Bugzilla – Attachment 48868 Details for
Bug 13321
Fix tax and prices calculation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13321: use the populate_with_prices where needed
Bug-13321-use-the-populatewithprices-where-needed.patch (text/plain), 2.82 KB, created by
Julian Maurice
on 2016-03-09 14:50:01 UTC
(
hide
)
Description:
Bug 13321: use the populate_with_prices where needed
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2016-03-09 14:50:01 UTC
Size:
2.82 KB
patch
obsolete
>From 316db0b7b7fa817071199bf00a7ba7a8ce813e4b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 14 Nov 2014 16:44:27 +0100 >Subject: [PATCH] Bug 13321: use the populate_with_prices where needed > >Now we need to calculate the prices (ecost, rrp, unitprice) and tax >(tax_rate, tax_value) when the price is set for an order. > >This only appends in the 3 files impacted by this patch. >addorder*.pl on ordering >finishreceive.pl on receiving > >Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> > >Signed-off-by: Francois Charbonnier <francois.charbonnier@inlibro.com> > >Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr> >--- > acqui/addorder.pl | 8 ++++++++ > acqui/addorderiso2709.pl | 12 ++++++++++++ > acqui/finishreceive.pl | 8 ++++++++ > 3 files changed, 28 insertions(+) > >diff --git a/acqui/addorder.pl b/acqui/addorder.pl >index e5480ef..b96030a 100755 >--- a/acqui/addorder.pl >+++ b/acqui/addorder.pl >@@ -264,6 +264,14 @@ if ( $orderinfo->{quantity} ne '0' ) { > > $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq ''; > >+ $orderinfo = C4::Acquisition::populate_order_with_prices( >+ { >+ order => $orderinfo, >+ booksellerid => $orderinfo->{booksellerid}, >+ ordering => 1, >+ } >+ ); >+ > # if we already have $ordernumber, then it's an ordermodif > my $order = Koha::Acquisition::Order->new($orderinfo); > if ( $orderinfo->{ordernumber} ) { >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index a659797..6634ca4 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -233,6 +233,18 @@ if ($op eq ""){ > > # remove uncertainprice flag if we have found a price in the MARC record > $orderinfo{uncertainprice} = 0 if $orderinfo{listprice}; >+ >+ %orderinfo = %{ >+ C4::Acquisition::populate_order_with_prices( >+ { >+ order => \%orderinfo, >+ booksellerid => $booksellerid, >+ ordering => 1, >+ receiving => 1, >+ } >+ ) >+ }; >+ > my $order = Koha::Acquisition::Order->new( \%orderinfo )->insert; > > # 4th, add items if applicable >diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl >index b35212c..5baf7db 100755 >--- a/acqui/finishreceive.pl >+++ b/acqui/finishreceive.pl >@@ -103,6 +103,14 @@ if ($quantityrec > $origquantityrec ) { > } > } > >+ $order = C4::Acquisition::populate_order_with_prices( >+ { >+ order => $order, >+ booksellerid => $booksellerid, >+ receiving => 1 >+ } >+ ); >+ > # save the quantity received. > if ( $quantityrec > 0 ) { > ( $datereceived, $new_ordernumber ) = ModReceiveOrder( >-- >1.9.1
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 13321
:
33789
|
33790
|
33791
|
33792
|
33793
|
34432
|
35152
|
35165
|
47489
|
47490
|
47491
|
47492
|
47493
|
47494
|
48867
|
48868
|
48869
|
48870
|
48871
|
48872
|
51080
|
51081
|
51082
|
51083
|
51084
|
51085
|
51643
|
51644
|
51645
|
51646
|
51647
|
51648
|
51649
|
52046
|
55168
|
55415
|
55416
|
55417
|
55418
|
55419
|
55420
|
55421
|
55422
|
55423
|
55427
|
56408
|
56422
|
56423
|
56424
|
56425
|
56426
|
56427
|
56428
|
56429
|
56430
|
56431
|
56432
|
56898
|
56899
|
56900
|
56901
|
56902
|
56903
|
56904
|
56905
|
56906
|
56907
|
56908
|
56909
|
56930
|
56959