function _createOrderObj(order, totalPayment, balance, status, payment_method, ref_no,register_id, register_history_id, return_order_id,user_id,store_id) {
	
	  		return dbService.orderTable.createRow({
	  			identity : order.identity,
	  			customer_id : order.customer_id,
	  			status : status,
	  			sub_total : order.sub_total,
	  			balance : balance,
	  			payment : totalPayment,
	  			discount : order.discounted_amount,
	  			total : order.total,
	  			notes : order.notes,
	  			order_date : order.date,
	  			order_time : order.time,
	  			created_at : new Date(),
	  			synced : false,
	  			synced_at: new Date(),
	  			register_id: register_id,
	  			user_id: user_id,
	  			store_id: store_id,
	  			register_history_id: register_history_id,
	  			return_order_id: return_order_id,
	  			payment_method: payment_method,
	  			payment_ref: ref_no,
	  			applyReward: order.applyReward,
	  			reward_value: order.reward_value,
	  		});
	  	}
/*
	  	* Create and return order db object from cart object
	  	*/
Create and return order db object from cart object
Create and return order db object from cart object
function _createOrderObj(order, totalPayment, balance, status, payment_method, ref_no,register_id, register_history_id, return_order_id,user_id,store_id) {
	  		return dbService.orderTable.createRow({
	  			identity : order.identity,
	  			customer_id : order.customer_id,
	  			status : status,
	  			sub_total : order.sub_total,
	  			balance : balance,
	  			payment : totalPayment,
	  			discount : order.discounted_amount,
	  			total : order.total,
	  			notes : order.notes,
	  			order_date : order.date,
	  			order_time : order.time,
	  			created_at : new Date(),
	  			synced : false,
	  			synced_at: new Date(),
	  			register_id: register_id,
	  			user_id: user_id,
	  			store_id: store_id,
	  			register_history_id: register_history_id,
	  			return_order_id: return_order_id,
	  			payment_method: payment_method,
	  			payment_ref: ref_no,
	  			applyReward: order.applyReward,
	  			reward_value: order.reward_value,
	  		});
	  	}
function _createOrderObj ( order , totalPayment , balance , status , payment_method , ref_no , register_id , register_history_id , return_order_id , user_id , store_id ) { return dbService . orderTable . createRow ( { identity : order . identity , customer_id : order . customer_id , status : status , sub_total : order . sub_total , balance : balance , payment : totalPayment , discount : order . discounted_amount , total : order . total , notes : order . notes , order_date : order . date , order_time : order . time , created_at : new Date ( ) , synced : false , synced_at : new Date ( ) , register_id : register_id , user_id : user_id , store_id : store_id , register_history_id : register_history_id , return_order_id : return_order_id , payment_method : payment_method , payment_ref : ref_no , applyReward : order . applyReward , reward_value : order . reward_value , } ) ; }
Create and return order db object from cart object
Create and return order db object from cart object