function testToXmlWithNull()
    {
        $data = null;
        $t = new TransactionTypes();
        $parent = XmlSerializer::createDocument('transaction_types');
        $t->toXml($data, $parent);
        $this->assertEqual($parent->ownerDocument->saveXml(), '<?xml version="1.0" encoding="UTF-8"?>
<transaction_types/>
');
    }
 public function getCreatedBy()
 {
     $this->__load();
     return parent::getCreatedBy();
 }
 public function getModifiedBy()
 {
     $this->__load();
     return parent::getModifiedBy();
 }
 public function addTransactionTypeAction()
 {
     $form = new Form_Iadmin_TransactionTypeAdd();
     if ($this->_request->isPost()) {
         if ($this->_request->getPost()) {
             $form_values = $this->_request->getPost();
             $transaction_type = new TransactionTypes();
             $transaction_type->setTransactionTypeName($form_values['transaction_type_name']);
             $transaction_type->setNature($form_values['nature']);
             $transaction_type->setIsAdjustment($form_values['is_adjustment']);
             $transaction_type->setStatus($form_values['status']);
             $created_by = $this->_em->find('Users', $this->_userid);
             $transaction_type->setCreatedBy($created_by);
             $transaction_type->setCreatedDate(App_Tools_Time::now());
             $transaction_type->setModifiedBy($created_by);
             $transaction_type->setModifiedDate(App_Tools_Time::now());
             $this->_em->persist($transaction_type);
             $this->_em->flush();
         }
     }
     $this->_redirect("/iadmin/manage-products/transaction-type?success=1");
 }