# \_invoiceUpdate

Update an invoice.

### Parameters

#### id

The ID of the Job.

#### discount

Float value to discount.

#### pandp

Float value of Postage and Packaging.

#### discount\_vat

Float value how much VAT to discount.

#### pandp\_vat

Float value how much VAT is on Postage and Packaging.

#### doc\_no

Number of the invoice.

#### order\_no

Optional. If this invoice is for a PurchaseOrder, what is the PurchaseOrder's number.

#### rows

Array of invoice rows. Each row has 6 columns:

* Text description.
* Net price of that item.
* Amount of items.
* Net total (net price \* amt).
* How much tax to apply.
* Gross total (net total + tax percentage).

#### invoice\_number

Optional text field.

#### notes

Optional text.

#### cdate

Date of the invoice.

### Example

```
FM_api('Job_invoiceUpdate',	['id' => '222402',
                                     'discount' => '.1',
                                     'pandp' => '13.99',
                                     'discount_vat' => '.05',
                                     'pandp_vat' => '2.99',
                                     'doc_no' => 'test001',
                                     'order_no' => '',
                                     'rows' => [['item 001',
                                                 '1.99',
                                                 '10',
                                                 '19.9',
                                                 '34.5',
                                                 '26.77']],
                                     'invoice_number' => '0001',
                                     'notes' => 'This is an invoice note',
                                     'cdate' => date('Y-m-d')]);
```

### Result

#### On Success

```
{'ok':1}
```
