Kreeditarve ridadele ei sisalda intrastat töölehel tasuta (üksus) tüüp kreeditarve arve, mis on loodud EU tarnija Itaalia versioonis Microsoft Dynamics nav-i 2009 erinevate jooksul pärast


Käesolev artikkel kehtib Microsoft Dynamics NAV Itaalia (it) keele locale.

Sümptomid


Oletame, et teil on arve, mis on loodud Euroopa Liidu tarnija Itaalia versioonis Microsoft Dynamics nav-i 2009. Tasuta (üksus) tippige kreeditarve arve sisestamisel erineval perioodil kreeditarve rida on kaasatud intrastat töölehel.
See probleem ilmneb järgmiste toodetega:
  • Itaalia versioonis Microsoft Dynamics nav-i 2009 R2
  • Itaalia versioonis Microsoft Dynamics nav-i 2009 Service Pack 1 (SP1)
  • Itaalia versioonis Microsoft Dynamics NAV 5.0 Service Pack 1 (SP1)

Lahendus


Kiirparanduse teave

Lasknud välja toetatava käigultparanduse on nüüd Microsoftilt saadaval. Aga see on ette nähtud ainult selles artiklis kirjeldatud probleemi kõrvaldamiseks. Rakendage seda ainult süsteemides, kus ilmneb see konkreetne probleem. Seda käigultparandust võidakse täiendavalt testida. Kui see probleem teie tööd tõsiselt ei kahjusta, soovitame oodata järgmist hoolduspaketti Microsoft Dynamics nav-i või järgmise Microsoft Dynamics nav-i versiooni, mis sisaldab seda kiirparandust.

Märkus. Erijuhtudel kulud, mis tekivad tavaliselt abi palub tühistada saab kui tehniline toetus Professional Microsoft Dynamics ja nendega seotud toodete leiab, et mõni konkreetne värskendus lahendab teie probleemi. Tavaline tugiteenuste kohaldatakse täiendavat tugiteenust vajavatele küsimustele ning probleemidele, mis pole lahendatavad konkreetse värskenduse installimisega.


Installiteave

Microsoft pakub programmeerimisnäiteid ainult artikli illustreerimiseks ilma igasuguse otsese või kaudse garantiita. See hõlmab, kuid ei piirdu kaudseid garantiisid turustatavuse või kindlaks otstarbeks sobivusega. See artikkel eeldab, et olete demonstreeritava programmeerimiskeelega programmeerimise keel ning luua protseduuride ja silumiseks kasutatavate tööriistadega tuttav. Microsofti tugitehnikud võivad aidata mõne konkreetse protseduuri funktsiooni selgitada, kuid ei muuda nad neid näiteid lisafunktsioonide pakkumiseks ega Koosta vastavaid protseduure teie konkreetsetele nõuetele.

Märkus. Enne selle kiirparanduse installimist veenduge, et kõik Microsoft Navision kliendi kasutajat sisse loginud süsteem välja. See hõlmab Microsoft Navision Application teenused (NAS) kliendi kasutajatele. Peaks olema ainult kliendi kasutaja on sisse logitud, kui otsustate seda käigultparandust.

Selle kiirparanduse rakendamiseks peab teil olema arendaja litsentsi.

Soovitame Windowsi sisselogimise aken või aken andmebaasi logimine kasutajakonto määrata "SUPER" rolli ID. Kui "SUPER" rolli ID-d ei saa määratud kasutajakonto, peate veenduma, et kasutaja konto on järgmised õigused:
  • Sa muutuvad objekti Muuda õigusi.
  • Käivita luba süsteemi objekti ID 5210 objekti ja süsteemi objekti ID 9015 objekti.


Märkus. Teil pole õigust andmeid talletab enne, kui olete andmete parandamiseks.

Koodi muudatusi

Märkus. Alati test koodi lahendab kontrollitavas keskkonnas enne rakendamist tootmine arvutite parandused.
Selle probleemi lahendamiseks toimige järgmiselt.
  1. Muuta koodi andmete kirje Number 2 kaubaandmiku kannete aruande (594) järgmiselt:
    Kood 1
    ...SETRANGE("Country/Region Code",'');
    END;

    IntrastatJnlLine2.SETCURRENTKEY("Source Type","Source Entry No.");
    IntrastatJnlLine2.SETRANGE("Source Type",IntrastatJnlLine2."Source Type"::"Item entry");
    ...
    Kood 1
    ...SETRANGE("Country/Region Code",'');
    END;

    // Add the following line.
    IntrastatJnlLine2.SETRANGE("Journal Batch Name",IntrastatJnlBatch.Name);

    IntrastatJnlLine2.SETCURRENTKEY("Source Type","Source Entry No.");
    IntrastatJnlLine2.SETRANGE("Source Type",IntrastatJnlLine2."Source Type"::"Item entry");
    ...
    Kood 2
    ...WITH ValueEntry DO BEGIN
    SETCURRENTKEY("Item Ledger Entry No.");

    // Delete the following line.
    SETRANGE("Valuation Date",StartDate,EndDate);

    SETRANGE("Entry Type","Entry Type"::"Direct Cost");
    SETFILTER("Invoiced Quantity",'<>%1', 0);
    SETFILTER(
    ...
    Asendamine kood 2
    ...WITH ValueEntry DO BEGIN
    SETCURRENTKEY("Item Ledger Entry No.");

    // Add the following line.
    SETRANGE("Posting Date",StartDate,EndDate);

    SETRANGE("Entry Type","Entry Type"::"Direct Cost");
    SETFILTER("Invoiced Quantity",'<>%1', 0);
    SETFILTER(
    ...
    Kood 3
    ...END;

    OnAfterGetRecord=VAR

    // Delete the following lines.
    Location@1000 : Record 14;
    ItemLedgEntry@1001 : Record 32;
    SalesShipmentLine@1010 : Record 111;
    ReturnReceiptLine@1009 : Record 6661;
    PurchRcptLine@1008 : Record 121;
    ReturnShipmentLine@1007 : Record 6651;
    ServiceShipmentLine@1004 : Record 5991;
    ServiceCrMemoLine@1003 : Record 5995;
    Include@1002 : Boolean;
    // End of the lines.

    PurchInvLine@1130000 : Record 123;
    PurchCrMemoLine@1130001 : Record 125;
    SalesInvoiceLine@1130002 : Record 113;
    ...
    Asendamine kood 3
    ...END;

    OnAfterGetRecord=VAR

    // Add the following line.
    PurchRcptLine@1008 : Record 121;

    PurchInvLine@1130000 : Record 123;
    PurchCrMemoLine@1130001 : Record 125;
    SalesInvoiceLine@1130002 : Record 113;
    ...
    Kood 4
    ...IF IntrastatJnlLine2.FINDFIRST THEN
    CurrReport.SKIP;

    // Delete the following lines.
    CASE TRUE OF
    "Drop Shipment":
    BEGIN
    IF ("Country/Region Code" = CompanyInfo."Country/Region Code") OR
    ("Country/Region Code" = '')
    THEN
    CurrReport.SKIP;
    IF "Applies-to Entry" = 0 THEN BEGIN
    ItemLedgEntry.SETCURRENTKEY("Item No.","Posting Date");
    ItemLedgEntry.SETRANGE("Item No.","Item No.");
    ItemLedgEntry.SETRANGE("Posting Date","Posting Date");
    ItemLedgEntry.SETRANGE("Applies-to Entry","Entry No.");
    ItemLedgEntry.FINDFIRST;
    END ELSE
    ItemLedgEntry.GET("Applies-to Entry");
    IF (ItemLedgEntry."Country/Region Code" <> CompanyInfo."Country/Region Code") AND
    (ItemLedgEntry."Country/Region Code" <> '')
    THEN
    CurrReport.SKIP;
    END;
    "Entry Type" = "Entry Type"::Transfer:
    BEGIN
    IF ("Country/Region Code" = CompanyInfo."Country/Region Code") OR
    ("Country/Region Code" = '')
    THEN
    CurrReport.SKIP;
    IF "Transfer Order No." = '' THEN BEGIN
    Location.GET("Location Code");
    IF (Location."Country/Region Code" <> '') AND
    (Location."Country/Region Code" <> CompanyInfo."Country/Region Code")
    THEN
    CurrReport.SKIP;
    END ELSE BEGIN
    ItemLedgEntry.SETRANGE("Transfer Order No.","Transfer Order No.");
    ItemLedgEntry.SETFILTER("Country/Region Code",'%1 | %2','',CompanyInfo."Country/Region Code");
    IF ItemLedgEntry.FINDSET THEN
    REPEAT
    Location.GET(ItemLedgEntry."Location Code");
    IF Location."Use As In-Transit" THEN
    Include := TRUE;
    UNTIL Include OR (ItemLedgEntry.NEXT = 0);
    IF NOT Include THEN
    CurrReport.SKIP;
    END;
    END;
    "Location Code" <> '':
    BEGIN
    Location.GET("Location Code");
    CheckILE(Location."Country/Region Code");
    END
    ELSE BEGIN
    IF "Entry Type" = "Entry Type"::Purchase THEN
    CheckILE(CompanyInfo."Ship-to Country/Region Code");
    IF "Entry Type" = "Entry Type"::Sale THEN
    CheckILE(CompanyInfo."Country/Region Code");
    END;
    END;

    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 of the lines.

    TotalInvoicedQty := 0;
    TotalAmt := 0;
    ...
    Asendamine kood 4
    ...IF IntrastatJnlLine2.FINDFIRST THEN
    CurrReport.SKIP;

    // Add the following line.
    TestILE("Item Ledger Entry");

    TotalInvoicedQty := 0;
    TotalAmt := 0;
  2. Muuta koodi andmete kirje Number 5 kaubaandmiku kannete aruande (594) järgmiselt:
    Kood
    ...{
    }
    }
    }
    REQUESTFORM
    {
    ...
    Eemaldamise teave
    ...{
    }
    }

    // Add the following lines.
    { PROPERTIES
    {
    DataItemTable=Table5802;
    DataItemTableView=SORTING(Entry No.);
    OnPreDataItem=BEGIN
    SETRANGE("Posting Date",StartDate,EndDate);
    SETFILTER("Item Charge No.",'<> %1','');
    "Item Ledger Entry".SETRANGE("Posting Date");

    IF IntrastatJnlBatch.Type = IntrastatJnlBatch.Type::Purchases THEN
    SETFILTER("Item Ledger Entry Type",'%1|%2', "Item Ledger Entry Type"::Purchase, "Item Ledger Entry Type"::Transfer)
    ELSE
    SETRANGE("Item Ledger Entry Type","Item Ledger Entry Type"::Sale);

    IntrastatJnlLine2.SETRANGE("Journal Batch Name",IntrastatJnlBatch.Name);
    IntrastatJnlLine2.SETCURRENTKEY("Source Type","Source Entry No.");
    IntrastatJnlLine2.SETRANGE("Source Type",IntrastatJnlLine2."Source Type"::"Item entry");
    END;

    OnAfterGetRecord=BEGIN
    IntrastatJnlLine2.SETRANGE("Source Entry No.","Item Ledger Entry No.");
    IF IntrastatJnlLine2.FINDFIRST THEN
    CurrReport.SKIP;

    IF "Item Ledger Entry".GET("Item Ledger Entry No.") THEN BEGIN
    IF ("Item Ledger Entry"."Posting Date" > StartDate) AND ("Item Ledger Entry"."Posting Date" < EndDate) THEN
    CurrReport.SKIP;
    IF "Country/Region".GET("Item Ledger Entry"."Country/Region Code") THEN
    IF "Country/Region"."EU Country/Region Code" = '' THEN
    CurrReport.SKIP;
    TestILE("Item Ledger Entry");

    InsertValueEntryLine;
    END;
    END;

    }
    SECTIONS
    {
    { PROPERTIES
    {
    SectionType=Body;
    SectionWidth=12000;
    SectionHeight=846;
    }
    CONTROLS
    {
    }
    }
    }
    }
    // End of the lines.

    }
    REQUESTFORM
    {
    ...
  3. Dokumentatsioonis kaubaandmiku kannete aruande (594) koodi muutmiseks järgmiselt:
    Kood
    ...IntrastatJnlBatch2.SETRANGE(Type,IntrastatJnlBatch.Type);
    END;

    // Delete the following line.
    BEGIN

    END.
    }
    RDLDATA
    ...
    Eemaldamise teave
    ...IntrastatJnlBatch2.SETRANGE(Type,IntrastatJnlBatch.Type);
    END;

    // Add the following lines.
    PROCEDURE TestILE@1130001(ItemLedgEntry@1130000 : Record 32);
    VAR
    Location@1130001 : Record 14;
    ItemLedgEntry2@1130002 : Record 32;
    Include@1130003 : Boolean;
    SalesShipmentHeader@1130004 : Record 110;
    SalesShipmentLine@1130005 : Record 111;
    PurchRcptLine@1130006 : Record 121;
    ReturnReceiptLine@1130007 : Record 6661;
    ReturnShipmentLine@1130008 : Record 6651;
    ServiceShipmentLine@1130009 : Record 5991;
    ServiceCrMemoLine@1130010 : Record 5995;
    BEGIN
    WITH ItemLedgEntry DO BEGIN
    CASE TRUE OF
    "Drop Shipment":
    BEGIN
    IF ("Country/Region Code" = CompanyInfo."Country/Region Code") OR
    ("Country/Region Code" = '')
    THEN
    CurrReport.SKIP;
    IF "Applies-to Entry" = 0 THEN BEGIN
    ItemLedgEntry2.SETCURRENTKEY("Item No.","Posting Date");
    ItemLedgEntry2.SETRANGE("Item No.","Item No.");
    ItemLedgEntry2.SETRANGE("Posting Date","Posting Date");
    ItemLedgEntry2.SETRANGE("Applies-to Entry","Entry No.");
    ItemLedgEntry2.FINDFIRST;
    END ELSE
    ItemLedgEntry2.GET("Applies-to Entry");
    IF (ItemLedgEntry2."Country/Region Code" <> CompanyInfo."Country/Region Code") AND
    (ItemLedgEntry2."Country/Region Code" <> '')
    THEN
    CurrReport.SKIP;
    END;
    "Entry Type" = "Entry Type"::Transfer:
    BEGIN
    IF ("Country/Region Code" = CompanyInfo."Country/Region Code") OR
    ("Country/Region Code" = '')
    THEN
    CurrReport.SKIP;
    IF "Transfer Order No." = '' THEN BEGIN
    Location.GET("Location Code");
    IF (Location."Country/Region Code" <> '') AND
    (Location."Country/Region Code" <> CompanyInfo."Country/Region Code")
    THEN
    CurrReport.SKIP;
    END ELSE BEGIN
    ItemLedgEntry2.SETRANGE("Transfer Order No.","Transfer Order No.");
    ItemLedgEntry2.SETFILTER("Country/Region Code",'%1 | %2','',CompanyInfo."Country/Region Code");
    IF ItemLedgEntry2.FINDSET THEN
    REPEAT
    Location.GET(ItemLedgEntry2."Location Code");
    IF Location."Use As In-Transit" THEN
    Include := TRUE;
    UNTIL Include OR (ItemLedgEntry2.NEXT = 0);
    IF NOT Include THEN
    CurrReport.SKIP;
    END;
    END;
    "Location Code" <> '':
    BEGIN
    Location.GET("Location Code");
    CheckILE(Location."Country/Region Code");
    END;
    ELSE BEGIN
    IF "Entry Type" = "Entry Type"::Purchase THEN
    CheckILE(CompanyInfo."Ship-to Country/Region Code");
    IF "Entry Type" = "Entry Type"::Sale THEN
    CheckILE(CompanyInfo."Country/Region Code");
    END;
    END;

    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.
    }
    RDLDATA
    ...

Eeltingimused

Peab olema üks selle kiirparanduse installinud järgmisi tooteid:
  • Itaalia versioonis Microsoft Dynamics nav-i 2009 R2
  • Itaalia versioonis Microsoft Dynamics nav-i 2009 Service Pack 1 (SP1)
  • Itaalia versioonis Microsoft Dynamics NAV 5.0 Service Pack 1 (SP1)

Eemaldamise teave

See käigultparandus ei saa eemaldada.

Olek


Microsoft on kinnitanud, et see probleem esineb jaotises "Kehtib järgmiste toodete kohta" loetletud Microsofti toodetel.
Märkus. See on "Kiire avaldamise" artikli loonud otse Microsofti tugiteenuse pakkujalt. Siintoodud teave on esitatud lähtudes-olemasoleval kujul vastusena ilmnenud probleemidele. Kiire avaldamise materjalides esineda trükivigu ja võidakse muuta ette teatamata. Vaadake Kasutustingimused muid kaalutlusi.