Setting a discount to the sales order using the API.
I have encountered a problem while implementing Sales Order creation via the API. When I try to set the discount field for a Sales Order record and declare the overall discount - it is not applied to the record:
http://prntscr.com/qn1md0.
In the v1 API the "Discount" and "Adjustment" fields were set the same way:
...
<FL val="Adjustment">123</FL>
<FL val="Discount">123</FL>
...
Now when I try to do a simmilar thing in the v2 API, it no longer works:
$record = ZCRMRestClient::getInstance()->getRecordInstance("Sales_Orders", $id_zoho);
...
$record->setFieldValue('Adjustment', (float)$order->total_shipping);
$record->setFieldValue('Discount', (float)$order->total_discounts_tax_incl);
...
$record->create();
The Adjustment value gets applied correctly, but the discount is ignored. How can I apply the total discount to Sales Order records?