AyaNova service management & work order software
AyaNova Support Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Help adding VAT field to already modified... Expand / Collapse
Author
Message
Posted 5/28/2008 9:34:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/20/2009 1:04:46 AM
Posts: 2, Visits: 9
i am trying to add a plus vat (value added tax) field to the bottom of my template (marked in red) but having alot of script issues generally crashing ayanova, my latest try is attatched, with the field i want to sort in red, is there any way i can get the template itself to add the 17.5% so as to avoid adding tax back in as it seems to confuse my book-keeper and i want to only use vat on this quote

regards

richard

  Post Attachments 
Copy of Evolution detailed quote w manual totals imput.zip (2 views, 55.55 KB)

Post #4074
Posted 5/28/2008 9:56:00 AM
AyaNova Sales & Support

AyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & SupportAyaNova Sales & Support

Group: Administrators
Last Login: Today @ 7:34:22 AM
Posts: 2,190, Visits: 5,029

Hi Richard

The field in red is called xrNetTravel in the report template you sent. And it still has the script in it from what that field originally was for - which was for displaying the net travel.

If what you want to do is manually apply a % against another field, you would need to edit its OnBeforePrint script to do this.

I have attached an edited copy of your report template to this reply so that you can see what I did below:

  • Note that I edited the Name of the field label to xrTotalIncVat  and the name of the field to the left of it to xrTotalexcVat only so that their names match more of what they do
  • Expand the Scripts property for this label
  • Open the OnBeforePrint script so that you can see the script

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
//this converts the GrandTotal that is displaying in the xrTotalexcVat label to a double type so
//that it can be multiplied by the VAT plus itself (1.175) and than displayed
//in the xrTotalincVat label
xrTotalIncVat.Text = string.Format("{0:c2}", (Convert.ToDouble(GrandTotal) * 1.175));
}

  • Print Preview - you will see that the field now has the GrandTotal accumulated amount multipled by 1.175

- Joyce

AyaNova Sales & Technical Support
http://www.ayanova.com


  Post Attachments 
Edited Copy of Evolution detailed quote w manual totals imput.zip (2 views, 51.79 KB)
Post #4075
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: AyaNova Sales & Support

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 7:55pm

Powered by InstantForum.NET v4.1.4 © 2010
Execution: 0.031. 10 queries. Compression Disabled.