-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #301 from leon-mbs/dev
6.1.0
- Loading branch information
Showing
49 changed files
with
1,048 additions
and
1,333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +0,0 @@ | ||
INSERT INTO `metadata` ( `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES( 5, 'Ïîñòà÷àëüíèêè', 'SupplierList', 'Äðîïøèï³íã', 0); | ||
INSERT INTO `metadata` ( `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES( 5, 'Òîâàðè', 'SupItems', 'Äðîïøèï³íã', 0); | ||
|
||
CREATE TABLE suppliers ( | ||
sup_id int(11) NOT NULL AUTO_INCREMENT, | ||
sup_name varchar(255) NOT NULL, | ||
disabled tinyint(1) NOT NULL DEFAULT 0, | ||
detail text NOT NULL, | ||
|
||
PRIMARY KEY (sup_id) | ||
) | ||
ENGINE = InnoDB, | ||
CHARACTER SET utf8 ; | ||
|
||
|
||
CREATE TABLE supitems ( | ||
supitem_id int(11) NOT NULL AUTO_INCREMENT, | ||
item_id int(11) NOT NULL, | ||
sup_id int(11) NOT NULL, | ||
quantity decimal(10, 3) NOT NULL DEFAULT 0, | ||
price decimal(10, 2) NOT NULL DEFAULT 0, | ||
sup_code varchar(255) DEFAULT NULL, | ||
comment varchar(255) DEFAULT NULL, | ||
PRIMARY KEY (supitem_id) | ||
) | ||
ENGINE = InnoDB, | ||
COLLATE utf8_general_ci; | ||
|
||
|
||
|
||
DROP VIEW supitems_view ; | ||
|
||
CREATE | ||
VIEW supitems_view | ||
AS | ||
SELECT | ||
`s`.`supitem_id` AS `supitem_id`, | ||
`s`.`item_id` AS `item_id`, | ||
`s`.`sup_id` AS `sup_id`, | ||
`s`.`quantity` AS `quantity`, | ||
`s`.`price` AS `price`, | ||
`s`.`sup_code` AS `sup_code`, | ||
`s`.`comment` AS `comment`, | ||
`i`.`itemname` AS `itemname`, | ||
`i`.`item_code` AS `item_code`, | ||
`i`.`detail` AS `detail`, | ||
`sp`.`sup_name` AS `sup_name` | ||
FROM ((`supitems` `s` | ||
JOIN `items` `i` | ||
ON ((`s`.`item_id` = `i`.`item_id`))) | ||
JOIN `suppliers` `sp` | ||
ON ((`s`.`sup_id` = `sp`.`sup_id`))) | ||
WHERE (`i`.`disabled` <> 1 AND sp.disabled <>1); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
INSERT INTO `metadata` ( `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES( 3, 'Товари у постачальникIв', 'CustItems', '', 0); | ||
|
||
|
||
|
||
CREATE TABLE custitems ( | ||
custitem_id int(11) NOT NULL AUTO_INCREMENT, | ||
item_id int(11) NOT NULL, | ||
customer_id int(11) NOT NULL, | ||
quantity decimal(10, 3) DEFAULT NULL, | ||
price decimal(10, 2) NOT NULL DEFAULT 0.00, | ||
cust_code varchar(255) NOT NULL, | ||
comment varchar(255) DEFAULT NULL, | ||
updatedon date NOT NULL, | ||
PRIMARY KEY (custitem_id) | ||
) | ||
ENGINE = InnoDB ; | ||
|
||
ALTER TABLE custitems | ||
ADD INDEX item_id (item_id); | ||
|
||
|
||
|
||
CREATE | ||
VIEW custitems_view | ||
AS | ||
SELECT | ||
`s`.`custitem_id` AS `custitem_id`, | ||
`s`.`item_id` AS `item_id`, | ||
`s`.`customer_id` AS `customer_id`, | ||
`s`.`quantity` AS `quantity`, | ||
`s`.`price` AS `price`, | ||
`s`.`cust_code` AS `cust_code`, | ||
`s`.`comment` AS `comment`, | ||
`s`.`updatedon` AS `updatedon`, | ||
`i`.`itemname` AS `itemname`, | ||
`i`.`cat_id` AS `cat_id`, | ||
`i`.`item_code` AS `item_code`, | ||
`i`.`detail` AS `detail`, | ||
`c`.`customer_name` AS `customer_name` | ||
FROM ((`custitems` `s` | ||
JOIN `items` `i` | ||
ON ((`s`.`item_id` = `i`.`item_id`))) | ||
JOIN `customers` `c` | ||
ON ((`s`.`customer_id` = `c`.`customer_id`))) | ||
WHERE ((`i`.`disabled` <> 1) | ||
AND (`c`.`status` <> 1)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.