Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Aged Debtor Analysis
08-13-2016, 12:00 PM
Post: #4
RE: Aged Debtor Analysis
(08-13-2016 01:52 AM)daveparrish Wrote:  
(08-12-2016 11:03 PM)agaluski Wrote:  If you run the Statements program it should take care of this.
Sometimes the float issue in the fields used to store amounts leaves tiny little decimals out there.
There is a block around line 52 in the PrintCustStatements.php that takes care of this
PHP Code:
/* Do a quick tidy up to settle any transactions that should have been settled at the time of allocation but for whatever reason weren't */
    
$ErrMsg _('There was a problem settling the old transactions.');
    
$DbgMsg _('The SQL used to settle outstanding transactions was');
    
$sql "UPDATE debtortrans SET settled=1
            WHERE ABS(debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debto​rtrans.ovgst-debtortrans.alloc)<0.009"
;
    
$SettleAsNec DB_query($sql,$db$ErrMsg$DbgMsg); 
I ran the statement program and did not resolve I ran for all customers and I tried one at a time and that did not resolve.
I reviewed the lines in PrintCustStatements.php and they are there.

After looking at the data it looks like the issue is with the debtortrans.ovgst having 5 decmenl spaces when you calculate debtortrans.ovamount+debtortrans.ovdiscount+debtortrans.ovfreight+debtortrans.ov​gst there is a difference between the total and debtortrans.alloc.
For example ovamount 2193.24 + ovgst 180.9423 = 2374.1823 alloc is 2374.18.
Is there a script that I can run to fix the ones that do not balance.
And also how can I fix this from happening in the future?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Aged Debtor Analysis - daveparrish - 08-11-2016, 12:51 PM
RE: Aged Debtor Analysis - agaluski - 08-12-2016, 11:03 PM
RE: Aged Debtor Analysis - daveparrish - 08-13-2016, 01:52 AM
RE: Aged Debtor Analysis - daveparrish - 08-13-2016 12:00 PM
RE: Aged Debtor Analysis - agaluski - 08-18-2016, 07:46 AM
RE: Aged Debtor Analysis - daveparrish - 08-18-2016, 12:16 PM
RE: Aged Debtor Analysis - agaluski - 08-19-2016, 12:16 AM
RE: Aged Debtor Analysis - daveparrish - 08-23-2016, 12:33 AM
RE: Aged Debtor Analysis - phil - 08-23-2016, 08:54 AM
RE: Aged Debtor Analysis - daveparrish - 08-25-2016, 05:42 AM
RE: Aged Debtor Analysis - agaluski - 08-26-2016, 01:08 AM
RE: Aged Debtor Analysis - daveparrish - 08-26-2016, 02:06 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)