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


Manual muliplication of quantity by part... Expand / Collapse
Author
Message
Posted 2/26/2007 11:41:08 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:45:59 AM
Posts: 1,866, Visits: 4,324
Had an interesting request from an AyaNova user - here is the scenerio:

They want to use the Discount field in the sub-section Parts in a Quote entry screen to "mark up" a price, instead of using it to decrease a price.

My suggestion to do this is to enter a negative amount into the Discount field:

For example, if you applied a discount of 20% (0.20) against a part price that is $3.75, the resulting price would be $3.00

Whereas if you applied a negative amount (-0.20) against a part price that is $3.75, the resulting price would be $4.50 - whichis ineffect marking up the price.

Now they also want to have a report for themselves so that they can compare the original price with no markup against what the customer would be charged with the markup.

As as example, I have provided below a specifc sample report template that is based off of the Sample Detailed Quote.

Sample Detailed Quote with No Markup compared Against Markup

Download, extract and import. Open up in the report designer and follow along to see where and how the original Sample Detailed Quote was edited to arrive at this report template

I added the following variables to the existing OnBeforeScript for the ReportHeaderBand1 as these will be used in scripts in this report template

decimal TotalNetPartPrice = 0;
decimal TotalWOPartPrice = 0;

In GroupHeader3 band (the groupheader for the Parts section of this report template), I added an additional cell xrTableCell97 and edited its text to show as Before MarkUp Net

I also edited the text for other fields in this groupheader identifiying which are not markup information, and which are (those that are have the markup (what is originally identfiied as the Discount field) percentage applied automatically by AyaNova)

In the Detail3 band area, I added an additional cell xrTableCell98 and edited its OnBeforeScript property with the following:

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
//this gets the value of the original price of the part and multiples it by the quantity to display in this field what the Net
//amount would be with no markup
xrTableCell98.Text = string.Format("{0:c2}", (Convert.ToDouble(DetailReportItemPart.GetCurrentColumnValue("LT_WorkorderItemPart_Label_Price"))) * (Convert.ToDouble(DetailReportItemPart.GetCurrentColumnValue("LT_WorkorderItemPart_Label_Quantity"))));

//this keeps a running total of the net price with no markup for display in the groupfooter
TotalNetPartPrice += Convert.ToDecimal((Convert.ToDouble(DetailReportItemPart.GetCurrentColumnValue("LT_WorkorderItemPart_Label_Price"))) * (Convert.ToDouble(DetailReportItemPart.GetCurrentColumnValue("LT_WorkorderItemPart_Label_Quantity"))));
}

In the GroupFooter2 band, I added an additional cell xrTableCell96 and edited its OnBeforeScript property with the following:

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
//this displays in this field the total net price if no markup was applied
xrTableCell96.Text = string.Format("{0:c2}", TotalNetPartPrice);

//this keeps a running total for display at the bottom of the report
TotalWOPartPrice  += TotalNetPartPrice;

//this sets the variable back to 0 in case there are additional workorder items with parts so that amounts are added correctly
TotalNetPartPrice = 0;
}

I added to the existing ReportFooter1 bands OnAfterPrint script the following so that if printing off multiple quotes at once, this is reset back to 0 for the next report template

TotalWOPartPrice = 0;

In the ReportFooter1 band, I added the additional label xrTabelCell99 and edited its text to show as No Markup Net Parts

I also added the additional label xrNetNoMarkupParts and set the OnBeforePrint script for it with the following:

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
xrNetNoMarkupParts.Text = string.Format("{0:c2}", TotalWOPartPrice);
}

This results than in a report template similar to the following below (shows partial of the report template) - whereby the user can now compare what the "original net price" to the price as a result of being multiplied by the markup (discount), as well as compared the entire quote part total with markup and no markup.



AyaNova Sales & Technical Support
http://www.ayanova.com
Post #2827
Posted 3/30/2007 6:52:07 PM
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:45:59 AM
Posts: 1,866, Visits: 4,324
Here is another rendition of this sample report template, but that also includes identifying the costs of the parts, and the total costs of parts for the quote - suggestion would be for internal use.

Sample Quote with Costs and With No Discount compared against Discounted Parts

This sample report uses the scripts identified above, but has had additional variables added for the Net cost variable and the Total workorder Part cost variable, as well as OnBeforeScripts for the Net Part Cost field in the groupfooter for parts, and the Workorder Part Costs field in the report footer; as well as showing how a subtraction is used in a script to subtract the total workorder No Discount amount from the Discounted part amount in the report footer.



AyaNova Sales & Technical Support
http://www.ayanova.com
Post #2974
« 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 9:30am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 12 queries. Compression Disabled.