Hello,
While developing extension for VirtueMart I notice that for some Type of Arithmetic Operation such as 'tax per product' or 'price modifier for profit markup' calc amount is not stored in order_calc_rules table can anyone explain why it is ? so that I can understand the flow properly.
It is just written for the vattax. see order model private function _createOrderCalcRules($order_id, $_cart) and there
if ($calculation_kind == 'VatTax') {
$orderCalcRules->calc_amount = $_cart->cartPrices[$key]['taxAmount'];
$orderCalcRules->calc_result = $_cart->cartData['VatTax'][$rule[7]]['result'];
}
I check now with
if ($calculation_kind == 'VatTax') {
$orderCalcRules->calc_amount = $_cart->cartPrices[$key]['taxAmount'];
$orderCalcRules->calc_result = $_cart->cartData['VatTax'][$rule[7]]['result'];
} else {
vmdebug('_createOrderCalcRules',$key,$rule,$_cart->cartPrices[$key]['taxAmount'],$_cart->cartData['VatTax'][$rule[7]]['result']);
}
How to implement the other, you may help ;-)