We are trying to get SVO profitability data summarized in a GI or report. What is the easiest way to do that? We bill by both SVO and/or Appointment depending on the customer, but regardless need to see a column for Total Billed, a column for Total Costs, and a Column for Profit/Loss by SVO. What tables and/or fields do I need to add to a GI to get this information?
We are specifically looking for the totals from the “profitability” tab of the SVO.
I can’t speak to product changes. You can create an idea on this forum so that others can vote. Acumatica product managers review the ideas and incorporate many of these ideas into the product with each new release.
To correct the error you should add the FSServiceOrder.refNbr field to the Grouping tab of the GI. You will also need to specify the SUM function in the Aggregate column of the results list for the Cost, and use the SUM and MAX in formula for the profit calculations. See the attached GI. It will only return one row per Service Order because of the grouping.
I revised the profit formula to account for the situation where the cost is 0 (that will cause a division by error), and to specify MAX for the FSServiceOrder.CuryDocTotal field.
You can find the names of the Data Access Classes and fields by choosing Customization-->Inspect Element and clicking on the fields or column headers on the relevant forms. In this case, I think the DAC that you are looking for is FSProfitability, with fields CuryExtCost, CuryBillableAmount, and CuryProfit.
CuryBillableAmount may be the billable amount, not necessarily the amount that has already been billed.
When I added the FSProfitability table, I was able to add those fields to my GI grid results but get a warning that those fields cannot be used because the table is not joined with other tables on the relations tab. What do I need to do there?
Normally you would need to join the additional DAC on the relations tab.
However, after looking into this further, this particular table (FSProfitability) does not actually exist in the DB and therefore it can’t be used in a GI.
As per that thread, your best bet will be to join the service order to the appointment(s). The joins on the relation tab should be FSServiceOrder.SrvOrdType = FSAppointmnet.SrvOrdType and FSServiceOrder.RefNbr = FSAppointment.SORefNbr
Then you can calculate the profitability similar to the following:
Will the FSProfitability table every be added to the DB? Seems like it would be much easier since I still cannot seem to find Service Order Total Costs that will populate.
I was able to get the joins on the relation tab as discussed above, but when I tried to do the calculation for profitability I get an error…
And I could use the sum of the Appointment Costs, but they each show up on separate lines right now…
I can’t speak to product changes. You can create an idea on this forum so that others can vote. Acumatica product managers review the ideas and incorporate many of these ideas into the product with each new release.
To correct the error you should add the FSServiceOrder.refNbr field to the Grouping tab of the GI. You will also need to specify the SUM function in the Aggregate column of the results list for the Cost, and use the SUM and MAX in formula for the profit calculations. See the attached GI. It will only return one row per Service Order because of the grouping.
I revised the profit formula to account for the situation where the cost is 0 (that will cause a division by error), and to specify MAX for the FSServiceOrder.CuryDocTotal field.
Thank you so much for all of this help. We are really close, but now that we are grouping if you look back at my example above with Joe Whitters everything appears on one line which is perfect, but the Billable Total is doubled up from adding the two lines together. (The costs from the appointment lines need to be added together, but not the billing from the service order.) Also, how do I get the profit columns to round to 2 decimal places?
So this GI now works for SVO’s that have appointments, but we have some that do not have appointments. How do I get the costs for those because the costs are on the SVO? Do I need a sperate GI for that? Can you get the costs off the SVO?
You can use a LEFT join from FSServiceOrder to FSAppointment to include service orders that don’t have any related appointments.
The field FSServiceOrder.CostTotal seems to be what you are looking for on the service orders, but I would recommend spot checking a few to make sure this is what you need.
This formula will return the FSServiceOrder.CostTotal (if there are no related appointments), or the sum of the FSAppointment.CostTotal (if there are related appointments):
This did work for the Cost Total, now I see it whether it is the sum of the appointments or the service order, but the Profit and Profit % calculations only work for the lines that have Appointment Costs. How do I change my profit formula to reference either the appointment or service cost totals?
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.