$module_n_price = $module_value['value'];
         } else {
             $module_n_price = $xtPrice->xtcRemoveTax($module_b_price, $module_tax_rate);
         }
         $module_tax = $xtPrice->calcTax($module_n_price, $module_tax_rate);
         //echo 'MT1: '.$module_tax .'<br>'; //DEBUG
     } else {
         $module_n_price = $module_value['value'];
         $module_b_price = $xtPrice->xtcAddTax($module_n_price, $module_tax_rate);
         $module_tax = $xtPrice->calcTax($module_n_price, $module_tax_rate);
     }
     //echo 'MT: '.$module_tax .'<br>'; //DEBUG
     //BOC  web28 - 2012-03-22 - neue anteilige Steuerberechnung Module - ausgenommen bei Versandkosten und Nachnahme ohne Steuer
     if ($module_name != 'shipping' && $module_name != 'cod_fee' && $module_tax_rate == 0) {
         //web28 - 2012-03-14 - FIX Steuerberechnung
         $module_tax = calculate_tax($module_value['value']);
         $module_n_price -= $module_tax;
         //Korrektur für Nettosumme bei Modulen ohne Steuersatz
     }
     //EOC  web28 - 2012-03-22 - neue anteilige Steuerberechnung Module - ausgenommen bei Versandkosten  und Nachnahme ohne Steuer
     $sql_data_array = array('orders_id' => (int) $_POST['oID'], 'n_price' => xtc_db_prepare_input($module_n_price), 'b_price' => xtc_db_prepare_input($module_b_price), 'tax' => xtc_db_prepare_input($module_tax), 'tax_rate' => xtc_db_prepare_input($module_tax_rate));
     $insert_sql_data = array('class' => $module_value['class']);
     $sql_data_array = xtc_array_merge($sql_data_array, $insert_sql_data);
     xtc_db_perform(TABLE_ORDERS_RECALCULATE, $sql_data_array);
     //echo $module_value['value'].'|'.$module_n_price.'|'.$module_tax.'|'.$module_value['class'].'<br>';
 }
 //EOF#######  Module  #######//
 //BOC####### Module ot_tax update ########//
 $tax_rate_query = xtc_db_query("select tax_rate from " . TABLE_ORDERS_RECALCULATE . " where orders_id = '" . (int) $_POST['oID'] . "' and class = 'ot_tax' GROUP BY tax_rate");
 while ($newtax = xtc_db_fetch_array($tax_rate_query)) {
     $new_tax_query = xtc_db_query("\n                                  SELECT SUM(tax) as new_tax_value\n                                    FROM " . TABLE_ORDERS_RECALCULATE . "\n                                   WHERE orders_id = '" . (int) $_POST['oID'] . "'\n                                     AND class != 'products'\n                                     AND tax_rate > 0\n                                     AND tax_rate = '" . $newtax['tax_rate'] . "'\n                                  ");
示例#2
0
        break;
    case 'load_states_disabled':
        load_states_disabled($vars['country']);
        break;
    case 'get_country':
        get_country($vars['country']);
        break;
    case 'get_state':
        get_state($vars['state']);
        break;
    case 'save_country':
        save_country($vars['country'], $vars['title'], $vars['tag'], $vars['act']);
        break;
    case 'save_state':
        save_state($vars['country'], $vars['state'], $vars['title'], $vars['tag'], $vars['act']);
        break;
    case 'get_expire':
        get_expire($vars['product_id'], $vars['begin_date']);
        break;
    case 'calculate_tax':
        calculate_tax($vars['product_id'], $vars['member_id'], $vars['amount'], $vars['incl_tax']);
        break;
    case 'affiliate_search':
        affiliate_search($vars['search']);
        break;
    case 'change_affiliate':
        change_affiliate($vars['member_id'], $vars['aff_id']);
        break;
    default:
        ajaxError('Unknown Request');
}