Billing option to show credit balances shows zero balances

For complex topics that regular users would not be interested in. For power users and database administrators.
Post Reply
mowgli
Posts: 134
Joined: Fri Sep 14, 2007 1:42 pm

Billing option to show credit balances shows zero balances

Post by mowgli »

Something seems to have happened between versions 6.4 and 6.6. In version 6.4, if we allow credit balances to come up in the billing run list by unchecking the billing option box to exclude them, we don't get any accounts with zero balances. Simply upgrading the database to version 6.6 with the same billing options, we get lots of zero balance accounts showing up. This problem continues into version 7.0. I've observed this behavior in 3 different databases; a demo, a conversion from Dentrix, and a conversion from Softdent (conversions done by 2 different companies). It makes no difference whether a "balance is less than" number is entered; but the number of zero accounts is reduced if "Balances don't subtract insurance estimate" is unchecked in Setup > Modules.
User avatar
jordansparks
Site Admin
Posts: 5776
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Billing option to show credit balances shows zero balances

Post by jordansparks »

Pick one of the patients that's showing up and look at the raw data in the database in the patient table. Is the balance something like 0.00000000001 ?
Jordan Sparks, DMD
http://www.opendental.com
mowgli
Posts: 134
Joined: Fri Sep 14, 2007 1:42 pm

Re: Billing option to show credit balances shows zero balances

Post by mowgli »

Selected 5 of them; yes, here's what it looks like:

Image
User avatar
jordansparks
Site Admin
Posts: 5776
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Billing option to show credit balances shows zero balances

Post by jordansparks »

I've put it down as a bug. The good news is that I see the same very small numbers in my database, so it should be easy to duplicate.
Jordan Sparks, DMD
http://www.opendental.com
mowgli
Posts: 134
Joined: Fri Sep 14, 2007 1:42 pm

Re: Billing option to show credit balances shows zero balances

Post by mowgli »

The "List<PatAging> GetAgingList" method in Patients.cs looks for any negative balance less than zero, which would include these tiny calculated balances. I tested looking for any negative balance less than half a cent instead, and it left these off the list. Could this be a solution?

if(!excludeNeg){
if(PrefC.GetBool("BalancesDontSubtractIns")) {
command+=" OR BalTotal < '-.005')";
}
else {
command+=" OR BalTotal - InsEst < '-.005')";
}
}
else{
command+=")";
}
User avatar
jordansparks
Site Admin
Posts: 5776
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Billing option to show credit balances shows zero balances

Post by jordansparks »

Done.
Jordan Sparks, DMD
http://www.opendental.com
Post Reply