function setfeetemplate($data) { global $template, $system, $MSG; $feenames = array('signup' => $MSG['430'], 'buyer' => $MSG['775'], 'setup' => $MSG['432'], 'featured' => $MSG['433'], 'bold' => $MSG['439'], 'highlighted' => $MSG['434'], 'subtitle' => $MSG['803'], 'extcat' => $MSG['804'], 'reserve' => $MSG['440'], 'image' => $MSG['435'], 'relist' => $MSG['437'], 'buynow' => $MSG['436'], 'finalval' => $MSG['791'], 'balance' => $MSG['935']); $total = 0; $total_exculding = 0; foreach ($data as $k => $v) { if (in_array($k, array('setup', 'featured', 'bold', 'highlighted', 'subtitle', 'relist', 'reserve', 'buynow', 'image', 'extcat', 'signup', 'buyer', 'finalval', 'balance'))) { if ($v > 0) { $excluding = vatexcluding($v); $total += $v; $total_exculding += $excluding; $template->assign_block_vars('fees', array('FEE' => $feenames[$k], 'UNIT_PRICE' => $system->print_money($excluding), 'UNIT_PRICE_WITH_TAX' => $system->print_money($v), 'TOTAL' => $system->print_money($total_exculding), 'TOTAL_WITH_TAX' => $system->print_money($total))); } } } return array($total, $total_exculding); }
$winner_address .= !empty($winner['address']) ? '<br>' . $winner['address'] : ''; $winner_address .= !empty($winner['city']) ? '<br>' . $winner['city'] : ''; $winner_address .= !empty($winner['prov']) ? '<br>' . $winner['prov'] : ''; $winner_address .= !empty($winner['country']) ? '<br>' . $winner['country'] : ''; $winner_address .= !empty($winner['zip']) ? '<br>' . $winner['zip'] : ''; if ($data['tax'] == 'n') { $unitexcl = $unitpriceincl = $paysubtotal; $subtotal = $totalinc = $payvalue; $vat = 0; } else { if ($data['taxinc'] == 'y') { $unitexcl = vatexcluding($paysubtotal); // auction price - tax $unitpriceincl = $paysubtotal; // auction price & tax $subtotal = vatexcluding($payvalue); // total invoice - tax $totalinc = $payvalue; // total invoice & tax } else { $unitexcl = $paysubtotal; // auction price - tax $unitpriceincl = vat($paysubtotal); // auction price & tax $subtotal = $payvalue; // total invoice - tax $totalinc = vat($payvalue); // total invoice & tax } } $totalvat = $totalinc - $subtotal;