Ejemplo n.º 1
0
	public function ajaxaddAction()
	{
		$this->_helper->layout()->disableLayout();
		$this->_helper->viewRenderer->setNoRender(true);
		$materials = new Pment_Models_MaterialMapper();
		$material = new Pment_Models_Material();
		$material->setPlanId($this->_getParam('planId'));
		$material->setType($this->_getParam('type'));
		$material->setMName($this->_getParam('mName'));
		$material->setSpec($this->_getParam('spec'));
		$material->setUnit($this->_getParam('unit'));
		$material->setAmount(0);
		$material->setAmountc($this->_getParam('amountc'));
		$material->setBudget($this->_getParam('budget'));
		$material->setBudgetTotal($this->_getParam('budgetTotal'));
		$material->setInDate($this->_getParam('inDate'));
		$material->setRemark($this->_getParam('remark'));
		$material->setAmountf($this->_getParam('amountf'));
		$material->setCost($this->_getParam('cost'));
		$material->setCostTotal($this->_getParam('costTotal'));
		$material->setVendorName($this->_getParam('vendorName'));
		$id = $materials->save($material);
		echo $id;
	}