[*] BO : Taxes are now historized

[*] BO : Taxes are no longer stored in the order details row
This commit is contained in:
fBrignoli
2011-09-14 09:06:20 +00:00
parent 0dd3f002e3
commit efbf3c5d45
14 changed files with 439 additions and 217 deletions
+3 -5
View File
@@ -74,13 +74,13 @@ class TaxRulesTaxManagerCore implements TaxManagerInterface
$behavior = 0;
$first_row = true;
$taxes_rates = array();
$taxes = array();
foreach ($rows as $row)
{
$tax = new Tax((int)$row['id_tax']);
$taxes_rates[] = $tax->rate;
$taxes[] = $tax;
// the applied behavior correspond to the most specific rules
if ($first_row)
@@ -93,9 +93,7 @@ class TaxRulesTaxManagerCore implements TaxManagerInterface
break;
}
$this->tax_calculator = new TaxCalculator($taxes_rates, $behavior);
return $this->tax_calculator;
return new TaxCalculator($taxes, $behavior);
}
}