Bugzilla – Attachment 35996 Details for
Bug 11062
Invoice's shipment/shipping cost should be included PRE-gst tax (as an option)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11062: Update DB entry
Bug-11062-Update-DB-entry.patch (text/plain), 3.23 KB, created by
Jonathan Druart
on 2015-02-18 15:46:00 UTC
(
hide
)
Description:
Bug 11062: Update DB entry
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-02-18 15:46:00 UTC
Size:
3.23 KB
patch
obsolete
>From a25c8c629ea9f783bc150728671aed18592bca24 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 18 Feb 2015 15:55:16 +0100 >Subject: [PATCH] Bug 11062: Update DB entry > >3 new DB field: >aqbooksellers.invoiceincgst >aqbooksellers.shipping_tax_rate >aqinvoices.shipping_tax_rate > >1 DB field renamed >aqinvoices.shipmentcost => aqinvoices.shipping >--- > installer/data/mysql/kohastructure.sql | 5 ++++- > installer/data/mysql/updatedatabase.pl | 21 +++++++++++++++++++++ > 2 files changed, 25 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 4719ee3..1dfd762 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2905,6 +2905,8 @@ CREATE TABLE `aqbooksellers` ( -- information about the vendors listed in acquis > `listincgst` tinyint(4) default NULL, -- is tax included in list prices (1 for yes, 0 for no) > `invoiceincgst` tinyint(4) default NULL, -- is tax included in invoice prices (1 for yes, 0 for no) > `tax_rate` decimal(6,4) default NULL, -- the tax rate the library is charged >+ `shipping_tax_rate decimal(6,4) default null, -- the tax rate for shipping >+ `shippingincgst` int(1) default 1, -- is tax included in shipping (1 for yes, 0 for no) > `discount` float(6,4) default NULL, -- discount offered on all items ordered from this vendor > `fax` varchar(50) default NULL, -- vendor fax number > deliverytime int(11) default NULL, -- vendor delivery time >@@ -3140,7 +3142,8 @@ CREATE TABLE aqinvoices ( > shipmentdate date default NULL, -- date of shipment > billingdate date default NULL, -- date of billing > closedate date default NULL, -- invoice close date, NULL means the invoice is open >- shipmentcost decimal(28,6) default NULL, -- shipment cost >+ shipping decimal(28,6) default NULL, -- shipment cost >+ shipping_tax_rate decimal(6,4) default NULL, -- shipment tax rate > shipmentcost_budgetid int(11) default NULL, -- foreign key to aqbudgets, link the shipment cost to a budget > PRIMARY KEY (invoiceid), > CONSTRAINT aqinvoices_fk_aqbooksellerid FOREIGN KEY (booksellerid) REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE, >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index d433eca..93fdfa6 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -9766,6 +9766,27 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = '3.19.00.XXX'; >+if ( CheckVersion($DBversion) ) { >+ >+ ## Add the new columns >+ $dbh->do(q| >+ ALTER TABLE aqbooksellers >+ ADD COLUMN shipping_tax_rate decimal(6,4) default NULL AFTER tax_rate, >+ ADD COLUMN shippingincgst int(1) default 1 AFTER shipping_tax_rate >+ >+ |); >+ >+ $dbh->do(q| >+ ALTER TABLE aqinvoices >+ CHANGE COLUMN shipmentcost shipping decimal(28,6) DEFAULT NULL, >+ ADD COLUMN shipping_tax_rate decimal(6,4) default NULL AFTER shipping, >+ |); >+ >+ print "Upgrade to $DBversion done (Bug 11062 - Add columns aqbooksellers.shipping_tax_rate and aqinvoices.shipping*)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >2.1.0
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 11062
:
28891
|
31033
|
35994
|
35995
| 35996