MarketPress - VAT / TAX

Hi there Guys.

I know there was a previous thread about this from like nine months ago.

The question is how to display pricing with Tax / VAT included for front end display of marketpress.

Monolith had a post with some code as a work around which was supposed to be added into the core system there after but it looks like that may have been pushed aside for more pressing matters. However this is not a polite suggestion in South Africa and is part of our legislation in our national Consumer Protection Act, sellers not displaying complete costs are in serious hot water.

Additionally this cannot be loaded as VAT inclusive as again by law this needs to be displayed separate on the invoice.

Right so after a bit of panel beating of Monoliths workaround code int he Template-Functions.php document, I have this working for general price display.

Line 1354 ->

if ((is_array($meta["mp_price"]) && count($meta["mp_price"]) == 1) || !empty($meta["mp_file"])) {
    if ($meta["mp_is_sale"] && $meta["mp_sale_price"][0]) {
	    $price = '<span class="mp_special_price"><del class="mp_old_price">'.$mp->format_currency('', $meta["mp_price"][0] + ($meta["mp_price"][0]* $settings ['tax']['rate'])).'</del>';
	    $price .= '<span class="mp_current_price">'.$mp->format_currency('', $meta["mp_sale_price"][0] + ($meta["mp_sale_price"][0]* $settings ['tax']['rate'])).'</span></span>';
	  } else {

		$price = '<span class="mp_normal_price"><span class="mp_current_price">'.$mp->format_currency('', $meta["mp_price"][0] + ($meta["mp_price"][0]* $settings ['tax']['rate'])).'</span></span>';

Which is all Good..

Now where I am having an issue.

Further down where the system handles Variations it is a slightly more complex system:

Line 1439 ->

//create select list if more than one variation
		  if (is_array($meta["mp_price"]) && count($meta["mp_price"]) > 1 && empty($meta["mp_file"])) {
	      $variation_select = '<select class="mp_product_variations" name="variation">';
				foreach ($meta["mp_price"] as $key => $value) {
				  $disabled = (in_array($key, $no_inventory)) ? ' disabled="disabled"' : '';
				  $variation_select .= '<option value="' . $key . '"' . $disabled . '>' . esc_html($meta["mp_var_name"][$key]) . ' - ';
					if ($meta["mp_is_sale"] && $meta["mp_sale_price"][$key]) {

		        $variation_select .= $mp->format_currency( '',$meta["mp_sale_price"][$key]);

		      } else {
		        $variation_select .= $mp->format_currency('', $value+($value* $settings ['tax']['rate']));
		      }
		      $variation_select .= "</option>\n";
		    }
	      $variation_select .= "</select> \n";
	 		} else {

It seems to use $key to define the product or something and combine "mp_price" as the key and use this as $value...

Fine this works for all normal prices loaded into the system but the moment a product price is set to sale I am struggling to generate this as a VAT / TAX inclusive amount.

For the majority of this i have been able to run the following equation to generate the taxe inclusive figure for display

$value+($value* $settings ['tax']['rate'])

However I just cant get this to work for

$variation_select .= $mp->format_currency( '',$meta["mp_sale_price"][$key]);

Please some help and a status update on the tax handling, shipping waybills and other additions to marketpress that were stated for launch in the next version which has come and gone would be nice.

Thank you kindly.