// Format definitions
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11184 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+8
-27
@@ -36,9 +36,6 @@ class TaxRuleCore extends ObjectModel
|
||||
public $behavior;
|
||||
public $description;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @see ObjectModel::$definition
|
||||
*/
|
||||
@@ -46,33 +43,17 @@ class TaxRuleCore extends ObjectModel
|
||||
'table' => 'tax_rule',
|
||||
'primary' => 'id_tax_rule',
|
||||
'fields' => array(
|
||||
'id_tax_rules_group' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_country' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_state' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId'),
|
||||
'zipcode_from' => array('type' => 'FILL_ME', 'validate' => 'isPostCode'),
|
||||
'zipcode_to' => array('type' => 'FILL_ME', 'validate' => 'isPostCode'),
|
||||
'id_tax' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'behavior' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedInt'),
|
||||
'description' => array('type' => 'FILL_ME', 'validate' => 'isString'),
|
||||
'id_tax_rules_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'id_state' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
|
||||
'zipcode_from' => array('type' => self::TYPE_INT, 'validate' => 'isPostCode'),
|
||||
'zipcode_to' => array('type' => self::TYPE_INT, 'validate' => 'isPostCode'),
|
||||
'id_tax' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
|
||||
'behavior' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
||||
'description' => array('type' => self::TYPE_STRING, 'validate' => 'isString'),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
$this->validateFields();
|
||||
$fields['id_tax_rules_group'] = (int)$this->id_tax_rules_group;
|
||||
$fields['id_country'] = (int)$this->id_country;
|
||||
$fields['id_state'] = (int)$this->id_state;
|
||||
$fields['zipcode_from'] = (int)$this->zipcode_from;
|
||||
$fields['zipcode_to'] = (int)$this->zipcode_to;
|
||||
$fields['behavior'] = (int)$this->behavior;
|
||||
$fields['id_tax'] = (int)$this->id_tax;
|
||||
$fields['description'] = $this->description;
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
public static function deleteByGroupId($id_group)
|
||||
{
|
||||
if (empty($id_group))
|
||||
|
||||
Reference in New Issue
Block a user