public function getForm(array $currencies, array $companies, array $contacts, array $statusList)
 {
     if (!$this->form) {
         $hidId = new Element\Hidden();
         $hidId->setName('proposalId');
         $txtCompanyId = new Element\Select();
         $txtCompanyId->setLabel('Company Name')->setName("companyId")->setAttribute('class', 'form-control')->setEmptyOption("--Choose Company--")->setValueOptions($companies);
         $txtContactId = new Element\Select();
         $txtContactId->setLabel('Contact Name')->setName('contactId')->setAttribute('class', 'form-control')->setEmptyOption("--Choose Contact--")->setValueOptions($contacts);
         $txtCode = new Element\Text();
         $txtCode->setLabel('Code')->setName('code')->setAttribute('class', 'form-control');
         $txtName = new Element\Text();
         $txtName->setLabel('Name')->setName('name')->setAttribute('class', 'form-control');
         $txtAmount = new Element\Number();
         $txtAmount->setName("amount")->setLabel('Amount')->setAttribute('class', 'form-control')->setAttributes(array('min' => '100', 'max' => '99999999999', 'step' => '100'));
         $selectCurrency = new Element\Select();
         $selectCurrency->setName('currencyId')->setLabel('Currency')->setAttribute('class', 'form-control')->setValueOptions($currencies);
         $txtProposalDate = new Element\Date('proposalDate');
         $txtProposalDate->setLabel('Date')->setAttributes(array('class' => 'form-control', 'allowPastDates' => true, 'momentConfig' => array('format' => 'YYYY-MM-DD')));
         $txtProposalFile = new Element\File();
         $txtProposalFile->setName('proposalFile')->setLabel('Upload file');
         $txtNodes = new Element\Textarea();
         $txtNodes->setLabel('Notes')->setName('notes')->setAttribute('class', 'form-control');
         $txtProposalBy = new Element\Text();
         $txtProposalBy->setName('proposalBy')->setLabel('Proposal By')->setAttribute('class', 'form-control');
         $txtGroupCode = new Element\Text();
         $txtGroupCode->setLabel('Group Code')->setName('group_code')->setAttribute('class', 'form-control');
         $txtStatus = new Element\Select();
         $txtStatus->setName('status')->setLabel('Status')->setAttribute('class', 'form-control')->setValueOptions($statusList);
         $form = new Form();
         $form->setAttribute('class', 'form-horizontal');
         $form->setAttribute('enctype', 'multipart/form-data');
         $form->add($hidId);
         $form->add($txtCompanyId);
         $form->add($txtContactId);
         $form->add($txtCode);
         $form->add($txtName);
         $form->add($txtAmount);
         $form->add($selectCurrency);
         $form->add($txtProposalDate);
         $form->add($txtProposalFile);
         $form->add($txtNodes);
         $form->add($txtProposalBy);
         $form->add($txtGroupCode);
         $form->add($txtStatus);
         $this->form = $form;
     }
     return $this->form;
 }
 public function getForm(array $currencies)
 {
     if (!$this->form) {
         $hidId = new Element\Hidden();
         $hidId->setName('receiveVoucherId');
         $txtVoucherNo = new Element\Text();
         $txtVoucherNo->setLabel('Number')->setName("voucherNo")->setAttribute('class', 'form-control text-center')->setAttribute('readonly', 'readonly');
         $txtVoucherDate = new Element\Date('voucherDate');
         $txtVoucherDate->setLabel('Date')->setAttributes(array('class' => 'form-control', 'allowPastDates' => true, 'momentConfig' => array('format' => 'YYYY-MM-DD')));
         $txtAccountType = new Element\Hidden('accountType');
         $txtDescription = new Element\Textarea();
         $txtDescription->setName("description")->setLabel('Description')->setAttribute('class', 'form-control');
         $txtAmount = new Element\Number();
         $txtAmount->setName("amount")->setLabel('Amount')->setAttribute('class', 'form-control')->setattributes(array('min' => '10', 'max' => '99999999999', 'step' => '1'));
         $cboCurrency = new Element\Select();
         $cboCurrency->setName('currencyId')->setLabel('Currency Type')->setAttribute('class', 'form-control')->setEmptyOption('-- Choose --')->setValueOptions($currencies);
         $txtDepositBy = new Element\Hidden();
         $txtDepositBy->setName("depositBy");
         $txtReason = new Element\Textarea();
         $txtReason->setName('reason');
         $txtGroupCode = new Element\Text();
         $txtGroupCode->setName('group_code')->setLabel('Group Code (optional)')->setAttribute('class', 'form-control');
         $form = new Form();
         $form->setAttribute('role', 'form');
         $form->add($hidId);
         $form->add($txtVoucherNo);
         $form->add($txtVoucherDate);
         $form->add($txtAccountType);
         $form->add($txtDescription);
         $form->add($txtAmount);
         $form->add($cboCurrency);
         $form->add($txtDepositBy);
         $form->add($txtReason);
         $form->add($txtGroupCode);
         $this->form = $form;
     }
     return $this->form;
 }