IE. 24.6901 cents
Is there a way in the cost set up to either round up or round down to the closest whole cent?
Pharos use the SQL money data type for all the job cost calculations in the stored procedures. This has a 4 decimal place precision. The job cost is usually rounded based upon the regional settings of the print server. Not sure why on area costing it is not rounded, maybe by design? (Question for Pharos!) but it isn't.
The way we've overcome this in the past is with a small script. Example below, this just truncates to 2dp but you can easily add a rounding routine. Also the script below will apply to all queues, again this can be easily modified to only apply to specific queues by checking the PlugIn.Queue value.
new iDecimalPlaces = 2;
new iListCounter =0;
new bTruncate = false;
new sJobCost = "" + PlugIn.JobCost;
// Check to see if job has custom page size, if not use standard JCM instead
while (iListCounter < List.Length(PlugIn.JobAttrs))
if(PlugIn.JobAttrs[iListCounter] == "Custom")
// Custome attribute found exit loop.
bTruncate = true;
iListCounter = List.Length(PlugIn.JobAttrs);
// Truncate required
// Find the decimal point and truncate. NB no rounding here, just a truncate!
String.Left(sJobCost, String.Find(sJobCost, ".") + iDecimalPlaces + 1 );
// Assign the truncated JobCost for the script to return
PlugIn.JobCost = sJobCost;
IO.PrintLine("New JobCost: " + PlugIn.JobCost);
IO.PrintLine("Not Custom Page Size. No Action Required.");
Thanks NIc! that is exactly what I was looking for.
Retrieving data ...