Misc costing work. Going to try to generate Excel costings

This commit is contained in:
Karl Cordes 2013-05-05 18:42:35 +10:00
parent b793d6dc31
commit f5a07bae4e
4 changed files with 18 additions and 15 deletions

View file

@ -27,18 +27,20 @@ class CostingsController extends AppController {
$this->Session->setFlash(__('The Costing could not be saved. Please, try again.', true)); $this->Session->setFlash(__('The Costing could not be saved. Please, try again.', true));
} }
} }
if(isset($this->params['named']['productid'])) { if(isset($this->params['named']['productid'])) {
$product = $this->Costing->Product->findById($this->params['named']['productid']); $product = $this->Costing->Product->findById($this->params['named']['productid']);
$this->set('product', $product); $this->set('type', 'product');
} $this->set('product', $product);
}
if(isset($this->params['named']['lineitemid'])) { if(isset($this->params['named']['line_item_id'])) {
$line_item = $this->Costing->LineItem->findById($this->params['named']['lineitem']); $line_item = $this->Costing->LineItem->findById($this->params['named']['line_item_id']);
$this->set('line_item', $line_item); $this->set('type', 'line_item');
$this->set('line_item', $line_item);
} die(print_r($line_item));
}

View file

@ -727,6 +727,8 @@ class DocumentsController extends AppController {
} }
function costing() {
}
} }

View file

@ -10,6 +10,7 @@
elseif(isset($line_item)) { elseif(isset($line_item)) {
$form->input('line_item_id', array('type'=>'hidden', 'value'=>$line_item['LineItem']['id'])); $form->input('line_item_id', array('type'=>'hidden', 'value'=>$line_item['LineItem']['id']));
print_r($line_item);
} }
?> ?>

View file

@ -10,8 +10,6 @@ $(document).ready(function () {
$(":input").change(buildup) $(":input").change(buildup)
}); });