Req Worksheet-create 1 worksheet per vendor

SavatageSavatage Member Posts: 7,142
edited 2009-09-05 in Navision Attain
Just asking if someone has info on this before I look thru CU333

is it the Order counter line here what's causing multiple po's for a single vendor?

*More Detail* if I create a Req Worksheet for a number of orders, The req Worksheet creates a sperate po for each Sell-To Customer Number even tho it's all for 1 vendor. What I would like is to create 1 po per vendor regardless of how many Sell-To Customer Number there are.

I;m looking to add a setup field in purchase order setup to turn it on & off using a boolean & an if statement. First I have to find the section that's creating this.
// Create lines
  LineCount := 0;
  OrderCounter := 0;
  OrderLineCounter := 0;
  CLEAR(PurchOrderHeader);
  SETCURRENTKEY(
    "Worksheet Template Name","Journal Batch Name","Vendor No.",
    "Sell-to Customer No.","Ship-to Code","Order Address Code","Currency Code");
  IF FIND('-') THEN
    REPEAT
      CASE "Requisition System" OF
        "Requisition System"::Transfer :
          BEGIN
            CarryOutAction.InsertTransHeader(ReqLine,2);
            OrderCounter := OrderCounter +1;
          END;

Answers

  • kapil4dynamicskapil4dynamics Member Posts: 591
    It can be a single order if due date on requisition worksheet for demand comes same.
    Kapil Khanna
  • SavatageSavatage Member Posts: 7,142
    I don't think so in my case.

    I can put identical orders (Special Orders) in for the same item - but with different sell-to customer numbers.

    When I run "Get Sales Orders" from Req Worksheet - it pulls 2 lines both the same item from these two orders.
    When Action-Create Purchase Orders is done - two po's are created.

    If I do the same thing with two different orders for the same item but with the same Sell-to Customer Number.
    ...Same Steps
    one po is created.

    I'm stepping thru code coverage right now to find where it needs to create multiple po's
  • SavatageSavatage Member Posts: 7,142
    Ok looking thru the code, cooked my brain.
    workaround...

    Made the Field "Sell-to Customer No." editable in table 246 "Requisition Line"
    Made the "Sell-To Customer No." visible in form 291 "Req. Worksheet"

    Now if I need to I can simply blank out the "Sell-To Customer No." or make them all the same.
    When I run Action->Create Purchase Orders - Only 1 Is Created.

    I see no place where the po actually saves the "Sell-to Customer No." so it just must be for the purpose of creating multiple po's in Req. Worksheet
  • kapil4dynamicskapil4dynamics Member Posts: 591
    Sorry for continuing post
    Savatage wrote:
    I don't think so in my case.

    If ur reoredering policy is "Order", Vendors are same and as per lead time etc etc if the due date is same for all the orders then NAV creates only one purchase order by default. I didn't know u might be using Special Orders.
    I see no place where the po actually saves the "Sell-to Customer No." so it just must be for the purpose of creating multiple po's in Req. Worksheet

    In case of Special Order or Drop Shipment, It keeps the Sell to Customer No. on Purchase Header.
    Kapil Khanna
  • SavatageSavatage Member Posts: 7,142
    Even if it does keep the sell-to # in the header - it's not doing anything that we need.

    As long as the purchase line has sales order# & sales order line# filled it's all ok with us.
  • AdamRoueAdamRoue Member Posts: 1,283
    Due to the nature of the order the sales line and purchase line are linked, I am pretty sure you can see the fields on the line. Nav, I believe, uses the same drop shipment code in parts here. With the drop shipment the purchase order will have the delivery address of the customer, meaning you HAVE to have separate orders. This is not true with "Special" orders, but I believe the code is reused - difficult as I am not a developer. However this leads me to my actual question - why are you using Special Orders?
    The art of teaching is clarity and the art of learning is to listen
Sign In or Register to comment.