...
IntrastatJnlBatch2.SETRANGE(Type,IntrastatJnlBatch.Type);
END;
BEGIN
END.
}
RDLDATA
...
...
IntrastatJnlBatch2.SETRANGE(Type,IntrastatJnlBatch.Type);
END;
// Add the following lines.
PROCEDURE TestILE@1130001(ItemLedgEntry@1130000 : Record 32);
VAR
SalesShipmentHeader@1130001 : Record 110;
SalesShipmentLine@1130002 : Record 111;
PurchRcptLine@1130003 : Record 121;
ReturnReceiptLine@1130004 : Record 6661;
ReturnShipmentLine@1130005 : Record 6651;
ServiceShipmentLine@1130006 : Record 5991;
ServiceCrMemoLine@1130007 : Record 5995;
BEGIN
WITH ItemLedgEntry DO BEGIN
CASE TRUE OF
"Document Type" = "Document Type"::"Sales Shipment":
IF SalesShipmentLine.GET("Document No.","Document Line No.") THEN
IF VATPostingSetup.GET(SalesShipmentLine."VAT Bus. Posting Group",SalesShipmentLine."VAT Prod. Posting Group") THEN;
("Document Type" = "Document Type"::"Sales Return Receipt") OR ("Document Type" = "Document Type"::"Sales Credit Memo"):
IF ReturnReceiptLine.GET("Document No.","Document Line No.") THEN
IF VATPostingSetup.GET(ReturnReceiptLine."VAT Bus. Posting Group",ReturnReceiptLine."VAT Prod. Posting Group") THEN;
"Document Type" = "Document Type"::"Purchase Receipt":
IF PurchRcptLine.GET("Document No.","Document Line No.") THEN
IF VATPostingSetup.GET(PurchRcptLine."VAT Bus. Posting Group",PurchRcptLine."VAT Prod. Posting Group") THEN;
("Document Type" = "Document Type"::"Purchase Return Shipment") OR ("Document Type" = "Document Type"::"Purchase Credit Memo"):
IF ReturnShipmentLine.GET("Document No.","Document Line No.") THEN
IF VATPostingSetup.GET(ReturnShipmentLine."VAT Bus. Posting Group",ReturnShipmentLine."VAT Prod. Posting Group") THEN;
"Document Type" = "Document Type"::"Service Shipment":
IF ServiceShipmentLine.GET("Document No.","Document Line No.") THEN
IF VATPostingSetup.GET(ServiceShipmentLine."VAT Bus. Posting Group",ServiceShipmentLine."VAT Prod. Posting Group") THEN;
"Document Type" = "Document Type"::"Service Credit Memo":
IF ServiceCrMemoLine.GET("Document No.","Document Line No.") THEN
IF VATPostingSetup.GET(ServiceCrMemoLine."VAT Bus. Posting Group",ServiceCrMemoLine."VAT Prod. Posting Group") THEN;
END;
IF VATPostingSetup."EU Service" THEN
CurrReport.SKIP;
IF ("Entry Type" = "Entry Type"::Sale) AND
(SalesShipmentHeader.GET("Document No.")) AND
(CompanyInfo."Country/Region Code" = SalesShipmentHeader."Bill-to Country/Region Code")
THEN
CurrReport.SKIP;
END;
END;
PROCEDURE InsertValueEntryLine@1130002();
VAR
Location@1130000 : Record 14;
BEGIN
GetGLSetup;
WITH IntrastatJnlLine DO BEGIN
INIT;
"Line No." := "Line No." + 10000;
Date := "Value Entry"."Posting Date";
"Country/Region Code" := "Item Ledger Entry"."Country/Region Code";
"Transaction Type" := "Item Ledger Entry"."Transaction Type";
"Transport Method" := "Item Ledger Entry"."Transport Method";
"Source Entry No." := "Item Ledger Entry"."Entry No.";
Quantity := "Item Ledger Entry".Quantity;
"Document No." := "Value Entry"."Document No.";
"Item No." := "Item Ledger Entry"."Item No.";
"Entry/Exit Point" := "Item Ledger Entry"."Entry/Exit Point";
Area := "Item Ledger Entry".Area;
"Transaction Specification" := "Item Ledger Entry"."Transaction Specification";
Amount := ROUND(ABS("Value Entry"."Sales Amount (Actual)"),1);
IF Quantity < 0 THEN
Type := Type::Shipment
ELSE
Type := Type::Receipt;
IF ("Country/Region Code" = '') OR
("Country/Region Code" = CompanyInfo."Country/Region Code")
THEN BEGIN
IF "Item Ledger Entry"."Location Code" = '' THEN
"Country/Region Code" := CompanyInfo."Ship-to Country/Region Code"
ELSE BEGIN
Location.GET("Item Ledger Entry"."Location Code");
"Country/Region Code" := Location."Country/Region Code"
END;
END;
VALIDATE("Item No.");
"Source Type" := "Source Type"::"Item entry";
VALIDATE(Quantity,ROUND(ABS(Quantity),0.00001));
VALIDATE("Cost Regulation %",IndirectCostPctReq);
INSERT;
END;
END;
// End of the lines.
BEGIN
END.
}
}
...