Add files via upload

This commit is contained in:
gopi17701 2018-07-24 11:17:50 -04:00 committed by GitHub
parent 456a68e291
commit f97e6f3756
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;