Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] BUG in Payments.php
12-09-2013, 12:24 PM, (This post was last modified: 02-12-2014, 12:56 PM by PakRicard.)
#1
[SOLVED] BUG in Payments.php
Hi all:

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.

Thanks!


Attached Files Thumbnail(s)
               
Regards,
Pak Ricard
Reply
02-03-2014, 04:29 PM, (This post was last modified: 02-03-2014, 04:55 PM by icedlava.)
#2
RE: BUG in Payments.php
Hi Ricard,

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 . " ',

to

'" . -$_SESSION['PaymentDetail' . $identifier]->Amount . "',


If we revert this at least banktrans entries are correct for type 1 payment.
Reply
02-03-2014, 07:14 PM, (This post was last modified: 02-03-2014, 07:15 PM by phil.)
#3
RE: BUG in Payments.php
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
Reply
02-03-2014, 07:59 PM,
#4
RE: BUG in Payments.php
Thanks for fixing Phil.

I'm still going through the databases fixing the incorrect transactions, so it's good to know we've caught it now.

There are some other buglets around. I'll see if I can get some time on them.

Cheers,
Reply
02-05-2014, 06:18 PM,
#5
RE: BUG in Payments.php
(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

Thanks!!!
Regards,
Pak Ricard
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)