2011-04-06 23:04:40 -07:00
|
|
|
<h3><?=$year?></h3>
|
|
|
|
|
|
|
|
|
|
<? if(isset($month)):?>
|
|
|
|
|
<h4><?=$month?></h4>
|
2011-04-07 01:52:01 -07:00
|
|
|
<?endif;?>
|
|
|
|
|
|
|
|
|
|
<table class="jobsTable">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Order Received</th>
|
|
|
|
|
<th>Job Number</th>
|
|
|
|
|
<th>Enquiry Number</th>
|
|
|
|
|
<th>Principle</th>
|
|
|
|
|
<th>Customer</th>
|
2011-04-12 23:37:34 -07:00
|
|
|
<th>Status</th>
|
2011-04-07 01:52:01 -07:00
|
|
|
<th>Sale Currency</th>
|
|
|
|
|
<th>Gross Sales AUD</th>
|
|
|
|
|
<th>Net Sales AUD</th>
|
|
|
|
|
<th>Gross Profit AUD</th>
|
2011-04-14 17:49:42 -07:00
|
|
|
<th>Net Export Sales Converted to Or Invoiced in AUD</th>
|
2011-04-07 01:52:01 -07:00
|
|
|
<th>GP% Excl Commissions</th>
|
|
|
|
|
<th>ATO Exchange Rate</th>
|
2011-04-07 03:21:46 -07:00
|
|
|
|
|
|
|
|
<th>Gross Australian Sales Foreign Currency</th>
|
|
|
|
|
<th>Net Australian Sales Foreign Currency</th>
|
|
|
|
|
<th>Gross Profit value Australian Sales Foreign Currency</th>
|
|
|
|
|
<th>Gross Export Sales Foreign Currency</th>
|
|
|
|
|
<th>Net Export Sales Foreign Currency</th>
|
|
|
|
|
<th>Gross Profit Value After Discount Exports Foreign Currency</th>
|
|
|
|
|
<th>Gross Commissions</th>
|
|
|
|
|
<th>Net Commisions</th>
|
|
|
|
|
|
2011-04-07 01:52:01 -07:00
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
|
2011-04-07 02:04:11 -07:00
|
|
|
<?
|
|
|
|
|
|
|
|
|
|
$gross_sales_aud_total = 0;
|
|
|
|
|
$net_sales_aud_total = 0;
|
|
|
|
|
$gross_profit_total = 0;
|
|
|
|
|
$count = 0;
|
2011-04-07 03:21:46 -07:00
|
|
|
$gross_profit_exports_aud_total = 0;
|
|
|
|
|
$gross_australian_sales_foreign_currency_total = 0;
|
|
|
|
|
$net_australian_sales_foreign_currency_total = 0;
|
|
|
|
|
$gross_profit_value_australian_sales_foreign_currency_total = 0;
|
|
|
|
|
$gross_export_sales_foreign_currency_total =0;
|
|
|
|
|
$net_export_sales_foreign_currency_total = 0;
|
|
|
|
|
$gross_profit_value_after_discount_exports_foreign_currency_total =0;
|
|
|
|
|
$gross_commissions_total =0;
|
|
|
|
|
$net_commissions_total = 0;
|
2011-04-07 02:04:11 -07:00
|
|
|
?>
|
|
|
|
|
|
2011-04-07 01:52:01 -07:00
|
|
|
<?foreach($jobs as $job):?>
|
2011-04-12 23:37:34 -07:00
|
|
|
|
|
|
|
|
<? if($job['Job']['job_status'] == 'JOB CANCELLED' || $job['Job']['job_status'] == 'JOB ON HOLD' ) {
|
|
|
|
|
$class='cancelled';
|
|
|
|
|
$doCount = false;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
$class ='';
|
|
|
|
|
$doCount = true;
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<tr class="<?=$class?>">
|
2011-04-07 01:52:01 -07:00
|
|
|
<td><?=$job['Job']['date_order_received'];?></td>
|
|
|
|
|
<td class="nowrap"><?=$html->link($job['Job']['title'], array('controller'=>'jobs', 'action'=>'view', $job['Job']['id']));?>
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td class="nowrap"><?=$html->link($job['Enquiry']['title'], array('controller'=>'enquiries','action'=>'view', $job['Enquiry']['id']));?>
|
|
|
|
|
</td>
|
2011-04-19 01:07:27 -07:00
|
|
|
<td><?=$html->link($principleList[$job['Enquiry']['principle_id']], '/principles/view/'.$job['Enquiry']['principle_id']);?></td>
|
2011-04-07 01:52:01 -07:00
|
|
|
|
|
|
|
|
<td><?=$html->link($job['Customer']['name'], array('controller'=>'customers','action'=>'view', $job['Customer']['id']));?></td>
|
|
|
|
|
|
2011-04-12 23:37:34 -07:00
|
|
|
<td><?=$job['Job']['job_status'];?></td>
|
|
|
|
|
|
2011-04-07 01:52:01 -07:00
|
|
|
<td>
|
|
|
|
|
<?=$job['Currency']['name'];?>
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2011-04-14 17:49:42 -07:00
|
|
|
<?=$number->currency($job['Job']['company_gross_sales_aud']);?>
|
2011-04-12 23:37:34 -07:00
|
|
|
<?
|
|
|
|
|
if($doCount) {
|
|
|
|
|
$gross_sales_aud_total += $job['Job']['company_gross_sales_aud'];
|
|
|
|
|
}
|
|
|
|
|
?>
|
2011-04-07 01:52:01 -07:00
|
|
|
</td>
|
|
|
|
|
<td>
|
2011-04-14 17:49:42 -07:00
|
|
|
<?=$number->currency($job['Job']['net_sales_aud']);?>
|
2011-04-12 23:37:34 -07:00
|
|
|
<?
|
|
|
|
|
if($doCount) {
|
|
|
|
|
$net_sales_aud_total += $job['Job']['net_sales_aud'];
|
|
|
|
|
|
|
|
|
|
} ?>
|
2011-04-07 01:52:01 -07:00
|
|
|
</td>
|
|
|
|
|
<td>
|
2011-04-14 17:49:42 -07:00
|
|
|
<?=$number->currency($job['Job']['gross_profit_aud']);?>
|
2011-04-12 23:37:34 -07:00
|
|
|
<?
|
|
|
|
|
if($doCount) {
|
|
|
|
|
$gross_profit_total += $job['Job']['gross_profit_aud'];
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
?>
|
2011-04-07 01:52:01 -07:00
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
2011-04-14 17:49:42 -07:00
|
|
|
<?=$number->currency($job['Job']['gross_profit_exports_aud']);?>
|
2011-04-07 01:52:01 -07:00
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<?=$job['Job']['gp_percent'];?>
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td>
|
|
|
|
|
<?=$job['Job']['ato_exchange_rate'];?>
|
|
|
|
|
</td>
|
2011-04-14 17:49:42 -07:00
|
|
|
<td> <?=$number->currency($job['Job']['gross_australian_sales_foreign_currency'], $job['Currency']['iso4217']);?>
|
2011-04-12 23:37:34 -07:00
|
|
|
<?
|
|
|
|
|
if($doCount) {
|
|
|
|
|
$gross_australian_sales_foreign_currency_total += $job['Job']['gross_australian_sales_foreign_currency']; }
|
|
|
|
|
?>
|
2011-04-07 01:52:01 -07:00
|
|
|
</td>
|
|
|
|
|
<td>
|
2011-04-14 17:49:42 -07:00
|
|
|
<?=$number->currency($job['Job']['net_australian_sales_foreign_currency'], $job['Currency']['iso4217']);
|
2011-04-12 23:37:34 -07:00
|
|
|
if($doCount) {
|
|
|
|
|
$net_australian_sales_foreign_currency_total += $job['Job']['net_australian_sales_foreign_currency'];
|
|
|
|
|
|
|
|
|
|
}
|
2011-04-07 03:21:46 -07:00
|
|
|
|
|
|
|
|
?>
|
2011-04-07 01:52:01 -07:00
|
|
|
</td>
|
2011-04-14 17:49:42 -07:00
|
|
|
<td> <?=$number->currency($job['Job']['gross_profit_value_australian_sales_foreign_currency'], $job['Currency']['iso4217']);
|
2011-04-12 23:37:34 -07:00
|
|
|
if($doCount) {
|
|
|
|
|
$gross_profit_value_australian_sales_foreign_currency_total += $job['Job']['gross_profit_value_australian_sales_foreign_currency'];
|
|
|
|
|
|
|
|
|
|
}
|
2011-04-07 03:21:46 -07:00
|
|
|
?>
|
2011-04-07 01:52:01 -07:00
|
|
|
</td>
|
|
|
|
|
<td>
|
2011-04-14 17:49:42 -07:00
|
|
|
<?=$number->currency($job['Job']['gross_export_sales_foreign_currency'],$job['Currency']['iso4217']);
|
2011-04-12 23:37:34 -07:00
|
|
|
|
|
|
|
|
if($doCount) {
|
|
|
|
|
|
|
|
|
|
$gross_export_sales_foreign_currency_total += $job['Job']['gross_export_sales_foreign_currency'];
|
|
|
|
|
}
|
2011-04-07 03:21:46 -07:00
|
|
|
?>
|
2011-04-07 01:52:01 -07:00
|
|
|
</td>
|
2011-04-14 17:49:42 -07:00
|
|
|
<td> <?=$number->currency($job['Job']['net_export_sales_foreign_currency'],$job['Currency']['iso4217']);
|
2011-04-12 23:37:34 -07:00
|
|
|
if($doCount) {
|
|
|
|
|
$net_export_sales_foreign_currency_total += $job['Job']['net_export_sales_foreign_currency'];
|
|
|
|
|
}
|
2011-04-07 03:21:46 -07:00
|
|
|
?>
|
2011-04-07 01:52:01 -07:00
|
|
|
</td>
|
2011-04-14 17:49:42 -07:00
|
|
|
<td> <?=$number->currency($job['Job']['gross_profit_value_after_discount_exports_foreign_currency'],$job['Currency']['iso4217']);
|
2011-04-07 03:21:46 -07:00
|
|
|
|
2011-04-12 23:37:34 -07:00
|
|
|
if($doCount) {
|
|
|
|
|
$gross_profit_value_after_discount_exports_foreign_currency_total += $job['Job']['gross_profit_value_after_discount_exports_foreign_currency'];
|
|
|
|
|
}
|
2011-04-07 03:21:46 -07:00
|
|
|
?>
|
2011-04-07 01:52:01 -07:00
|
|
|
</td>
|
|
|
|
|
<td>
|
2011-04-14 17:49:42 -07:00
|
|
|
<?=$number->currency($job['Job']['gross_commissions']);
|
2011-04-12 23:37:34 -07:00
|
|
|
if($doCount) {
|
|
|
|
|
$gross_commissions_total += $job['Job']['gross_commissions'];
|
|
|
|
|
}
|
2011-04-07 03:21:46 -07:00
|
|
|
?>
|
|
|
|
|
</td>
|
2011-04-14 17:49:42 -07:00
|
|
|
<td> <?=$number->currency($job['Job']['net_commissions']);
|
2011-04-12 23:37:34 -07:00
|
|
|
if($doCount) {
|
|
|
|
|
$net_commissions_total += $job['Job']['net_commissions'];
|
|
|
|
|
}
|
2011-04-07 03:21:46 -07:00
|
|
|
|
|
|
|
|
?>
|
2011-04-07 01:52:01 -07:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
2011-04-07 03:21:46 -07:00
|
|
|
<?
|
|
|
|
|
$count++;
|
2011-04-07 02:04:11 -07:00
|
|
|
endforeach;?>
|
2011-04-07 01:52:01 -07:00
|
|
|
</tbody>
|
2011-04-07 02:04:11 -07:00
|
|
|
<tfoot>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><? //Date ?></td>
|
|
|
|
|
<td><? //Job No ?></td>
|
|
|
|
|
<td><? //Enq No ?></td>
|
|
|
|
|
<td><? //Principle ?></td>
|
|
|
|
|
<td><? //Customer ?></td>
|
2011-04-12 23:37:34 -07:00
|
|
|
<td><?//Status ?></td>
|
2011-04-07 02:04:11 -07:00
|
|
|
<td><? //Sale Currency?></td>
|
2011-04-07 03:21:46 -07:00
|
|
|
<td><?=$number->currency($gross_sales_aud_total)?></td>
|
|
|
|
|
<td><?=$number->currency($net_sales_aud_total)?></td>
|
|
|
|
|
<td><?=$number->currency($gross_profit_total)?></td>
|
2011-04-07 02:04:11 -07:00
|
|
|
<td><? //Net Sales Conv to AUD?></td>
|
|
|
|
|
<td><? //GP % Excl Comm?> </td>
|
|
|
|
|
<td><? //ATO EXH RATE?></td>
|
2011-04-07 03:21:46 -07:00
|
|
|
|
|
|
|
|
<td><?=$number->currency($gross_australian_sales_foreign_currency_total);?></td>
|
|
|
|
|
<td><?=$number->currency($net_australian_sales_foreign_currency_total);?></td>
|
|
|
|
|
<td><?=$number->currency($gross_profit_value_australian_sales_foreign_currency_total);?></td>
|
|
|
|
|
<td><?=$number->currency($gross_export_sales_foreign_currency_total);?></td>
|
|
|
|
|
<td><?=$number->currency($net_export_sales_foreign_currency_total);?></td>
|
|
|
|
|
<td><?=$number->currency($gross_profit_value_after_discount_exports_foreign_currency_total);?></td>
|
|
|
|
|
<td><?=$number->currency($gross_commissions_total);?></td>
|
|
|
|
|
<td><?=$number->currency($net_commissions_total);?></td>
|
|
|
|
|
|
2011-04-07 02:04:11 -07:00
|
|
|
</tr>
|
|
|
|
|
</tfoot>
|
2011-04-07 01:52:01 -07:00
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?
|
2011-04-14 17:49:42 -07:00
|
|
|
print_r($jobs);
|
2011-04-07 01:52:01 -07:00
|
|
|
?>
|