41 lines
960 B
PHP
41 lines
960 B
PHP
|
|
<?php
|
||
|
|
class Quote extends AppModel {
|
||
|
|
|
||
|
|
var $name = 'Quote';
|
||
|
|
var $validate = array(
|
||
|
|
'enquiry_id' => array('numeric'),
|
||
|
|
'revision' => array('alphanumeric'),
|
||
|
|
'deliverytime' => array('alphanumeric'),
|
||
|
|
'paymentterms' => array('alphanumeric'),
|
||
|
|
'daysvalid' => array('numeric')
|
||
|
|
|
||
|
|
);
|
||
|
|
|
||
|
|
//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' => ''
|
||
|
|
)
|
||
|
|
);
|
||
|
|
|
||
|
|
var $hasMany = array(
|
||
|
|
'QuoteProduct' => array('className' => 'QuoteProduct',
|
||
|
|
'foreignKey' => 'quote_id',
|
||
|
|
'dependent' => false,
|
||
|
|
'conditions' => '',
|
||
|
|
'fields' => '',
|
||
|
|
'order' => '',
|
||
|
|
'limit' => '',
|
||
|
|
'offset' => '',
|
||
|
|
'exclusive' => '',
|
||
|
|
'finderQuery' => '',
|
||
|
|
'counterQuery' => ''
|
||
|
|
)
|
||
|
|
);
|
||
|
|
|
||
|
|
}
|
||
|
|
?>
|