[ASTPPCOM-118] Reseller recharge Created: 25/Sep/16 Updated: 20/Dec/16 Resolved: 20/Dec/16 |
|
| Status: | Done |
| Project: | ASTPP Community |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | ||
| Reporter: | fozzygo4 | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Hi Team, I picked up an issue from my resellers. If they recharge their customers with any amount then their own balance (reseller balance) gets updated as well. Example: Reseller recharges a customer with 100. The customer balance is updated with 100 but so is the resellers balance. The reseller should not be updated. |
| Comments |
| Comment by dev-astpp [ 26/Sep/16 ] |
|
Its not issue ! |
| Comment by fozzygo4 [ 26/Sep/16 ] |
|
That’s not logical. A resellers balance is determined and controlled by an admin of the reseller. Let me give an example. I am a admin (Company A) and I get a new reseller called Company B who wants to resell my services to their customers. I setup a pre-paid reseller account for B. B has 0 credit available because B needs to purchase call credit to be able to sell the credit to his customers. B purchases $100 and admin A loads a payment to reseller B for $100. B's balance is now $100 and B's customers can now make calls. Now B has customer C. Customer C is pre-paid. Customer C will deduct the cost of the calls from the reseller B's balance and be debited from their own balance. C purchases credit from reseller B of $50.00. Reseller B adds a payment to C of $50. C's balance is now $50 and can make calls but reseller B should still remain at $100 because no calls have been made. If C makes a call for $1 then it should be deducted from C's balance as well as reseller B (Provided there is now profit added, B should be $99 and C should be $49 after the call). If there is profit and C makes a call for $1 and the cost is 50c then $1 is deducted from C and 50c is deducted from reseller B. I’m sure you will agree this is how it works and is logical. This is how it works with ASTPP version 2. Now in version 3 it works like so and I will point out why it is wrong. Same scenario as above with the setup so we have admin A, reseller B and customer of reseller B called C. B purchases credit from A to be able to sell calls to their customers. B has $100 that they can now sell and I (Admin A) have been paid $100 from B. C now purchases $50 from reseller B. B adds a payment to C for $50. C's balance is now $50 but reseller B is now $150. Admin A did not sell the extra $50 to reseller B. Admin A is now losing money because the resellers balance is not controlled by the administrator. |
| Comment by Samir Doshi [ 26/Sep/16 ] |
|
In ASTPP Version 2, when C was making payment via paypal, all actual money was going to admin's paypal account and reseller was not getting anything. Then admin has to recharge reseller's account manually upon their request as customer C's actual money went to admin's paypal account. Handing manual process of recharge between admin and reseller was lengthy and not proper, so we automated the process in Version 3. Now in Version 3, when customer C is making payment via paypal, all actual money will goes to admin's paypal account but along with that same amount of recharge will be done in reseller's account. So neither admin nor reseller has to bother each other for payment whenever their customer (C) do the payment. Hope you understand. Let me know if have any further concern about the same. |
| Comment by fozzygo4 [ 26/Sep/16 ] |
|
Hi Samir, We don’t use PayPal and prefer to use the manual process. Even if we did use Paypal then why is the reseller getting credited with the money that should go towards the customer. The reseller is my customer and I need to manage the resellers credit / debit. Can I chat to you on Skype and perhaps I can show you what I mean via teamviewer. Regards STEPHEN FORSTER [cid:image001.png@01D21805.A0966680] Reception: +27 (0) 10 591-2099 Direct: +27 (0) 10 591-2105 Mobile: +27 (0) 83 650-8600 Skype: Stephen-fozzy E-mail: stephen@go4.co.za Web: http://www.go4.co.zahttp://www.go4.co.za/ From: Samir Doshi notifications@github.com In ASTPP Version 2, when C was making payment via paypal, all actual money was going to admin's paypal account and reseller was not getting anything. Then admin has to recharge reseller's account manually upon their request as customer C's actual money went to admin's paypal account. Handing manual process of recharge between admin and reseller was lengthy and not proper, so we automated the process in Version 3. Now in Version 3, when customer C is making payment via paypal, all actual money will goes to admin's paypal account but along with that same amount of recharge will be done in reseller's account. So neither admin nor reseller has to bother each other for payment whenever their customer (C) do the payment. Hope you understand. Let me know if have any further concern about the same. — |
| Comment by fozzygo4 [ 01/Oct/16 ] |
|
Hi Samir, I need you to please assist me in understanding why this new way of recharging reseller customers is also topping up the reseller account at the same time. If I am the supplier to the reseller and my reseller is pre-paid then the resellers balance should only be effected when I the admin top-up the resellers account. Right now the reseller is able to top-up his own account just by topping up his customer account. Surely you understand that this is not the correct way. How must I the admin now control how much credit the reseller has. In this scenario he will never run out of credit. Please take a closer look at the problem and maybe we can have a Skype / Teamviewer session so that I can show you what I mean. |
| Comment by Samir Doshi [ 01/Oct/16 ] |
|
Hi Stephen, Lets have discussion on Monday for the same. Will ping you on skype. Best RegardsSamir Doshi Disclaimer: On Sat, Oct 1, 2016 at 12:16 PM, Stephen Forster notifications@github.com > Hi Samir, I need you to please assist me in understanding why this new way |
| Comment by fozzygo4 [ 01/Oct/16 ] |
|
Awesome thanks! |
| Comment by fozzygo4 [ 19/Dec/16 ] |
|
Hi Samir, It has been a while since we chatted. I had some time to go through the code in libraries > accounts.php I commented out the following code and it has fixed my issue with the resellers balance being updated at the same time as the resellers customers balance when processing a manual payment. if($login_user_data['type'] ==1){ $reseller_ids=$this->common->get_parent_info($login_user_data['id'],0); $reseller_ids=rtrim($reseller_ids,","); $reseller_arr=explode(",",$reseller_ids); if(!empty($reseller_arr)){ $custom_array=$post_array; foreach($reseller_arr as $key=>$reseller_id){ $custom_array['id']=$reseller_id; $response = $this->accounts_model->account_process_payment($custom_array); $reseller_info=(array)$this->db->get_where('accounts',array("id"=>$reseller_id))->first_row(); $last_invoice_ID = $this->get_invoice_date("invoiceid",$reseller_info["id"]); $invoice_id=$this->invoices->invoices->generate_receipt($reseller_info['id'],$custom_array['credit'],$reseller_info,$last_invoice_ID+1,$invoice_prefix,$due_date); $account_balance = $this->common->get_field_name('balance', 'accounts', $reseller_info['id']); $insert_arr = array("accountid" => $reseller_info['id'], "description" => trim($custom_array['notes']), "debit" => 0, "credit" => $custom_array['credit'], "created_date" => gmdate("Y-m-d H:i:s"), "invoiceid"=>$invoice_id, "reseller_id"=>$reseller_info['reseller_id'], "item_type"=>'Refill', "item_id"=>'0', 'before_balance'=>$account_balance-$custom_array['credit'], 'after_balance'=>$account_balance, ); $this->db->insert("invoice_details", $insert_arr); } } } |
| Comment by Samir Doshi [ 20/Dec/16 ] |
|
Thanks Stephen. We will check it out and do needful. Best RegardsSamir Doshi Disclaimer: On Mon, Dec 19, 2016 at 1:25 PM, Stephen Forster <notifications@github.com> > Hi Samir, > } |