$result = get_sales_order_details($i, ST_SALESQUOTE);
$SubTotal = 0;
$items = $prices = array();
+ if ($myrow["ship_via"]) {
+ $items[] = $myrow["ship_via"];
+ $prices[] = $myrow["freight_cost"];
+ }
while ($myrow2=db_fetch($result))
{
$Net = round2(((1 - $myrow2["discount_percent"]) * $myrow2["unit_price"] * $myrow2["quantity"]),
$rep->NewLine();
}
- $tax_items = get_tax_for_items(ST_SALESORDER, $items, $prices, $myrow["freight_cost"],
- $myrow['tax_group_id'], $myrow['tax_included'], null);
+ $tax_items = get_tax_for_items(ST_SALESORDER, $items, $prices, $myrow['tax_group_id'], $myrow['tax_included']);
$first = true;
foreach($tax_items as $tax_item)
{