function _createOrderItemObjs(items, order_id) {
	  		// console.log(parseFloat(items.variant.supplier_pirce));

	  		return items.map(function(i){
	  			var total_percent = (parseFloat(i.custom_price) + parseFloat(i.discounted_amount))*(parseFloat(i.discount_percentage)/100);
	  			
	  			return dbService.orderItemsTable.createRow({
	  				order_id : order_id,
	  				variant_id : i.variant.id,
	  				quantity : i.quantity,
	  				notes: i.notes,
	  				supplier_price : parseInt(i.variant.supplier_price),
	  				subtotal: parseFloat(i.custom_price) + parseFloat(i.discounted_amount),
	  				discount: parseFloat(i.discount_percentage),
	  				total: parseFloat(i.custom_price) + parseFloat(i.discounted_amount) - parseFloat(total_percent),
	  				description: i.description,
	  			})
	  		})
	  	}
/*
	  	* Create and return array of order_item db object from cart.items object
	  	*/
Create and return array of order_item db object from cart.items object
Create and return array of order_item db object from cart . items object
function _createOrderItemObjs(items, order_id) {
	  		return items.map(function(i){
	  			var total_percent = (parseFloat(i.custom_price) + parseFloat(i.discounted_amount))*(parseFloat(i.discount_percentage)/100);
	  			return dbService.orderItemsTable.createRow({
	  				order_id : order_id,
	  				variant_id : i.variant.id,
	  				quantity : i.quantity,
	  				notes: i.notes,
	  				supplier_price : parseInt(i.variant.supplier_price),
	  				subtotal: parseFloat(i.custom_price) + parseFloat(i.discounted_amount),
	  				discount: parseFloat(i.discount_percentage),
	  				total: parseFloat(i.custom_price) + parseFloat(i.discounted_amount) - parseFloat(total_percent),
	  				description: i.description,
	  			})
	  		})
	  	}
function _createOrderItemObjs ( items , order_id ) { return items . map ( function ( i ) { var total_percent = ( parseFloat ( i . custom_price ) + parseFloat ( i . discounted_amount ) ) * ( parseFloat ( i . discount_percentage ) / 100 ) ; return dbService . orderItemsTable . createRow ( { order_id : order_id , variant_id : i . variant . id , quantity : i . quantity , notes : i . notes , supplier_price : parseInt ( i . variant . supplier_price ) , subtotal : parseFloat ( i . custom_price ) + parseFloat ( i . discounted_amount ) , discount : parseFloat ( i . discount_percentage ) , total : parseFloat ( i . custom_price ) + parseFloat ( i . discounted_amount ) - parseFloat ( total_percent ) , description : i . description , } ) } ) }
Create and return array of order_item db object from cart.items object
Create and return array of order_item db object from cart . items object
// console.log(parseFloat(items.variant.supplier_pirce));