Topic: DATABASE ERROR : no debtor trans found for given params
New to this...
Invoiced a customer and promptly received payment.
Went to sales > Customer Payments, selected the customer, entered the relevant reference, allocated the amount, hit "Add Payment" and I am getting this error:
DATABASE ERROR : no debtor trans found for given params
sql that failed was : SELECT trans.*,ov_amount+ov_gst+ov_freight+ov_freight_tax+ov_discount AS Total,cust.name AS DebtorName, cust.address, cust.curr_code, cust.tax_id, com.memo_,bank_act,0_bank_accounts.bank_name, 0_bank_accounts.bank_account_name, 0_bank_accounts.account_type AS BankTransType, 0_bank_accounts.bank_curr_code, 0_bank_trans.amount as bank_amount FROM 0_debtor_trans trans LEFT JOIN 0_comments com ON trans.type=com.type AND trans.trans_no=com.id LEFT JOIN 0_shippers ON 0_shippers.shipper_id=trans.ship_via, 0_debtors_master cust, 0_bank_trans, 0_bank_accounts WHERE trans.trans_no='2' AND trans.type='12' AND trans.debtor_no=cust.debtor_no AND 0_bank_trans.trans_no ='2' AND 0_bank_trans.type=12 AND 0_bank_trans.amount != 0 AND 0_bank_accounts.id=0_bank_trans.bank_act
Went to phpmyadmin and looked in 0_debtor_trans, and I am seeing type = 13
It appears that the sql is looking for type = 12 which does not exist, my transaction shows type 13 and not 12
I am stumped - could anyone please let me know what to do and why the type shows 13 and not 12
Thanks / Frank