 			collection_id)
 		VALUES (
 			#transaction_id#,
-			to_date('#TRANS_DATE#','yyyy-mm-dd'),
+			'#TRANS_DATE#',
 			'#escapeQuotes(TRANS_REMARKS)#',
 			'borrow',
 			'#escapeQuotes(NATURE_OF_MATERIAL)#',

			'#LENDERS_TRANS_NUM_CDE#',
			'#Borrow_Number#',
			#LENDERS_INVOICE_RETURNED_FG#,
			to_date('#RECEIVED_DATE#','yyyy-mm-dd'),
			to_date('#DUE_DATE#','yyyy-mm-dd'),
			to_date('#LENDERS_LOAN_DATE#','yyyy-mm-dd'),
			'#escapeQuotes(LENDERS_INSTRUCTIONS)#',
			'#BORROW_STATUS#'
		)

			<cfset w=w & " and borrow_status = '#borrow_status#'">
		</cfif>
		<cfif isdefined("received_date_after") and len(received_date_after) gt 0>
			<cfset w=w & " and received_date >= '#received_date_after#'">
		</cfif>
		<cfif isdefined("received_date_before") and len(received_date_before) gt 0>
			<cfset w=w & " and received_date <= '#received_date_before#'">
		</cfif>
		<cfif isdefined("lenders_loan_date_after") and len(lenders_loan_date_after) gt 0>
			<cfset w=w & " and lenders_loan_date >= '#lenders_loan_date_after#'">
		</cfif>
		<cfif isdefined("lenders_loan_date_before") and len(lenders_loan_date_before) gt 0>
			<cfset w=w & " and lenders_loan_date <= '#lenders_loan_date_before#'">
		</cfif>
		<cfif isdefined("due_date_after") and len(due_date_after) gt 0>
			<cfset w=w & " and due_date >= '#due_date_after#'">
		</cfif>
		<cfif isdefined("due_date_before") and len(due_date_before) gt 0>
			<cfset w=w & " and due_date <= '#due_date_before#'">
		</cfif>
		<cfif isdefined("LENDERS_INSTRUCTIONS") and len(LENDERS_INSTRUCTIONS) gt 0>
			<cfset w=w & " and upper(LENDERS_INSTRUCTIONS) like '%#ucase(LENDERS_INSTRUCTIONS)#%'">
