Wrong Job Ledger Entry Item Ledger Entry No.

Big_DBig_D Member Posts: 207
Hi mibuso.com users

In CU 1012 (v5.00)...

Type::Item:
BEGIN
IF ItemLedgEntry.GET(ThisLedgEntryNo) THEN BEGIN
JobLedgEntry."Ledger Entry Type" := JobLedgEntry."Ledger Entry Type"::Item;
JobLedgEntry."Ledger Entry No." := ItemLedgEntry."Entry No.";
JobLedgEntry."Serial No." := ItemLedgEntry."Serial No.";
JobLedgEntry."Lot No." := ItemLedgEntry."Lot No.";
END;
END;

Has anybody come across that this line

JobLedgEntry."Ledger Entry No." := ItemLedgEntry."Entry No.";

Doesn't always get assigned the right ItemLedgEntry."Entry No." that should be applied!

With thanks
Big D signing off!

Comments

  • kinekine Member Posts: 12,562
    If not, than the problem is not in this code, but how the variable "ThisLedgEntryNo" is filled in...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Big_DBig_D Member Posts: 207
    Hi Kine

    Thanks for the reply

    All standard code (Cu1012) matie - untouched

    Type::Item:
    BEGIN
    IF ItemLedgEntry.GET(LastLedgerEntryNo) THEN;
    IF ItemLedgEntry2.FIND('+') THEN;
    ItemLedgEntry.NEXT;
    LastNoOfEntries := 0;
    NoOfEntriesStack := 0;
    REPEAT
    NoOfEntriesStack -= ItemLedgEntry.Quantity;
    CreateJobLedgEntry(ItemLedgEntry."Entry No.",JobJnlLine2);

    This "ItemLedgEntry."Entry No."" - in the last line above isn't always the right one for the job but can't see why - lucky i have an expert on the case now =D> !

    WIth thanks
    Big D signing off!
  • kinekine Member Posts: 12,562
    You do not have expert on this case now, else you will be charged... I will not solve it for you, I am trying to give you some hints. But the work is on you... :whistle:
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kinekine Member Posts: 12,562
    Without any analysis of the problem it could not be solved. You need to be able to reproduce when the no. is not correct for you, than you can debug the code and look why it is taking what it is taking and how it is different from your idea...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Big_DBig_D Member Posts: 207
    Oh the old solve it myself senario - brilliant I didn't think of that one myself - thanks for the A1 tip.

    With thanks
    Big D signing off!
  • kinekine Member Posts: 12,562
    Big D wrote:
    Oh the old solve it myself scenario - brilliant I didn't think of that one myself - thanks for the A1 tip.

    With thanks
    Sorry, but to be able to you, I cannot do it "blind". You need to describe example when it is wrong, do some research, post the results here, and than may be we will see something you cannot see.

    And yes, the old solve it myself scenario... It is working in most cases. But from your description there is no point what you have already tried, what have you already found out etc.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.