Jump to content
  • 0

Can't Record Check Payments


NETLINK

Question

4 answers to this question

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

  • 0

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));
            }
        }
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...