Bugzilla – Attachment 146478 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: DB changes
Bug-25655-DB-changes.patch (text/plain), 3.75 KB, created by
Jonathan Druart
on 2023-02-10 14:51:46 UTC
(
hide
)
Description:
Bug 25655: DB changes
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-02-10 14:51:46 UTC
Size:
3.75 KB
patch
obsolete
>From 2e7cef0f20faf60361ae9b28a278532ba8bcee72 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 16 Jan 2023 21:09:05 +0100 >Subject: [PATCH] Bug 25655: DB changes > >Sponsored-by: The Research University in the Helmholtz Association (KIT) >Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> >--- > .../data/mysql/atomicupdate/bug_25655.pl | 26 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 3 +++ > 2 files changed, 29 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_25655.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_25655.pl b/installer/data/mysql/atomicupdate/bug_25655.pl >new file mode 100755 >index 00000000000..01be1a1ee21 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_25655.pl >@@ -0,0 +1,26 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "25655", >+ description => "Store actual cost in foreign currency and currency from the invoices", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ unless ( column_exists('aqorders', 'invoice_unitprice') ) { >+ $dbh->do(q{ >+ ALTER TABLE aqorders >+ ADD COLUMN invoice_unitprice decimal(28,6) DEFAULT NULL COMMENT 'the unit price in foreign currency' AFTER estimated_delivery_date >+ }); >+ } >+ say $out "Added column 'aqorders.invoice_unitprice'"; >+ >+ unless ( column_exists('aqorders', 'invoice_currency') ) { >+ $dbh->do(q{ >+ ALTER TABLE aqorders >+ 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 >+ }); >+ } >+ say $out "Added column 'aqorders.invoice_currency'"; >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index df66cee1750..6b2c6adbe6a 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -690,6 +690,8 @@ CREATE TABLE `aqorders` ( > `suppliers_reference_qualifier` varchar(3) DEFAULT NULL COMMENT 'Type of number above usually ''QLI''', > `suppliers_report` mediumtext DEFAULT NULL COMMENT 'reports received from suppliers', > `estimated_delivery_date` date DEFAULT NULL COMMENT 'Estimated delivery date', >+ `invoice_unitprice` decimal(28,6) DEFAULT NULL COMMENT 'the unit price in foreign currency', >+ `invoice_currency` varchar(10) DEFAULT NULL COMMENT 'the currency of the invoice_unitprice', > PRIMARY KEY (`ordernumber`), > KEY `basketno` (`basketno`), > KEY `biblionumber` (`biblionumber`), >@@ -703,6 +705,7 @@ CREATE TABLE `aqorders` ( > CONSTRAINT `aqorders_budget_id_fk` FOREIGN KEY (`budget_id`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `aqorders_created_by` FOREIGN KEY (`created_by`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, > CONSTRAINT `aqorders_currency` FOREIGN KEY (`currency`) REFERENCES `currency` (`currency`) ON DELETE SET NULL ON UPDATE SET NULL, >+ CONSTRAINT `aqorders_invoice_currency` FOREIGN KEY (`invoice_currency`) REFERENCES `currency` (`currency`) ON DELETE SET NULL ON UPDATE SET NULL, > CONSTRAINT `aqorders_ibfk_1` FOREIGN KEY (`basketno`) REFERENCES `aqbasket` (`basketno`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `aqorders_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE, > CONSTRAINT `aqorders_ibfk_3` FOREIGN KEY (`invoiceid`) REFERENCES `aqinvoices` (`invoiceid`) ON DELETE SET NULL ON UPDATE CASCADE, >-- >2.25.1
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