update_fxpaid
This is an old revision of the document!
UPDATE ap SET fxamount = amount WHERE fxamount = 0; UPDATE ap SET fxpaid = paid WHERE fxpaid = 0; UPDATE ar SET fxamount = (SELECT SUM(amount) FROM acc_trans WHERE chart_id IN (SELECT id FROM chart WHERE link LIKE '%AR_amount%' OR link LIKE '%IC_income%' OR link LIKE '%tax%') AND trans_id=ar.id and NOT fx_transaction); UPDATE ar SET fxpaid = (SELECT SUM(0-amount) FROM acc_trans WHERE chart_id IN (SELECT id FROM chart WHERE link LIKE '%_paid%') AND trans_id=ar.id AND NOT fx_transaction);
update_fxpaid.1475568848.txt.gz · Last modified: 2024/09/25 06:19 (external edit)