added basic invoice rendering #97 #93 (#99)

This commit is contained in:
Kevin Papst
2018-01-21 22:50:46 +01:00
committed by GitHub
parent 9a161b8fd9
commit 4cbc5391c0
73 changed files with 2986 additions and 918 deletions

View File

@@ -16,7 +16,6 @@ use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CountryType;
use Symfony\Component\Form\Extension\Core\Type\CurrencyType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\PercentType;
use Symfony\Component\Form\Extension\Core\Type\TelType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
@@ -40,84 +39,57 @@ class CustomerEditForm extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
// string - length 255
->add('name', TextType::class, [
'label' => 'label.name',
])
// text
->add('number', TextType::class, [
'label' => 'label.customer_number',
])
->add('comment', TextareaType::class, [
'label' => 'label.comment',
'required' => false,
])
// do not allow project selection:
// 1. it is a bad UX
// 2. what should happen if they are detached?
/*
->add('projects', EntityType::class, [
'label' => 'label.project',
'class' => 'Kimai:Project',
'multiple' => true,
'expanded' => true
])
*/
// boolean
->add('visible', VisibilityType::class, [
'label' => 'label.visible',
])
// string - length 255
->add('company', TextType::class, [
'label' => 'label.company',
'required' => false,
])
// string - length 255
->add('vat', PercentType::class, [
'label' => 'label.vat',
'type' => 'integer',
])
// string - length 255
->add('contact', TextType::class, [
'label' => 'label.contact',
'required' => false,
])
// string - length 255
->add('address', TextareaType::class, [
'label' => 'label.address',
'required' => false,
])
// string - length 2
->add('country', CountryType::class, [
'label' => 'label.country',
])
// string - length 3
->add('currency', CurrencyType::class, [
'label' => 'label.currency',
])
// string - length 255
->add('phone', TelType::class, [
'label' => 'label.phone',
'required' => false,
])
// string - length 255
->add('fax', TelType::class, [
'label' => 'label.fax',
'required' => false,
])
// string - length 255
->add('mobile', TelType::class, [
'label' => 'label.mobile',
'required' => false,
])
// string - length 255
->add('mail', EmailType::class, [
'label' => 'label.email',
'required' => false,
])
// string - length 255
->add('homepage', UrlType::class, [
'label' => 'label.homepage',
'required' => false,
])
// string - length 255
->add('timezone', TimezoneType::class, [
'label' => 'label.timezone',
])