Bug Drop Shipment 5.01?
Belias
Member Posts: 2,998
CODEUNIT 414
CODEUNIT 60
AM I MISSING SOMETHING? (sorry for the bad layout of the post...find '//' to see where I commented
)
IF Status = Status::Released THEN
EXIT;
IF "Document Type" = "Document Type"::Quote THEN
IF CheckCustomerCreated(TRUE) THEN
GET("Document Type"::Quote,"No.")
ELSE
EXIT;
TESTFIELD("Sell-to Customer No.");
SalesLine.SETRANGE("Document Type","Document Type");
SalesLine.SETRANGE("Document No.","No.");
SalesLine.SETFILTER(Type,'>0');
SalesLine.SETFILTER(Quantity,'<>0');
IF SalesLine.ISEMPTY THEN
ERROR(Text001,"Document Type","No.");
InvtSetup.GET;
IF InvtSetup."Location Mandatory" THEN BEGIN
SalesLine.SETRANGE(Type,SalesLine.Type::Item);
IF SalesLine.FINDSET THEN
REPEAT
SalesLine.TESTFIELD("Location Code");
UNTIL SalesLine.NEXT = 0;
SalesLine.SETFILTER(Type,'>0');
END;
SalesLine.SETRANGE("Drop Shipment",FALSE);
NotOnlyDropShipment := SalesLine.FINDFIRST; //if there are only drop shpmt, no records are found
SalesLine.RESET;
SalesSetup.GET;
IF SalesSetup."Calc. Inv. Discount" THEN BEGIN //Note that this happens only with this flag active
MODIFY;
CODEUNIT.RUN(CODEUNIT::"Sales-Calc. Discount",SalesLine); //uninitialized SalesLine will be passed to the codeunit below
GET("Document Type","No.");
END;
IF TestPrepayment(Rec) AND ("Document Type" = "Document Type"::Order) THEN
Status := Status::"Pending Prepayment"
ELSE
Status := Status::Released;
SalesLine.SetSalesHeader(Rec);
SalesLine.CalcVATAmountLines(0,Rec,SalesLine,TempVATAmountLine0);
SalesLine.CalcVATAmountLines(1,Rec,SalesLine,TempVATAmountLine1);
SalesLine.UpdateVATOnLines(0,Rec,SalesLine,TempVATAmountLine0);
SalesLine.UpdateVATOnLines(1,Rec,SalesLine,TempVATAmountLine1);
MODIFY(TRUE);
IF NotOnlyDropShipment THEN
IF "Document Type" IN ["Document Type"::Order,"Document Type"::"Return Order"] THEN
WhseSalesRelease.Release(Rec);
CODEUNIT 60
SalesLine.COPY(Rec);
TempSalesHeader.GET("Document Type","Document No."); //Error: The Sales Header does not exist. Identification fields and values: Document Type='Quote',No.=''
TemporaryHeader := FALSE;
CalculateInvoiceDiscount(TempSalesHeader,TempSalesLine);
Rec := SalesLine;
AM I MISSING SOMETHING? (sorry for the bad layout of the post...find '//' to see where I commented
0
Answers
-
Actually it was replaced with this line:
IF NOT SalesLine.FIND('-') THENDescribed in MS support article 940425.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions