...
TempPrePmtAmtToDeduct@1003 : Decimal;
TransactionLogEntryNo@1024 : Integer;
BEGIN
IF PostingDateExists AND (ReplacePostingDate OR ("Posting Date" = 0D)) THEN BEGIN
...
...
TempPrePmtAmtToDeduct@1003 : Decimal;
TransactionLogEntryNo@1024 : Integer;
// Add the following line.
SalesLineForCharge@1025 : Record 37;
BEGIN
IF PostingDateExists AND (ReplacePostingDate OR ("Posting Date" = 0D)) THEN BEGIN
...
...
ClearItemChargeAssgntFilter;
TempItemChargeAssgntSales.SETCURRENTKEY("Applies-to Doc. Type");
// Delete the following line.
TempItemChargeAssgntSales.SETFILTER("Applies-to Doc. Type",'<>%1',"Document Type");
TempItemChargeAssgntSales.SETRANGE("Document Line No.",SalesLine."Line No.");
IF TempItemChargeAssgntSales.FINDSET THEN
...
...
ClearItemChargeAssgntFilter;
TempItemChargeAssgntSales.SETCURRENTKEY("Applies-to Doc. Type");
TempItemChargeAssgntSales.SETRANGE("Document Line No.",SalesLine."Line No.");
IF TempItemChargeAssgntSales.FINDSET THEN
...
...
CASE TempItemChargeAssgntSales."Applies-to Doc. Type" OF
TempItemChargeAssgntSales."Applies-to Doc. Type"::Shipment:
// Delete the following lines.
PostItemChargePerShpt(SalesLine);
TempItemChargeAssgntSales."Applies-to Doc. Type"::"Return Receipt":
PostItemChargePerRetRcpt(SalesLine);
END;
TempItemChargeAssgntSales.MARK(TRUE);
// End of the lines.
UNTIL TempItemChargeAssgntSales.NEXT = 0;
END;
END;
...
...
CASE TempItemChargeAssgntSales."Applies-to Doc. Type" OF
TempItemChargeAssgntSales."Applies-to Doc. Type"::Shipment:
// Add the following line
BEGIN
PostItemChargePerShpt(SalesLine);
TempItemChargeAssgntSales.MARK(TRUE);
END;
TempItemChargeAssgntSales."Applies-to Doc. Type"::"Return Receipt":
BEGIN
PostItemChargePerRetRcpt(SalesLine);
TempItemChargeAssgntSales.MARK(TRUE);
END;
TempItemChargeAssgntSales."Applies-to Doc. Type"::Order,
TempItemChargeAssgntSales."Applies-to Doc. Type"::Invoice:
BEGIN
IF SalesLineForCharge.GET(
TempItemChargeAssgntSales."Applies-to Doc. Type",
TempItemChargeAssgntSales."Applies-to Doc. No.",
TempItemChargeAssgntSales."Applies-to Doc. Line No.")
THEN
IF (SalesLineForCharge."Qty. to Ship (Base)" = 0) AND
(SalesLineForCharge."Qty. to Invoice (Base)" = 0)
THEN
ERROR(Text054);
END;
TempItemChargeAssgntSales."Applies-to Doc. Type"::"Return Order",
TempItemChargeAssgntSales."Applies-to Doc. Type"::"Credit Memo":
BEGIN
IF SalesLineForCharge.GET(
TempItemChargeAssgntSales."Applies-to Doc. Type",
TempItemChargeAssgntSales."Applies-to Doc. No.",
TempItemChargeAssgntSales."Applies-to Doc. Line No.")
THEN
IF (SalesLineForCharge."Return Qty. to Receive (Base)" = 0) AND
(SalesLineForCharge."Qty. to Invoice (Base)" = 0)
THEN
ERROR(Text054);
END;
END;
// End of the lines.
UNTIL TempItemChargeAssgntSales.NEXT = 0;
END;
END;
...
...
Text052@1102601000 : TextConst 'ENU=You must assign item charge %1 if you want to invoice it.';
Text053@1102601001 : TextConst 'ENU=You can not invoice item charge %1 because there is no item ledger entry to assign it to.';
PROCEDURE SetPostingDate@1(NewReplacePostingDate@1000 : Boolean;NewReplaceDocumentDate@1001 : Boolean;NewPostingDate@1002 : Date);
BEGIN
...
...
Text052@1102601000 : TextConst 'ENU=You must assign item charge %1 if you want to invoice it.';
Text053@1102601001 : TextConst 'ENU=You can not invoice item charge %1 because there is no item ledger entry to assign it to.';
// Add the following line.
Text054@1102601002 : TextConst 'ENU=The order line that the item charge has originally been assigned to has been partially or fully posted. You must reassign the item charge to the posted receipt or shipment instead.';
PROCEDURE SetPostingDate@1(NewReplacePostingDate@1000 : Boolean;NewReplaceDocumentDate@1001 : Boolean;NewPostingDate@1002 : Date);
BEGIN
...