_invoiceGet
Retrieve an Appointment's invoice. If an invoice does not already exist for that Appointment, then one will be created and then returned.
Parameters
id
The ID of the Appointment.
Example
FM_api('Appointment_invoiceGet', ['id' => '222402']);
Result
On Success
{'id':'206976',
'appointment_id':'222402',
'cdate':'2015-11-02',
'customer_id':'100831',
'total':'0',
'paid':'2',
'rows':'[]',
'notes':'',
'num':'5',
'type':'0',
'status':'2',
'discount':'0',
'pandp':'0',
'doc_no':null,
'order_no':null,
'discount_vat':'0',
'pandp_vat':'0',
'total_net':'0.0000'}
The ID returned here is the database ID of the invoice row.
Note the Status, which starts as '-1', meaning 'Draft'. Common Status values are:
-1: Draft
0: Quoted
1: Invoiced
2: Paid
3: Cancelled
Last updated