mirror of
https://github.com/dyiop/astute.git
synced 2025-04-06 21:30:20 -04:00
new SQL function is_so_fulfilled
This commit is contained in:
parent
8266c8e85e
commit
e0d2a2317d
|
@ -781,6 +781,17 @@ return rem_qty;
|
||||||
END//
|
END//
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
||||||
|
CREATE FUNCTION astute.`is_po_fulfilled`(po_no varchar(20)) RETURNS int(1)
|
||||||
|
BEGIN
|
||||||
|
declare count int;
|
||||||
|
SELECT count(*) INTO count FROM po_detail WHERE PO_num = po_no and remaining_qty > 0;
|
||||||
|
if count > 0 then
|
||||||
|
return 0;
|
||||||
|
else
|
||||||
|
return 1;
|
||||||
|
end if;
|
||||||
|
END;
|
||||||
|
|
||||||
-- Dumping structure for table astute.user
|
-- Dumping structure for table astute.user
|
||||||
CREATE TABLE IF NOT EXISTS `user` (
|
CREATE TABLE IF NOT EXISTS `user` (
|
||||||
`user_id` int(5) NOT NULL,
|
`user_id` int(5) NOT NULL,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user