// Stock Available : Add shared management for group of shops

This commit is contained in:
dSevere
2011-11-30 16:28:06 +00:00
parent 48c0a94350
commit fdcbd6b651
9 changed files with 442 additions and 188 deletions
+4 -1
View File
@@ -33,6 +33,7 @@ class GroupShopCore extends ObjectModel
public $name;
public $active;
public $share_customer;
public $share_stock;
public $share_order;
public $deleted;
@@ -41,6 +42,7 @@ class GroupShopCore extends ObjectModel
'active' => 'isBool',
'share_customer' => 'isBool',
'share_order' => 'isBool',
'share_stock' => 'isBool',
'name' => 'isGenericName',
);
protected $table = 'group_shop';
@@ -63,7 +65,8 @@ class GroupShopCore extends ObjectModel
$fields['name'] = pSQL($this->name);
$fields['share_customer'] = (int)$this->share_customer;
$fields['share_order'] = ($fields['share_customer']) ? (int)$this->share_order : false;
$fields['share_stock'] = (int)$this->share_stock;
$fields['share_order'] = ($fields['share_customer'] && $fields['share_stock']) ? (int)$this->share_order : false;
$fields['active'] = (int)$this->active;
$fields['deleted'] = (int)$this->deleted;
return $fields;