<?php
namespace Modules\Invoices\Cashings\Management\TransferToCredit;


class View_Utils_FormAdmin extends \App\Mvc\View_Utils_FormAbstract
{

	/**
	 *
	 * @see \App\Mvc\View_Utils_FormAbstract::getForm()
	 */
	public function getForm()
	{
		$form = \Engine\Form\General::create();

		$cashingDocDetails = \Engine\Form\Container\Fieldset::create();
		$form->addContainer($cashingDocDetails);

		// document date
		$cashDocDate = new \Engine\Form\Input\Date($this->lang['index']['form']['docDate'], 'docDate', $this->values['docDate']);
		$cashDocDate->setMandatory();
		$cashingDocDetails->addElement($cashDocDate);

		// doc number
		$docNumber = new \Engine\Form\Input\Text($this->lang['index']['form']['docNumber'], 'docNumber', $this->values['docNumber']);
		$docNumber->setMandatory(false);
		$form->addElement($docNumber);

		// value
		$cashValue = new \App\Form\Input\Price($this->lang['index']['form']['docValue'], 'docValue', $this->values['docValue']);
		$cashValue->setMandatory();
		$cashingDocDetails->addElement($cashValue);

		// submit button
		$form->addElement(new \Engine\Form\Input\Hidden('', 'save', 1));

		return $form;
	}
}