44 lines
1.1 KiB
PHP
Executable file
44 lines
1.1 KiB
PHP
Executable file
<?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' => ''
|
|
),
|
|
'QuotePage' => array('className' => 'QuotePage',
|
|
'foreignKey' => 'quote_id',
|
|
'dependent' => true)
|
|
|
|
);
|
|
|
|
}
|
|
?>
|