public function setupBarcode() { $form_values = $this->form_values; $stakeholder_item_pack = new StakeholderItemPackSizes(); if (!empty($form_values['item_pack_size_id'])) { $item_pack = $this->_em->find("ItemPackSizes", $form_values['item_pack_size_id']); $stakeholder_item_pack->setItemPackSize($item_pack); } if (!empty($form_values['stakeholder_id'])) { $stakeholder = $this->_em->find("Stakeholders", $form_values['stakeholder_id']); $stakeholder_item_pack->setStakeholder($stakeholder); } if (!empty($form_values['packaging_level'])) { $packaging_level = $this->_em->find("ListDetail", $form_values['packaging_level']); $stakeholder_item_pack->setPackagingLevel($packaging_level); } // if (!empty($form_values['batch_length'])) { // // $stakeholder_item_pack->setBatchLength($form_values['batch_length']); // } $stakeholder_item_pack->setItemGtin($form_values['item_gtin']); // $stakeholder_item_pack->setGtin($form_values['gtin']); // $stakeholder_item_pack->setBatch($form_values['batch']); // $stakeholder_item_pack->setExpiry($form_values['expiry']); // $stakeholder_item_pack->setGtinStartPosition($form_values['gtin_start_position']); // $stakeholder_item_pack->setBatchNoStartPosition($form_values['batch_no_start_position']); // $stakeholder_item_pack->setExpiryDateStartPosition($form_values['expiry_date_start_position']); // $stakeholder_item_pack->setGtinEndPosition($form_values['gtin_end_position']); // $stakeholder_item_pack->setBatchNoEndPosition($form_values['batch_no_end_position']); // $stakeholder_item_pack->setExpiryDateEndPosition($form_values['expiry_date_end_position']); $stakeholder_item_pack->setPackSizeDescription($form_values['pack_size_description']); $stakeholder_item_pack->setLength($form_values['length']); $stakeholder_item_pack->setWidth($form_values['width']); $stakeholder_item_pack->setHeight($form_values['height']); // if (!empty($form_values['expiry_date_format'])) { // //$expiry_date_format = $this->_em->find("ListDetail", $form_values['expiry_date_format']); // $stakeholder_item_pack->setExpiryDateFormat($form_values['expiry_date_format']); // } $stakeholder_item_pack->setQuantityPerPack($form_values['quantity_per_pack']); $stakeholder_item_pack->setVolumPerVial($form_values['volume_per_unit_net']); // $stakeholder_item_pack->setPrePrintedBarcode($form_values['pre_printed_barcode']); $user_id = $this->_em->getRepository('Users')->find($this->_user_id); $stakeholder_item_pack->setCreatedBy($user_id); $stakeholder_item_pack->setCreatedDate(App_Tools_Time::now()); $stakeholder_item_pack->setModifiedBy($user_id); $stakeholder_item_pack->setModifiedDate(App_Tools_Time::now()); $this->_em->persist($stakeholder_item_pack); $this->_em->flush(); }
public function setWidth($width) { $this->__load(); return parent::setWidth($width); }