asterisk2billing.org
http://forum.asterisk2billing.org/

billing batch uses incorrect field
http://forum.asterisk2billing.org/viewtopic.php?f=22&t=5404
Page 1 of 1

Author:  cerien [ Thu May 14, 2009 3:46 pm ]
Post subject:  billing batch uses incorrect field

Hello,

the a2billing_batch_billing.php retrieves the last billing date for a customer from the cc_billing_customer table, field date.

however, the update of this table, done at line 157, uses a field named "start_date" -> therefore, the table is not updated, and subsequent billing runs pickup all the calls ! this should be replaced simply with 'date', imho

strange enough, I have entries in this table - havent identified how they got there !

I've looked into creating a trac entry, but beyond the fact I have no clue how it works (still can guess), looks like it requires a login, & the forum login doesnt work....


jean

Author:  cerien [ Thu May 14, 2009 4:45 pm ]
Post subject:  Re: billing batch uses incorrect field

cerien wrote:
strange enough, I have entries in this table - havent identified how they got there !



ok - i got it now... the first run for a customer has no value in the php variable start_date, therefore, the table insert does not specify the clause, and the 'date' field is populated with default value, ie current timestamp..

so the 2nd run is ok, but the third & subsequent will fail !

jean

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/