Reports finished for now
This commit is contained in:
parent
2a6f370351
commit
a3b01ffda2
|
|
@ -127,8 +127,8 @@ class JobsController extends AppController {
|
||||||
|
|
||||||
if(isset($month) && isset($year)) { //After a Specific Month for a Year
|
if(isset($month) && isset($year)) { //After a Specific Month for a Year
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$startDate = $year.'-'.$month.'-01';
|
$startDate = $year.'-'.$month.'-01';
|
||||||
|
|
||||||
$startDateTime = strtotime($startDate);
|
$startDateTime = strtotime($startDate);
|
||||||
|
|
@ -137,17 +137,32 @@ class JobsController extends AppController {
|
||||||
|
|
||||||
$endDate = $year.'-'.$month.'-'.$numberOfDaysInMonth;
|
$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'=>
|
$jobs = $this->Job->find('all', array('conditions'=>
|
||||||
array('Job.date_order_received BETWEEN ? AND ?'=>array($startDate, $endDate)),
|
array('Job.date_order_received BETWEEN ? AND ?'=>array($startDate, $endDate)),
|
||||||
'order'=>'Job.date_order_received ASC'));
|
'order'=>'Job.date_order_received ASC'));
|
||||||
|
|
||||||
|
|
||||||
/* $dateStringFormat = 'j F Y';
|
/* $dateStringFormat = 'j F Y';
|
||||||
$dateString['first'] = date($dateStringFormat, $firstDayUnix);
|
$dateString['first'] = date($dateStringFormat, $firstDayUnix);
|
||||||
$dateString['last'] = date($dateStringFormat, $lastDayUnix);
|
$dateString['last'] = date($dateStringFormat, $lastDayUnix);
|
||||||
*/
|
*/
|
||||||
$this->set('jobRangeTitle', $jobRangeTitle);
|
$this->set('jobRangeTitle', $jobRangeTitle);
|
||||||
|
|
||||||
$this->set('year', $year);
|
$this->set('year', $year);
|
||||||
|
|
@ -156,6 +171,8 @@ class JobsController extends AppController {
|
||||||
|
|
||||||
$this->set('jobs', $jobs);
|
$this->set('jobs', $jobs);
|
||||||
|
|
||||||
|
$this->set('totals', $this->getTotals($jobs));
|
||||||
|
print_r($totals);
|
||||||
$this->set('principleList',$this->Job->Enquiry->Principle->find('list'));
|
$this->set('principleList',$this->Job->Enquiry->Principle->find('list'));
|
||||||
|
|
||||||
$this->set('startDate',$startDate);
|
$this->set('startDate',$startDate);
|
||||||
|
|
@ -196,7 +213,7 @@ class JobsController extends AppController {
|
||||||
|
|
||||||
$lastYear = $year - 1;
|
$lastYear = $year - 1;
|
||||||
$jobRangeTitle = $lastYear.' - '.$year.' ('.$dateString['first']." to ".$dateString['last'].')';
|
$jobRangeTitle = $lastYear.' - '.$year.' ('.$dateString['first']." to ".$dateString['last'].')';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->set('jobRangeTitle', $jobRangeTitle);
|
$this->set('jobRangeTitle', $jobRangeTitle);
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<th class="purple">Gross Profit 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">Net Export Sales Converted to Or Invoiced in AUD</th>
|
||||||
<th class="purple">Gross Profit Value Export 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">Gross Australian Sales Foreign Currency</th>
|
||||||
<th class="lightblue">Net Australian Sales Foreign Currency</th>
|
<th class="lightblue">Net Australian Sales Foreign Currency</th>
|
||||||
|
|
@ -177,6 +177,71 @@
|
||||||
endforeach;?>
|
endforeach;?>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<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>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue