can we print comments on Sales invoice

lallylally Member Posts: 323
Hi to every body,

Thanks to everybody for giving awesome support to freshers .
I created sales order and had written some comments . I want to print that comments on sales order report. Next suppose if iPost that order as ship and invoice.
What my query is i want to print that comments in sales invoice report.
So How to print that comments on report of sales order and sales invoice.

I am very curious to know solutions and suggestions to solve this query.
I am not a super programmer . So provide some example code. #-o

Thanks
lally

Comments

  • SavatageSavatage Member Posts: 7,142
    once your in the sales order comments..

    enter your comments and check off "Print On Invoice"

    perhaps you have that field hidden.

    Right click on the title bar of the comments form & view "Show Columns"

    **Or are you talking about adding comment on the Sales Line?
  • lallylally Member Posts: 323
    Thank u Savatage,



    I am working on cronus databse of 4.0 sp1.I searched that field check off "Print On Invoice" that form sales comment line. Even i checked as u told "Right click on the title bar of the comments form & view "Show Columns" . Even i clould not find.
    Finally what i need is I added some comments to sales order form . I want to print that comments on sales order and sales invoice.
    So throw some valuable suggestions..........

    thanks in advance
    lally
  • Revolution1210Revolution1210 Member Posts: 161
    Savatage wrote:
    once your in the sales order comments..

    enter your comments and check off "Print On Invoice"

    perhaps you have that field hidden.

    Right click on the title bar of the comments form & view "Show Columns"

    **Or are you talking about adding comment on the Sales Line?

    Are you sure :-s Print On Invoice?.............. ...ahhh it's a US localisation thing. The Print On.. fields are not present in other country versions.
    Ian

    www.NextEqualZero.com
    A technical eye on Dynamics NAV
  • FommoFommo Member Posts: 138
    Savatage wrote:
    once your in the sales order comments..

    enter your comments and check off "Print On Invoice"

    perhaps you have that field hidden.

    I think you have some customization there... There is no such flag on Sales Order Comment Sheet. Neither does the Invoice Report bring such functionality in standard NAV. I have seen such customization a multiple time though. Not so hard to do, but still it needs customization.

    The main thing is to extend the comment table with the boolean field to hold the decision wheather you want the comment to be an internal thing or something that should be contained on the invoice.
    Then you have to add a data item "Sales Comment Line" indented below the "Page Loop" data item to get it iterated for every invoice page (if that's what you want). Then you also need to insert a new section that shows the comments on the invoice.
    And don't forget to filter the comments using that boolean flag so you can choose which comments to print out and which not.
  • SavatageSavatage Member Posts: 7,142
    I guess by the reponses above that it is a US localization
    Seeing that it's fields 10000 to 10007 show me it's not something we added.
    Field Name	Data Type	Length	Description
    1	Document Type	Option	BC.FCR.01.04
    2	No.	Code	20	
    3	Line No.	Integer		
    4	Date	Date		
    5	Code	Code	10	
    6	Comment	Text	80	
    10000	Print On Quote	Boolean		
    10001	Print On Pick Ticket	Boolean		
    10002	Print On Order Confirmation	Boolean	
    10003	Print On Shipment	Boolean		
    10004	Print On Invoice	Boolean		
    10005	Print On Credit Memo	Boolean		
    10006	Print On Return Authorization	Boolean	
    10007	Print On Return Receipt	Boolean	
    50001	User ID	Code	20	//I added this
    14000901	Include in E-Mail	Boolean	//Eship added this
    

    Our Inv Report is setup like this
    Sales Invoice Header <Sales Invoice Header>
    -Sales Invoice Line SalesInvLineDesc
    --Sales Invoice Line SalesInvLineExt
    -Sales Comment Line <Sales Comment Line>
    -Integer CopyLoop
    --Integer PageLoop
    ---Integer SalesInvLine

    The Code on the Sales Cooment Line appears as so.

    OnAfterGetRecord()
    WITH TempSalesInvoiceLine DO BEGIN
      INIT;
      "Document No." := "Sales Invoice Header"."No.";
    END;
    IF STRLEN(Comment) <= MAXSTRLEN(TempSalesInvoiceLine.Description) THEN BEGIN
      TempSalesInvoiceLine.Description := Comment;
      TempSalesInvoiceLine."Description 2" := '';
    END ELSE BEGIN
      SpacePointer := MAXSTRLEN(TempSalesInvoiceLine.Description) + 1;
      WHILE (SpacePointer > 1) AND (Comment[SpacePointer] <> ' ') DO
        SpacePointer := SpacePointer - 1;
      IF SpacePointer = 1 THEN
        SpacePointer := MAXSTRLEN(TempSalesInvoiceLine.Description) + 1;
      TempSalesInvoiceLine.Description := COPYSTR(Comment,1,SpacePointer - 1);
      TempSalesInvoiceLine."Description 2" :=
        COPYSTR(COPYSTR(Comment,SpacePointer + 1),1,MAXSTRLEN(TempSalesInvoiceLine."Description 2"));
    END;
    TempSalesInvoiceLine.INSERT;
    
  • themavethemave Member Posts: 1,058
    yes it is a US thing, we have the exact same setup in our database.
  • lallylally Member Posts: 323
    Thank U Savatage,


    Thanks to evrybody for u r suggestions.Finally i have to do to solve this problem. How to solve this problem. If it is possible throw some detail explanation to close this problem. It is not only one country problem.Maximum countries didnot have this option to print comments.
    So throw step by step procedure to understand everybody.
    Savatage please...................... ](*,) ](*,) ](*,)

    thanks in advance
    lally
Sign In or Register to comment.