Основной бизнес-процесс
Оформление накладных
This commit is contained in:
1
App/Waybill/sql/create_order.sql
Normal file
1
App/Waybill/sql/create_order.sql
Normal file
@@ -0,0 +1 @@
|
||||
INSERT INTO `waybill` (`user_id`,`waybill_date`, `total`) VALUES ($e_user_id, '$e_order_date', $e_total);
|
||||
@@ -1 +1 @@
|
||||
SELECT work_id, name, price, material, count FROM workpiece
|
||||
SELECT work_id, name, price, material, count FROM workpiece
|
||||
2
App/Waybill/sql/insert_order_line.sql
Normal file
2
App/Waybill/sql/insert_order_line.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
INSERT INTO `waybill_lines` VALUES ($e_order_id, $e_prod_id,
|
||||
(SELECT price FROM workpiece WHERE work_id = $e_prod_id), $e_amount);
|
||||
3
App/Waybill/sql/one_good.sql
Normal file
3
App/Waybill/sql/one_good.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
SELECT `work_id`, `name`, `price`, `weight`
|
||||
FROM `workpiece`
|
||||
WHERE `work_id` = $work_id;
|
||||
Reference in New Issue
Block a user