Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 4:28 pm
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Refill in customer native currency
PostPosted: Wed May 25, 2016 12:10 pm 
Offline

Joined: Sat Sep 15, 2012 9:11 am
Posts: 7
Hi,

I am trying to improve customer announced balances.

Issue is:
base currency is USD
customer currency GBP
then Cronjobs/currencies_update_yahoo.php runs from cron. Customer who has £1, getting wrong random balance announcement: £0.99 £1.03
It is correct, but wrong for customer to hear.

I wrote a patch then customer get topup via our own API £1 he will hear his balance increased by £1, not £0.99 not £1.03 but exactly £1. It is stable, works and balances stored in base currency without braking any other functionality.

Now I want:
1. add ability A2B_entity_logrefill.php to enter value in users currency. It require read cc_card before update, recalculate, write cc_card.
initially I modified common/lib/Form/Class.FormBO.php static function add_card_refill. It update balance correctly. However I think it is a hook that is called after insert cc_logrefill. cc_logrefill still getting value entered in the form.
I need help here.


2. I am already able to show correct balance that customer will hear on A2B_card_info.php. But would like to show on A2B_entity_card.php
I found some code admin/Public/form_data/FG_var_card.inc. Something around line 137:

$show_fields['credit'] = array("<acronym title=\"".gettext("BALANCE")."\">".gettext("BA")."</acronym>", "credit", "5%", "center", "sort", "5", "", "", "", "", "", "display_2bill");

I need to show: CONCAT(credit/announce_exchange.' '.currency) where credit, announce_exchange, currency are all columns of cc_card table.

display_2bill located in Misc.php, that has no access to other columns. How can I do it?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group