src/Invoice/Creator.php
protected function getInvoiceLines()
    {
        $itemLines = $this->getItemLines();
        $itemLines = $this->addLineType($itemLines, static::LineType_OrderItem);

        $feeLines = $this->getFeeLines();

        $discountLines = $this->getDiscountLines();
        $discountLines = $this->addLineType($discountLines, static::LineType_Discount);

        $manualLines = $this->getManualLines();
        $manualLines = $this->addLineType($manualLines, static::LineType_Manual);

        $result = array_merge($itemLines, $feeLines, $discountLines, $manualLines);
        return $result;
    }
protected function getInvoiceLines()
    {
        $itemLines = $this->getItemLines();
        $itemLines = $this->addLineType($itemLines, static::LineType_OrderItem);

        $feeLines = $this->getFeeLines();

        $discountLines = $this->getDiscountLines();
        $discountLines = $this->addLineType($discountLines, static::LineType_Discount);

        $manualLines = $this->getManualLines();
        $manualLines = $this->addLineType($manualLines, static::LineType_Manual);

        $result = array_merge($itemLines, $feeLines, $discountLines, $manualLines);
        return $result;
    }
protected function getInvoiceLines ( ) { $ itemLines = $ this -> getItemLines ( ) ; $ itemLines = $ this -> addLineType ( $ itemLines , static :: LineType_OrderItem ) ; $ feeLines = $ this -> getFeeLines ( ) ; $ discountLines = $ this -> getDiscountLines ( ) ; $ discountLines = $ this -> addLineType ( $ discountLines , static :: LineType_Discount ) ; $ manualLines = $ this -> getManualLines ( ) ; $ manualLines = $ this -> addLineType ( $ manualLines , static :: LineType_Manual ) ; $ result = array_merge ( $ itemLines , $ feeLines , $ discountLines , $ manualLines ) ; return $ result ; }
Returns the 'invoice''line' parts of the invoice add structure.

Each invoice line is a keyed array.
The following keys are allowed or expected (*) by the API:
- itemnumber
- product
- nature
* unitprice
* vatrate
* quantity
- costprice: optional, this triggers margin invoices.

Meta data (not recognised by the API but used later on by the Creator or
Completor, or for support and debugging purposes), see
{@see \Siel\Acumulus\Meta}:
- Complementary  to amount and vatrate:
- unitpriceinc
- vatamount
* meta-line-type: type of line: 1 of the LineType_... constants.
- vat rate related:
* meta-vatrate-source, 1 of the VatRateSource_... constants:
- exact: should exactly equal an existing VAT rate.
- exact-0: should exactly equal the 0 VAT rate.
- calculated: based on dividing vatamount and unitprice which
both may have a limited precision and therefore probably will
not exactly match an existing vat rate.
- completor: to be filled in by the completor.
- strategy: to be completed in by a tax divide strategy. This may
lead to this line being split into multiple lines.
- parent: copied from the parent.
* meta-vatrate-min: required if meta-vatrate-source is calculated.
The minimum value for the vat rate, based on the precision of the
vatamount and unitprice.
* meta-vatrate-max: required if meta-vatrate-source is calculated.
The maximum value for the vat rate, based on the precision of the
vatamount and unitprice.
- meta-strategy-split: true or false (absent = false)
- Totals per line:
- meta-line-price
- meta-line-priceinc
- meta-line-vatamount
- Parent - children line meta data:
- meta-children
- meta-children-count
- meta-parent-index
- meta-children-merged
- meta-children-not-shown
- meta-parent
-
These keys can be used to complete missing values or to assist in
correcting rounding errors in the values that are present.

The base CompletorInvoiceLines expects:
- meta-vatrate-source to be filled
- If meta-vatrate-source = exact: no other keys expected
- If meta-vatrate-source = calculated: meta-vatrate-min and
meta-vatrate-max are expected to be filled. These values should come
from calling the helper method getVatRangeTags() with the values used
to calculate the vat rate and their precision.
- If meta-vatrate-source = completor: vatrate should be null and
unitprice should be 0. The completor will typically fill vatrate with
the highest or most appearing vat rate, looking at the exact and
calculated (after correcting them for rounding errors) vat rates.
- If meta-vatrate-source = strategy: vat rate should be null and either
unitprice or unitpriceinc should be filled wit a non-0 amount
(typically a negative amount as this is mostly used for spreading
discounts over tax rates). Moreover, on the invoice level
meta-invoice-amount and meta-invoice-vatamount should be filled in.
The completor will use a tax divide strategy to arrive at valid values
for the missing fields.

Extending classes should normally not have to override this method, but
should instead implement getItemLines(), getShippingLine(),
getPaymentFeeLine(), getGiftWrappingLine(), getDiscountLines(), and
getManualLines().

@return array[]
A non keyed array with all invoice lines.
Returns the invoice line parts of the invoice add structure .