$this_taxes = module_finance::sanatise_taxes($quote_item_data['taxes'], $quote_item_data['quote_item_amount']); $this_taxes_amounts = array(); $this_taxes_rates = array(); if (!count($this_taxes)) { $this_taxes = array('amount' => 0, 'percent' => 0); } foreach ($this_taxes as $this_tax) { $this_taxes_amounts[] = dollar($this_tax['amount'], true, $quote['currency_id']); $this_taxes_rates[] = $this_tax['percent'] . '%'; } $row_replace['item_tax'] = implode(', ', $this_taxes_amounts); $row_replace['item_tax_rate'] = implode(', ', $this_taxes_rates); } $this_item_row_html = $item_row_html; $this_item_row_html = str_replace(' data-item-row="true"', '', $this_item_row_html); // we pass this through the template system so we can make use of things like arithmatic. $temp_template = new module_template(); $temp_template->assign_values($row_replace); $temp_template->content = $this_item_row_html; $this_item_row_html = $temp_template->replace_content(); /*foreach($row_replace as $key=>$val){ $this_item_row_html = str_replace('{'.strtoupper($key).'}', $val, $this_item_row_html); }*/ $all_item_row_html .= $this_item_row_html; } $replace['ITEM_ROW_CONTENT'] = $all_item_row_html; $t->assign_values($replace); echo $t->render(); if (isset($row_replace) && count($row_replace)) { module_template::add_tags('quote_task_list', $row_replace); }