BillingLineFormTrait
Add/edit form of a billing line: multilingual texts (`name`/`description`) and the main fields (number mask, numbering period, length of the numeric part).
The mask and the period feed InvoiceNumberGenerator.
Table of Contents
Constants
- BILLING_PERIODS : mixed = ['never', 'year', 'month', 'day']
- Numbering period options; the values must match `BillingLine::billingPeriod` (enum).
Methods
- createComponentEditForm() : Form
- addBillingLineMainFields() : void
- Number mask, numbering period and length of the numeric part.
- addBillingLineTranslationFields() : void
- Multilingual texts (`name`/`description`), active according to the checkbox.
- buildBillingLineEntity() : BillingLine
- saveBillingLineForm() : bool
- setBillingLineFormDefaults() : void
Constants
BILLING_PERIODS
Numbering period options; the values must match `BillingLine::billingPeriod` (enum).
private
mixed
BILLING_PERIODS
= ['never', 'year', 'month', 'day']
Methods
createComponentEditForm()
protected
createComponentEditForm() : Form
Return values
FormaddBillingLineMainFields()
Number mask, numbering period and length of the numeric part.
private
addBillingLineMainFields(Form $form) : void
Parameters
- $form : Form
addBillingLineTranslationFields()
Multilingual texts (`name`/`description`), active according to the checkbox.
private
addBillingLineTranslationFields(Form $form) : void
Parameters
- $form : Form
buildBillingLineEntity()
private
buildBillingLineEntity(ArrayHash<string|int, mixed> $values) : BillingLine
Parameters
- $values : ArrayHash<string|int, mixed>
Return values
BillingLinesaveBillingLineForm()
private
saveBillingLineForm(ArrayHash<string|int, mixed> $values) : bool
Parameters
- $values : ArrayHash<string|int, mixed>
Return values
boolsetBillingLineFormDefaults()
private
setBillingLineFormDefaults(Form $form) : void
Parameters
- $form : Form