added new invoice fields, improved invoice templates (#1258)

This commit is contained in:
Kevin Papst
2019-11-18 12:01:26 +01:00
committed by GitHub
parent 2287c9951c
commit 47bd8b0ce7
50 changed files with 1530 additions and 1222 deletions

View File

@@ -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,

View File

@@ -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',
],
]);
}
}

View File

@@ -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',

View File

@@ -50,6 +50,7 @@ class InvoiceCalculatorType extends AbstractType
return $renderer;
},
'translation_domain' => 'invoice-calculator',
'search' => false,
]);
}

View File

@@ -50,6 +50,7 @@ class InvoiceNumberGeneratorType extends AbstractType
return $renderer;
},
'translation_domain' => 'invoice-numbergenerator',
'search' => false,
]);
}

View File

@@ -56,6 +56,7 @@ class InvoiceRendererType extends AbstractType
},
'translation_domain' => 'invoice-renderer',
'docu_chapter' => 'invoices.html',
'search' => false,
]);
}

View File

@@ -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,
]);
}