#489 Efface menu + dépendance -> mise à jour SQL

Correction signe opération extournée
This commit is contained in:
Dany De Bontridder 2011-12-09 15:07:40 +00:00
parent 0ca86b6e1c
commit 1ab4348bb1
2 changed files with 12 additions and 2 deletions

View file

@ -14,7 +14,7 @@ begin
loop
return next x;
for e in select * from comptaproc.get_menu_dependency_pm(x)
for e in select * from comptaproc.get_menu_dependency(x)
loop
return next e;
end loop;
@ -27,6 +27,16 @@ LANGUAGE plpgsql;
delete from profile_menu where p_id=2 and me_code_dep='DIVPARM';
delete from profile_menu where p_id=2 and me_code_dep='MOD';
update quant_sold set qs_price=(-1)*qs_price, qs_vat=(-1)*qs_vat where qs_quantite > 0 and qs_price > 0 and qs_vat >= 0;
update quant_purchase set qp_price=(-1)*qp_price, qp_vat=(-1)*qp_vat,
qp_nd_amount=(-1)*qp_nd_amount,
qp_nd_tva=(-1)*qp_nd_tva,
qp_nd_tva_recup=(-1)*qp_nd_tva_recup,
qp_dep_priv=(-1)*qp_dep_priv
where qp_quantite > 0 and qp_price > 0 and qp_vat >= 0;
update version set val=100;
commit;