diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-12-20 02:55:31 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-12-20 02:55:31 +0000 |
commit | 5ead0207f91dfecac4cafa8eb95cf7c50866d71f (patch) | |
tree | 81c904809dc91dc01da654bf10112b2d68cc182b /sql/modules/Voucher.sql | |
parent | b119931d2f74d3d0a6a2d3292154c175f534acf4 (diff) |
Voucher and Payment Enhancements and fixes
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1986 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql/modules/Voucher.sql')
-rw-r--r-- | sql/modules/Voucher.sql | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/modules/Voucher.sql b/sql/modules/Voucher.sql index b5dc76b1..f095b92a 100644 --- a/sql/modules/Voucher.sql +++ b/sql/modules/Voucher.sql @@ -290,8 +290,8 @@ BEGIN -- Adjust AR/AP tables for payment and payment reversal vouchers -- voucher_id is only set in acc_trans on payment/receipt vouchers and -- their reversals. -CT - update ar set paid = amount - - (select sum(amount) * -1 from acc_trans + update ar set paid = amount + + (select sum(amount) from acc_trans join chart ON (acc_trans.chart_id = chart.id) where link = 'AR' AND trans_id = ar.id AND (voucher_id IS NULL OR voucher_id NOT IN |