Returns Customer Invoice details

Parameters

cid

Customer ID

dateFrom

The date to retrieve customer invoice details from in format YYYY/MM/DD

dateTo

The date to retrieve customer invoice details to in format YYYY/MM/DD

start

where to start from e.g, by default, page 2 should be set to 10

length

number of results

order

order to display the results in, asc or desc.

draw

Example

FM_api('CustomerInvoices_getDT', ['cid' => '1','dateFrom' => '2018-01-01', 'dateTo' => '2019-01-02', 'start' => '0','order' => '', 'draw' => '1', 'length' => '10'])

On Success

{"sql":"select id, appointment_id, num, cdate, total, paid, status from user82878_invoices as i where customer_id=1 and i.cdate>=\"2018-01-01\" and i.cdate<=\"2019-01-02 23:59:59\" and status>-2 order by num asc limit 0,10","draw":1,"recordsTotal":"10","recordsFiltered":"10","data":[["3|106|3","2018-10-19","2.5",2.5,"1",false,0]]}