FR [ 1788114 ] Prepayments on purchases

forgot postgres migration script
This commit is contained in:
Carlos Ruiz 2007-09-05 03:21:43 +00:00
parent 5de5a8efe9
commit 5dae9321dd
1 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,6 @@
UPDATE AD_VAL_RULE
SET code =
'(C_Order.DocStatus=''WP'' OR (C_Order.DocStatus=''CO'' AND EXISTS (SELECT * FROM C_DocType dt WHERE C_Order.C_DocType_ID=dt.C_DocType_ID AND (dt.DocSubTypeSO=''SO'' OR dt.DocBaseType=''POO'')) AND EXISTS (SELECT * FROM C_OrderLine ol WHERE C_Order.C_Order_ID=ol.C_Order_ID AND ol.QtyInvoiced<>ol.QtyOrdered)))'
WHERE ad_val_rule_id = 218;
COMMIT;