diff options
Diffstat (limited to 'sql/modules')
-rw-r--r-- | sql/modules/Payment.sql | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/modules/Payment.sql b/sql/modules/Payment.sql index b3b9d1c2..dc6ac74a 100644 --- a/sql/modules/Payment.sql +++ b/sql/modules/Payment.sql @@ -385,8 +385,12 @@ BEGIN CASE WHEN t_voucher_id IS NULL THEN true ELSE false END, - t_voucher_id, in_payment_date, in_source), + t_voucher_id, in_payment_date, in_source); + INSERT INTO acc_trans + (trans_id, chart_id, amount, approved, voucher_id, + transdate, source) + VALUES (in_transactions[out_count][1], case when in_account_class = 1 THEN t_ar_ap_id WHEN in_account_class = 2 THEN t_cash_id @@ -743,7 +747,11 @@ BEGIN in_date_reversed, in_source, 'Reversing ' || COALESCE(in_source, ''), case when in_batch_id is not null then false - else true end, t_voucher_id), + else true end, t_voucher_id); + INSERT INTO acc_trans + (trans_id, chart_id, amount, transdate, source, memo, approved, + voucher_id) + VALUES (pay_row.trans_id, pay_row.ar_ap_account_id, pay_row.amount, in_date_reversed, in_source, 'Reversing ' || COALESCE(in_source, ''), |