Fixes a couple of problems with sales tax migration plus a couple of other problems.

This commit is contained in:
Steve Ireland committed 2019-02-23 18:58:28 -05:00
1 parent 069715fe4a
commit 2f710e80e7
10 files changed
+75 -18

No files matched your search

@@ -148,6 +148,3 @@ ALTER TABLE `ospos_expenses`
INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
('default_receivings_discount_type', '0'),
('default_receivings_discount', '0');
ALTER TABLE `ospos_suppliers`
CHANGE COLUMN `tax_id` `tax_id` VARCHAR(32) NULL;
@@ -74,7 +74,7 @@ CREATE TABLE IF NOT EXISTS `ospos_tax_jurisdictions` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
ALTER TABLE `ospos_suppliers`
ADD COLUMN `tax_id` varchar(32) NOT NULL DEFAULT '' AFTER `account_number`;
ADD COLUMN `tax_id` varchar(32) DEFAULT NULL AFTER `account_number`;
ALTER TABLE `ospos_tax_categories`
ADD COLUMN `deleted` int(1) NOT NULL DEFAULT 0 AFTER `tax_group_sequence`;
@@ -0,0 +1,6 @@
UPDATE `ospos_suppliers`
SET `tax_id` = ''
WHERE `tax_id`IS NULL;
ALTER TABLE `ospos_suppliers`
CHANGE COLUMN `tax_id` `tax_id` varchar(32) NOT NULL DEFAULT '';
@@ -0,0 +1,5 @@
-- This is to cleanup any orphaned tax migration tables
DROP TABLE IF EXISTS `ospos_tax_codes_backup`;
DROP TABLE IF EXISTS `ospos_sales_taxes_backup`;
DROP TABLE IF EXISTS `ospos_tax_code_rates_backup`;