Beispiel #1
0
 /**
  * @return void
  */
 public function saveCalculationData()
 {
     $ctc = $this->getData('customer_tax_class_ids');
     $ptc = $this->getData('product_tax_class_ids');
     $rates = $this->getData('tax_rate_ids');
     $this->_calculation->deleteByRuleId($this->getId());
     foreach ($ctc as $c) {
         foreach ($ptc as $p) {
             foreach ($rates as $r) {
                 $dataArray = ['tax_calculation_rule_id' => $this->getId(), 'tax_calculation_rate_id' => $r, 'customer_tax_class_id' => $c, 'product_tax_class_id' => $p];
                 $this->_calculation->setData($dataArray)->save();
             }
         }
     }
 }