Client is doing revaluation, but some lines have a quanitity of ect. 255.000 but only want revaluate the remaining quanity of 71.020. How do I do this? They have quite many lines since I revaluate for the last year. So would prefer something that can be automaticly.
I have written the code for inserting the lines in the Revaluation Journal so there is alot and would be hard to find the ones I need to adjust.
TempItem.FIND('-'); REPEAT CLEAR(ItemLedgerEntry); ItemLedgerEntry.SETRANGE("Item No.", TempItem."No."); ItemLedgerEntry.SETRANGE(Open, TRUE); IF ItemLedgerEntry.FIND('-') THEN REPEAT LineNo += 1; //CurrentJnlBatchName := 'CHO'; ItemJournalLine.INIT; ItemJournalLine.VALIDATE("Value Entry Type",ItemJournalLine."Value Entry Type"::Revaluation); ItemJournalLine.VALIDATE("Source Code",'VÆRDIRGKLD'); ItemJournalLine."Journal Template Name" := 'VÆRDIREGUL'; ItemJournalLine."Journal Batch Name" := 'CHO'; ItemJournalLine."Line No." := LineNo; ItemJournalLine.VALIDATE("Document No.",'REG2016'); ItemJournalLine.VALIDATE("Item No.",ItemLedgerEntry."Item No."); ItemJournalLine.VALIDATE("Applies-to Entry",ItemLedgerEntry."Entry No."); ItemJournalLine.VALIDATE("Unit Cost (Revalued)", TempItem."Unit Price"); ItemJournalLine."Posting Date" := TODAY; ItemJournalLine.INSERT(TRUE); UNTIL ItemLedgerEntry.NEXT = 0; UNTIL TempItem.NEXT = 0; MESSAGE('Finnished');
*This post is locked for comments