~ 1 min read

daloRADIUS bug fix for refill traffic or time

share this story on
An open source contribution from Ezequiel Villarreal to fix a bug in daloRADIUS's accounting interface

With thanks to Ezequiel Villarreal, and another fine example of the open source movement in general and the daloRADIUS users community in specific, a patch has been contributed to solve an issue with refilling a user’s traffic or time limits in daloRADIUS’s Accounting interface.

Ezequiel was kind enough to e-mail information about a problem, along with constructive feedback on the project (always great to hear!), but not without also sending the fix for it too.

> Hi! Liran,  
> I’ve downloaded daloradius, it is a great plataform  ![:-)](https://web.archive.org/web/20140625184339im_/http://enginx.com/wp-includes/images/smilies/icon_smile.gif)

> I’ve found a bug when you do a Refill Traffic, it gives you an insert error, but you could see that only debugging.

> On “./include/management/userOperations.php”You have: $sql = “INSERT INTO “.$configValues['CONFIG_DB_TBL_DALOBILLINGHISTORY']. ” (id,username,**planName**,billAmount,billAction,billPerformer,billReason,”. ” paymentmethod,cash,creditcardname,creditcardnumber,creditcardverification,creditcardtype,creditcardexp,”. ” creationdate,creationby”. “)”. ” VALUES “………………..

> There is not planName on billing_history, only you have a planId. then, refilling is not saved on that table.

> I’ve changed code to$sql = “INSERT INTO “.$configValues['CONFIG_DB_TBL_DALOBILLINGHISTORY']. ” (id,username,**planID**,billAmount,billAction,billPerformer,billReason,”. ” paymentmethod,cash,creditcardname,creditcardnumber,creditcardverification,creditcardtype,creditcardexp,”. ” creationdate,creationby”.

> The same problem on refilling time.
> 
> And it works perfectly!  
> Thank you very much!

> Best Regards,  
> Ezequiel Villarreal

daloRADIUS accounting and reporting capabilities