Fixed missing $ at end of stored procedure delcaration
This commit is contained in:
parent
5624dc0b59
commit
530de3e680
1 changed files with 9 additions and 5 deletions
|
|
@ -21,10 +21,10 @@ INSERT INTO parm_code VALUES ('VENTE ', '70', 'Poste comptable de base pour les
|
|||
|
||||
CREATE OR REPLACE FUNCTION tva_delete(int4)
|
||||
RETURNS void AS
|
||||
$BODY$declare
|
||||
$BODY$
|
||||
declare
|
||||
p_tva_id alias for $1;
|
||||
nCount integer;
|
||||
|
||||
begin
|
||||
nCount=0;
|
||||
select count(*) into nCount from quant_sold where qs_vat_code=p_tva_id;
|
||||
|
|
@ -33,13 +33,15 @@ begin
|
|||
end if;
|
||||
return;
|
||||
end;
|
||||
$BODY$
|
||||
LANGUAGE plpgsql VOLATILE;
|
||||
|
||||
-- Function: tva_insert(int4, text, numeric, text, text)
|
||||
|
||||
CREATE OR REPLACE FUNCTION tva_insert(int4, text, "numeric", text, text)
|
||||
RETURNS int4 AS
|
||||
$BODY$declare
|
||||
$BODY$
|
||||
declare
|
||||
p_tva_id alias for $1;
|
||||
p_tva_label alias for $2;
|
||||
p_tva_rate alias for $3;
|
||||
|
|
@ -76,6 +78,7 @@ insert into tva_rate(tva_id,tva_label,tva_rate,tva_comment,tva_poste)
|
|||
values (p_tva_id,p_tva_label,p_tva_rate,p_tva_comment,p_tva_poste);
|
||||
return 0;
|
||||
end;
|
||||
$BODY$
|
||||
LANGUAGE plpgsql VOLATILE;
|
||||
|
||||
-- Function: tva_insert(p_tva_id text, p_tva_label text, p_tva_rate text, p_tva_comment text, p_tva_poste text)
|
||||
|
|
@ -114,9 +117,10 @@ end if;
|
|||
update tva_rate set tva_label=p_tva_label,tva_rate=p_tva_rate,tva_comment=p_tva_comment,tva_poste=p_tva_poste
|
||||
where tva_id=p_tva_id;
|
||||
return 0;
|
||||
end;$BODY$
|
||||
end;
|
||||
$BODY$
|
||||
LANGUAGE plpgsql VOLATILE;
|
||||
|
||||
|
||||
update version set val=12;
|
||||
commit;
|
||||
commit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue