Bugzilla – Attachment 146826 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: Update existing orders in DB
Bug-25655-Update-existing-orders-in-DB.patch (text/plain), 1.85 KB, created by
Katrin Fischer
on 2023-02-17 10:41:29 UTC
(
hide
)
Description:
Bug 25655: Update existing orders in DB
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-02-17 10:41:29 UTC
Size:
1.85 KB
patch
obsolete
>From 69688e27bb989685fc6ecca6204df2ef72b12f5a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 15 Feb 2023 09:01:54 +0100 >Subject: [PATCH] Bug 25655: Update existing orders in DB > >Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > installer/data/mysql/atomicupdate/bug_25655.pl | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > >diff --git a/installer/data/mysql/atomicupdate/bug_25655.pl b/installer/data/mysql/atomicupdate/bug_25655.pl >index 01be1a1ee2..e8f0d2f729 100755 >--- a/installer/data/mysql/atomicupdate/bug_25655.pl >+++ b/installer/data/mysql/atomicupdate/bug_25655.pl >@@ -11,6 +11,10 @@ return { > ALTER TABLE aqorders > ADD COLUMN invoice_unitprice decimal(28,6) DEFAULT NULL COMMENT 'the unit price in foreign currency' AFTER estimated_delivery_date > }); >+ $dbh->do(q{ >+ UPDATE aqorders >+ SET invoice_unitprice=unitprice >+ }); > } > say $out "Added column 'aqorders.invoice_unitprice'"; > >@@ -20,6 +24,15 @@ return { > ADD COLUMN invoice_currency varchar(10) DEFAULT NULL COMMENT 'the currency of the invoice_unitprice' AFTER invoice_unitprice, > ADD CONSTRAINT `aqorders_invoice_currency` FOREIGN KEY (`invoice_currency`) REFERENCES `currency` (`currency`) ON DELETE SET NULL ON UPDATE SET NULL > }); >+ my ( $active_currency ) = $dbh->selectrow_array(q{ >+ SELECT currency >+ FROM currency >+ WHERE active = 1 >+ }); >+ $dbh->do(q{ >+ UPDATE aqorders >+ SET invoice_currency = ? >+ }, undef, $active_currency); > } > say $out "Added column 'aqorders.invoice_currency'"; > }, >-- >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