Bugzilla – Attachment 14707 Details for
Bug 9280
Bad price calculation when filling a basket with staged records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Passed QA] Bug 9280: FIX price calculation adding an order from a staged file
Bug-9280-FIX-price-calculation-adding-an-order-fro.patch (text/plain), 2.21 KB, created by
Elliott Davis
on 2013-01-18 15:50:39 UTC
(
hide
)
Description:
[Passed QA] Bug 9280: FIX price calculation adding an order from a staged file
Filename:
MIME Type:
Creator:
Elliott Davis
Created:
2013-01-18 15:50:39 UTC
Size:
2.21 KB
patch
obsolete
>From feb886dd774ce1e6effd313cf7670007f34d92ed Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 13 Dec 2012 14:26:54 +0100 >Subject: [PATCH] Bug 9280: FIX price calculation adding an order from a staged file > >Test plan: >Add an order from a staged file containing a price value (010$d for >UNIMARC user). >Check this patch with 2 different vendors (listprice=1 and listprice=0). >Check the calculated price (depending discount and gstrate). > >Signed-off-by: mathieu saby <mathieu.saby@univ-rennes2.fr> >Signed-off-by: Elliott Davis <elliott@bywatersolions.com> >introduces no new bugs >--- > acqui/addorderiso2709.pl | 10 +++------- > 1 files changed, 3 insertions(+), 7 deletions(-) > >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index 4942571..0e0670f 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -189,7 +189,7 @@ if ($op eq ""){ > SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' ); > } > # 3rd add order >- my $patron = C4::Members->GetMember( borrowernumber => $loggedinuser ); >+ my $patron = C4::Members::GetMember( borrowernumber => $loggedinuser ); > my $branch = C4::Branch->GetBranchDetail( $patron->{branchcode} ); > # get quantity in the MARC record (1 if none) > my $quantity = GetMarcQuantity($marcrecord, C4::Context->preference('marcflavour')) || 1; >@@ -222,12 +222,8 @@ if ($op eq ""){ > my $basket = GetBasket( $orderinfo{basketno} ); > my $bookseller = GetBookSellerFromId( $basket->{booksellerid} ); > $orderinfo{gstrate} = $bookseller->{gstrate}; >- if ( $bookseller->{listincgst} ) { >- $orderinfo{ecost} = $price; >- } else { >- $orderinfo{ecost} = $price * ( 1 + $orderinfo{gstrate} ); >- } >- $orderinfo{rrp} = ( $orderinfo{ecost} * 100 ) / ( 100 - $bookseller->{discount} ); >+ $orderinfo{rrp} = $price; >+ $orderinfo{ecost} = $orderinfo{rrp} * ( 1 - $bookseller->{discount} / 100 ); > $orderinfo{listprice} = $orderinfo{rrp}; > $orderinfo{unitprice} = $orderinfo{ecost}; > $orderinfo{total} = $orderinfo{ecost}; >-- >1.7.2.5
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 9280
:
14071
|
14074
|
14079
|
14084
| 14707