Topic: Audit trail is showing double entries for Payment and Deposit
The audit trail report is showing double entries for Payment and Deposit for Customer/Suppllier entries.
If the payment/deposits are made to Misc. than there is single entry posting in audit trail, but if we select customer/supplier it loads add_audit_trail therefore i have added the following in
1: For customer trans
/sales/includes/db/cust_trans_db.inc
Under write_customer_trans function i have replaced
if ($trans_type != ST_JOURNAL) // skip for journal entries
with
if ($trans_type != ST_JOURNAL && $trans_type != ST_BANKDEPOSIT && $trans_type != ST_BANKPAYMENT) // skip for journal entries
2. For Supplier trans
and in /purchasing/includes/db/supp_trans_db.inc
under write_supp_trans function i have added this line
if ($type != ST_JOURNAL && $type != ST_BANKDEPOSIT && $type != ST_BANKPAYMENT // skip for journal entries
above
add_audit_trail($type, $trans_no, $date_,"Added",$amount);
This fixes the double posting of the same transactions in audit_trail table