No charge hours calculation

I have a report, based on the Work Order Summary, With Grand Total report. I added a field for “Discounted Hours” which uses the field ‘no charge quantity’ to pull the data. I noticed when I go to print the report, it does not subtract the “discounted” amount from the total. (I am not sure that it did this even before I modified the report or added the field.) Is there an easy way to do this? I have attached a copy so you can see what I am talking about. Thanks in advance!

Hi

Thanks for posting and providing the report.

I’ll take a look as soon as possible and post back.

  • Joyce

Hi

The report template you have further customized appears to be the sample Detailed Service Workorder with Grand Total.

A report can only print what you have told it to do. In this case, you have added a new field in the Labor band’s groupfooter areato display the group sum amount for the datafield No Charge Quantity. You haven’t told the report to subtract this amount from any other fields.

But the main thing is - the way we have developed AyaNova, is that No Charge Hours are the hours you enter that are no charge, and the Service Rate Quantity field are the actual hours that are charged, the billable hours.

For example, you may have been onsite from 11AM till 3PM which is a total of 4 hours, but charged for only 3 hours.

So you would enter 3 into the Service Rate Quantity field, and 1 into the No Charge Hours field in the workorder.

This way, when you print off a report for the client, only the quantity in Service Rate Quantity is charged against the $ amount of the rate, and taxes are figured from this as well.

From what it sounds like, you are entering all hours both no charge and billable into the Service Rate Quantity, whereas AyaNova and the sample report templates we provide are developed based on only billable hours are entered into the Service Rate Quantity.

This report may be able to be edited to subtract the amount from the Service Rate Quantity and than to subtract the amount from the taxes and the total dollar amount, but it no way would it be easy nor would it be quick. It would require many many hours to figure out how to sidestep fundamental aspect of the AyaNova program.And all reports are based on this feature - that only billable hours are entered into Service Rate Quantity - so more than just this report would have to be edited.

Your report right now does show the total amount of No Charge Hours for each workorder, and it could be additonally customized to mulitple this amount by the Service Rate to get an amount of what the client "didn’t have to pay for so that they can see, as well as show this total amount at the bottom of the report- because the whole idea is to let your client know you provided them something at no cost for goodwill. Let me know if you want to go this route, and I will as soon as I can add these scripts to do this into this report and post back to this area for others as well.

Butyou need toenter only billable hours into the Service Rate Quantity, and hours that are not billed into the No Charge Hours field.

  • Joyce

Hi Joyce,

Thanks for looking at this and clarifying. Yes, I do want to show the amount not charged to the customer. Itseems toadd valueto our service, in the customer’s eyes, to show that we occasionally discount our service whencircumstances are beyond our control, or theirs.

In the scripts that you are speaking of…is it possible to show the fields only if they are populated? (Like much of the rest of the report)

Thank you!

masonworks (10/11/2006)In the scripts that you are speaking of…is it possible to show the fields only if they are populated? (Like much of the rest of the report)

Hi

Not sure what you mean exactly - do you mean not show a specific data field if there is no data - if so, which field?

  • Joyce

Yes, that is what I mean. Do not show the field if there is not data. I am speaking of the Discounted Hours field we are looking at. If there were no ‘no charge’ hours on the workorder, do not display on the report.

masonworks (10/11/2006)Yes, that is what I mean. Do not show the field if there is not data. I am speaking of the Discounted Hours field we are looking at. If there were no ‘no charge’ hours on the workorder, do not display on the report.

I think you mean that if the hours are 0, to not show the number 0, nor to show the Discounted Hours label.

I can take a look at thatto see if possible and what isinvolved. Will post back.

  • Joyce

As you can see by the time stamp of this topic reply, this has taken some doing - but I got it.

This report template is based on the sample Detailed Service Workorder with Grand Total report that was initially edited by masonworks and has now been further customized to include a total of Net NC charge amount derived from NC Hours multipled the Service Rate Charge; the Net NC Hours; and at the report footer, a total of NC Hours and total of NC charge amount derived from NC Hours multipled the Service Rate Charge.

This report could be useful if you provide no charge labor to your clients - showing on the report you provide them the amount of no charge hours and the potential currency amount of no charge that you did not charge them. This provides value in the eyes of your clients - if you are not going to charge them for something, let them know they received that.

And the report includes scripts so that if there isn’t any NC Hours, it doesn’t show any labels for these fields. As you may not want to provide a report to your client that says 0 NC Hours.

To do this requires scripts to be applied as well as the fields.

Download and importthe report template, open it in custom report designer, and follow along by selecting the properties where indicated so that you can see how done.

Select the ReportHeaderBand1, select the Properties tab, expand the Scripts property, and open the the OnBeforePrint script property.

In the existing script have added the variables where the running totals of NC Hours and NC Amount will be kept

decimal NetNC = 0;
decimal NetNCAmount = 0;

Also added into this script setting the default heights for the two panels that we want to show only if the NC Hours is more than 0. These initially set the default height of these panels to 0 (shrunk).

int pnlNetNCAmountDefault=0;
int pnlTotalNCAmountDefault=0;

pnlNetNCAmountDefault=pnlNetNCAmount.Height;
pnlTotalNCAmountDefault=pnlTotalNCAmount.Height;

In the Detail1 band for the DetailReportItemLabor band have placed the panel pnlNetNCAmount with the field xrLabel12 that is just text, and the field xrLabel15 that is derived from the NC Hours multipled the Service Rate Charge for that labor item.

You can see the script for xrLabel15 by selecting it, select Properties tab, expand the Scripts property, open the OnBeforePrint script property:

private void OnBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
{
//this gets the value of the NC Hours object, coverts it to decimal and holds it in the NCQty variable
decimal NCQty = Convert.ToDecimal(DetailReportItemLabor.GetCurrentColumnValue(“LT_WorkorderItemLabor_Label_NoChargeQuantity”));
//this gets the value of the Service Rate Charge, converts it to decimal and holds it in the NCRate variable
decimal NCRate = Convert.ToDecimal(DetailReportItemLabor.GetCurrentColumnValue(“LT_WorkorderItemLabor_Label_LaborRateCharge”));
//this multiplies the NCQty by the NCRate to produce the NCAmount variable
decimal NCAmount = NCQty * NCRate;
//this format the NCAmount variable first to currency and than to a string to place as text into the xrLabel15 field
xrLabel15.Text = string.Format("{0:c2}", NCAmount);
//this states that if the NoCharge Qty is 0, to set the field xrLabel15 to not be visible
xrLabel15.Visible=(0!=decimal.Parse(DetailReportItemLabor.GetCurrentColumnValue(“LT_WorkorderItemLabor_Label_NoChargeQuantity”).ToString()));
//this maintains a running total of NCAmount into the NetNCAmount we will use at the end of the report
NetNCAmount += Convert.ToDecimal(NCAmount);
}

Select the Detail1 band of the DetailReportItemLabor, select Properties, expand Scripts and view the OnBeforePrint script property where have added the additional code so that this panel doesn’t show and also shrinks up if NC is 0

[i]if(DetailReportItemLabor.GetCurrentColumnValue(“LT_WorkorderItemLabor_Label_NoChargeQuantity”).

Thank you so much for your time! This is awesome!

Have edited this and reposted it
-Delete the previous report template
-Download the MARCH1 Sample Service Workorder with No Charge Amount
-Extract
-Import into AyaNova

The previous sample report template posted on Feb 7th would not show the No Charge Amounts if there were regular labor charges after the No Charge amount