NETLINK Posted June 27, 2015 Report Posted June 27, 2015 In relation to the following bug, I'm unable to record check payments. Is there a workaround? http://dev.blesta.com/browse/CORE-1597 Even when the credit is 10 Cents more than the invoice total, I am unable to record the payment. Please see screenshot. Quote
0 NETLINK Posted June 27, 2015 Author Report Posted June 27, 2015 There seems to be 2 issues here. 1 is with rounding and floats not matching, and the other is with these lines of code in app/models/transactions.php: // The total remaining transaction amount is the maximum that amounts can apply if (isset($vars['transaction_id']) && ($transaction = $this->get((int)$vars['transaction_id']))) { $total = max(0, ($transaction->amount - $transaction->applied_amount)); } The problem, as far as I can see, is that when credit is being applied to an invoice, and the total credit amount needed to pay the invoice is the sum of two or more transactions. For example, the invoice amount is 100.00. A check payment of 90.00 is recorded, and then another check payment of 10.00. The total credit amount is now 100.00, from 2 transactions. However, the script above only uses the first transaction to determine the max credit amount, which would be 90.00. Quote
0 Paul Posted June 27, 2015 Report Posted June 27, 2015 What version are you running? There was an issue in 3.4.3 and 3.5 beta 4 or 5 that was resolved in 3.4.4 and 3.5.0 that this may be affected by. Michael 1 Quote
0 NETLINK Posted June 28, 2015 Author Report Posted June 28, 2015 I'm using 3.4.4. But a single transaction ID still seems to be getting passed to the verifyApply method in transactions.php when trying to apply credits. When I commented out line 704 in app/models/transactions.php, the payment was applied successfully. Line 699 to 706: if ($validate_trans_id) { $total = null; // The total remaining transaction amount is the maximum that amounts can apply if (isset($vars['transaction_id']) && ($transaction = $this->get((int)$vars['transaction_id']))) { $total = max(0, ($transaction->amount - $transaction->applied_amount)); } } Quote
0 NETLINK Posted August 6, 2015 Author Report Posted August 6, 2015 This still seems to be an issue in version 3.5.2. I'm trying to apply a check payment to an invoice. Quote
Question
NETLINK
In relation to the following bug, I'm unable to record check payments. Is there a workaround?
http://dev.blesta.com/browse/CORE-1597
Even when the credit is 10 Cents more than the invoice total, I am unable to record the payment. Please see screenshot.
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.