Make inventory to support decimal quantity on transactions logging (#726)

This commit is contained in:
FrancescoUK
2016-07-08 17:03:27 +01:00
parent c82e9e4929
commit a3704f9b12
4 changed files with 10 additions and 7 deletions

View File

@@ -10,6 +10,9 @@ ALTER TABLE `ospos_item_kit_items`
ALTER TABLE `ospos_item_quantities`
MODIFY COLUMN `quantity` decimal(15,3) NOT NULL DEFAULT '0';
ALTER TABLE `ospos_inventory`
MODIFY COLUMN `trans_inventory` decimal(15,3) NOT NULL DEFAULT '0';
ALTER TABLE `ospos_receivings`
DROP KEY `invoice_number`,
CHANGE COLUMN `invoice_number` `reference` varchar(32) DEFAULT NULL,
@@ -35,7 +38,7 @@ ALTER TABLE `ospos_items_taxes`
MODIFY COLUMN `percent` decimal(15,3) NOT NULL;
ALTER TABLE `ospos_customers`
ADD COLUMN `discount_percent` decimal(15,2) NOT NULL DEFAULT '0.00';
ADD COLUMN `discount_percent` decimal(15,2) NOT NULL DEFAULT '0';
-- alter config table

View File

@@ -91,7 +91,7 @@ CREATE TABLE `ospos_customers` (
`company_name` varchar(255) DEFAULT NULL,
`account_number` varchar(255) DEFAULT NULL,
`taxable` int(1) NOT NULL DEFAULT '1',
`discount_percent` decimal(15,2) NOT NULL DEFAULT '0.00',
`discount_percent` decimal(15,2) NOT NULL DEFAULT '0',
`deleted` int(1) NOT NULL DEFAULT '0',
UNIQUE KEY `account_number` (`account_number`),
KEY `person_id` (`person_id`)
@@ -160,7 +160,7 @@ CREATE TABLE `ospos_inventory` (
`trans_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`trans_comment` text NOT NULL,
`trans_location` int(11) NOT NULL,
`trans_inventory` int(11) NOT NULL DEFAULT '0',
`trans_inventory` decimal(15,3) NOT NULL DEFAULT '0',
PRIMARY KEY (`trans_id`),
KEY `trans_items` (`trans_items`),
KEY `trans_user` (`trans_user`),

View File

@@ -91,7 +91,7 @@ CREATE TABLE `ospos_customers` (
`company_name` varchar(255) DEFAULT NULL,
`account_number` varchar(255) DEFAULT NULL,
`taxable` int(1) NOT NULL DEFAULT '1',
`discount_percent` decimal(15,2) NOT NULL DEFAULT '0.00',
`discount_percent` decimal(15,2) NOT NULL DEFAULT '0',
`deleted` int(1) NOT NULL DEFAULT '0',
UNIQUE KEY `account_number` (`account_number`),
KEY `person_id` (`person_id`)
@@ -160,7 +160,7 @@ CREATE TABLE `ospos_inventory` (
`trans_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`trans_comment` text NOT NULL,
`trans_location` int(11) NOT NULL,
`trans_inventory` int(11) NOT NULL DEFAULT '0',
`trans_inventory` decimal(15,3) NOT NULL DEFAULT '0',
PRIMARY KEY (`trans_id`),
KEY `trans_items` (`trans_items`),
KEY `trans_user` (`trans_user`),

View File

@@ -91,7 +91,7 @@ CREATE TABLE `ospos_customers` (
`company_name` varchar(255) DEFAULT NULL,
`account_number` varchar(255) DEFAULT NULL,
`taxable` int(1) NOT NULL DEFAULT '1',
`discount_percent` decimal(15,2) NOT NULL DEFAULT '0.00',
`discount_percent` decimal(15,2) NOT NULL DEFAULT '0',
`deleted` int(1) NOT NULL DEFAULT '0',
UNIQUE KEY `account_number` (`account_number`),
KEY `person_id` (`person_id`)
@@ -160,7 +160,7 @@ CREATE TABLE `ospos_inventory` (
`trans_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`trans_comment` text NOT NULL,
`trans_location` int(11) NOT NULL,
`trans_inventory` int(11) NOT NULL DEFAULT '0',
`trans_inventory` decimal(15,3) NOT NULL DEFAULT '0',
PRIMARY KEY (`trans_id`),
KEY `trans_items` (`trans_items`),
KEY `trans_user` (`trans_user`),