<!---
<cfcomponent output="false">
	<cffunction name="approve" access="remote" returntype="string">	
	           <cfargument name="ApproveBill" required="yes" hint="ot Step 1">
			   <cfargument name="ApproveBill_1" required="yes" hint="ot Step 1">
			   <cfif #ApproveBill# neq ''>
			   <cfquery  datasource="#Application.DataSrc#">
			update #Request.prefix_db_agency#.ScheduleItems set ApproveBill = '1' where ScheduleItems_ID in(#ApproveBill#)
			   </cfquery>
			   </cfif>
			   <cfif #ApproveBill_1# neq ''>
			    <cfquery  datasource="#Application.DataSrc#">
			update #Request.prefix_db_agency#.ScheduleItems set ApproveBill = '0' where ScheduleItems_ID in(#ApproveBill_1#)
			   </cfquery>
			   </cfif>
			   
			  <cfreturn 'success'>  
</cffunction>
</cfcomponent>--->

<cfcomponent output="false">
	<cffunction name="approve" access="remote" returntype="string">
       	<cfargument name="chkvalue" required="yes" hint="ot Step 1">
	   	<cfargument name="unchkvalue" required="yes" hint="ot Step 1">

	    <cfif #chkvalue# neq ''>
		   	<cfquery  datasource="#Application.DataSrc#">
				update #Request.prefix_db_agency#.pSchedules set ApproveBill = '1' where Schedule_ID in (#chkvalue#)
		   	</cfquery>
	   	</cfif>

	   	<cfif #unchkvalue# neq ''>
		    <cfquery  datasource="#Application.DataSrc#">
				update #Request.prefix_db_agency#.pSchedules set ApproveBill = '0' where Schedule_ID in (#unchkvalue#)
		   	</cfquery>
	   	</cfif>

		<cfreturn 'success'>
	</cffunction>
	
	<cffunction name="Delete_schedule" access="remote" returntype="string">
       	<cfargument name="Schedule_ID" required="yes" hint="ot Step 1">

	    <cfif #Schedule_ID# neq ''>
		   	<cfquery  datasource="#Application.DataSrc#">
				update #Request.prefix_db_agency#.pSchedules set Status = '1' where Schedule_ID in(#Schedule_ID#)
		   	</cfquery>
	   	</cfif>

	  <cfreturn 'success'>
	</cffunction>


	<cffunction name="Delete_NOA" access="remote" returntype="string">
       	<cfargument name="Schedule_ID" required="yes" hint="ot Step 1">

	    <cfif #Schedule_ID# neq ''>
		   	<cfquery  datasource="#Application.DataSrc#">
				update #Request.prefix_db_agency#.pSchedules set NOA = '1' where Schedule_ID in(#Schedule_ID#) AND status = 0
		   	</cfquery>
	   	</cfif>

	  <cfreturn 'success'>
	</cffunction>


	
</cfcomponent>