for ($i = $from; $i <= $to; $i++)
{
$myrow = get_sales_order_header($i, ST_SALESQUOTE);
+ if ($currency != ALL_TEXT && $myrow['curr_code'] != $currency) {
+ continue;
+ }
$baccount = get_default_bank_account($myrow['curr_code']);
$params['bankaccount'] = $baccount['id'];
$branch = get_branch($myrow["branch_code"]);