invoiceninja / sdk-php

PHP wrapper for Invoice Ninja's REST API
https://www.invoiceninja.com
83 stars 41 forks source link

Set VAT on invoice #2

Closed marcoboers closed 7 years ago

marcoboers commented 7 years ago

How can I set the VAT on the created invoice? Or make make a certain tax rate the standard of a new invoice?

hillelcoren commented 7 years ago

You should be able use:

$invoice = new Invoice();
$invoice->client_id = 1;
$invoice->addInvoiceItem('Item', 'Notes...', 10);
$invoice->tax_name1 = 'VAT';
$invoice->tax_rate1 = 17;
$invoice->save();