<!-- 
RSS generated by JIRA (8.13.3#813003-sha1:22ebedbb75c99b147c66f14e031dd8a2d214753a) at Sat Feb 10 07:14:19 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Jira</title>
    <link>https://jira.astppbilling.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.13.3</version>
        <build-number>813003</build-number>
        <build-date>14-01-2021</build-date>
    </build-info>


<item>
            <title>[ASTPPCOM-118] Reseller recharge</title>
                <link>https://jira.astppbilling.org/browse/ASTPPCOM-118</link>
                <project id="10608" key="ASTPPCOM">ASTPP Community</project>
                    <description>&lt;p&gt;Hi Team,&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Example: Reseller recharges a customer with 100. The customer balance is updated with 100 but so is the resellers balance.&lt;/p&gt;

&lt;p&gt;The reseller should not be updated.&lt;/p&gt;</description>
                <environment></environment>
        <key id="11938">ASTPPCOM-118</key>
            <summary>Reseller recharge</summary>
                <type id="10000" iconUrl="https://jira.astppbilling.org/secure/viewavatar?size=xsmall&amp;avatarId=10318&amp;avatarType=issuetype">Task</type>
                                                <status id="10001" iconUrl="https://jira.astppbilling.org/images/icons/status_generic.gif" description="">Done</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="fozzygo4">fozzygo4</reporter>
                        <labels>
                    </labels>
                <created>Sun, 25 Sep 2016 23:42:16 +0530</created>
                <updated>Tue, 20 Dec 2016 19:40:54 +0530</updated>
                            <resolved>Tue, 20 Dec 2016 19:40:54 +0530</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                <comments>
                            <comment id="12692" author="dev-astpp" created="Mon, 26 Sep 2016 09:45:54 +0530"  >&lt;p&gt;Its not issue !&lt;br/&gt;
Its feature because if reseller doesn&apos;t have any balance then call is not establish. so we are giving balance/credit to reseller  as well so their customer can make call.&lt;/p&gt;</comment>
                            <comment id="12693" author="fozzygo4" created="Mon, 26 Sep 2016 11:56:06 +0530"  >&lt;p&gt;That&#8217;s not logical. A resellers balance is determined and controlled by an admin of the reseller. Let me give an example.&lt;/p&gt;

&lt;p&gt;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&apos;s balance is now $100 and B&apos;s customers can now make calls.&lt;/p&gt;

&lt;p&gt;Now B has customer C. Customer C is pre-paid. Customer C will deduct the cost of the calls from the reseller B&apos;s balance and be debited from their own balance.&lt;/p&gt;

&lt;p&gt;C purchases credit from reseller B of $50.00. Reseller B adds a payment to C of $50. C&apos;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&apos;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&#8217;m sure you will agree this is how it works and is logical. This is how it works with ASTPP version 2.&lt;/p&gt;

&lt;p&gt;Now in version 3 it works like so and I will point out why it is wrong.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;C now purchases $50 from reseller B. B adds a payment to C for $50. C&apos;s balance is now $50 but reseller B is now $150. Admin A did not sell the extra $50 to reseller B.&lt;/p&gt;

&lt;p&gt;Admin A is now losing money because the resellers balance is not controlled by the administrator. &lt;/p&gt;</comment>
                            <comment id="12694" author="smrdoshi" created="Mon, 26 Sep 2016 17:57:00 +0530"  >&lt;p&gt;In ASTPP Version 2, when C was making payment via paypal, all actual money was going to admin&apos;s paypal account and reseller was not getting anything. Then admin has to recharge reseller&apos;s account manually upon their request as customer C&apos;s actual money went to admin&apos;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. &lt;/p&gt;

&lt;p&gt;Now in Version 3, when customer C is making payment via paypal, all actual money will goes to admin&apos;s paypal account but along with that same amount of recharge will be done in reseller&apos;s account. So neither admin nor reseller has to bother each other for payment whenever their customer (C) do the payment. &lt;/p&gt;

&lt;p&gt;Hope you understand. Let me know if have any further concern about the same. &lt;/p&gt;</comment>
                            <comment id="12695" author="fozzygo4" created="Mon, 26 Sep 2016 18:23:08 +0530"  >&lt;p&gt;Hi Samir,&lt;/p&gt;

&lt;p&gt;We don&#8217;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.&lt;/p&gt;

&lt;p&gt;Regards&lt;/p&gt;

&lt;p&gt;STEPHEN FORSTER&lt;br/&gt;
GO 4 IT SOLUTIONS (PTY) LTD.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;cid:image001.png@01D21805.A0966680&amp;#93;&lt;/span&gt;&lt;br/&gt;
DISCLAIMER: This document is for the personal and private attention of the addressee and should be read by the addressee only. Go 4 IT Solutions (Pty) Ltd, its subsidiaries and/or any of its associate companies accepts no liability and/or responsibility whatsoever for all and any consequences arising out of but not limited to the receipt by a party, other than the addressee, of this communication. If you have received this communication in error, please notify us immediately thereof by telephone. Kindly destroy this communication immediately. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this communication are strictly prohibited.&lt;/p&gt;

&lt;p&gt;Reception:&lt;/p&gt;

&lt;p&gt;+27 (0) 10 591-2099&lt;/p&gt;

&lt;p&gt;Direct:&lt;/p&gt;

&lt;p&gt;+27 (0) 10 591-2105&lt;/p&gt;

&lt;p&gt;Mobile:&lt;/p&gt;

&lt;p&gt;+27 (0) 83 650-8600&lt;/p&gt;

&lt;p&gt;Skype:&lt;/p&gt;

&lt;p&gt;Stephen-fozzy&lt;/p&gt;

&lt;p&gt;E-mail:&lt;/p&gt;

&lt;p&gt;stephen@go4.co.za&lt;/p&gt;

&lt;p&gt;Web:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.go4.co.zahttp://www.go4.co.za/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.go4.co.zahttp://www.go4.co.za/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From: Samir Doshi notifications@github.com&lt;br/&gt;
Reply-To: iNextrix/ASTPP reply@reply.github.com&lt;br/&gt;
Date: Monday, 26September, 2016 at 2:27 PM&lt;br/&gt;
To: iNextrix/ASTPP ASTPP@noreply.github.com&lt;br/&gt;
Cc: Stephen Forster stephen@go4.co.za, Author author@noreply.github.com&lt;br/&gt;
Subject: Re: &lt;span class=&quot;error&quot;&gt;&amp;#91;iNextrix/ASTPP&amp;#93;&lt;/span&gt; Reseller recharge (&lt;a href=&quot;https://jira.astppbilling.org/browse/ASTPPCOM-118&quot; title=&quot;Reseller recharge&quot; class=&quot;issue-link&quot; data-issue-key=&quot;ASTPPCOM-118&quot;&gt;&lt;del&gt;ASTPPCOM-118&lt;/del&gt;&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;In ASTPP Version 2, when C was making payment via paypal, all actual money was going to admin&apos;s paypal account and reseller was not getting anything. Then admin has to recharge reseller&apos;s account manually upon their request as customer C&apos;s actual money went to admin&apos;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.&lt;/p&gt;

&lt;p&gt;Now in Version 3, when customer C is making payment via paypal, all actual money will goes to admin&apos;s paypal account but along with that same amount of recharge will be done in reseller&apos;s account. So neither admin nor reseller has to bother each other for payment whenever their customer (C) do the payment.&lt;/p&gt;

&lt;p&gt;Hope you understand. Let me know if have any further concern about the same.&lt;/p&gt;

&lt;p&gt;&#8212;&lt;br/&gt;
You are receiving this because you authored the thread.&lt;br/&gt;
Reply to this email directly, view it on GitHubhttps://github.com/iNextrix/ASTPP/issues/118#issuecomment-249555745, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AT8i_3PAlyqO21-TbCDfduTW2EuRq57Yks5qt7oUgaJpZM4KF9q7.&lt;/p&gt;</comment>
                            <comment id="12696" author="fozzygo4" created="Sat, 1 Oct 2016 12:16:19 +0530"  >&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;</comment>
                            <comment id="12697" author="smrdoshi" created="Sat, 1 Oct 2016 12:20:01 +0530"  >&lt;p&gt;Hi Stephen,&lt;/p&gt;

&lt;p&gt;Lets have discussion on Monday for the same. Will ping you on skype.&lt;/p&gt;

&lt;h2&gt;&lt;a name=&quot;BestRegards&quot;&gt;&lt;/a&gt;Best Regards&lt;/h2&gt;

&lt;p&gt;Samir Doshi&lt;br/&gt;
&lt;em&gt;iNextrix Technologie&lt;/em&gt;&lt;em&gt;s Pvt. Ltd&lt;/em&gt;.&lt;br/&gt;
&lt;a href=&quot;http://www.inextrix.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.inextrix.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclaimer:&lt;/em&gt;&lt;br/&gt;
The information contained in this communication is confidential and may be&lt;br/&gt;
legally privileged. It is intended solely for the use of the individual or&lt;br/&gt;
entity to whom it is addressed and others authorised to receive it. If you&lt;br/&gt;
are not the intended recipient you are hereby notified that any disclosure,&lt;br/&gt;
copying, distribution or taking action in reliance of the contents of this&lt;br/&gt;
information is strictly prohibited and may be unlawful.&lt;/p&gt;

&lt;p&gt;On Sat, Oct 1, 2016 at 12:16 PM, Stephen Forster notifications@github.com&lt;br/&gt;
wrote:&lt;/p&gt;

&lt;p&gt;&amp;gt; Hi Samir, I need you to please assist me in understanding why this new way&lt;br/&gt;
&amp;gt; of recharging reseller customers is also topping up the reseller account at&lt;br/&gt;
&amp;gt; the same time.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; If I am the supplier to the reseller and my reseller is pre-paid then the&lt;br/&gt;
&amp;gt; resellers balance should only be effected when I the admin top-up the&lt;br/&gt;
&amp;gt; resellers account.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; Right now the reseller is able to top-up his own account just by topping&lt;br/&gt;
&amp;gt; up his customer account. Surely you understand that this is not the correct&lt;br/&gt;
&amp;gt; way. How must I the admin now control how much credit the reseller has. In&lt;br/&gt;
&amp;gt; this scenario he will never run out of credit.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; Please take a closer look at the problem and maybe we can have a Skype /&lt;br/&gt;
&amp;gt; Teamviewer session so that I can show you what I mean.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; &#8212;&lt;br/&gt;
&amp;gt; You are receiving this because you commented.&lt;br/&gt;
&amp;gt; Reply to this email directly, view it on GitHub&lt;br/&gt;
&amp;gt; &lt;a href=&quot;https://github.com/iNextrix/ASTPP/issues/118#issuecomment-250896428&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/iNextrix/ASTPP/issues/118#issuecomment-250896428&lt;/a&gt;, or mute&lt;br/&gt;
&amp;gt; the thread&lt;br/&gt;
&amp;gt; &lt;a href=&quot;https://github.com/notifications/unsubscribe-auth/AA6gcauC0AYCP8tSnhM6olZA5c_TiFT2ks5qvgG7gaJpZM4KF9q7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/notifications/unsubscribe-auth/AA6gcauC0AYCP8tSnhM6olZA5c_TiFT2ks5qvgG7gaJpZM4KF9q7&lt;/a&gt;&lt;br/&gt;
&amp;gt; .&lt;/p&gt;</comment>
                            <comment id="12698" author="fozzygo4" created="Sat, 1 Oct 2016 12:27:11 +0530"  >&lt;p&gt;Awesome thanks!&lt;/p&gt;</comment>
                            <comment id="12699" author="fozzygo4" created="Mon, 19 Dec 2016 13:25:40 +0530"  >&lt;p&gt;Hi Samir,&lt;/p&gt;

&lt;p&gt;It has been a while since we chatted. I had some time to go through the code in libraries &amp;gt; accounts.php&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;($login_user_data[&lt;span class=&quot;code-quote&quot;&gt;&apos;type&apos;&lt;/span&gt;] ==1){
		      $reseller_ids=$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;common-&amp;gt;get_parent_info($login_user_data[&lt;span class=&quot;code-quote&quot;&gt;&apos;id&apos;&lt;/span&gt;],0);
		      $reseller_ids=rtrim($reseller_ids,&lt;span class=&quot;code-quote&quot;&gt;&quot;,&quot;&lt;/span&gt;);
		      $reseller_arr=explode(&lt;span class=&quot;code-quote&quot;&gt;&quot;,&quot;&lt;/span&gt;,$reseller_ids);
		      &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt;(!empty($reseller_arr)){
			 $custom_array=$post_array;
			foreach($reseller_arr as $key=&amp;gt;$reseller_id){
			  $custom_array[&lt;span class=&quot;code-quote&quot;&gt;&apos;id&apos;&lt;/span&gt;]=$reseller_id;
			  $response = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;accounts_model-&amp;gt;account_process_payment($custom_array);
			  $reseller_info=(array)$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;db-&amp;gt;get_where(&lt;span class=&quot;code-quote&quot;&gt;&apos;accounts&apos;&lt;/span&gt;,array(&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;=&amp;gt;$reseller_id))-&amp;gt;first_row();
			  $last_invoice_ID = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;get_invoice_date(&lt;span class=&quot;code-quote&quot;&gt;&quot;invoiceid&quot;&lt;/span&gt;,$reseller_info[&lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;]);
			  $invoice_id=$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;invoices-&amp;gt;invoices-&amp;gt;generate_receipt($reseller_info[&lt;span class=&quot;code-quote&quot;&gt;&apos;id&apos;&lt;/span&gt;],$custom_array[&lt;span class=&quot;code-quote&quot;&gt;&apos;credit&apos;&lt;/span&gt;],$reseller_info,$last_invoice_ID+1,$invoice_prefix,$due_date);
			  $account_balance = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;common-&amp;gt;get_field_name(&lt;span class=&quot;code-quote&quot;&gt;&apos;balance&apos;&lt;/span&gt;, &lt;span class=&quot;code-quote&quot;&gt;&apos;accounts&apos;&lt;/span&gt;, $reseller_info[&lt;span class=&quot;code-quote&quot;&gt;&apos;id&apos;&lt;/span&gt;]);
			  $insert_arr = array(&lt;span class=&quot;code-quote&quot;&gt;&quot;accountid&quot;&lt;/span&gt; =&amp;gt; $reseller_info[&lt;span class=&quot;code-quote&quot;&gt;&apos;id&apos;&lt;/span&gt;],
				      &lt;span class=&quot;code-quote&quot;&gt;&quot;description&quot;&lt;/span&gt; =&amp;gt; trim($custom_array[&lt;span class=&quot;code-quote&quot;&gt;&apos;notes&apos;&lt;/span&gt;]),
				      &lt;span class=&quot;code-quote&quot;&gt;&quot;debit&quot;&lt;/span&gt; =&amp;gt; 0,
				      &lt;span class=&quot;code-quote&quot;&gt;&quot;credit&quot;&lt;/span&gt; =&amp;gt; $custom_array[&lt;span class=&quot;code-quote&quot;&gt;&apos;credit&apos;&lt;/span&gt;],
				      &lt;span class=&quot;code-quote&quot;&gt;&quot;created_date&quot;&lt;/span&gt; =&amp;gt; gmdate(&lt;span class=&quot;code-quote&quot;&gt;&quot;Y-m-d H:i:s&quot;&lt;/span&gt;), 
				      &lt;span class=&quot;code-quote&quot;&gt;&quot;invoiceid&quot;&lt;/span&gt;=&amp;gt;$invoice_id,
				      &lt;span class=&quot;code-quote&quot;&gt;&quot;reseller_id&quot;&lt;/span&gt;=&amp;gt;$reseller_info[&lt;span class=&quot;code-quote&quot;&gt;&apos;reseller_id&apos;&lt;/span&gt;],
				      &lt;span class=&quot;code-quote&quot;&gt;&quot;item_type&quot;&lt;/span&gt;=&amp;gt;&lt;span class=&quot;code-quote&quot;&gt;&apos;Refill&apos;&lt;/span&gt;,
				      &lt;span class=&quot;code-quote&quot;&gt;&quot;item_id&quot;&lt;/span&gt;=&amp;gt;&lt;span class=&quot;code-quote&quot;&gt;&apos;0&apos;&lt;/span&gt;,
  				      &lt;span class=&quot;code-quote&quot;&gt;&apos;before_balance&apos;&lt;/span&gt;=&amp;gt;$account_balance-$custom_array[&lt;span class=&quot;code-quote&quot;&gt;&apos;credit&apos;&lt;/span&gt;],
				      &lt;span class=&quot;code-quote&quot;&gt;&apos;after_balance&apos;&lt;/span&gt;=&amp;gt;$account_balance,
				    );
			    $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;db-&amp;gt;insert(&lt;span class=&quot;code-quote&quot;&gt;&quot;invoice_details&quot;&lt;/span&gt;, $insert_arr);
			}
		      }
		    }

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="12700" author="smrdoshi" created="Tue, 20 Dec 2016 19:40:54 +0530"  >&lt;p&gt;Thanks Stephen. We will check it out and do needful.&lt;/p&gt;


&lt;h2&gt;&lt;a name=&quot;BestRegards&quot;&gt;&lt;/a&gt;Best Regards&lt;/h2&gt;
&lt;p&gt;Samir Doshi&lt;br/&gt;
&lt;em&gt;iNextrix Technologie&lt;/em&gt;&lt;em&gt;s Pvt. Ltd&lt;/em&gt;.&lt;br/&gt;
&lt;a href=&quot;http://www.inextrix.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.inextrix.com&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;&lt;em&gt;Disclaimer:&lt;/em&gt;&lt;br/&gt;
The information contained in this communication is confidential and may be&lt;br/&gt;
legally privileged. It is intended solely for the use of the individual or&lt;br/&gt;
entity to whom it is addressed and others authorised to receive it. If you&lt;br/&gt;
are not the intended recipient you are hereby notified that any disclosure,&lt;br/&gt;
copying, distribution or taking action in reliance of the contents of this&lt;br/&gt;
information is strictly prohibited and may be unlawful.&lt;/p&gt;

&lt;p&gt;On Mon, Dec 19, 2016 at 1:25 PM, Stephen Forster &amp;lt;notifications@github.com&amp;gt;&lt;br/&gt;
wrote:&lt;/p&gt;

&lt;p&gt;&amp;gt; Hi Samir,&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt; It has been a while since we chatted. I had some time to go through the&lt;br/&gt;
&amp;gt; code in libraries &amp;gt; accounts.php&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt; I commented out the following code and it has fixed my issue with the&lt;br/&gt;
&amp;gt; resellers balance being updated at the same time as the resellers customers&lt;br/&gt;
&amp;gt; balance when processing a manual payment.&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt; if($login_user_data&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;type&amp;#39;&amp;#93;&lt;/span&gt; ==1){&lt;br/&gt;
&amp;gt; 		      $reseller_ids=$this-&amp;gt;common-&amp;gt;get_parent_info($login_user_data&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;id&amp;#39;&amp;#93;&lt;/span&gt;,0);&lt;br/&gt;
&amp;gt; 		      $reseller_ids=rtrim($reseller_ids,&quot;,&quot;);&lt;br/&gt;
&amp;gt; 		      $reseller_arr=explode(&quot;,&quot;,$reseller_ids);&lt;br/&gt;
&amp;gt; 		      if(!empty($reseller_arr)){&lt;br/&gt;
&amp;gt; 			 $custom_array=$post_array;&lt;br/&gt;
&amp;gt; 			foreach($reseller_arr as $key=&amp;gt;$reseller_id)&lt;/p&gt;
{
&amp;gt; 			  $custom_array[&apos;id&apos;]=$reseller_id;
&amp;gt; 			  $response = $this-&amp;gt;accounts_model-&amp;gt;account_process_payment($custom_array);
&amp;gt; 			  $reseller_info=(array)$this-&amp;gt;db-&amp;gt;get_where(&apos;accounts&apos;,array(&quot;id&quot;=&amp;gt;$reseller_id))-&amp;gt;first_row();
&amp;gt; 			  $last_invoice_ID = $this-&amp;gt;get_invoice_date(&quot;invoiceid&quot;,$reseller_info[&quot;id&quot;]);
&amp;gt; 			  $invoice_id=$this-&amp;gt;invoices-&amp;gt;invoices-&amp;gt;generate_receipt($reseller_info[&apos;id&apos;],$custom_array[&apos;credit&apos;],$reseller_info,$last_invoice_ID+1,$invoice_prefix,$due_date);
&amp;gt; 			  $account_balance = $this-&amp;gt;common-&amp;gt;get_field_name(&apos;balance&apos;, &apos;accounts&apos;, $reseller_info[&apos;id&apos;]);
&amp;gt; 			  $insert_arr = array(&quot;accountid&quot; =&amp;gt; $reseller_info[&apos;id&apos;],
&amp;gt; 				      &quot;description&quot; =&amp;gt; trim($custom_array[&apos;notes&apos;]),
&amp;gt; 				      &quot;debit&quot; =&amp;gt; 0,
&amp;gt; 				      &quot;credit&quot; =&amp;gt; $custom_array[&apos;credit&apos;],
&amp;gt; 				      &quot;created_date&quot; =&amp;gt; gmdate(&quot;Y-m-d H:i:s&quot;),
&amp;gt; 				      &quot;invoiceid&quot;=&amp;gt;$invoice_id,
&amp;gt; 				      &quot;reseller_id&quot;=&amp;gt;$reseller_info[&apos;reseller_id&apos;],
&amp;gt; 				      &quot;item_type&quot;=&amp;gt;&apos;Refill&apos;,
&amp;gt; 				      &quot;item_id&quot;=&amp;gt;&apos;0&apos;,
&amp;gt;   				      &apos;before_balance&apos;=&amp;gt;$account_balance-$custom_array[&apos;credit&apos;],
&amp;gt; 				      &apos;after_balance&apos;=&amp;gt;$account_balance,
&amp;gt; 				    );
&amp;gt; 			    $this-&amp;gt;db-&amp;gt;insert(&quot;invoice_details&quot;, $insert_arr);
&amp;gt; 			}
&lt;p&gt;&amp;gt; 		      }&lt;br/&gt;
&amp;gt; 		    }&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt;&lt;br/&gt;
&amp;gt; &#8212;&lt;br/&gt;
&amp;gt; You are receiving this because you commented.&lt;br/&gt;
&amp;gt; Reply to this email directly, view it on GitHub&lt;br/&gt;
&amp;gt; &amp;lt;&lt;a href=&quot;https://github.com/iNextrix/ASTPP/issues/118#issuecomment-267902747&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/iNextrix/ASTPP/issues/118#issuecomment-267902747&lt;/a&gt;&amp;gt;, or mute&lt;br/&gt;
&amp;gt; the thread&lt;br/&gt;
&amp;gt; &amp;lt;&lt;a href=&quot;https://github.com/notifications/unsubscribe-auth/AA6gcRxh_XuyFN0k5IdxF2glTgQsuYxYks5rJjh8gaJpZM4KF9q7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/notifications/unsubscribe-auth/AA6gcRxh_XuyFN0k5IdxF2glTgQsuYxYks5rJjh8gaJpZM4KF9q7&lt;/a&gt;&amp;gt;&lt;br/&gt;
&amp;gt; .&lt;br/&gt;
&amp;gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10703" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>118</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10006" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i009d3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>