Using latest Payments.php in SVN with a bank account in non-functional currency I found it does not record the correct amounts in banktrans table.
Example:
Functional currency IDR
Bank account in USD: Initial balance 10.000 USD
Go to Payments.php and do the following payments from this USD bank account (currency of payment USD as well)
Payment 1 = 100 USD
Payment 2 = 200 USD
Payment 3 = 300 USD
We should expect 3 new rows in banktrans with -100, -200 and -300 USD but we get 3 rows with - 600 USD .
Also the bank reconciliation, gets wrong info as well, initial balance gets wrong, and quantities to reconcile get wrong as well.
Please check 4 attached files where you can clearly see this issue.
Not sure when this problem showed up. It's a quite tricky script, so I would prefer if one of the webERP masters could fix it.
This bug is still a problem as of today. We have had to halt user input until it is fixed. It was picked up when the bank reconciliation was attempted.
We have a large number of transactions that have to be fixed in webERP installations for banktrans table transactions.
Coincidentally I saw your post on the list today regarding this bug. I was about to also start looking at the code as it's become quite urgent to fix.
Our transactions are correct up to Sept 2013 at least.
From what I can gather Phil is looking at Payments.php now so I will hold off on that for now.
Thanks for highlighting the bug.
Cheers,
Actually I think I found the problem:
Revision 6350 Line 605
Was changed from:
'" . -$PaymentItem->Amount . " ',
I think we only need a single total here otherwise we end up with a bank payment for each gl analysis line.
I modified it to create just a single total banktrans for the total of all GL analysis lines.
Sorry it took me a while to get around to this one... had forgotten - always appreciate a reminder
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
(02-03-2014, 07:14 PM)phil Wrote: I think we only need a single total here otherwise we end up with a bank payment for each gl analysis line.
I modified it to create just a single total banktrans for the total of all GL analysis lines.
Sorry it took me a while to get around to this one... had forgotten - always appreciate a reminder