Bugzilla – Attachment 146822 Details for
Bug 25655
Additionally store actual cost in foreign currency and currency from the invoice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25655: Save values from ModOrderReceive
Bug-25655-Save-values-from-ModOrderReceive.patch (text/plain), 2.93 KB, created by
Katrin Fischer
on 2023-02-17 10:41:18 UTC
(
hide
)
Description:
Bug 25655: Save values from ModOrderReceive
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-02-17 10:41:18 UTC
Size:
2.93 KB
patch
obsolete
>From e421131f691a724fa807e3dbf2ce3265b4b7ed9d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 16 Jan 2023 22:37:09 +0100 >Subject: [PATCH] Bug 25655: Save values from ModOrderReceive > >Sponsored-by: The Research University in the Helmholtz Association (KIT) >Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > C4/Acquisition.pm | 36 +++++++++++++++++++++++++----------- > 1 file changed, 25 insertions(+), 11 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 12178420bf..844dc63171 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -1415,23 +1415,29 @@ sub ModReceiveOrder { > $order->{ordernumber} > ); > >- if ( not $order->{subscriptionid} && defined $order->{order_internalnote} ) { >- $dbh->do( >- q|UPDATE aqorders >- SET order_internalnote = ? >- WHERE ordernumber = ?|, {}, >- $order->{order_internalnote}, $order->{ordernumber} >- ); >- } >- > # Recalculate tax_value >- $dbh->do(q| >+ $query = q| > UPDATE aqorders > SET > tax_value_on_ordering = quantity * | . get_rounding_sql(q|ecost_tax_excluded|) . q| * tax_rate_on_ordering, > tax_value_on_receiving = quantity * | . get_rounding_sql(q|unitprice_tax_excluded|) . q| * tax_rate_on_receiving >+ |; >+ >+ my @params; >+ if ( not $order->{subscriptionid} && defined $order->{order_internalnote} ) >+ { >+ $query .= q|, order_internalnote = ?|; >+ push @params, $order->{order_internalnote}; >+ } >+ if ( defined $order->{invoice_unitprice} ) { >+ $query .= q|, invoice_unitprice = ?, invoice_currency = ?|; >+ push @params, $order->{invoice_unitprice}, $order->{invoice_currency}; >+ } >+ $query .= q| > WHERE ordernumber = ? >- |, undef, $order->{ordernumber}); >+ |; >+ >+ $dbh->do($query, undef, @params, $order->{ordernumber}); > > delete $order->{ordernumber}; > $order->{budget_id} = ( $budget_id || $order->{budget_id} ); >@@ -1483,6 +1489,10 @@ sub ModReceiveOrder { > , order_internalnote = ? > | if defined $order->{order_internalnote}; > >+ $query .= q| >+ , invoice_unitprice = ?, invoice_currency = ? >+ | if defined $order->{invoice_unitprice}; >+ > $query .= q| where biblionumber=? and ordernumber=?|; > > my $sth = $dbh->prepare( $query ); >@@ -1508,6 +1518,10 @@ sub ModReceiveOrder { > push @params, $order->{order_internalnote}; > } > >+ if ( defined $order->{invoice_unitprice} ) { >+ push @params, $order->{invoice_unitprice}, $order->{invoice_currency}; >+ } >+ > push @params, ( $biblionumber, $order->{ordernumber} ); > > $sth->execute( @params ); >-- >2.30.2
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 25655
:
144618
|
145906
|
145907
|
145908
|
145909
|
145910
|
145911
|
145912
|
146082
|
146084
|
146085
|
146086
|
146087
|
146088
|
146089
|
146478
|
146479
|
146480
|
146481
|
146482
|
146483
|
146484
|
146658
|
146660
|
146818
|
146819
|
146820
|
146821
| 146822 |
146823
|
146824
|
146825
|
146826