Hi guys,
I know that the auto increment of the document number (e.g. A-1, A-2, A-3...) only takes place if your journal line is balanced BUT what about positive/negative adjustments in the item journal?
Since there is no balancing account or any monetary value involved to make the line balanced, is there another way to auto increment the document number?
Thanks
David
0
Comments
In the Item Jnl Line you copy the last Doc. No (at least when you're doing simple Pos and neg. Adjustments) in the function SetupNewLine.
IF (ItemJnlTemplate.Type IN
[ItemJnlTemplate.Type::Consumption,ItemJnlTemplate.Type::Output])
THEN BEGIN
IF NOT MfgSetup."Doc. No. Is Prod. Order No." THEN
"Document No." := LastItemJnlLine."Document No."
END ELSE
"Document No." := LastItemJnlLine."Document No.";
For the Gen Jnl. you have the following code:
IF BottomLine AND
(Balance - LastGenJnlLine."Balance (LCY)" = 0) AND
NOT LastGenJnlLine.EmptyLine
THEN
"Document No." := INCSTR("Document No.");
You'll have to define you own criteria and write a logic for when you want the Doc. No. to be incremented
In the mean time, other ways of auto incrementing the doc number in the Item Jnl are more than welcome