39 lines
705 B
PHP
39 lines
705 B
PHP
<?php
|
|
|
|
class CostingsController extends AppController {
|
|
|
|
var $name = 'Costings';
|
|
var $helpers = array('Html', 'Form','Ajax');
|
|
var $components = array('RequestHandler');
|
|
|
|
|
|
|
|
function index() {
|
|
$this->Costings->recursive = 0;
|
|
$this->set('costings', $this->paginate());
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Add a costing to a product. It's either being added to a product, quote_product etc.
|
|
*
|
|
*
|
|
* @param int $id
|
|
* @param string $target
|
|
*/
|
|
function add($id, $target) {
|
|
|
|
if (!$id && empty($this->data)) {
|
|
$this->Session->setFlash(__('Invalid Quote ID', true));
|
|
$this->redirect(array('action'=>'index'));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
?>
|