Options

Sales Invoice

GDGD Member Posts: 49
HELLO

WHEN FROM SALES ORDER I POST SHIP+INVOICE I HAVE 1 INVOICE AND 1 SHIPMENT.

I WANT IN THE INVOICE FORM TO BE PRINTED THE TRANSPORTATION DESCRIPTION OF THE RELATED SHIPMENT.

I PUT IN THE FORM 206 THE SALES SHIPMENT HEADER IN ORDER TO PICK UP THE FIELD "TRANSPORTATION DESC" BUT DOES NOT PRINT ANYTHING

HOW I CAN DRAW THIS FIELD FROM THE SHIPMENT?

THANKS IN ADVANCE
GD

Answers

  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Please, remove the chewing gum from you caps-lock key :D
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Have you added this field to the invoice table? Is it a field from the sales header?

    Or have you made a function in the sales invoice table which returns the code from the shipment?

    Please give me some more info's (Without the caps :D )
  • Options
    GDGD Member Posts: 49
    exist as a field in the sales shipment header....

    i worked only in with report 206 where i put the shipment header as a data item, in order to draw this field...i think i go the rong direction :mrgreen:

    i need a function (in the sales invoice table) to take this field from the shipment table?

    gd
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    The easiest way is to make the field available on the sales invoice.

    If this is not possible you need to read the sales shipment from a variable on the 206 report.

    They should have the same Order No.
  • Options
    GDGD Member Posts: 49
    is it possible to give me some detail step about the easiest way 8-[
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Well, it is the easiest way to have in on your report, you need however need to change at least some tables. :shock:

    First you need to find out how the field on the sales shipment is updated.

    Normaly the fields in the sales header, sales shipment and sales invoice have the same field numbers. This allows Navision to use Transferfields in the posting routine.

    With this, it is possible to add new fields to all 3 tables. If the numbers are the same, the posting routine is updated automaticaly.

    A problem however is in the fields that are create by Navision. If a field exists in the sales shipment with no. 100 you cannot add this to the sales invoice with the same number using your development license.

    What is the field number of the Transportation Description in the sales shipment?

    I hope I explained this correctly. :?
  • Options
    GDGD Member Posts: 49
    Mark,

    the field No. 16751 in shipemt Header Table

    and does not allow me to create the same in the invoice header!!!!

    The other solution about the variable in sales invoice report 206. i put as variable SalesShipHeader record: Sales Shipment Header.

    and i wrote a function on SalesInvoiceHeader - OnAfterGetRecord

    SalesShipHeader.GET(Sales Shipment Header.Transportation Description);

    but did not print anynthing!!!

    gd
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Have you tried
    SalesShipment.Setrange("order No.", "order No.");
    salesshipment.FIND('-');
    

    instread of the GET thing?

    You can only use get on the primairy key.
  • Options
    GDGD Member Posts: 49
    Mark works fine from the sales order.

    the invoice report crashes when i create an invoice directly from the invoice form (problably because there is not an OrderNo)

    can i exclude somehow this process?

    gd
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    In this case you can make the find conditional
    SalesShipment.Setrange("order No.", "order No."); 
    if not salesshipment.FIND('-') then
      salesshipment.init;
    
  • Options
    GDGD Member Posts: 49
    works perfect..

    thanks a lot
Sign In or Register to comment.