-
Notifications
You must be signed in to change notification settings - Fork 60
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 #83 from leon-mbs/dev
Dev
- Loading branch information
Showing
86 changed files
with
4,038 additions
and
236 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
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
ALTER TABLE `items` ADD `manufacturer` VARCHAR(255) NULL ; | ||
|
||
|
||
ALTER VIEW `items_view` AS | ||
select | ||
`items`.`item_id` AS `item_id`, | ||
`items`.`itemname` AS `itemname`, | ||
`items`.`description` AS `description`, | ||
`items`.`detail` AS `detail`, | ||
`items`.`item_code` AS `item_code`, | ||
`items`.`bar_code` AS `bar_code`, | ||
`items`.`cat_id` AS `cat_id`, | ||
`items`.`msr` AS `msr`, | ||
`items`.`disabled` AS `disabled`, | ||
`items`.`minqty` AS `minqty`, | ||
`items`.`manufacturer` AS `manufacturer`, | ||
`item_cat`.`cat_name` AS `cat_name` | ||
from | ||
(`items` left join `item_cat` on((`items`.`cat_id` = `item_cat`.`cat_id`))); | ||
|
||
|
||
ALTER VIEW `documents_view` AS | ||
select | ||
`d`.`document_id` AS `document_id`, | ||
`d`.`document_number` AS `document_number`, | ||
`d`.`document_date` AS `document_date`, | ||
`d`.`user_id` AS `user_id`, | ||
`d`.`content` AS `content`, | ||
`d`.`amount` AS `amount`, | ||
`d`.`meta_id` AS `meta_id`, | ||
`u`.`username` AS `username`, | ||
`c`.`customer_id` AS `customer_id`, | ||
`c`.`customer_name` AS `customer_name`, | ||
`d`.`state` AS `state`, | ||
`d`.`notes` AS `notes`, | ||
`d`.`payamount` AS `payamount`, | ||
`d`.`payed` AS `payed`, | ||
`d`.`parent_id` AS `parent_id`, | ||
`d`.`branch_id` AS `branch_id`, | ||
`b`.`branch_name` AS `branch_name`, | ||
`metadata`.`meta_name` AS `meta_name`, | ||
`metadata`.`description` AS `meta_desc` | ||
from | ||
((((`documents` `d` left join `users_view` `u` on((`d`.`user_id` = `u`.`user_id`))) left join `customers` `c` on((`d`.`customer_id` = `c`.`customer_id`))) join `metadata` on((`metadata`.`meta_id` = `d`.`meta_id`))) left join `branches` `b` on((`d`.`branch_id` = `b`.`branch_id`))); |
This file was deleted.
Oops, something went wrong.
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,45 @@ | ||
INSERT INTO `metadata` ( `meta_type`, `description`, `meta_name`, `menugroup`, `disabled`) VALUES( 2, 'Движение по контрагентам', 'CustActivity', 'Платежи', 0); | ||
|
||
|
||
ALTER VIEW `paylist_view` AS | ||
select | ||
`pl`.`pl_id` AS `pl_id`, | ||
`pl`.`document_id` AS `document_id`, | ||
`pl`.`amount` AS `amount`, | ||
`pl`.`mf_id` AS `mf_id`, | ||
`pl`.`notes` AS `notes`, | ||
`pl`.`user_id` AS `user_id`, | ||
`pl`.`paydate` AS `paydate`, | ||
`pl`.`paytype` AS `paytype`, | ||
`d`.`document_number` AS `document_number`, | ||
`u`.`username` AS `username`, | ||
`m`.`mf_name` AS `mf_name`, | ||
`d`.`customer_id` AS `customer_id`, | ||
`d`.`customer_name` AS `customer_name` | ||
from | ||
(((`paylist` `pl` join `documents_view` `d` on((`pl`.`document_id` = `d`.`document_id`))) join `users_view` `u` on((`pl`.`user_id` = `u`.`user_id`))) left join `mfund` `m` on((`pl`.`mf_id` = `m`.`mf_id`))); | ||
|
||
ALTER VIEW `shop_products_view` AS | ||
select | ||
`p`.`product_id` AS `product_id`, | ||
`p`.`group_id` AS `group_id`, | ||
`p`.`productname` AS `productname`, | ||
`p`.`manufacturer_id` AS `manufacturer_id`, | ||
`p`.`price` AS `price`, | ||
`p`.`sold` AS `sold`, | ||
`p`.`deleted` AS `deleted`, | ||
`p`.`sef` AS `sef`, | ||
`p`.`item_id` AS `item_id`, | ||
`p`.`created` AS `created`, | ||
`p`.`detail` AS `detail`, | ||
`p`.`rating` AS `rating`, | ||
`i`.`item_code` AS `item_code`, | ||
(case when (`p`.`created` > (now() - interval 1 month)) then 1 else 0 end) AS `novelty`, | ||
`p`.`comments` AS `comments`, | ||
`g`.`groupname` AS `groupname`, | ||
`m`.`manufacturername` AS `manufacturername`, | ||
0 AS `qty` | ||
from | ||
(((`shop_products` `p` join `shop_productgroups` `g` on((`p`.`group_id` = `g`.`group_id`))) left join `shop_manufacturers` `m` on((`p`.`manufacturer_id` = `m`.`manufacturer_id`))) join `items` `i` on((`p`.`item_id` = `i`.`item_id`))); | ||
|
||
|
Oops, something went wrong.