Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvoiceTotals only contains the totals of the first invoiceline when adding a SalesInvoice #188

Open
J87NL opened this issue Dec 11, 2020 · 0 comments

Comments

@J87NL
Copy link

J87NL commented Dec 11, 2020

When adding a new invoice using $invoiceApiConnector->send() the InvoiceTotals in the returned data only seems to contain the totals of the first InvoiceLine in stead of the total of the invoice:

    [totals:PhpTwinfield\Invoice:private] => PhpTwinfield\InvoiceTotals Object
        (
            [valueExcl:PhpTwinfield\InvoiceTotals:private] => 19.80
            [valueInc:PhpTwinfield\InvoiceTotals:private] => 21.58
        )
        ...
    [lines:PhpTwinfield\Invoice:private] => Array
        (
            [1] => PhpTwinfield\InvoiceLine Object
                (
                    [ID:PhpTwinfield\InvoiceLine:private] => 1
                    [quantity:PhpTwinfield\InvoiceLine:private] => 1
                ...
                    [unitsPriceExcl:PhpTwinfield\InvoiceLine:private] => 19.80
                    [unitsPriceInc:PhpTwinfield\InvoiceLine:private] => 
                    [units:PhpTwinfield\InvoiceLine:private] => 1
                    [allowDiscountOrPremium:PhpTwinfield\InvoiceLine:private] => true
                    [valueExcl:PhpTwinfield\InvoiceLine:private] => 19.80
                    [vatValue:PhpTwinfield\InvoiceLine:private] => 1.78
                    [valueInc:PhpTwinfield\InvoiceLine:private] => 21.58
                ...
                )

            [2] => PhpTwinfield\InvoiceLine Object
                (
                ...
                    [unitsPriceExcl:PhpTwinfield\InvoiceLine:private] => 20.87
                    [unitsPriceInc:PhpTwinfield\InvoiceLine:private] => 
                    [units:PhpTwinfield\InvoiceLine:private] => 1
                    [allowDiscountOrPremium:PhpTwinfield\InvoiceLine:private] => true
                    [valueExcl:PhpTwinfield\InvoiceLine:private] => 20.87
                    [vatValue:PhpTwinfield\InvoiceLine:private] => 4.38
                    [valueInc:PhpTwinfield\InvoiceLine:private] => 25.25
                ...
                )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant