I likez teh beerz & foodz.
Code: Select all
public function getRate($tax_class_id) {
if (isset($this->taxes[$tax_class_id])) {
$rate = 0;
foreach ($this->taxes[$tax_class_id] as $tax_rate) {
$rate += $tax_rate['rate'];
}
return $rate;
} else {
return 0;
}
}
Code: Select all
public function getRate($tax_class_id) {
if (isset($this->taxes[$tax_class_id])) {
$rate = 0;
//taxfree part 1
global $registry;
$this->customer = $registry->get('customer');
if ($this->customer->getCustomerGroupId() == '9') {
} else {
//end of part 1
foreach ($this->taxes[$tax_class_id] as $tax_rate) {
$rate += $tax_rate['rate'];
}
return $rate;
// part 2
}
// end of part 2
} else {
return 0;
}
}
I likez teh beerz & foodz.
Hmm... I hadn't noticed this before. So, how do you make a customer tax exempt then? Is merchboer's solution the correct one?Qphoria wrote:I was thinking of adding tax exemption to a customer group...
OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English
that'd be great, now I've had to modify both the tax.php and cart.php in the admin/library, which I probably have to do again after an update.Qphoria wrote:I was thinking of adding tax exemption to a customer group, but it might be better at the individual customer level to just have a tax_exempt flag. This way you can have tax_exempt wholesalers and tax_exempt normal customers
Cart.php is edited since my discounts also apply to the customers that do not have to pay VAT and I don't want to create two sets of discounts

I likez teh beerz & foodz.
This would be very useful to have tax exemption on the individual customer.Qphoria wrote:I was thinking of adding tax exemption to a customer group, but it might be better at the individual customer level to just have a tax_exempt flag. This way you can have tax_exempt wholesalers and tax_exempt normal customers
If anyone has a solution or is a developer that can create this solution please contact me ASAP.
Thank you.
Checkout Our OpenCart powered Stores
Sandcarving Systems | Glass Banks
If I'm not mistaking it is not necessary to edit cart.php
I likez teh beerz & foodz.
A tax exemption is also applied automatically in the cart according to the "tax category" of the customer (set in registration and provided with a valid ID number).
If it could be of interest for you, you can have a look on my other post and to the working site demo
http://forum.opencart.com/viewtopic.php?f=123&t=31980
regards,
M
-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------
https://www.lotnllc.com is your one stop shop for all your computer needs!
actually I already added in a similar module the forced admin approval need for some specific customer categories. If you are interested to my module, I can really quickly integrate it.
Let me know,
M
-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------
https://www.lotnllc.com is your one stop shop for all your computer needs!
at the moment I don't have one module like what you need, but maybe I could arrange it if you and other people are interested to.
Let me know,
M
-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------
https://www.lotnllc.com is your one stop shop for all your computer needs!
In admin customer edit, it will be possible to select in a Exempted Tax Class list, following options: none, all, specific tax class.
M
-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------
http://myopencart.ilbello.com
Instructions in welcome messages. Let me know for any doubt/feedback.
M
-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------
https://www.lotnllc.com is your one stop shop for all your computer needs!
Users browsing this forum: No registered users and 3 guests