function get_sql_for_sales_orders_view($trans_type, $trans_no, $filter,
$stock_item='', $from='', $to='', $ref='', $location=ALL_TEXT, $customer_id=ALL_TEXT)
{
function get_sql_for_sales_orders_view($trans_type, $trans_no, $filter,
$stock_item='', $from='', $to='', $ref='', $location=ALL_TEXT, $customer_id=ALL_TEXT)
{