Posts Tagged Invoice
Show Shipment Information on Sales Invoices
When using combined shipments or when using the “Get Shipment Lines…” function on the invoice form, a line with shipment information is shown for all shipments linked to the invoice lines.
This is very useful information for the customer and for customer service. It gives them a direct link between shipments and the invoices. Unfortunately this information line is not added when you “Ship and Invoice” an Order.
With the following adjustment to codeunit 80, the extra line is also added when you post “Ship and Invoice” an order.
Codeunit 80 – Sales-Post
...
IF Invoice THEN BEGIN
// Insert invoice line or credit memo line
IF "Document Type" IN ["Document Type"::Order,"Document Type"::Invoice] THEN BEGIN
//insertion start
//Add shipment info if this is the first line of an invoice and there is shipping info.
recSalesInvLines.SETRANGE("Document No.",SalesInvHeader."No.");
IF recSalesInvLines.ISEMPTY AND (SalesShptHeader."No." <> '') AND (SalesShptHeader."Shipment Date" <> 0D) THEN BEGIN
SalesInvLine.INIT;
SalesInvLine."Document No." := SalesInvHeader."No.";
SalesInvLine.Description :=
STRSUBSTNO(Text92000,SalesShptHeader."No.",SalesShptHeader."Shipment Date");
SalesInvLine.INSERT;
END;
//insertion end
SalesInvLine.INIT;
SalesInvLine.TRANSFERFIELDS(TempSalesLine);
SalesInvLine."Document No." := SalesInvHeader."No.";
SalesInvLine.Quantity := TempSalesLine."Qty. to Invoice";
SalesInvLine."Quantity (Base)" := TempSalesLine."Qty. to Invoice (Base)";
...
Multilanguage Value of Text92000: ENU=Shipment No. %1 of %2:;DES=Lieferung Nr. %1 vom %2:;ITS=Fornitura Nr. %1 del %2:;FRS=Livraison n° %1 du %2.
A text line with the Shipment No. and the Shipment Date will now be added to the invoice every time you ship and invoice an order.
Add comment October 8, 2008
