I found something like:
[{“quantity”:0,“cost”:0,“product_key”:“”,“notes”:“”,“discount”:0,“is_amount_discount”:true,“tax_name1”:“”,“tax_rate1”:0,“tax_name2”:“”,“tax_rate2”:0,“tax_name3”:“”,“tax_rate3”:0,“custom_value1”:“”,“custom_value2”:“”,“custom_value3”:“”,“custom_value4”:“”,“type_id”:“1”,“tax_id”:“1”,“product_cost”:0,“sort_id”:“0”,“line_total”:0,“gross_line_total”:0,“tax_amount”:0,“date”:“”,“task_id”:“”,“expense_id”:“”,“unit_code”:“C62”}]
for invoice.line-items. And I am wondering why you fill up the database with nothing?
select from …
if line_item = empty, create json:
[{“quantity”:0,“cost”:0,“product_key”:“”,“notes”:“”,“discount”:0,“is_amount_discount”:true,“tax_name1”:“”,“tax_rate1”:0,“tax_name2”:“”,“tax_rate2”:0,“tax_name3”:“”,“tax_rate3”:0,“custom_value1”:“”,“custom_value2”:“”,“custom_value3”:“”,“custom_value4”:“”,“type_id”:“1”,“tax_id”:“1”,“product_cost”:0,“sort_id”:“0”,“line_total”:0,“gross_line_total”:0,“tax_amount”:0,“date”:“”,“task_id”:“”,“expense_id”:“”,“unit_code”:“C62”}]
Now you have it without filling so much stuff in your table.
Is there any secret reason, why do you do that in this way, please?