|
@@ -13,16 +13,6 @@ class Info
|
|
|
$this->where['sales_type'] = $type;
|
|
|
$this->where['sales_id'] = $type_id;
|
|
|
$this->table = 'sales';
|
|
|
- } else {
|
|
|
- if (class_exists('\\Place', false)) {
|
|
|
- if ($place = Dever::get('Place')) {
|
|
|
- if ($place->info['sales_type'] && $place->info['sales_id']) {
|
|
|
- $this->where['sales_type'] = $place->info['sales_type'];
|
|
|
- $this->where['sales_id'] = $place->info['sales_id'];
|
|
|
- $this->table = 'sales';
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -30,7 +20,16 @@ class Info
|
|
|
public function yue($source_id, $sku_id, $init = true)
|
|
|
{
|
|
|
if ($init) {
|
|
|
- $this->init();
|
|
|
+ $type = $type_id = 0;
|
|
|
+ if (class_exists('\\Place', false)) {
|
|
|
+ if ($place = Dever::get('Place')) {
|
|
|
+ if ($place->info['sales_type'] && $place->info['sales_id']) {
|
|
|
+ $type = $place->info['sales_type'];
|
|
|
+ $type_id = $place->info['sales_id'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $this->init($type, $type_id);
|
|
|
} else {
|
|
|
$this->where = [];
|
|
|
$this->table = 'info';
|