_getPredictedSales
Returns sql for sales chance
Parameters
daysFrom
Number of days previous to retrieve details from
daysTo
Number of days ahead to retrieve details from
customer_id
The customer id
notes
Notes for the Quote you wish to retrieve sales chance for.
status
Status of the Quote you wish to retrieve sales chance for.
user_id
User Id assigned to the Quote you wish to retrieve sales chance for.
Example
FM_api('Quotes_getPredictedSales', ['daysFrom' => '-353', 'daysTo' => '7', 'customer_id' => '6', 'notes' => '', 'status' => '', 'user_id' => ''])
On Success
""select sum(total_net) as total_net, sum(profit) as profit, sale_chance from user82878_quotes where cdate>=date_add(date(now()), interval 0 day) and date(cdate)<=date_add(date(now()), interval 0 day) and customer_id=6 and status=0 group by sale_chance""
Last updated