ar_ap_versus_general_ledger
Check if AR and acc_trans are in sync:
select ar.invnumber, ac.trans_id, sum(ac.amount) from acc_trans ac join ar on (ar.id = ac.trans_id) where chart_id in (select id from chart where link='AR') and ar.amount = ar.paid group by ar.invnumber, ac.trans_id having round(sum(ac.amount)::numeric, 2) <> 0;
Check if AP and acc_trans are in sync:
select ap.invnumber, ac.trans_id, sum(ac.amount) from acc_trans ac join ap on (ap.id = ac.trans_id) where chart_id in (select id from chart where link='AP') and ap.amount = ap.paid group by ap.invnumber, ac.trans_id having round(sum(ac.amount)::numeric, 2) <> 0;
ar_ap_versus_general_ledger.txt · Last modified: 2024/09/25 06:21 by 127.0.0.1