Service tax % in sales invoice report is not working

lavanyaballurgilavanyaballurgi Member Posts: 235
edited 2012-05-10 in NAV Three Tier
Hey Experts,


i created a code to print service tax % in sales invoice report. it works but not for all invoices.what may b wrong?

"<Sales Line>".SETFILTER("Service Tax Amount",'>%1',0);

grc_ServiceTaxSetup.SETRANGE(Code,"<Sales Line>"."Service Tax Group");

IF grc_ServiceTaxSetup.FINDFIRST THEN

gdc_servicetaxpercentage := grc_ServiceTaxSetup."Service Tax %";

Answers

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Did you try by adding
    IF "<Sales Line>".FINDFIRST THEN
    
    after first line..
  • lavanyaballurgilavanyaballurgi Member Posts: 235
    yes your trick worked...


    gdc_servicetaxpercentage := 0;
    grc_salesinvoiceline.SETRANGE("Document No.","No.");
    grc_salesinvoiceline.SETFILTER("Service Tax Amount",'>%1',1);
    IF grc_salesinvoiceline.FINDFIRST THEN
    grc_ServiceTaxSetup.SETRANGE(Code,grc_salesinvoiceline."Service Tax Group");
    IF grc_ServiceTaxSetup.FINDFIRST THEN
    gdc_servicetaxpercentage := grc_ServiceTaxSetup."Service Tax %";
Sign In or Register to comment.