Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Apr 19, 2024 5:35 am
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Invoice duplicated amount
PostPosted: Fri Sep 04, 2009 12:25 am 
Offline

Joined: Tue Mar 17, 2009 4:00 pm
Posts: 153
Location: Where the sun shines
[[ I am copying here some exchanges regarding invoices that have been made in ticket #636 - may interest forum users as well]]


When a customers invoice is generated automatically by the cron job at the beginning of a new month and the previous invoice has not been paid yet the system generates the new invoice adding the amount of the previous invoice to the new invoice which is not correct. e.g. Month july invoice 100 USD, Month August 120 USD of calls the invoice generated is 220 USD and not 120 USD as it should be.

The customer now has 2 invoices one for 100 and another for 220 so he thinks he ows us 320 which is not correct!

He should only have 2 invoices with 100 and 120 for a total of 220!

Very often it is longer that one month for a postpaid customer to pay and the a monthly invoice should have only the consumption for that month on it.

Change History
09/03/09 22:58:34 changed by jean ¶
Hi, I noticed this as well. This is because the batch bills for the customer 'credit' (ie the outstanding balance).

The workaround is to refill the account straight after the invoice generation, or shortly after.

As such, it is not so "crazy"... you have two risks to manage, one is the unbilled amount, and this is done through credit limit/balance - the other risk is billed invoice collection - and this is done through a proper collection process. Not refilling the account makes you confuse these risks, which are quite different.

In the end, your maximum total exposure is not just the credit limit, but the credit limit multiplied by (the number of outstanding invoices you allow + 1)

Hope this is clear ! if not, we may want to have a more thorough discussion in the forum !

J.

09/03/09 23:39:08 changed by speschko ¶
Your "workarround" will obviously work but in this case it is not correct to "refill" or Pay a customer account until he has really paid. The Payment can also be done by the customer through Paypal and in this case your solution would then provoke the customer having paid double because you manually did the refill and then he paid with Paypal. The proper way would be to invoice only the usage for the month that is being billed. The customers balance will still reflect that he has the total outstanding.

09/03/09 23:52:35 changed by jean ¶
I must admit I dont use Paypal - in case of manual payment, the screen offers to refill or not the account - so I just dont refill at actual payment time & I'm good !

however, if you want to bill the call usage and not the credit, this is fairly simple to change. in file a2billing_batch_billing.php, around line 249, replace:

$amount = abs($Customercredit?);

with

$amount = $amount_calls;

and that should generate an invoice with the call charges equal to what appears in the receipt.

as to integrate this is the core A2B, this is not straightforward - I am not sure that everybody considers it this way. kr j.

09/04/09 00:11:12 changed by speschko ¶
OK I believe to know why you think this behavior is correct because you are thinking of Prepaid Customers. In this case the correction should only be for Post Paid Customers because that is where you pay for usage after getting the bill, and specifically in my case my customer has 45 days to pay his bills so this would increase his consumption every month by the billing amount from the previous month and I definitely do not with to add payments before he has really paid me.

The accountants would get a bit confused seeing payments in their account that they have not actually transferred money for. I cannot believe that this is not the same anywhere else in the world. I hope that this error can be dealt with.

I will test your batch_billing modification. Is there any way you know that I could rerun the billing that was done on 1st of September without charging for the calls that have been generated since then in the month of August??


Top
 Profile  
 
 Post subject: Re: Invoice duplicated amount
PostPosted: Fri Sep 04, 2009 12:45 am 
Offline

Joined: Tue Mar 17, 2009 4:00 pm
Posts: 153
Location: Where the sun shines
Quote:
Is there any way you know that I could rerun the billing that was done on 1st of September without charging for the calls that have been generated since then in the month of August??


if there has been little / no activity on your system, then you delete all cc_invoice, cc_invoice_item, cc_receipt, cc_receipt_item, cc_billing_customer entry that have a date in the range of start/stop of your billing. then you update all your customer billing day to current day & rerun (and set the billing day back).

obviously, make a db backup first - just in case !
ideally, you even take this backup to another box, restore it, test the changes there, and then run your bills on the prod system !

I cant guarantee the above procedure will work 100% - however, I've used it several times in a test environment to test evolutions of the billing script.

kind regards
J.


Top
 Profile  
 
 Post subject: Re: Invoice duplicated amount
PostPosted: Sat Sep 05, 2009 7:44 pm 
Offline

Joined: Mon Oct 01, 2007 10:44 pm
Posts: 230
Location: Bovey, Devon, UK
Oh boy, this is not good. Thanks for the heads up. I don't know if this is due to be fixed this month, but if it isn't I write and post a patch.


Regards


Top
 Profile  
 
 Post subject: Re: Invoice duplicated amount
PostPosted: Mon Dec 07, 2009 5:37 pm 
Offline

Joined: Tue May 23, 2006 8:30 pm
Posts: 67
Hi Cerien and Middletn
I was looking for this feature for a long time, actual 1.4.2.1 version do not support it so I would like to know what version you are using and how to apply the changes or patch that put me on the right path to creates invoices with previous non-paid amounts included.

regards
rafael


Top
 Profile  
 
 Post subject: Re: Invoice duplicated amount
PostPosted: Mon Dec 07, 2009 6:55 pm 
Offline

Joined: Tue Mar 17, 2009 4:00 pm
Posts: 153
Location: Where the sun shines
Hi

This applied to version 1.4.0 - around revision 2200-2280.

My understanding was that non-paid invoices were indeed included, hence the 'duplication' of the post - not so sure what has changed afterwards !

kr

j.


Top
 Profile  
 
 Post subject: Re: Invoice duplicated amount
PostPosted: Fri Dec 11, 2009 1:07 am 
Offline

Joined: Tue May 23, 2006 8:30 pm
Posts: 67
Thanks
I was doing some tests in my lab but cant understand this behavior:

Look the items of invoice created using the script at 2009-12-01:

2009-11-26 CHARGE :49 - MegaXX 26.42 0.00% 26.42
2009-12-01 Amount for periode before the 2009-12-01 16.62 0.00% 16.62

Those charges are ok but in the "PREVIEW NEXT INVOICE" section appears this items:

2009-12-01 CHARGE :49 - MegaXX 26.420000 0.00% 26.420000
2009/12/10 Amount for periode between the 1969-12-31 and 21.561890 0.00% 21.561890

Subtotal excl. VAT: 47.99 USD
VAT 0%: 0.00 USD
Total incl. VAT: 47.99 USD


This 'preview' includes the new monthly subscription and the charges for calls that customer mades from last billing plus the non-paid ones, ie, 4.94 + 16.62 = 21.56

First Issue: Why this 'Preview' not includes the non-paid 'subscription' charge (added at 2009-11-26 in this example)? I think the total in preview next invoice should be the sum of all non-paid items like:

2009-11-26 CHARGE :49 - MegaXX 26.42 0.00% 26.42
2009-12-01 CHARGE :49 - MegaXX 26.42 0.00% 26.42
2009/12/10 Amount for periode between the 1969-12-31 and ... 21.561890 0.00% 21.561890
Total = 74.4

Second Issue: The preview shows a bad description the may be confusing for customers (Amount for periode between the 1969-12-31...)

Third Issue: I run 'a2billing_batch_billing.php' to create a new invoice for this customer (I changed the invoice date from 1 to 10) and invoice its created but not includes any non-paid charges, not even the acumulated 'amount for perioded..' that appears in the 'preview' so this is the new invoice:

Date
2009-12-10 Invoice number
200900000176 Client Account Number 8338532204

Date Description Cost excl. VAT VAT Cost incl. VAT
2009-12-01 CHARGE :49 - MegaXX 26.42 0.00% 26.42
2009-12-10 Amount for period between the 2009-12-01 and 2009-12-10 4.94 0.00% 4.94

Subtotal excl. VAT: 31.36 USD
VAT0.00%: 0.00 USD
Total incl. VAT: 31.36 USD

Its confusing but finally I can conlude the billing script not include the non-paid invoice amounts in the new ones, its there any way to change this behavior?

thanks,
rafael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 
Voice Broadcast System


All times are UTC


Who is online

Users browsing this forum: No registered users and 13 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group