Bu makale, tüm ülkelerde ve tüm dil yerel ayarlarında Microsoft Dynamics NAV 2009 için geçerlidir.
Belirtiler
Microsoft Dynamics NAV 2009 R2 ve Microsoft Dynamics NAV 2009 Service Pack 1'de (SP1) bir Avrupa Birliği (AB) satıcısı için sevk eden faturadan farklı bir dönemde bir alacak dekontu gönderdiğinizde, iade dekontu satırı İntrastat günlüğüne eklenmez.
Çözüm
Düzeltme bilgileri
Artık Microsoft, desteklenen bir düzeltme sunmaktadır. Ancak, yalnızca bu makalede açıklanan sorunu düzeltmeye yöneliktir. Bunu yalnızca bu özel sorunun yaşandığı sistemlere uygulayın. Bu düzeltme için ek sınamalar gerekebilir. Bu nedenle, bu sorundan ciddi bir şekilde etkilenmiyorsanız, bir sonraki Microsoft Dynamics NAV 2009 hizmet paketini veya bu düzeltmeyi içeren bir sonraki Microsoft Dynamics NAV sürümünü beklemenizi öneririz.
Not Özel durumlarda, Microsoft Dynamics ve ilgili ürünler için bir Teknik Destek Uzmanı belirli bir güncelleştirmenin sorunu çözeceğini belirlerse, normalde destek aramaları için yapılan ücretler iptal edilebilir. Ek destek soruları ve söz konusu güncelleştirme için uygun olmayan sorunlara normal destek ücretleri uygulanır.
Yükleme bilgileri
Microsoft, programlama örneklerini yalnızca gösterim amacıyla sağlar; açık veya zımni hiçbir garanti vermez. Bu, satılabilirlik veya belirli bir amaca uygunluk ile ilgili zımni garantileri içerir, ancak bunlarla sınırlı değildir. Bu makale, gösterilen programlama diline ve prosedürler oluşturmak ve prosedürlerde hata ayıklamak için kullanılan araçlara aşina olduğunuzu varsaymaktadır. Microsoft destek mühendisleri, belirli bir yordamın işlevselliğinin açıklanmasına yardımcı olabilir, ancak gereksinimlerinizi karşılamaya yönelik ek işlevsellik sağlamak veya yordamlar geliştirmek amacıyla bu örnekleri değiştirmezler.
Not Bu düzeltmeyi yüklemeden önce, tüm Microsoft Navision istemcisi kullanıcılarının sistem oturumunu kapattığını doğrulayın. Bu, Microsoft Navision Application Services (NAS) istemci kullanıcılarını içerir. Bu düzeltmeyi uyguladığınızda oturum açan tek istemci kullanıcı siz olmalısınız.
Bu düzeltmeyi uygulamak için bir geliştirici lisansınız olmalıdır.
Windows Oturum Açma veya Veritabanı Oturum Açma penceresindeki kullanıcı hesabına "SUPER" rol kimliğinin atanmasını öneririz. Kullanıcı hesabına "SUPER" rol kimliği atanamıyorsa, kullanıcı hesabının aşağıdaki izinlere sahip olduğunu doğrulamanız gerekir:
- Değiştireceğiniz nesnenin Değiştirme izni.
- Sistem Nesne Kimliği 5210 nesnesi ve Sistem Nesne Kimliği 9015 nesnesi için Yürütme izni.
Not: Veri onarımı gerçekleştirmeniz gerekmediği sürece, veri depoları üzerinde haklarınız olması gerekmez.
Kod değişiklikleri
Not: Kod düzeltmelerini üretim bilgisayarlarınıza uygulamadan önce her zaman denetimli bir ortamda sınayın.
Bu sorunu gidermek için, Kalem Genel Defteri Girişlerini Al raporundaki (594) kodu değiştirin. Bunu yapmak için aşağıdaki adımları izleyin:
2 Numaralı Veri Öğesinin kodunu aşağıdaki gibi değiştirin:
Mevcut kod 1... SETRANGE("Country/Region Code",''); END; IntrastatJnlLine2.SETCURRENTKEY("Source Type","Source Entry No."); IntrastatJnlLine2.SETRANGE("Source Type",IntrastatJnlLine2."Source Type"::"Item entry"); ...Değiştirme kodu 1
... SETRANGE("Country/Region Code",''); END; // Add the following line. IntrastatJnlLine2.SETRANGE("Journal Batch Name",IntrastatJnlBatch.Name); // End of the line. IntrastatJnlLine2.SETCURRENTKEY("Source Type","Source Entry No."); IntrastatJnlLine2.SETRANGE("Source Type",IntrastatJnlLine2."Source Type"::"Item entry"); ...Mevcut kod 2
... WITH ValueEntry DO BEGIN SETCURRENTKEY("Item Ledger Entry No."); // Delete the following line. SETRANGE("Valuation Date",StartDate,EndDate); // End of the line. SETRANGE("Entry Type","Entry Type"::"Direct Cost"); SETFILTER( "Item Ledger Entry Type",'%1|%2|%3', ...Değiştirme kodu 2
... WITH ValueEntry DO BEGIN SETCURRENTKEY("Item Ledger Entry No."); // Add the following line. SETRANGE("Posting Date",StartDate,EndDate); // End of the line. SETRANGE("Entry Type","Entry Type"::"Direct Cost"); SETFILTER( "Item Ledger Entry Type",'%1|%2|%3', ...Mevcut kod 3
... END; END; // Delete the following lines. OnAfterGetRecord=VAR Location@1000 : Record 14; ItemLedgEntry@1001 : Record 32; Include@1002 : Boolean; BEGIN // End of the lines. IntrastatJnlLine2.SETRANGE("Source Entry No.","Entry No."); IF IntrastatJnlLine2.FINDFIRST THEN CurrReport.SKIP; ...Değiştirme kodu 3
... END; END; OnAfterGetRecord=BEGIN IntrastatJnlLine2.SETRANGE("Source Entry No.","Entry No."); IF IntrastatJnlLine2.FINDFIRST THEN CurrReport.SKIP; ...Mevcut kod 4
... IF IntrastatJnlLine2.FINDFIRST THEN CurrReport.SKIP; // Delete the following lines. IF "Entry Type" IN ["Entry Type"::Sale,"Entry Type"::Purchase] THEN BEGIN ItemLedgEntry.RESET; ItemLedgEntry.SETCURRENTKEY("Document No.","Document Type"); ItemLedgEntry.SETRANGE("Document No.","Document No."); ItemLedgEntry.SETRANGE("Item No.","Item No."); ItemLedgEntry.SETRANGE(Correction,TRUE); ItemLedgEntry.SETRANGE("Document Type","Document Type"::"Sales Shipment"); IF NOT ItemLedgEntry.ISEMPTY THEN CurrReport.SKIP; ItemLedgEntry.SETRANGE("Document Type","Document Type"::"Sales Return Receipt"); IF NOT ItemLedgEntry.ISEMPTY THEN CurrReport.SKIP; ItemLedgEntry.SETRANGE("Document Type","Document Type"::"Purchase Receipt"); IF NOT ItemLedgEntry.ISEMPTY THEN CurrReport.SKIP; ItemLedgEntry.SETRANGE("Document Type","Document Type"::"Purchase Return Shipment"); IF NOT ItemLedgEntry.ISEMPTY THEN CurrReport.SKIP; END; 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; // End of the lines. TotalInvoicedQty := 0; TotalAmt := 0; TotalAmtExpected := 0; ...Değiştirme kodu 4
... IF IntrastatJnlLine2.FINDFIRST THEN CurrReport.SKIP; // Add the following line. TestILE("Item Ledger Entry"); // End of the line. TotalInvoicedQty := 0; TotalAmt := 0; TotalAmtExpected := 0; ...4 Numaralı Veri Öğesinin kodunu aşağıdaki gibi değiştirin:
Mevcut kod... { } } } REQUESTFORM { ...Değişim kodu
... { } } // 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"); 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 { ...TestILE işlevindeki kodu aşağıdaki gibi değiştirin:
Mevcut kod... END; END; BEGIN END. } ...Değişim kodu
... END; END; // Add the following lines. PROCEDURE TestILE@5(ILE@1000 : Record 32); VAR ItemLedgEntry@1003 : Record 32; Location@1002 : Record 14; Include@1001 : Boolean; BEGIN WITH ILE DO BEGIN IF "Entry Type" IN ["Entry Type"::Sale,"Entry Type"::Purchase] THEN BEGIN ItemLedgEntry.RESET; ItemLedgEntry.SETCURRENTKEY("Document No.","Document Type"); ItemLedgEntry.SETRANGE("Document No.","Document No."); ItemLedgEntry.SETRANGE("Item No.","Item No."); ItemLedgEntry.SETRANGE(Correction,TRUE); ItemLedgEntry.SETRANGE("Document Type","Document Type"::"Sales Shipment"); IF NOT ItemLedgEntry.ISEMPTY THEN CurrReport.SKIP; ItemLedgEntry.SETRANGE("Document Type","Document Type"::"Sales Return Receipt"); IF NOT ItemLedgEntry.ISEMPTY THEN CurrReport.SKIP; ItemLedgEntry.SETRANGE("Document Type","Document Type"::"Purchase Receipt"); IF NOT ItemLedgEntry.ISEMPTY THEN CurrReport.SKIP; ItemLedgEntry.SETRANGE("Document Type","Document Type"::"Purchase Return Shipment"); IF NOT ItemLedgEntry.ISEMPTY THEN CurrReport.SKIP; END; 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; END; END; PROCEDURE InsertValueEntryLine@6(); VAR Location@1000 : 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. } ...
Önkoşullar
Bu düzeltmeyi uygulamak için aşağıdaki ürünlerden birini yüklemiş olmanız gerekir:
- Microsoft Dynamics NAV 2009 R2
- Microsoft Dynamics NAV 2009 Service Pack 1
Kaldırma bilgileri
Bu düzeltmeyi kaldıramazsınız.
Durum
Microsoft bunun, "Şunlar için geçerlidir" bölümünde listelenen Microsoft ürünlerinde sorun olduğunu doğrulamıştır.
Not: Bu, doğrudan Microsoft destek kuruluşu tarafından hazırlanmış bir "HIZLI YAYIMLAMA" makalesidir. Burada yer alan bilgiler acil sorunlar karşısında bu şekliyle verilir. Kullanıma sunma hızının bir sonucu olarak, materyaller yazım hataları içerebilir ve herhangi bir zamanda önceden haber verilmeksizin revize edilebilir. Göz önünde bulundurulması gereken diğer hususlar için Kullanım Koşulları'na bakın.