new discount on sales

This commit is contained in:
Erastus
2018-08-31 15:27:44 -05:00
parent a5f0c83e87
commit a6b11e6f48
44 changed files with 288 additions and 334 deletions

View File

@@ -1,22 +0,0 @@
--
-- Add support for Discount on Sales Fixed
--
INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
('default_sales_discount_fixed', '0'),
('default_sales_discount_type', '0');
ALTER TABLE `ospos_item_kits`
ADD COLUMN `kit_discount_fixed` DECIMAL(15,2) NOT NULL DEFAULT '0.00' AFTER `kit_discount_percent`;
ALTER TABLE `ospos_customers`
ADD COLUMN `discount_fixed` DECIMAL(15,2) NOT NULL DEFAULT '0.00' AFTER `discount_percent`;
ALTER TABLE `ospos_sales_items`
ADD COLUMN `discount_fixed` DECIMAL(15,2) NOT NULL DEFAULT '0.00' AFTER `discount_percent`,
ADD COLUMN `discount_type` TINYINT(2) NOT NULL DEFAULT '0' AFTER `discount_fixed`;
ALTER TABLE `ospos_receivings_items`
ADD COLUMN `discount_fixed` DECIMAL(15,2) NOT NULL DEFAULT '0.00' AFTER `discount_percent`,
ADD COLUMN `discount_type` TINYINT(2) NOT NULL DEFAULT '0' AFTER `discount_fixed`;

View File

@@ -0,0 +1,24 @@
--
-- Add support for Discount on Sales Fixed
--
INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
('default_sales_discount_fixed', '0'),
('default_sales_discount_type', '0');
ALTER TABLE `ospos_item_kits`
CHANGE COLUMN `kit_discount_percent` `kit_discount` DECIMAL(15,2) NOT NULL DEFAULT '0.00' AFTER `item_id`,
ADD COLUMN `kit_discount_type` TINYINT(2) NOT NULL DEFAULT '0' AFTER `kit_discount`;
ALTER TABLE `ospos_customers`
CHANGE COLUMN `discount_percent` `discount` DECIMAL(15,2) NOT NULL DEFAULT '0.00' AFTER `sales_tax_code`,
ADD COLUMN `discount_type` TINYINT(2) NOT NULL DEFAULT '0' AFTER `discount`;
ALTER TABLE `ospos_sales_items`
CHANGE COLUMN `discount_percent` `discount` DECIMAL(15,2) NOT NULL DEFAULT '0.00' AFTER `item_unit_price`,
ADD COLUMN `discount_type` TINYINT(2) NOT NULL DEFAULT '0' AFTER `discount`;
ALTER TABLE `ospos_receivings_items`
CHANGE COLUMN `discount_percent` `discount` DECIMAL(15,2) NOT NULL DEFAULT '0.00' AFTER `item_unit_price`,
ADD COLUMN `discount_type` TINYINT(2) NOT NULL DEFAULT '0' AFTER `discount`;