Vendor Validate

erugalatha
Member Posts: 120
Hello,
On a requisition line for a Purchase Order when you set the Vendor No. it resets the Direct Unit Cost to 0.00.
How would I change this to keep the price that comes in from the Sales Order?
On a requisition line for a Purchase Order when you set the Vendor No. it resets the Direct Unit Cost to 0.00.
How would I change this to keep the price that comes in from the Sales Order?
0
Comments
-
The Direct Unit Cost gets calculated from Purchase Price table. Which in your case is empty.
From I understand you want the price of the Sales Order be the price on the PO? this this case you not making any profit?
Is this a drop shipment?
Anyways If you want to change the cost, you can do it in the following function.
In requisition Line table function GetDirectCost(CalledByFieldNo : Integer)
You can change it to grab it from related sales line0 -
ara3n wrote:Is this a drop shipment?
Yes.ara3n wrote:You can change it to grab it from related sales line
I suppose I really need to get the best price available that's not zero i.e. if there's a price book for the vendor then I should get it from there if not I need to keep the direct cost that is on the requisition line. It's a sensitive place to be making changes and I'm still not exactly sure where in GetDirectCost I should make it.0 -
Here is the code
IF "Replenishment System" = "Replenishment System"::Purchase THEN BEGIN PurchPriceCalcMgt.FindReqLineDisc(Rec); PurchPriceCalcMgt.FindReqLinePrice(Rec,CalledByFieldNo); //Start 001 IF ("Direct Unit Cost" = 0) AND (CalledBYFieldNo = FieldNo("Vendor No.")) and ("Sales order No." <> '') then begin if SalesLine.get(SalesLine."Document type"::Order,"Sales Order No.","Sales Order Line No.") then begin "Direct Unit Cost" := SalesLine."Unit Cost (LCY)"; end; end; //End 001 END;
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions