Export Registrants "Due amount" incorrect amount when deposit used

  • Jason Landau
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago #109370 by Jason Landau
Hi,
When a deposit is used the amount due is a negative number. -10 (for example)
Payments are going through paypal.
Events Booking 2.14.3

When "Full Payment" method is used the "due amount" column in the export is correctly "null" or "empty".
Thank you for your help.

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago #109374 by Tuan Pham Ngoc
Hello Jason

If it is possible, please update your site to latest version of Events Booking and try again. 2.13.3 is a quite outdated version

If you cannot update, please let us know step by step what we need to do to see the negative amount like you said (you need to submit a support ticket sending us super admin account of your site so that we can check it)

We will check to see why it happens and get it sorted

Tuan

Please Log in or Create an account to join the conversation.

  • Jason Landau
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago #109411 by Jason Landau
Hi Tuan,
I cloned the site to have a testing environment and I updated to version 3.2.1 and it didn't fix the problem.
I'm still getting a negative number on registrants export in "due amount" column of export.

To recreate problem:
1) make an event with deposit
2) register using deposit feature. (I saw same results with offline and paypal)
3) from administrator/index.php?option=com_eventbooking&view=registrants view export registrants
In the "Amount Due" column I have a negative amount that is $1 - $2 less than the deposit amount.

Any help is greatly appreciated.
I'm not sure if this is the right section but it looks pretty straight forward so it doesn't make sense to me.

This is older version:
com_eventbooking\site\helper\data.php
$row->due_amount = EventbookingHelper::formatAmount($row->amount - $row->deposit_amount, $config);

Please Log in or Create an account to join the conversation.

  • Jason Landau
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago - 7 years 3 months ago #109412 by Jason Landau
I can also confirm I get a negative number with both a deposit of a percentage and a fixed amount.
Same result.
Funny thing is the negative number in the "Amount due" column is just slightly less than the deposit amount.
Example:

Fixed deposit example: $50 deposit // -48.00 amount due

Percentage deposit example: $248 deposit // -246.60 amount due
Last edit: 7 years 3 months ago by Jason Landau.

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago #109419 by Tuan Pham Ngoc
Haven't had a chance to setup test data to test the result yet, but I might figure out the reason of the error

Please get this file, unzip it, upload to components/com_eventbooking/helper folder, then check it again and let me know the result (this code is base on latest version of Events Booking)

Regards,

Tuan
Attachments:

Please Log in or Create an account to join the conversation.

  • Jason Landau
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago #109428 by Jason Landau
Thank you for your help!
I replaced the file as you instructed.
Result is still a negative number with a slight change.

Before file replaced:
Fixed deposit example: $50 deposit // -48.00 amount due
Percentage deposit example: $248 deposit // -246.60 amount due

After file replaced:
Fixed deposit example: $50 deposit // -50.00 amount due
Percentage deposit example: $248.60 deposit // -248.60 amount due

Please Log in or Create an account to join the conversation.

  • Jason Landau
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago #109430 by Jason Landau
Tuan...
I found a typo lol.
line 969
before
$amount = $row->anount;
after
$amount = $row->amount;

Although I don't see the typo on my older version..
Any advice how to correct this one?
www.dropbox.com/s/t0wa8uz19kgl5la/data.php?dl=0
Thank you for any help!

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago #109467 by Tuan Pham Ngoc
Hi

Did you try to make that modification in the file I sent you? It should solve the issue

Please try that and let me know. If the issue not sorted, I am going to check it on tomorrow morning when I come to office

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Jason Landau
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago #109490 by Jason Landau
Hi Tuan,
Thank you for your help. No rush at all, sorry to make you work over the weekend.
I applied the changes to my Events Booking 2.14.3 version and it appears to be working although I'm still checking. Would you mind double checking my changes?
www.dropbox.com/s/i5786iz8fm98hy1/data.php?dl=0

I still don't quite understand why it didn't work if the variable wasn't set beforehand but whatever works..
Thanks again!

Please Log in or Create an account to join the conversation.

More
7 years 3 months ago #109502 by Tuan Pham Ngoc
Hi Jason

Yes, your file should work OK. The reason it didn't work is because we called $row->amount = EventbookingHelper::formatAmount($row->amount, $config); before, so after that command, $row->amount is not a number anymore, it is actually a formatted string with currency symbol, so math operator won't work anymore

Regards,

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc