Bug 18639: Add replacementprice field to aqorders
authorNick Clemens <nick@bywatersolutions.com>
Fri, 29 Dec 2017 16:14:07 +0000 (16:14 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 31 Aug 2018 12:46:12 +0000 (12:46 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
installer/data/mysql/atomicupdate/bug_18639_add_replacementprice_field_to_aqorders.perl [new file with mode: 0644]
installer/data/mysql/kohastructure.sql

diff --git a/installer/data/mysql/atomicupdate/bug_18639_add_replacementprice_field_to_aqorders.perl b/installer/data/mysql/atomicupdate/bug_18639_add_replacementprice_field_to_aqorders.perl
new file mode 100644 (file)
index 0000000..004d6ab
--- /dev/null
@@ -0,0 +1,6 @@
+$DBversion = 'XXX';  # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+    $dbh->do( "ALTER TABLE  aqorders ADD COLUMN replacementprice DECIMAL(28,6)" );
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 18639 - Add replacementprice field to aqorders table)\n";
+}
index 45fd117..8868ca0 100644 (file)
@@ -3172,7 +3172,8 @@ CREATE TABLE `aqorders` ( -- information related to the basket line items
   `purchaseordernumber` LONGTEXT, -- not used? always NULL
   `basketno` int(11) default NULL, -- links this order line to a specific basket (aqbasket.basketno)
   `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this order line was last modified
-  `rrp` decimal(13,2) DEFAULT NULL, -- the replacement cost for this line item
+  `rrp` decimal(13,2) DEFAULT NULL, -- the retail cost for this line item
+  `replacementprice` decimal(28,6) DEFAULT NULL, -- the replacement cost for this line item
   `rrp_tax_excluded` decimal(28,6) default NULL, -- the replacement cost excluding tax
   `rrp_tax_included` decimal(28,6) default NULL, -- the replacement cost including tax
   `ecost` decimal(13,2) DEFAULT NULL, -- the replacement cost for this line item