Service Contract Invoice Amount

farrel
Member Posts: 25
HI All,
I just want to confirm if the Amount Per Period on Service Contract Header should be the same on Line Amount on the Service Invoice Detail? Because when we try to use the function of NAV on creating service invoice we did not get the same amount on the Amount per Period on the service contract header against on the amount on the invoice detail created especially if the period covered is not the whole month.
Computation on Amount Per Period on service contract:
"Annual Amount" / ServContractMgt.NoOfDayInYear(InvTo)) * DaysInThisInvPeriod
Where DaysInThisInvPeriod = InvoiceFrom – InvoiceTo + 1
Computation of service invoice amount on function create service invoice:
AmountCalculated := AnnualAmount / 12 * NoOfMonthsAndMPartsInPeriod(PeriodStarts,PeriodEnds)
NoOfMonthsAndMPartsInPeriod =
{
IF Day1 > Day2 THEN
EXIT;
IF (Day1 = 0D) OR (Day2 = 0D) THEN
EXIT;
MonthsAndMParts := 0;
WDate := CALCDATE('<-CM>',Day1);
REPEAT
OldWDate := CALCDATE('<CM>',WDate);
IF WDate < Day1 THEN
WDate := Day1;
IF OldWDate > Day2 THEN
OldWDate := Day2;
IF (WDate <> CALCDATE('<-CM>',WDate)) OR (OldWDate <> CALCDATE('<CM>',OldWDate)) THEN
MonthsAndMParts := MonthsAndMParts +
(OldWDate - WDate + 1)/(CALCDATE('<CM>',OldWDate) - CALCDATE('<-CM>',WDate) + 1)
ELSE
MonthsAndMParts := MonthsAndMParts + 1;
WDate := CALCDATE('<CM>',OldWDate) + 1;
UNTIL WDate > Day2;
} meaning if the period covered is less than the total number of days in a particular month it will compute for a percentage.
i.e. 26/31 where 26 is the difference of day1 and day2 + 1 and 31 is the total days on that month.
In short, what should be followed? Is this really the nature of NAV?
Any response would be much appreciated.
Regards,
Farrel
I just want to confirm if the Amount Per Period on Service Contract Header should be the same on Line Amount on the Service Invoice Detail? Because when we try to use the function of NAV on creating service invoice we did not get the same amount on the Amount per Period on the service contract header against on the amount on the invoice detail created especially if the period covered is not the whole month.
Computation on Amount Per Period on service contract:
"Annual Amount" / ServContractMgt.NoOfDayInYear(InvTo)) * DaysInThisInvPeriod
Where DaysInThisInvPeriod = InvoiceFrom – InvoiceTo + 1
Computation of service invoice amount on function create service invoice:
AmountCalculated := AnnualAmount / 12 * NoOfMonthsAndMPartsInPeriod(PeriodStarts,PeriodEnds)
NoOfMonthsAndMPartsInPeriod =
{
IF Day1 > Day2 THEN
EXIT;
IF (Day1 = 0D) OR (Day2 = 0D) THEN
EXIT;
MonthsAndMParts := 0;
WDate := CALCDATE('<-CM>',Day1);
REPEAT
OldWDate := CALCDATE('<CM>',WDate);
IF WDate < Day1 THEN
WDate := Day1;
IF OldWDate > Day2 THEN
OldWDate := Day2;
IF (WDate <> CALCDATE('<-CM>',WDate)) OR (OldWDate <> CALCDATE('<CM>',OldWDate)) THEN
MonthsAndMParts := MonthsAndMParts +
(OldWDate - WDate + 1)/(CALCDATE('<CM>',OldWDate) - CALCDATE('<-CM>',WDate) + 1)
ELSE
MonthsAndMParts := MonthsAndMParts + 1;
WDate := CALCDATE('<CM>',OldWDate) + 1;
UNTIL WDate > Day2;
} meaning if the period covered is less than the total number of days in a particular month it will compute for a percentage.
i.e. 26/31 where 26 is the difference of day1 and day2 + 1 and 31 is the total days on that month.
In short, what should be followed? Is this really the nature of NAV?
Any response would be much appreciated.
Regards,
Farrel
0
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
- 322 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