cmc-sales/models/job.php

61 lines
1.2 KiB
PHP
Executable file

<?php
class Job extends AppModel {
var $name = 'Job';
var $validate = array(
'title' => array('notempty'),
'enquiry_id' => array('numeric'),
'date_order_received' => array('date'),
'domestic_freight_paid_by' => array('notempty'),
'sale_category' => array('notempty'),
'shipment_category' => array('notempty')
);
//The Associations below have been created with all possible keys, those that are not needed can be removed
var $belongsTo = array(
'Enquiry' => array(
'className' => 'Enquiry',
'foreignKey' => 'enquiry_id',
'conditions' => '',
'fields' => '',
'order' => '',
'counterCache' => true
),
'Currency' => array(
'className' => 'Currency',
'foreignKey' => 'currency_id'
),
'Customer' => array(
'className' => 'Customer',
'foreignKey' => 'customer_id'
)
);
var $hasAndBelongsToMany = array(
'PurchaseOrder' => array(
'className' => 'PurchaseOrder',
'joinTable' => 'jobs_purchase_orders',
'unique' => true
),
'Email' => array(
'className' => 'Email',
'joinTable' => 'emails_jobs',
)
);
function getJobsByWeekNumber() {
}
}
?>