cmc-sales/models/quote.php

46 lines
1.2 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' => ''
),
'Currency' => array('className' => 'Currency', 'foreignKey' => 'currency_id')
);
var $hasMany = array(
'LineItem' => array('className' => 'LineItem',
'foreignKey' => 'quote_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),
'QuotePage' => array('className' => 'QuotePage',
'foreignKey' => 'quote_id',
'dependent' => true)
);
}
?>