Add cashup feature

This commit is contained in:
FrancescoUK
2018-07-14 09:39:52 +01:00
parent 4420dccc60
commit b3bfc51ee8
15 changed files with 1034 additions and 5 deletions

View File

@@ -36,3 +36,48 @@ ALTER TABLE `ospos_sales_items`
ALTER TABLE `ospos_receivings_items`
CHANGE COLUMN `discount_percent` `discount` DECIMAL(15,2) NOT NULL DEFAULT 0 AFTER `item_unit_price`,
ADD COLUMN `discount_type` TINYINT(2) NOT NULL DEFAULT '0' AFTER `discount`;
--
-- Add support for module cashups
--
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
('module_cashups', 'module_cashups_desc', 107, 'cashups');
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`) VALUES
('cashups', 'cashups');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`) VALUES
('cashups', 1);
-- Table structure for table `ospos_cash_up`
CREATE TABLE `ospos_cash_up` (
`cashup_id` int(10) NOT NULL,
`open_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`close_date` timestamp NULL,
`open_amount_cash` decimal(15,2) NOT NULL,
`transfer_amount_cash` decimal(15,2) NOT NULL,
`note` int(1) NOT NULL,
`closed_amount_cash` decimal(15,2) NOT NULL,
`closed_amount_card` decimal(15,2) NOT NULL,
`closed_amount_check` decimal(15,2) NOT NULL,
`closed_amount_total` decimal(15,2) NOT NULL,
`description` varchar(255) NOT NULL,
`open_employee_id` int(10) NOT NULL,
`close_employee_id` int(10) NOT NULL,
`deleted` int(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Indexes for table `ospos_cash_up`
ALTER TABLE `ospos_cash_up`
ADD PRIMARY KEY (`cashup_id`),
ADD KEY `open_employee_id` (`open_employee_id`),
ADD KEY `close_employee_id` (`close_employee_id`);
-- AUTO_INCREMENT for table `ospos_cash_up`
ALTER TABLE `ospos_cash_up`
MODIFY `cashup_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;