Printing special item numbers for certain customers..

yuppicideyuppicide Member Posts: 410
edited 2009-10-29 in Navision Attain
Is something like this possible? We use Navision 3.10.

Currently we have options to print Packing List, Sales Invoice, etc.

A few customers don't want our item numbers on those documents. They want their item number.

Currently I output the files to PDF, erase what's there, type new stuff in a similarly sized and style font, then print.

I was thinking there has to be an easier way that I can make Navision automate the process somewhat.

What do you think is my easiest route? I had two different ideas:

1 - Modify the FOB's so when it's printing it checks the "ship to" address and our item number. If ship to address equal, then print their item number, if ship to address not equal XXX then print our item number.

2 - Export the Packing List and Invoice FOB, rename them. Make them appear under the Print menu. They will say "Special Packing List" and "Special Invoice". In there it will prompt you for their item numbers and will print that. It should know how many items are on it and prompt you only for that many.

Comments

  • SavatageSavatage Member Posts: 7,142
    Are you storing there numbers in the Customer->Cross references?
    You can have the inv report "GET" the Cross Reference table and if a code exist for that customer & item # then ALSO or ONLY SHOW the Cross Reference # (which is their #)
  • SavatageSavatage Member Posts: 7,142
    Correction FIND not get... OK Say you stored the customers Item # for Your Item in the Item Cross Reference Table.

    Open Your Report And Add Globals
    CrossRef - Type Record - Item Cross Reference
    CustItemNo - Type Code - 20

    View sections and on the SalesInvLine, Body(1) or whichever line is printing your records
    View->C/al Code (f9)
    add
    OnPreSection()
    CrossRef.RESET;
    CrossRef.SETRANGE(CrossRef."Item No.",TempSalesInvoiceLine."No.");
    CrossRef.SETRANGE(CrossRef."Cross-Reference Type",CrossRef."Cross-Reference Type"::Customer);
    CrossRef.SETRANGE(CrossRef."Cross-Reference Type No.",TempSalesInvoiceLine."Sell-to Customer No.");
    IF CrossRef.FIND('+')
     THEN CustItemNo := CrossRef."Cross-Reference No."
     ELSE CustItemNo := '';
    

    Now add a textbox in that section with sourceexp= CustItemNo
    If a code exists for this customer and that item, their code will show in the new textbox.


    If you want to get all fancy you can add a new field to the customer table called "Show Cross-Ref On Inv" type boolean
    so you can turn the option on & off per customer.. Just change the code a bit.
    OnPreSection()
    Customer.Get(TempSalesInvoiceLine."Sell-to Customer No.");
    If Customer."Show CrossRef On Invoice" THEN BEGIN
     CrossRef.RESET;
     CrossRef.SETRANGE(CrossRef."Item No.",TempSalesInvoiceLine."No.");
     CrossRef.SETRANGE(CrossRef."Cross-Reference Type",CrossRef."Cross-Reference Type"::Customer);
     CrossRef.SETRANGE(CrossRef."Cross-Reference Type No.",TempSalesInvoiceLine."Sell-to Customer No.");
     IF CrossRef.FIND('+')
      THEN CustItemNo := CrossRef."Cross-Reference No."
      ELSE CustItemNo := '';
    END;
    
  • garakgarak Member Posts: 3,263
    @Harry, i would also set a filter to the "unit of measure code" and the "variant code".



    You can also take a look to the field "Reference No." in the Sales Line Table (37) to understand how to filter.

    Regards
    Do you make it right, it works too!
  • SavatageSavatage Member Posts: 7,142
    That's true if you use those, we just happen not to, so I didn't include it.

    So If you do have different customer item numbers for each type of UOM then you would have to add that setrange to the code.
  • David_CoxDavid_Cox Member Posts: 509
    If you are using the Sales Line table check your version for the field "Cross-Reference No." if this exists then from the Customer Card > Customer > Cross References, add the Customers Item Numbers.

    When you create a new Sales Line this field is populated for you if there is a correct Cross Reference setup, so there is no need for large blocks of code in the reports.

    If the line is not updated in any report as an example the Order Confirmation you just need to add one simple line of code:

    Report 205 Order Confirmation
    RoundLoop - OnAfterGetRecord()
    IF Number = 1 THEN
      SalesLine.FIND('-')
    ELSE
      SalesLine.NEXT;
    "Sales Line" := SalesLine;
    
    //Add This Code Here
    IF SalesLine."Cross-Reference No." <> '' THEN
        "Sales Line"."No." := SalesLine."Cross-Reference No.";
    //
    
    IF NOT "Sales Header"."Prices Including VAT" AND
       (SalesLine."VAT Calculation Type" = SalesLine."VAT Calculation Type"::"Full VAT")
    THEN
      SalesLine."Line Amount" := 0;
    
    IF (SalesLine.Type = SalesLine.Type::"G/L Account") AND (NOT ShowInternalInfo) THEN
      "Sales Line"."No." := '';
    
    Later on in this code section you will see the standard code changes the "No. field so it is safe to update the "Sales Line" record fields without saving

    Report 206 Sales Invoice
    Sales Invoice Line - OnAfterGetRecord()
    //Add This Code Here
    IF "Cross-Reference No." <> '' THEN
        "No." := "Cross-Reference No.";
    //
    
    IF (Type = Type::"G/L Account") AND (NOT ShowInternalInfo) THEN
      "No." := '';
    

    David :D
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
  • yuppicideyuppicide Member Posts: 410
    I have to read the rest of this thread, but for now I'll say this.

    My problem is that for example one customer is a company that operates stores on various cruise ships.

    So, in some cases for that customer, depending on the ship to address, it would need to change the item to theirs.

    For example, let's say my item is 5555-1212, but for Carnival Cruise Lines they want 55-1212CCL. Yet for Princess Cruises they want our number.

    But, far as I know nobody even knew about the cross-reference thing, nor used it. So, if need be I believe I'd be able to edit that as well.
    Savatage wrote:
    Are you storing there numbers in the Customer->Cross references?
    You can have the inv report "GET" the Cross Reference table and if a code exist for that customer & item # then ALSO or ONLY SHOW the Cross Reference # (which is their #)
  • David_CoxDavid_Cox Member Posts: 509
    yuppicide wrote:
    So, in some cases for that customer, depending on the ship to address, it would need to change the item to theirs.

    For example, let's say my item is 5555-1212, but for Carnival Cruise Lines they want 55-1212CCL.

    But, far as I know nobody even knew about the cross-reference thing, nor used it. So, if need be I believe I'd be able to edit that as well.

    The Item Cross Reference is only at the "Sell-to Customer No." level and not at the "Ship-to Code" level, you could add the "Ship-to Code" to the Item Cross Reference table and change the code on the Sales Line and the codeunits to filter on the Ship-to Code being blank or matching the Sales Header Ship-to Code, and populate the "Cross Reference No." on the Sales Line table when validating the "No." field.

    But it might be better to create your own table and functions if you require a simple system, or the customers licence does not cover Item Cross References

    David
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
  • SavatageSavatage Member Posts: 7,142
    yuppicide wrote:
    IBut, far as I know nobody even knew about the cross-reference thing, nor used it. So, if need be I believe I'd be able to edit that as well.

    I'm curious where you've been storing their item numbers then?

    Added fields to the item table?
  • yuppicideyuppicide Member Posts: 410
    On paper. :D

    They send us the orders via fax or in snail mail. It gets stored in a filing cabinet. Their item numbers never make it into our system.
    Savatage wrote:
    yuppicide wrote:
    IBut, far as I know nobody even knew about the cross-reference thing, nor used it. So, if need be I believe I'd be able to edit that as well.

    I'm curious where you've been storing their item numbers then?

    Added fields to the item table?
  • garakgarak Member Posts: 3,263
    And why you doesn't import the customer item no.s? To many? To often changes?
    Do you make it right, it works too!
  • yuppicideyuppicide Member Posts: 410
    Well, we probably weren't importing item numbers because of a few reasons..

    1 - There's so many features in Navision. When they bought the software they were shown a brief demo of how to do things they needed, but at the time maybe they didn't need such feature. So, maybe they never got explained the feature or maybe they didn't know it was there. What I've found is with all the features in Navision there is a bunch of stuff we do not use. In fact, some of this stuff is the first time we're ever even trying some of these features. If there is any problem with a particular feature our Navision partner will charge us to fix it. They say you're required to test everything within XX amount of days after purchasing Navision.

    I say it's impossible to test every feature.. there's just too much.

    So, a lot of this stuff we're only seeing for the first time because, being the only technical one in the office, look for things that can make life easier or ways to do certain things.

    2 - Another reason they probably don't use it is because there's only a handful of customers we'd only want to actually print those item numbers for.
    garak wrote:
    And why you doesn't import the customer item no.s? To many? To often changes?
  • SavatageSavatage Member Posts: 7,142
    Did you test to see if you can access the cross-reference form?

    Has any of the posts above helped you? Have you thought about changing/fixing the customer's so that they are not all bunched together using ship-to's

    Perhaps a seperate customer for Princess Cruises and another for Carnival Cruises. This way no extra alterations to the Cross-reference need to be done since "like customers" are grouped together.

    In the code I tested above (the 2nd more fancier) allows you to turn on the printing of cross-references per customer.
  • yuppicideyuppicide Member Posts: 410
    Hi, sorry.. kind of revisiting this topic after sort of forgetting about it.

    I'm looking into what you said. For one new customer they only buy the same items over and over for us. They don't need to know our item numbers. So, I'm testing it out.

    I do see it on Sales Line table, so I've setup my first Cross Reference.

    It populated Description fine.. does not populate the Item No... am looking into that.
Sign In or Register to comment.