Customer Entry Statistics

Tomas
Member Posts: 420
Avg. Collection Period is calculated incorrectly on this scenario:
When we post credit memo and apply it to invoice, Avg. Collection Period is recalculated. Which means, that if we apply credit memo to invoice on the same day, AvgDaysToPay will be increased by zero, but invoice numbers will be increased by 1 and while calculating Avg. Collection Period we will get distorted numbers (smaller than we would get by calculating only times between payment application to invoice).
I would expect, navision not to include invoices (for which credit memos were raised) in Avg. Collection Period calculation, as client will not be paying for these invoices.
Any ideas? :bug: ?
Tested on NAV4.3 GB, NAV 4.3 W1 versions.
When we post credit memo and apply it to invoice, Avg. Collection Period is recalculated. Which means, that if we apply credit memo to invoice on the same day, AvgDaysToPay will be increased by zero, but invoice numbers will be increased by 1 and while calculating Avg. Collection Period we will get distorted numbers (smaller than we would get by calculating only times between payment application to invoice).
I would expect, navision not to include invoices (for which credit memos were raised) in Avg. Collection Period calculation, as client will not be paying for these invoices.
Any ideas? :bug: ?
Tested on NAV4.3 GB, NAV 4.3 W1 versions.
Tomas,
Dynamics NAV Enthusiast
Dynamics NAV Enthusiast
0
Comments
-
here's a post & report - you can try to see if it calcs the same way.
If not this report can be very useful to you.
http://www.mibuso.com/forum/viewtopic.php?t=243510 -
Yes, report is calculating the same way. This part of code is incorrect:
// Optimized Approximation IF (CustLedgEntry2."Document Type" = CustLedgEntry2."Document Type"::Invoice) AND NOT CustLedgEntry2.Open THEN IF CustLedgEntry2."Closed at Date" > CustLedgEntry2."Posting Date" THEN UpdateDaysToPay(CustLedgEntry2."Closed at Date" - CustLedgEntry2."Posting Date",DaysToPay,NoOfInv) ELSE IF CustLedgEntry2."Closed by Entry No." <> 0 THEN BEGIN IF CustLedgEntry3.GET(CustLedgEntry2."Closed by Entry No.") THEN UpdateDaysToPay(CustLedgEntry3."Posting Date" - CustLedgEntry2."Posting Date",DaysToPay,NoOfInv); END ELSE BEGIN CustLedgEntry3.SETCURRENTKEY("Closed by Entry No."); CustLedgEntry3.SETRANGE("Closed by Entry No.",CustLedgEntry2."Entry No."); IF CustLedgEntry3.FIND('+') THEN UpdateDaysToPay(CustLedgEntry3."Posting Date" - CustLedgEntry2."Posting Date",DaysToPay,NoOfInv); END; UNTIL CustLedgEntry2.NEXT(-1) = 0;
As for Avg. Collection days we need to look ONLY at Invoices and Payments applied to invoices (all other entries, like credit memos should not be even looked at), the fix probably would be instead of the code above use this one:IF (CustLedgEntry2."Document Type" = CustLedgEntry2."Document Type"::Invoice) AND NOT CustLedgEntry2.Open THEN BEGIN CustLedgEntry3.SETCURRENTKEY("Entry No."); IF CustLedgEntry3.GET(CustLedgEntry2."Closed by Entry No.") THEN IF CustLedgEntry3."Document Type" = CustLedgEntry3."Document Type"::Payment THEN UpdateDaysToPay(CustLedgEntry3."Posting Date" - CustLedgEntry2."Posting Date"); END;
Tomas,
Dynamics NAV Enthusiast0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions