Advertisement
Advertisement
| 02.07.2008 at 10:02AM PST, ID: 23145241 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: |
<!--- The method I'm calling --->
<cffunction name="dailyTotals" access="remote" returntype="void" output="true">
<cfargument name="department" type="string" required="yes" />
<cfstoredproc procedure="sp_OMR_qry_DailyHours" datasource="#session.database#" username="#session.DBID#" password="#session.DBPass#" >
<cfprocparam type="in" cfsqltype="cf_sql_varchar" dbvarname="department" value="#arguments.department#" null="no" />
<cfprocresult name="qry_dailyhours" resultset="1" />
</cfstoredproc>
<cfsavecontent variable="content">
<cfoutput query="qry_dailyhours">
<cfset sumHours = 0>
<tr >
<cfset rowClass = "reportDataRow#Int(qry_dailyhours.CurrentRow MOD 2)#">
<td class="#rowClass#"></td>
<td class="#rowClass#">#DateFormat(qry_dailyhours.recordDate, "MM/DD/YYYY")#</td>
<!--- <td>#qry_dailyhours.TimecardWeek#</td> --->
<!--- <td>#qry_hours.SupDepartment#</td> --->
<td class="#rowClass#"><cfif #qry_dailyhours.Direct# EQ "">0<cfelse>#Round(qry_dailyhours.Direct)# <cfset sumHours = sumHours + qry_dailyhours.Direct></cfif></td>
<td class="#rowClass#"><cfif #qry_dailyhours.indirect# EQ "">0<cfelse>#Round(qry_dailyhours.Indirect)# <cfset sumHours = sumHours + qry_dailyhours.Indirect></cfif></td>
<td class="#rowClass#"><cfif #qry_dailyhours.Nonop# EQ "">0<cfelse>#Round(qry_dailyhours.NonOp)# <cfset sumHours = sumHours + qry_dailyhours.Nonop></cfif></td>
<td class="#rowClass#">#Round(sumHours)#</td>
<td class="#rowClass#">#Round(qry_dailyhours.OT)#</td>
<td class="#rowClass#"><cfif sumHours NEQ '0'>#DecimalFormat((qry_dailyhours.OT/sumHours)*100)#%</cfif></td>
</tr>
</cfoutput>
</cfsavecontent>
<cfwddx action="CFML2JS" input="#content#" toplevelvariable="r">
</cffunction>
<!--- How I'm calling the method --->
function get_week(department,weekend){
param = 'department='+ department + '&weekend=' + weekend;
http( 'POST' , 'components/ajax.cfc?method=dailyTotals' , add_rows, param);
}
What is the best way to write the add_rows function?
|