Changed order of users from Last name to firstname per Kenans request. Will probably need to change it back later

This commit is contained in:
Karl Cordes 2011-04-19 12:30:49 +10:00
parent 326a5f57f3
commit 0f4ec7d6a4
5 changed files with 9 additions and 6 deletions

View file

@ -9,6 +9,7 @@ class ContactsController extends AppController {
'Enquiry' => array('order' => array('Enquiry.id' => 'asc'))
);
function index() {
$this->Contact->recursive = 0;
$this->set('contacts', $this->paginate());

View file

@ -32,7 +32,7 @@ class CustomersController extends AppController {
$this->set('customer', $this->Customer->read(null, $id));
$this->set('addresses', $this->Customer->Address->findAllByCustomerId($id));
$this->set('enquiries', $this->paginate('Enquiry', array('Enquiry.customer_id' => $id)));
$this->set('contacts', $this->Customer->Contact->find('all', array('conditions' => array('customer_id' => $id), 'order' => 'Contact.last_name ASC')));
$this->set('contacts', $this->Customer->Contact->find('all', array('conditions' => array('customer_id' => $id))));
$this->set('invoices', $this->Customer->Invoice->find('all', array('conditions'=>array('Invoice.customer_id'=>$id), 'order'=> 'Invoice.id DESC')));
$this->set('jobs', $this->Customer->Job->find('all', array('conditions'=>array('Job.customer_id'=>$id), 'order'=> 'Job.id DESC')));

View file

@ -12,6 +12,8 @@ class User extends AppModel {
);
var $order = 'first_name ASC';
/* TO DO: Fix up this validation stuff
var $validate = array(
'username' => array(

View file

@ -47,7 +47,7 @@ echo $paginator->counter(array(
<th>Date Order Placed on Principle</th>
<th><?php echo $paginator->sort('Customer','Customer.name');?></th>
<th>Customer Order No</th>
<th><?php echo $paginator->sort('Supplier Ref');?></th>
<th><?php echo $paginator->sort('Principle Ref', 'principle_reference');?></th>
<th><?php echo $paginator->sort('Scheduled Ex-Works', 'date_scheduled_ex_works');?></th>
<th><?php echo $paginator->sort('Date Sent to Customer', 'date_sent_to_customer');?></th>
<th><?php echo $paginator->sort('Freight Paid By CMC');?></th>
@ -115,7 +115,7 @@ echo $paginator->counter(array(
<?=$job['Job']['customer_order_number'];?>
</td>
<td> <?
<td class="nowrap"> <?
foreach($job['PurchaseOrder'] as $po) {
echo $po['principle_reference'];
echo "<br>";
@ -135,11 +135,11 @@ echo $paginator->counter(array(
<?=$job['Currency']['name'];?>
</td>
<td>
<?=$job['Job']['company_gross_sales_aud'];?>
<?=$number->currency($job['Job']['company_gross_sales_aud']);?>
</td>
<td>
<?=$job['Job']['net_sales_aud'];?>
<?=$number->currency($job['Job']['net_sales_aud']);?>
</td>
<td> <?=$job['Job']['gross_profit_aud'];?>
</td>

View file

@ -1337,7 +1337,7 @@ select.sale_category {
input.highlighted {
background-color:#77A7FF;
background-color:#F9FF4C;
font-size: 100%;
}