Welcome Guest, Not a member yet? Register   Sign In
flexi cart - A comprehensive shopping cart library for CodeIgniter

[eluser]koichirose[/eluser]
@haseydesign

Did you have the chance to look at the discount error?
I also don't understand if 'tax_method' is actually working.

Here's some code:
Code:
$discount_data = array(
   'id' => $i,
   'description' => 'Example Description',
   'value' => 10,
   'column' => 'item_summary_total',
   'calculation' => '1',
   'tax_method' => '1',
   'void_reward_points' => TRUE //Void any reward points being earnt
  );
  $this->flexi_cart->set_discount($discount_data);

Cart contents: 1 product, 100€ including VAT.
The discount will be 9.99€ in this case. It should be 10€.

By setting 'tax_method' to 1 ( apply tax before discount ) I'd expect this:
82.644 + vat (21%) = 100
discount: 10% of 100 = 10

It looks like the discount is always applied before tax:
10% of 82.644 = 8.26
8.26 + vat (21%) = 9.99

Could you help me out with this?

Thank you!


Messages In This Thread
flexi cart - A comprehensive shopping cart library for CodeIgniter - by El Forum - 02-14-2013, 08:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB