-- only updates the qty's etc..
-
-
-CREATE OR REPLACE FUNCTION invfifo_fill_all(integer, integer)
- RETURNS boolean
-AS $BODY$
-DECLARE
- i_location_id ALIAS FOR $1;
- i_itemsite_id ALIAS FOR $2;
- BEGIN
-
- PERFORM invfifo_fill(invdetail_id,true) FROM (
- SELECT
- invdetail_id
- FROM
- invdetailview
-
- WHERE
- invdetail_location_id = i_location_id
- AND
- invhist_itemsite_id = i_itemsite_id
- ORDER BY
- invhist_transdate ASC,
- invdetail_id ASC
-
- ) x;
- RETURN true;
- END;
-$BODY$
- LANGUAGE plpgsql VOLATILE
- COST 100;
-
-ALTER FUNCTION invfifo_fill_all(integer, integer)
- OWNER TO admin;
-
-
-
-
-
-
-
CREATE OR REPLACE FUNCTION invfifo_fill(integer)
RETURNS boolean