Jump to content

Problema con impuestos, no asocia pais.V. 1.7.4.2


gusman126

Recommended Posts

Hola a todos, estoy desarrollando un modulo. 
Este modulo lee los impuestos del producto

$product = new Product($id_product);
$id_group= $product->id_tax_rules_group;
$taxes = TaxRule::getTaxRulesByGroupId($id_lang, $id_group);


Comprueba el pais y elige el impuesto a ese pais

foreach($taxes as $taxs){
	if($taxs["country_name"] == 'spain' or $taxs["country_name"] == 'españa'){
		$tax = ($taxs['rate'] /100) + 1;
	}else{
		$tax = 1;
	}
}

El problema es que en la información leida , siempre es null en el campo de pais

var_dump($taxes);

[0]=>
  array(10) {
    ["id_tax_rule"]=>
    string(3) "270"
    ["country_name"]=>
    NULL
    ["state_name"]=>
    NULL
    ["rate"]=>
    string(6) "21.000"
    ["zipcode_from"]=>
    string(1) "0"
    ["zipcode_to"]=>
    string(1) "0"
    ["description"]=>
    string(0) ""
    ["behavior"]=>
    string(1) "0"
    ["id_country"]=>
    string(2) "36"
    ["id_state"]=>
    string(1) "0"
  }
  [1]=>
  array(10) {
    ["id_tax_rule"]=>
    string(3) "249"
    ["country_name"]=>
    NULL
    ["state_name"]=>
    NULL
    ["rate"]=>
    string(6) "21.000"
    ["zipcode_from"]=>
    string(1) "0"
    ["zipcode_to"]=>
    string(1) "0"
    ["description"]=>
    string(0) ""
    ["behavior"]=>
    string(1) "0"
    ["id_country"]=>
    string(1) "3"
    ["id_state"]=>
    string(1) "0"
  }
......

 

Tengo que hacer mas pruebas con versiones superiores de la 1.7 , por lo que puedo saber si es culpa de esta version o de todas las 1.7

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...