mirror of
https://github.com/dyiop/astute.git
synced 2025-04-05 21:10:16 -04:00
Add files via upload
This commit is contained in:
parent
456a68e291
commit
f97e6f3756
|
@ -64,10 +64,10 @@ DELIMITER ;
|
|||
|
||||
-- Dumping structure for procedure astute.create_po
|
||||
DELIMITER //
|
||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `create_po`(PONum varchar(40), contractNum varchar(20), PODate date, contractAmt double(10,2), customerid int)
|
||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `create_po`(PONum varchar(40), contractNum varchar(20), PODate date, contractAmt double(10,2), customerid int, astute_project_num_in varchar(20))
|
||||
BEGIN
|
||||
INSERT INTO PO (PO_num, contract_num, PO_date, contract_amt, customer_id)
|
||||
VALUES (PONum, contractNum, PODate, contractAmt, customerId);
|
||||
INSERT INTO PO (PO_num, contract_num, PO_date, contract_amt, customer_id,astute_project_num)
|
||||
VALUES (PONum, contractNum, PODate, contractAmt, customerId,astute_project_num_in);
|
||||
END//
|
||||
DELIMITER ;
|
||||
|
||||
|
@ -210,7 +210,7 @@ DELIMITER //
|
|||
CREATE DEFINER=`root`@`localhost` FUNCTION `get_remaining_qty_fun`(po_num_in varchar(20), item_no_in int) RETURNS double
|
||||
BEGIN
|
||||
DECLARE remaining_qty double;
|
||||
select po_detail.qty - sum(amt) into remaining_qty from invoice_detail, po_detail
|
||||
select po_detail.qty - sum(invoice_detail.qty) into remaining_qty from invoice_detail, po_detail
|
||||
where invoice_detail.inv_num in (select inv_num from invoice where invoice.PO_num = po_num_in)
|
||||
and invoice_detail.line_item_num = item_no_in
|
||||
and invoice_detail.line_item_num = po_detail.line_item_no;
|
||||
|
|
Loading…
Reference in New Issue
Block a user