element('table', array('class' => 'item receipt detail', 'caption' => 'Receipt Info', 'rows' => $rows, 'column_class' => array('field', 'value'))); ?>
Amount Received:
Amount Applied:
link('#'.$payment['id'], array('controller' => 'payments', 'action' => 'view', $payment['id'])), $payment['PaymentType']['name'], $payment['comment'], currency($payment['amount']), currency($running_total) ); } echo $this->element('table', array('class' => 'item payment list', 'caption' => 'Payments in Receipt', 'headers' => $headers, 'rows' => $rows, 'column_class' => $headers)); /********************************************************************** * Charges */ $headers = array('ID', 'Date', /*'Due',*/ 'Type', 'Lease', 'Comment', 'Amount' /*, 'Tax', 'Subtotal'*/, 'Applied', /*'Total'*/); $rows = array(); $running_total = 0; foreach($receipt['Charge'] AS $charge) { $amount = $charge['total']; $running_total += $amount; $rows[] = array($html->link('#'.$charge['id'], array('controller' => 'charges', 'action' => 'view', $charge['id'])), datefmt($charge['charge_date']) .' - '. datefmt($charge['charge_to_date']), //datefmt($charge['due_date']), $charge['ChargeType']['name'], '#'.$charge['Lease']['number'], $charge['comment'], //currency($charge['amount']), //currency($charge['tax']), currency($charge['total']), currency($charge['ChargesReceipt']['amount']), //currency($running_total) ); } echo $this->element('table', array('class' => 'item charge list', 'caption' => 'Charges Applied Towards', 'headers' => $headers, 'rows' => $rows, 'column_class' => $headers)); ?>