How to restrict lines not to appear on sales invoice report

Markandey_PandeyMarkandey_Pandey Member Posts: 178
Hi all,

i have a special requirement ,
Actually when sales order is created, one sale order can have only one item but in some cases to comment on the invoice we use second or third line of item description but i dont want to display these extra lines on report.

can anybody tell me how to restrict this.
Markandey Pandey

Comments

  • kapamaroukapamarou Member Posts: 1,152
    You can filter the lines like

    SETFILTER(Type,'<>%1','')

    or on the Body section you can do

    CurrReport.SHOWOUTPUT(Type<>Type::"")
  • David_SingletonDavid_Singleton Member Posts: 5,479
    This is a very complex modification, and made the more so by how easy it looks at first glance. As a beginner this is not something you want to tackle. I have seen some huge disasters caused by modifications like this being made by newbie programmers to Navision.
    David Singleton
  • matttraxmatttrax Member Posts: 2,309
    This is a very complex modification, and made the more so by how easy it looks at first glance. As a beginner this is not something you want to tackle. I have seen some huge disasters caused by modifications like this being made by newbie programmers to Navision.

    It's true...early on in my career I once gave a customer dynamic invoices. :oops: They would change when the flag on the item/resource changed and would print amounts that were not the same as what they had been posted as. :oops: x2

    Be careful.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    I can't count the number of times I have seen this nor what it cost to the Navision customer. One that comes to mind was at one site where they had complex conditions to print or not print the lines, and they obviously did not test every scenario, so there were conditions that a customer got goods shipped to them, but never paid. Pretty hard going back to customers and telling them that all their invoices were wrong and they will be getting new ones. Another where they were calculating tax manually and ended out not charging sales tax to the customer. the list goes on.


    Actually its a hard balance for me. Since the more programmers there are out there doing stuff like this the more work there is for me, so maybe I need to stop helping people. :whistle:
    David Singleton
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Ah no I remember now the Sales Tax one was where they did job style invoicing and hid all the main lines (by filtering at the Sales Line table level, and some code generated a new TempSalesLine variable in the report that consolidated the lines, but of course with mixed item types they couldn't do sales tax so the tax on the detail lines never went to the consolidated lines. Try explaining that to a Sales Tax Auditor. :mrgreen:
    David Singleton
  • matttraxmatttrax Member Posts: 2,309
    Thankfully for me the controller at that company was on top of his stuff. That was about the time I learned what posted really meant :lol: Have to learn eventually.
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    OTOH Markandey Pandey wants to play around only with the comment lines which should be OK. Generally, IMHO a display logic like IF ("Amount"<>0) OR ("Amount Incl. VAT"<>0) THEN CurrReport.SHOWOUTPUT(TRUE) ELSE (...complicated display logic here...) should be considered safe enough.
  • aseigleaseigle Member Posts: 207
    In 2009SP1 Comments functionality was extended on the Sales and Purchase Lines to include setups for Print on: Quote, Pick Ticket, Order Confirmation, Invoice, Credit Memo, Return Authorization, Return Receipt. Perhaps you could add the comment to the line, and leave the Invoice selection unchecked. This way you could have the comment on your Sales Order and other relevant documents, and when you post, the comment is available on the Invoice, but will not print.

    You didn't mention what version you are on, but maybe this could help.
  • Markandey_PandeyMarkandey_Pandey Member Posts: 178
    Yes i am using 2009 sp1
    Markandey Pandey
Sign In or Register to comment.