View | Details | Raw Unified | Return to bug 11062
Collapse All | Expand All

(-)a/installer/data/mysql/kohastructure.sql (-1 / +4 lines)
Lines 2905-2910 CREATE TABLE `aqbooksellers` ( -- information about the vendors listed in acquis Link Here
2905
  `listincgst` tinyint(4) default NULL, -- is tax included in list prices (1 for yes, 0 for no)
2905
  `listincgst` tinyint(4) default NULL, -- is tax included in list prices (1 for yes, 0 for no)
2906
  `invoiceincgst` tinyint(4) default NULL, -- is tax included in invoice prices (1 for yes, 0 for no)
2906
  `invoiceincgst` tinyint(4) default NULL, -- is tax included in invoice prices (1 for yes, 0 for no)
2907
  `tax_rate` decimal(6,4) default NULL, -- the tax rate the library is charged
2907
  `tax_rate` decimal(6,4) default NULL, -- the tax rate the library is charged
2908
  `shipping_tax_rate decimal(6,4) default null, -- the tax rate for shipping
2909
  `shippingincgst` int(1) default 1, -- is tax included in shipping (1 for yes, 0 for no)
2908
  `discount` float(6,4) default NULL, -- discount offered on all items ordered from this vendor
2910
  `discount` float(6,4) default NULL, -- discount offered on all items ordered from this vendor
2909
  `fax` varchar(50) default NULL, -- vendor fax number
2911
  `fax` varchar(50) default NULL, -- vendor fax number
2910
  deliverytime int(11) default NULL, -- vendor delivery time
2912
  deliverytime int(11) default NULL, -- vendor delivery time
Lines 3140-3146 CREATE TABLE aqinvoices ( Link Here
3140
  shipmentdate date default NULL,   -- date of shipment
3142
  shipmentdate date default NULL,   -- date of shipment
3141
  billingdate date default NULL,    -- date of billing
3143
  billingdate date default NULL,    -- date of billing
3142
  closedate date default NULL,  -- invoice close date, NULL means the invoice is open
3144
  closedate date default NULL,  -- invoice close date, NULL means the invoice is open
3143
  shipmentcost decimal(28,6) default NULL,  -- shipment cost
3145
  shipping decimal(28,6) default NULL,  -- shipment cost
3146
  shipping_tax_rate decimal(6,4) default NULL, -- shipment tax rate
3144
  shipmentcost_budgetid int(11) default NULL,   -- foreign key to aqbudgets, link the shipment cost to a budget
3147
  shipmentcost_budgetid int(11) default NULL,   -- foreign key to aqbudgets, link the shipment cost to a budget
3145
  PRIMARY KEY (invoiceid),
3148
  PRIMARY KEY (invoiceid),
3146
  CONSTRAINT aqinvoices_fk_aqbooksellerid FOREIGN KEY (booksellerid) REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE,
3149
  CONSTRAINT aqinvoices_fk_aqbooksellerid FOREIGN KEY (booksellerid) REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE,
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +21 lines)
Lines 9766-9771 if ( CheckVersion($DBversion) ) { Link Here
9766
    SetVersion($DBversion);
9766
    SetVersion($DBversion);
9767
}
9767
}
9768
9768
9769
$DBversion = '3.19.00.XXX';
9770
if ( CheckVersion($DBversion) ) {
9771
9772
    ## Add the new columns
9773
    $dbh->do(q|
9774
        ALTER TABLE aqbooksellers
9775
            ADD COLUMN shipping_tax_rate decimal(6,4) default NULL AFTER tax_rate,
9776
            ADD COLUMN shippingincgst int(1) default 1 AFTER shipping_tax_rate
9777
9778
    |);
9779
9780
    $dbh->do(q|
9781
        ALTER TABLE aqinvoices
9782
            CHANGE COLUMN shipmentcost shipping decimal(28,6) DEFAULT NULL,
9783
            ADD COLUMN shipping_tax_rate decimal(6,4) default NULL AFTER shipping,
9784
    |);
9785
9786
    print "Upgrade to $DBversion done (Bug 11062 - Add columns aqbooksellers.shipping_tax_rate and aqinvoices.shipping*)\n";
9787
    SetVersion($DBversion);
9788
}
9789
9769
=head1 FUNCTIONS
9790
=head1 FUNCTIONS
9770
9791
9771
=head2 TableExists($table)
9792
=head2 TableExists($table)
9772
- 

Return to bug 11062