<?php

/*

 * Developer : John D'Alto (jdalto@yahoo.com)

 * Date : 9/1/2012

 * All code (c)2012 JLS Consulting, all rights reserved

 */



namespace Dorcas\TabithaBundle\Form\Type;



use Symfony\Component\Form\AbstractType;

use Symfony\Component\Form\FormBuilder;

use Doctrine\ORM\EntityRepository;

use Symfony\Component\OptionsResolver\OptionsResolverInterface;



class PromissoryType extends AbstractType

{

    public function buildForm(FormBuilder $builder, array $options)

    {

        $builder->add('expiration_date', 'date', array('label' => 'EXPIRATION DATE OF PROMISSORY NOTE:',

            'input'  => 'datetime',

            'widget' => 'single_text',

            'format' => 'MM/dd/yyyy'));

        $builder->add('balance_client', 'money', array('label' => 'Balance for the Client to Pay:', 'currency' => 'USD', 'precision' => '0'));

        		

		$builder->add('account_number', 'text', array('label' => 'Account Number:', 'max_length' => 15));

        $builder->add('vendor_address', 'text', array('label' => 'Vendor Address:'));       

        $builder->add('pledge_dorcas', 'money', array('currency' => 'USD'));

		$builder->add('pledge_other', 'money', array('currency' => 'USD'));

		$builder->add('pledge_other2', 'money', array('currency' => 'USD'));

		$builder->add('check_purpose');

		$builder->add('other_desc', 'text');

		$builder->add('other_desc2', 'text');

		//$builder->add('assistance_type', 'text');

		$builder->add('name_on_bill', 'text');

		$builder->add('vendor_name', 'text');

		



    }

    

    public function getName()

    {

        return 'promissoryform';

    }

    

        public function getDefaultOptions(array $options)

    {

        return array('data_class' => 'Dorcas\TabithaBundle\Entity\Promissory',);

    }

    

    public function setDefaultOptions(OptionsResolverInterface $resolver)

    {

    $resolver->setDefaults(array(

        'data_class' => 'Dorcas\TabithaBundle\Entity\Promissory',

    ));

    }

}

