2011-04-20 00:44:13 -07:00
|
|
|
<?php
|
|
|
|
|
class ShipmentInvoice extends AppModel {
|
|
|
|
|
|
|
|
|
|
var $name = 'ShipmentInvoice';
|
2011-05-01 20:11:32 -07:00
|
|
|
/*var $validate = array(
|
2011-04-20 00:44:13 -07:00
|
|
|
'shipment_id' => array('numeric'),
|
|
|
|
|
'principle_id' => array('numeric'),
|
|
|
|
|
'currency_id' => array('numeric'),
|
|
|
|
|
'invoice_number' => array('notempty'),
|
|
|
|
|
'approved' => array('numeric')
|
2011-05-01 20:11:32 -07:00
|
|
|
);*/
|
2011-04-20 00:44:13 -07:00
|
|
|
|
|
|
|
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
|
|
|
|
var $belongsTo = array(
|
|
|
|
|
'Shipment' => array(
|
|
|
|
|
'className' => 'Shipment',
|
|
|
|
|
'foreignKey' => 'shipment_id',
|
|
|
|
|
'conditions' => '',
|
|
|
|
|
'fields' => '',
|
|
|
|
|
'order' => '',
|
|
|
|
|
'counterCache'=>true
|
|
|
|
|
),
|
|
|
|
|
'Principle' => array(
|
|
|
|
|
'className' => 'Principle',
|
|
|
|
|
'foreignKey' => 'principle_id',
|
|
|
|
|
'conditions' => '',
|
|
|
|
|
'fields' => '',
|
|
|
|
|
'order' => ''
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
'FreightForwarder' => array(
|
|
|
|
|
'className' => 'FreightForwarder',
|
|
|
|
|
'foreignKey' => 'freight_forwarder_id'
|
|
|
|
|
),
|
|
|
|
|
'Currency' => array(
|
|
|
|
|
'className' => 'Currency',
|
|
|
|
|
'foreignKey' => 'currency_id',
|
|
|
|
|
'conditions' => '',
|
|
|
|
|
'fields' => '',
|
|
|
|
|
'order' => ''
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
?>
|