C:\xampp53670\htdocs\frontaccounting\sales\includes\db\cust_trans_db.inc:213: display_backtrace()
C:\xampp53670\htdocs\frontaccounting\sales\includes\sales_db.inc:233: get_customer_trans('4','13')
C:\xampp53670\htdocs\frontaccounting\sales\includes\cart_class.inc:220: read_sales_trans('13',(Array[1]),(Cart Object))
C:\xampp53670\htdocs\frontaccounting\sales\includes\cart_class.inc:308: (Cart Object)->read('13','4','1')
C:\xampp53670\htdocs\frontaccounting\sales\create_recurrent_invoices.php:59: (Cart Object)->write('1')
C:\xampp53670\htdocs\frontaccounting\sales\create_recurrent_invoices.php:125: create_recurrent_invoices('4','4','1','2','02-08-2018','01-07-2018','02-07-2018','Recurrent Invoice covers period 01-08-2018 - 31-08-2018.')
DATABASE ERROR : duplicate debtor transactions 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, trans.prep_amount>0 as prepaid,com.memo_, shippers.shipper_name, sales_types.sales_type, sales_types.tax_included, branch.*, cust.discount, tax_groups.name AS tax_group_name, tax_groups.id AS tax_group_id FROM debtor_trans trans LEFT JOIN comments com ON trans.type=com.type AND trans.trans_no=com.id LEFT JOIN shippers ON shippers.shipper_id=trans.ship_via, debtors_master cust, sales_types, cust_branch branch, tax_groups WHERE trans.trans_no='4' AND trans.type='13' AND trans.debtor_no=cust.debtor_no AND sales_types.id = trans.tpe AND branch.branch_code = trans.branch_code AND branch.tax_group_id = tax_groups.id
No luck to get it work. debtor_trans table is empty. i wondering why duplicate debtor transactions found.