In Step 1 I get an error:
At least one Job Ledger Entry applied and not closed where Job No. = 898, Phase Code = , Task Code = , Step Code = exists.
This is Text017 in the following code i codeunit 104045 in funcion CheckJobs
WITH JobLedgerEntry DO BEGIN
SETCURRENTKEY("Related to Budget","Job No.","Entry Type","Phase Code","Task Code","Step Code");
JobLedgerEntry2.SETCURRENTKEY("Related to Budget","Job No.","Entry Type","Phase Code","Task Code","Step Code");
SETFILTER("Amt. Posted to G/L",'<>0');
IF FINDSET THEN
REPEAT
SETRANGE("Related to Budget","Related to Budget");
SETRANGE("Job No.","Job No.");
SETRANGE("Entry Type","Entry Type");
SETRANGE("Phase Code","Phase Code");
SETRANGE("Task Code","Task Code");
SETRANGE("Step Code","Step Code");
IF NOT TempJobTaskPhaseStepComb.GET("Job No.","Phase Code","Task Code","Step Code") THEN BEGIN
SETRANGE("Amt. Recognized",0);
IF FINDFIRST THEN BEGIN
UpgradeErrorLog.SetError(
STRSUBSTNO(
Text016,
TABLECAPTION,
FIELDCAPTION("Job No."),"Job No.",
FIELDCAPTION("Phase Code"),"Phase Code",
FIELDCAPTION("Task Code"),"Task Code",
FIELDCAPTION("Step Code"),"Step Code"),
DATABASE::"Job Ledger Entry",'');
TempJobTaskPhaseStepComb."Job No." := "Job No.";
TempJobTaskPhaseStepComb."Phase Code" := "Phase Code";
TempJobTaskPhaseStepComb."Task Code" := "Task Code";
TempJobTaskPhaseStepComb."Step Code" := "Step Code";
TempJobTaskPhaseStepComb.INSERT;
END ELSE BEGIN
JobLedgerEntry2.SETRANGE("Job No.","Job No.");
JobLedgerEntry2.SETRANGE("Phase Code","Phase Code");
JobLedgerEntry2.SETRANGE("Task Code","Task Code");
JobLedgerEntry2.SETRANGE("Step Code","Step Code");
JobLedgerEntry2.SETRANGE("Amt. Recognized",0);
IF JobLedgerEntry2.FINDSET THEN BEGIN
Job.GET("Job No.");
REPEAT
IF ((JobLedgerEntry2."Entry Type" = "Entry Type"::Usage) AND
(((Job."Job Usage Posting" = Job."Job Usage Posting"::Costs) AND
(JobLedgerEntry2."Total Cost" <> 0)) OR
((Job."Job Usage Posting" = Job."Job Usage Posting"::Prices) AND
(JobLedgerEntry2."Total Price" <> 0)))) OR
((JobLedgerEntry2."Entry Type" = "Entry Type"::Sale) AND
JobLedgerEntry2.Chargeable AND
(JobLedgerEntry2."Total Price" <> 0))
THEN BEGIN
UpgradeErrorLog.SetError(
STRSUBSTNO(
Text016,
TABLECAPTION,
FIELDCAPTION("Job No."),"Job No.",
FIELDCAPTION("Phase Code"),"Phase Code",
FIELDCAPTION("Task Code"),"Task Code",
FIELDCAPTION("Step Code"),"Step Code"),
DATABASE::"Job Ledger Entry",'');
TempJobTaskPhaseStepComb."Job No." := "Job No.";
TempJobTaskPhaseStepComb."Phase Code" := "Phase Code";
TempJobTaskPhaseStepComb."Task Code" := "Task Code";
TempJobTaskPhaseStepComb."Step Code" := "Step Code";
TempJobTaskPhaseStepComb.INSERT;
JobLedgerEntry2.FINDLAST;
END;
UNTIL JobLedgerEntry2.NEXT = 0;
END;
END;
END;
SETRANGE("Amt. Recognized");
FINDLAST;
SETRANGE("Related to Budget");
SETRANGE("Job No.");
SETRANGE("Entry Type");
SETRANGE("Phase Code");
SETRANGE("Task Code");
SETRANGE("Step Code");
UNTIL NEXT = 0;
RESET;
SETCURRENTKEY("Related to Budget","Job No.","Entry Type","Phase Code","Task Code","Step Code");
IF FINDSET THEN
REPEAT
SETRANGE("Related to Budget","Related to Budget");
SETRANGE("Job No.","Job No.");
SETRANGE("Phase Code","Phase Code");
SETRANGE("Task Code","Task Code");
SETRANGE("Step Code","Step Code");
SETRANGE(Open,TRUE);
IF FINDSET THEN
REPEAT
JobLedgerEntry2.RESET;
JobLedgerEntry2.SETRANGE("Job No.","Job No.");
JobLedgerEntry2.SETRANGE("Closed by Entry No.","Entry No.");
IF JobLedgerEntry2.FINDFIRST THEN BEGIN
UpgradeErrorLog.SetError(
STRSUBSTNO(
Text017,
TABLECAPTION,
FIELDCAPTION("Job No."),"Job No.",
FIELDCAPTION("Phase Code"),"Phase Code",
FIELDCAPTION("Task Code"),"Task Code",
FIELDCAPTION("Step Code"),"Step Code"), DATABASE::"Job Ledger Entry",'');
FINDLAST;
END;
UNTIL NEXT = 0;
SETRANGE(Open);
FINDLAST;
SETRANGE("Step Code");
SETRANGE("Task Code");
SETRANGE("Phase Code");
SETRANGE("Job No.");
SETRANGE("Related to Budget");
UNTIL NEXT = 0;
END;
The error occurs because an entry of type Usage is closed by an entry of type Sale, and this entry is only partially applied (Remaining Amount > 0) and is therefore Open.
This kind of entry is apparently not allowed in the upgrade process.
Could someone please shed som light on this issue, and how to solve or "bypass" this. As long as there are records which are applied to another record which is not closed, it is not possible to proceed with the upgrade process.
An example of data provoking the error can be downloaded here:
http://www.mediafire.com/?wmmtxiyjl4d
Thanks in advance.
Comments
Regards
Raj
I'm migrating nav from 3.70--> to 5.00 SP1 and I've encountered the same error.
Have someone an answer for the issue?
klord1379, and the support request?
Tks in advance
Andrea
Have you heard from Microsoft?
Any answer from MS yet?
(I prefer asking here, io. posting a support request. That is like the upgrade process itself: slow.....)
If there is a Job with 'normal' JLE's and with one JLE of Type=Usage and not Chargeable, then the upgrade toolkit raises an error!
Seems like MS has to do some work on this...
Codeunit 104045 performs the following tasks:
• Sets Open to No for all job ledger entries where Quantity of the applied job ledger entries totals 0 even if Remaining Amount is not 0. This should only be the case when sales discounts have been applied or for Type G/L accounts where quantity is not used accurately. Also see Upgrading Jobs codeunit 104048.
Codeunit 104048 performs the following tasks:
• Job planning lines, in table 1003, with Line Type Contract are created based on job ledger entries if:
Type is Sales: a job planning line will be created with Invoiced set to True; based on the Invoice Type it will be created as an invoice or a credit memo.
Type is Usage: Chargeable is True and Quantity of the applied job ledger entries is larger than 0; a job planning line will be created based on remaining quantity and the Unit Price.
And we have enhanced the performance drastically when upgrading Jobs.
Up to now I can not advise customers that use Job functionality to upgrade to 5.0 or 2009.
Too many bugs and conceptual mistakes.