Reports finished for now
This commit is contained in:
parent
2a6f370351
commit
a3b01ffda2
|
|
@ -137,8 +137,23 @@ class JobsController extends AppController {
|
|||
|
||||
$endDate = $year.'-'.$month.'-'.$numberOfDaysInMonth;
|
||||
|
||||
$monthStrings = array(
|
||||
'01'=>'January',
|
||||
'02'=> 'February',
|
||||
'03'=>'March',
|
||||
'04'=> 'April',
|
||||
'05'=> 'May',
|
||||
'06'=> 'June',
|
||||
'07'=> 'July',
|
||||
'08'=> 'August',
|
||||
'09'=> 'September',
|
||||
'10'=> 'October',
|
||||
'11'=> 'November',
|
||||
'12' => 'December');
|
||||
|
||||
$jobRangeTitle = "$month/$year";
|
||||
|
||||
|
||||
$jobRangeTitle = $monthStrings[$month]." $year";
|
||||
$jobs = $this->Job->find('all', array('conditions'=>
|
||||
array('Job.date_order_received BETWEEN ? AND ?'=>array($startDate, $endDate)),
|
||||
'order'=>'Job.date_order_received ASC'));
|
||||
|
|
@ -147,7 +162,7 @@ class JobsController extends AppController {
|
|||
/* $dateStringFormat = 'j F Y';
|
||||
$dateString['first'] = date($dateStringFormat, $firstDayUnix);
|
||||
$dateString['last'] = date($dateStringFormat, $lastDayUnix);
|
||||
*/
|
||||
*/
|
||||
$this->set('jobRangeTitle', $jobRangeTitle);
|
||||
|
||||
$this->set('year', $year);
|
||||
|
|
@ -156,6 +171,8 @@ class JobsController extends AppController {
|
|||
|
||||
$this->set('jobs', $jobs);
|
||||
|
||||
$this->set('totals', $this->getTotals($jobs));
|
||||
print_r($totals);
|
||||
$this->set('principleList',$this->Job->Enquiry->Principle->find('list'));
|
||||
|
||||
$this->set('startDate',$startDate);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<th class="purple">Gross Profit AUD</th>
|
||||
<th class="purple">Net Export Sales Converted to Or Invoiced in AUD</th>
|
||||
<th class="purple">Gross Profit Value Export in AUD</th>
|
||||
<th class="purple">GP% Excl Commissions</th>
|
||||
<th class="purple">Av. GP% Excl Commissions</th>
|
||||
|
||||
<th class="lightblue">Gross Australian Sales Foreign Currency</th>
|
||||
<th class="lightblue">Net Australian Sales Foreign Currency</th>
|
||||
|
|
@ -177,6 +177,71 @@
|
|||
endforeach;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Order Received</th>
|
||||
<th>All Paid</th>
|
||||
<th>All Sent</th>
|
||||
<th>Status</th>
|
||||
<th class="sale_category">Sale Category</th>
|
||||
<th>Job Type</th>
|
||||
<th>Shipment Category</th>
|
||||
<th>Job Number</th>
|
||||
<th>Enquiry Number</th>
|
||||
<th>Principle</th>
|
||||
<th>CMC POs</th>
|
||||
<th>Customer</th>
|
||||
<th>Sale Currency</th>
|
||||
<th class="purple">Gross Sales AUD</th>
|
||||
<th class="purple">Net Sales AUD</th>
|
||||
<th class="purple">Gross Profit AUD</th>
|
||||
<th class="purple">Net Export Sales Converted to Or Invoiced in AUD</th>
|
||||
<th class="purple">Gross Profit Value Export in AUD</th>
|
||||
<th class="purple">GP% Excl Commissions</th>
|
||||
<th class="pink">ATO Exchange Rate</th>
|
||||
<th class="lightblue">Gross Australian Sales Foreign Currency</th>
|
||||
<th class="lightblue">Net Australian Sales Foreign Currency</th>
|
||||
<th class="lightblue">Gross Profit value Australian Sales Foreign Currency</th>
|
||||
<th class="lightgreen">Gross Export Sales Foreign Currency</th>
|
||||
<th class="lightgreen">Net Export Sales Foreign Currency</th>
|
||||
<th class="lightgreen">Gross Profit Value After Discount Exports Foreign Currency</th>
|
||||
<th class="darkgreen">Gross Commissions</th>
|
||||
<th class="darkgreen">Net Commisions</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td id="totals"><?=$number->currency($totals['company_gross_sales_aud']);?></td>
|
||||
<td><?=$number->currency($totals['net_sales_aud']);?></td>
|
||||
<td><?=$number->currency($totals['gross_profit_aud']);?></td>
|
||||
|
||||
<td><?=$number->currency($totals['net_export_sales_aud']);?></td>
|
||||
<td><?=$number->currency($totals['gross_profit_exports_aud']);?></td>
|
||||
<td><?=$number->toPercentage($totals['gp_percent']);?></td>
|
||||
<td><?//ATO Exch Rate?></td>
|
||||
<td><?=$number->currency($totals['gross_australian_sales_foreign_currency']);?></td>
|
||||
<td><?=$number->currency($totals['net_australian_sales_foreign_currency']);?></td>
|
||||
<td><?=$number->currency($totals['gross_profit_value_australian_sales_foreign_currency']);?></td>
|
||||
<td><?=$number->currency($totals['gross_export_sales_foreign_currency']);?></td>
|
||||
<td><?=$number->currency($totals['net_export_sales_foreign_currency']);?></td>
|
||||
<td><?=$number->currency($totals['gross_profit_value_after_discount_exports_foreign_currency']);?></td>
|
||||
<td><?=$number->currency($totals['gross_commissions']);?></td>
|
||||
<td><?=$number->currency($totals['net_commissions']);?></td>
|
||||
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Reference in a new issue