Bugzilla – Attachment 128127 Details for
Bug 29607
addorderiso2709: The stored discount when importing an order from a file is invalid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for the bug 29607
patch_29607.patch (text/plain), 2.84 KB, created by
Christophe TORIN
on 2021-12-01 13:51:23 UTC
(
hide
)
Description:
Patch for the bug 29607
Filename:
MIME Type:
Creator:
Christophe TORIN
Created:
2021-12-01 13:51:23 UTC
Size:
2.84 KB
patch
obsolete
>diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index 63cfb2afee..4e4ae7d2de 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -163,7 +163,6 @@ if ($op eq ""){ > my $c_quantity = shift( @quantities ) || GetMarcQuantity($marcrecord, C4::Context->preference('marcflavour') ) || 1; > my $c_budget_id = shift( @budgets_id ) || $input->param('all_budget_id') || $budget_id; > my $c_discount = shift ( @discount); >- $c_discount = $c_discount / 100 if $c_discount > 1; > my $c_sort1 = shift( @sort1 ) || $input->param('all_sort1') || ''; > my $c_sort2 = shift( @sort2 ) || $input->param('all_sort2') || ''; > my $c_replacement_price = shift( @orderreplacementprices ); >@@ -276,13 +275,13 @@ if ($op eq ""){ > $price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR"; > $price = Koha::Number::Price->new($price)->unformat; > $orderinfo{tax_rate} = $bookseller->tax_rate; >- my $c = $c_discount ? $c_discount : $bookseller->discount / 100; >+ my $c = $c_discount ? $c_discount : $bookseller->discount; > $orderinfo{discount} = $c; > if ( $c_discount ) { > $orderinfo{ecost} = $price; >- $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c ); >+ $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c / 100 ); > } else { >- $orderinfo{ecost} = $price * ( 1 - $c ); >+ $orderinfo{ecost} = $price * ( 1 - $c / 100 ); > $orderinfo{rrp} = $price; > } > $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate; >@@ -337,13 +336,13 @@ if ($op eq ""){ > $c_price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR"; > $c_price = Koha::Number::Price->new($c_price)->unformat; > $orderinfo{tax_rate} = $bookseller->tax_rate; >- my $c = $c_discount ? $c_discount : $bookseller->discount / 100; >+ my $c = $c_discount ? $c_discount : $bookseller->discount; > $orderinfo{discount} = $c; > if ( $c_discount ) { > $orderinfo{ecost} = $c_price; >- $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c ); >+ $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c / 100 ); > } else { >- $orderinfo{ecost} = $c_price * ( 1 - $c ); >+ $orderinfo{ecost} = $c_price * ( 1 - $c / 100 ); > $orderinfo{rrp} = $c_price; > } > $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate;
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 29607
:
128127
|
135538
|
135561
|
135728