<?php
    class ReportShell extends Shell {
    var $uses = array('Order');
	
	function main() {
		//Get orders shipped in the last month
		//$month_ago = date('Y-m-d H:i:s', strtotime('-1 month'));
		$orders = $this->Order->find("all",array('conditions'=>"Order.order_code = 20000"));
		//Print out each order's information
		foreach($orders as $order) {
			$this->out('Order date: ' . $order['Order']['created'] . "\n");
			$this->out('----------------------------------------' . "\n");
		}
		//Print out total for the selected orders
	}
}
?>
