added new invoice fields, improved invoice templates (#1258)
This commit is contained in:
@@ -56,6 +56,10 @@ class CustomerEditForm extends AbstractType
|
||||
'label' => 'label.company',
|
||||
'required' => false,
|
||||
])
|
||||
->add('vatId', TextType::class, [
|
||||
'label' => 'label.vat_id',
|
||||
'required' => false,
|
||||
])
|
||||
->add('contact', TextType::class, [
|
||||
'label' => 'label.contact',
|
||||
'required' => false,
|
||||
|
||||
@@ -40,14 +40,26 @@ class InvoiceTemplateForm extends AbstractType
|
||||
->add('company', TextType::class, [
|
||||
'label' => 'label.company',
|
||||
])
|
||||
->add('vatId', TextType::class, [
|
||||
'label' => 'label.vat_id',
|
||||
'required' => false,
|
||||
])
|
||||
->add('address', TextareaType::class, [
|
||||
'label' => 'label.address',
|
||||
'required' => false,
|
||||
])
|
||||
->add('contact', TextareaType::class, [
|
||||
'label' => 'label.contact',
|
||||
'required' => false,
|
||||
])
|
||||
->add('paymentTerms', TextareaType::class, [
|
||||
'label' => 'label.payment_terms',
|
||||
'required' => false,
|
||||
])
|
||||
->add('paymentDetails', TextareaType::class, [
|
||||
'label' => 'label.invoice_bank_account',
|
||||
'required' => false,
|
||||
])
|
||||
->add('dueDays', TextType::class, [
|
||||
'label' => 'label.due_days',
|
||||
])
|
||||
@@ -71,6 +83,11 @@ class InvoiceTemplateForm extends AbstractType
|
||||
'csrf_protection' => true,
|
||||
'csrf_field_name' => '_token',
|
||||
'csrf_token_id' => 'admin_invoice_template',
|
||||
'attr' => [
|
||||
'data-form-event' => 'kimai.invoiceTemplateUpdate',
|
||||
'data-msg-success' => 'action.update.success',
|
||||
'data-msg-error' => 'action.update.error',
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class InvoiceToolbarForm extends AbstractToolbarForm
|
||||
]);
|
||||
$builder->add('create', SubmitType::class, [
|
||||
'label' => 'button.print',
|
||||
'attr' => ['formtarget' => 'invoice'],
|
||||
'attr' => ['formtarget' => '_blank'],
|
||||
]);
|
||||
$builder->add('preview', SubmitType::class, [
|
||||
'label' => 'button.preview',
|
||||
|
||||
@@ -50,6 +50,7 @@ class InvoiceCalculatorType extends AbstractType
|
||||
return $renderer;
|
||||
},
|
||||
'translation_domain' => 'invoice-calculator',
|
||||
'search' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ class InvoiceNumberGeneratorType extends AbstractType
|
||||
return $renderer;
|
||||
},
|
||||
'translation_domain' => 'invoice-numbergenerator',
|
||||
'search' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ class InvoiceRendererType extends AbstractType
|
||||
},
|
||||
'translation_domain' => 'invoice-renderer',
|
||||
'docu_chapter' => 'invoices.html',
|
||||
'search' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ class YesNoType extends AbstractType
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'value' => true,
|
||||
'false_values' => [null, 0, false, 'false'],
|
||||
'false_values' => [null, 0, false, 'false', '', '0'],
|
||||
'required' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user