Look at overwritten Lines 109,110 in api24/sales.inc:
$info[$sale_index]['ov_discount'] = $trans['ov_discount'];
$info[$sale_index]['ov_discount'] = $trans['Total'];
The above has been corrected and committed in my repo.
Also the VARLIB commit in the core has not been updated as yet in this module but committed in my repo.
The URLs for sales (TRANS_TYPE = 10 for Sales Invoices) are like:
http://www.example.com/frontac24/modules/api24/sales/<TRANS_TYPE>
http:// www.example.com/frontac24/modules/api24/sales/<TRANS_NO>/<TRANS_TYPE>
http:// www.example.com/frontac24/modules/api24/sales/<TRANS_NO>/<TRANS_TYPE>?page=<PAGE_NO>
Note the order of the attributes in the last 2 URLs above.
The api24/config_api.inc has the constant RESULTS_PER_PAGE defined in it.
Both work okay in my version. For Transaction Number 2 in Transaction Type Sales Invoice (10) the output is:
{
"ref":"002\/2017"
,"comments":""
,"order_date":"05\/07\/2017"
,"payment":"4"
,"payment_terms":{
"0":"4"
,"terms_indicator":"4"
,"1":"Cash Only"
,"terms":"Cash Only"
,"2":"0"
,"days_before_due":"0"
,"3":"0"
,"day_in_following_month":"0"
,"4":"0"
,"inactive":"0"
,"5":"1"
,"cash_sale":"1"
}
,"due_date":"05\/07\/2017"
,"phone":""
,"cust_ref":""
,"delivery_address":"N\/A"
,"ship_via":"1"
,"deliver_to":"Donald Easter LLC"
,"delivery_date":"05\/07\/2017"
,"location":"DEF"
,"freight_cost":"0"
,"email":""
,"customer_id":"1"
,"branch_id":"1"
,"sales_type":"1"
,"dimension_id":"0"
,"dimension2_id":"0"
,"line_items":
[
{
"id":"6"
,"stock_id":"101"
,"qty":1
,"units":"each"
,"price":"300"
,"discount":"0"
,"description":"iPad Air 2 16GB"
}
]
,"sub_total":300
,"display_total":300
}