Bugzilla – Attachment 56423 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.89 KB, created by
Koha Team University Lyon 3
on 2016-10-13 15:40:58 UTC
(
hide
)
Description:
Bug 13321: use the populate_with_prices where needed
Filename:
MIME Type:
Creator:
Koha Team University Lyon 3
Created:
2016-10-13 15:40:58 UTC
Size:
2.89 KB
patch
obsolete
>From d1957ab3747df7065e0cf954237f8b031bbdce71 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> >Signed-off-by: Sonia Bouis <koha@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 5223b7f..1a37438 100755 >--- a/acqui/addorder.pl >+++ b/acqui/addorder.pl >@@ -268,6 +268,14 @@ if ( $basket->{is_standing} || $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 e425051..9a7739c 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 0a62887..53a7412 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( >-- >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 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