Hi,
I was testing the "add" Invoice API but right now I have no idea what the problem is since the response is too generic, please see below:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Below is my sample invoice data that I was trying to submit to our blesta server. Is there something I am missing here?
$date = date('c');
$invoice = ['client_id' => 68,
'date_billed' => $date,
'date_due' => $date,
'date_closed' => $date,
'date_autodebit' => $date,
'status' => 'active',
'currency' => 'USD',
'note_private' => 'Initial payment',
'note public' => '',
'lines' => [
'service_id' => 127,
'amount' => 500,
'qty' => 1,
'description' => '1 slot',
'tax' => false
],
'term' => '',
'period' => '',
'duration' => '',
];