Sales Invoice

SnoopycSnoopyc Member Posts: 45
edited 2014-07-03 in Navision Attain
Hi expert, I have lines of code for the sales invoice printing form. In the printout, I want to show the items which are charged for TAX as YES, but even though there are taxes charged, it still shows as NO. Below is the code. Thank you!
If ("Sales Invoice Line"."Amount Including VAT" - "Sales Invoice Line".Amount) <> 0 THEN

Tax := 'Y'

ELSE

Tax := 'N';

Comments

  • SavatageSavatage Member Posts: 7,142
    What's TAX a text field you created?

    What trigger is your code & your sourceexp of a textbox is tax correct?

    did you check if every line that has tax also has a tax% value?
    then you could use that... if Tax% <> 0 the tax := 'y' else tax := 'n';
  • SnoopycSnoopyc Member Posts: 45
    Thank you expert! It still does not work.
  • SnoopycSnoopyc Member Posts: 45
    The report I am using comes from the system, which is report 10074. Then I deleted the code and added only the tax % value to the table, but the numbers showing are all zero even though it has tax values. So that is why the code doesn't work. How to fix it? Thank you!
  • SavatageSavatage Member Posts: 7,142
    Are you saying you only want Taxed item to appear on your report or are you asking to pirnt a "y" or "n" on the line?

    Do you want to skip the the untaxed lines in your report?

    then use CURRREPORT.SKIP;
    http://msdn.microsoft.com/en-us/library/dd339042.aspx
  • SnoopycSnoopyc Member Posts: 45
    Thank you, expert! I want to print Y for the tax and N for Non-tax. I tried to add the tax % field to the report and all of them are showing as zero even thought some of them have values.
Sign In or Register to comment.