SELECT 		bagco_order.customer_id 														AS 'CustomerID',
			''																				AS 'CustomerName',
			SUM( bop.total_unit_price ) +
			SUM( bop.extras_charge ) +
			SUM( pl.total_print_charge ) +
			SUM( pl.setup_charge ) +
			SUM( bagco_order_delivery.carriage_cost )										AS 'Value'
FROM		bagco_order
LEFT JOIN 	bagco_order_product bop 						ON bop.bagco_order_id 						= bagco_order.bagco_order_id AND bop.quantity > 0
LEFT JOIN 	bagco_order_product_print_method pm 			ON pm.bagco_order_product_id 				= bop.bagco_order_product_id
LEFT JOIN 	bagco_order_product_print_method_print_line pl 	ON pl.bagco_order_product_print_method_id 	= pm.bagco_order_product_print_method_id
LEFT JOIN 	bagco_order_logo bol 							ON bol.bagco_order_id 						= bagco_order.bagco_order_id
LEFT JOIN 	bagco_order_delivery 							ON bagco_order_delivery.bagco_order_id 		= bagco_order.bagco_order_id
WHERE		bagco_order.order_status_id <> '10'
AND			bagco_order.customer_id 	IN ( {{{CustomerIDs}}} )
AND			bagco_order.order_date 		BETWEEN '{{{FromDate}}}' AND '{{{ToDate}}}'
GROUP BY 	bagco_order.customer_id