1 (edited by trafficpest 01/10/2018 07:31:20 am)

Topic: Can't allocate my clients payments

When I enter a payment in the ui it never gives me the success screen. But when I check the Database and the Allocate customer payment screen it shows that the payments were entered but not allocated. When I try to allocate them in the allocate customer payment screen with the debug 2 flag set (in config.php) It gives me this error   

/home4/traffid0/public_html/books/sales/includes/db/cust_trans_db.inc:206:    display_backtrace()
/home4/traffid0/public_html/books/includes/ui/allocation_cart.inc:126:    get_customer_trans('1','12','190')
/home4/traffid0/public_html/books/includes/ui/allocation_cart.inc:42:    (allocation Object)->read('12','1','190','2')
/home4/traffid0/public_html/books/sales/allocations/customer_allocate.php:111:    (allocation Object)->allocation('12','1','190','2')

/home4/traffid0/public_html/books/includes/ui/ui_msgs.inc:14:    trigger_error('
/home4/traffid0/public_html/books/sales/includes/db/cust_trans_db.inc:206:    display_backtrace()
/home4/traffid0/public_html/books/includes/ui/allocation_cart.inc:126:    get_customer_trans('1','12','190')
/home4/traffid0/public_html/books/includes/ui/allocation_cart.inc:42:    (allocation Object)->read('12','1','190','2')
/home4/traffid0/public_html/books/sales/allocations/customer_allocate.php:111:    (allocation Object)->allocation('12','1','190','2')
','256')
/home4/traffid0/public_html/books/includes/ui/ui_view.inc:1484:    display_error('
/home4/traffid0/public_html/books/sales/includes/db/cust_trans_db.inc:206:    display_backtrace()
/home4/traffid0/public_html/books/includes/ui/allocation_cart.inc:126:    get_customer_trans('1','12','190')
/home4/traffid0/public_html/books/includes/ui/allocation_cart.inc:42:    (allocation Object)->read('12','1','190','2')
/home4/traffid0/public_html/books/sales/allocations/customer_allocate.php:111:    (allocation Object)->allocation('12','1','190','2')
')
/home4/traffid0/public_html/books/sales/includes/db/cust_trans_db.inc:206:    display_backtrace()
/home4/traffid0/public_html/books/includes/ui/allocation_cart.inc:126:    get_customer_trans('1','12','190')
/home4/traffid0/public_html/books/includes/ui/allocation_cart.inc:42:    (allocation Object)->read('12','1','190','2')
/home4/traffid0/public_html/books/sales/allocations/customer_allocate.php:111:    (allocation Object)->allocation('12','1','190','2')
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, trans.prep_amount>0 as prepaid,com.memo_,bank_act,2_bank_accounts.bank_name, 2_bank_accounts.bank_account_name, 2_bank_accounts.account_type AS BankTransType, 2_bank_accounts.bank_curr_code, 2_bank_trans.amount as bank_amount FROM 2_debtor_trans trans LEFT JOIN 2_comments com ON trans.type=com.type AND trans.trans_no=com.id LEFT JOIN 2_shippers ON 2_shippers.shipper_id=trans.ship_via, 2_debtors_master cust, 2_bank_trans, 2_bank_accounts WHERE trans.trans_no='1' AND trans.type='12' AND trans.debtor_no=cust.debtor_no AND trans.debtor_no='190' AND 2_bank_trans.trans_no ='1' AND 2_bank_trans.type=12 AND 2_bank_trans.amount != 0 AND 2_bank_accounts.id=2_bank_trans.bank_act 



/home4/traffid0/public_html/books/includes/errors.inc:198:    trigger_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, trans.prep_amount>0 as prepaid,com.memo_,bank_act,2_bank_accounts.bank_name, 2_bank_accounts.bank_account_name, 2_bank_accounts.account_type AS BankTransType, 2_bank_accounts.bank_curr_code, 2_bank_trans.amount as bank_amount FROM 2_debtor_trans trans LEFT JOIN 2_comments com ON trans.type=com.type AND trans.trans_no=com.id LEFT JOIN 2_shippers ON 2_shippers.shipper_id=trans.ship_via, 2_debtors_master cust, 2_bank_trans, 2_bank_accounts WHERE trans.trans_no='1' AND trans.type='12' AND trans.debtor_no=cust.debtor_no AND trans.debtor_no='190' AND 2_bank_trans.trans_no ='1' AND 2_bank_trans.type=12 AND 2_bank_trans.amount != 0 AND 2_bank_accounts.id=2_bank_trans.bank_act 


','256')
/home4/traffid0/public_html/books/sales/includes/db/cust_trans_db.inc:207:    display_db_error('no debtor trans found for given params','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_,bank_act,&TB_PREF&bank_accounts.bank_name, &TB_PREF&bank_accounts.bank_account_name, &TB_PREF&bank_accounts.account_type AS BankTransType, &TB_PREF&bank_accounts.bank_curr_code, &TB_PREF&bank_trans.amount as bank_amount FROM &TB_PREF&debtor_trans trans LEFT JOIN &TB_PREF&comments com ON trans.type=com.type AND trans.trans_no=com.id LEFT JOIN &TB_PREF&shippers ON &TB_PREF&shippers.shipper_id=trans.ship_via, &TB_PREF&debtors_master cust, &TB_PREF&bank_trans, &TB_PREF&bank_accounts WHERE trans.trans_no='1' AND trans.type='12' AND trans.debtor_no=cust.debtor_no AND trans.debtor_no='190' AND &TB_PREF&bank_trans.trans_no ='1' AND &TB_PREF&bank_trans.type=12 AND &TB_PREF&bank_trans.amount != 0 AND &TB_PREF&bank_accounts.id=&TB_PREF&bank_trans.bank_act ','1')
/home4/traffid0/public_html/books/includes/ui/allocation_cart.inc:126:    get_customer_trans('1','12','190')
/home4/traffid0/public_html/books/includes/ui/allocation_cart.inc:42:    (allocation Object)->read('12','1','190','2')
/home4/traffid0/public_html/books/sales/allocations/customer_allocate.php:111:    (allocation Object)->allocation('12','1','190','2')


Thank You in advance

Re: Can't allocate my clients payments

Ok, I also get that error when allocating in the Customer Payment Entry ui as well.

I can see the amount was credited from accounts receivables and debited in 5690 Interest & Bank Charges???

shouldn't it go to a undeposited funds account in current assets???

Thanks

Re: Can't allocate my clients payments

Okay I was able to fix the debit account to be undeposited funds that setting was actually under the bank account setting but I still can't allocate a payment to an invoice

Re: Can't allocate my clients payments

Okay I was a complete fool it wasn't working because I was entering the payment in the bank charges section. Thats why I couldnt allocate because there was no balance left to allocate. There could be a if statement to prevent that. I feel like a fool. Ha