I am using opencart version 2.1.0.1.
I want to set different tax values to products for different countries. It's ok but when i want to give tax a negative value, it doesn't works.
Is this possible to use negative value on taxes by changing the code? I want to apply some discounts by tax. Please help.
Tax.php like this:
<?php
class ModelTotalTax extends Model {
public function getTotal(&$total_data, &$total, &$taxes) {
foreach ($taxes as $key => $value) {
if ($value > 0) {
$total_data[] = array(
'code' => 'tax',
'title' => $this->tax->getRateName($key),
'value' => $value,
'sort_order' => $this->config->get('tax_sort_order')
);
$total += $value;
}
}
}
}