InvoiceFactory
in package
FinalYes
Test data factory: InvoiceData::factory()->reverseCharge()->withLines(5)->make().
Deterministic (no random values), so that snapshots stay stable.
Table of Contents
Methods
- b2c() : self
- builder() : InvoiceBuilder
- calculated() : InvoiceData
- Invoice data with totals and VAT breakdown, calculated with $calculator (default: En16931Calculator).
- creditNote() : self
- currency() : self
- export() : self
- intraCommunity() : self
- make() : InvoiceData
- Uncalculated invoice data.
- new() : self
- number() : self
- reverseCharge() : self
- state() : self
- Free modification of the builder.
- withLines() : self
Methods
b2c()
public
b2c() : self
Return values
selfbuilder()
public
builder() : InvoiceBuilder
Return values
InvoiceBuildercalculated()
Invoice data with totals and VAT breakdown, calculated with $calculator (default: En16931Calculator).
public
calculated([TotalsCalculator|null $calculator = null ]) : InvoiceData
Parameters
- $calculator : TotalsCalculator|null = null
Return values
InvoiceDatacreditNote()
public
creditNote() : self
Return values
selfcurrency()
public
currency(string $currency) : self
Parameters
- $currency : string
Return values
selfexport()
public
export() : self
Return values
selfintraCommunity()
public
intraCommunity() : self
Return values
selfmake()
Uncalculated invoice data.
public
make() : InvoiceData
Return values
InvoiceDatanew()
public
static new() : self
Return values
selfnumber()
public
number(string $number) : self
Parameters
- $number : string
Return values
selfreverseCharge()
public
reverseCharge() : self
Return values
selfstate()
Free modification of the builder.
public
state(callable(InvoiceBuilder): mixed $state) : self
Parameters
- $state : callable(InvoiceBuilder): mixed
Return values
selfwithLines()
public
withLines(int $count) : self
Parameters
- $count : int