|
@@ -33,12 +33,15 @@ class Set
|
|
|
return date($string, $day);
|
|
|
}
|
|
|
|
|
|
- public function statYes($info, $type)
|
|
|
+ public function statYes($info, $type, $source = false)
|
|
|
{
|
|
|
$table = 'cash/' . $type;
|
|
|
|
|
|
+ if (!$source) {
|
|
|
+ $source = $type;
|
|
|
+ }
|
|
|
$info = is_array($info) ? $info : Dever::db($table)->one($info);
|
|
|
- $other = Dever::db($type . '/info')->find($info[$type . '_id']);
|
|
|
+ $other = Dever::db($source . '/info')->find($info[$source . '_id']);
|
|
|
if (!$other) {
|
|
|
return '';
|
|
|
}
|
|
@@ -149,6 +152,7 @@ class Set
|
|
|
$show = Dever::input('show', 1);
|
|
|
$type = Dever::input('type', 'shop');
|
|
|
$pay_type = 1;
|
|
|
+ $table = 'cash/' . $type;
|
|
|
if ($type == 'shop') {
|
|
|
$search_option_type = 1;
|
|
|
$name = '门店';
|
|
@@ -156,6 +160,7 @@ class Set
|
|
|
$search_option_type = 1;
|
|
|
$pay_type = '2,3';
|
|
|
$name = '门店零售';
|
|
|
+ $type = 'shop';
|
|
|
} elseif ($type == 'store') {
|
|
|
$search_option_type = 3;
|
|
|
$name = '仓库';
|
|
@@ -164,8 +169,6 @@ class Set
|
|
|
$name = '工厂';
|
|
|
}
|
|
|
|
|
|
- $table = 'cash/' . $type;
|
|
|
-
|
|
|
$config = Dever::db($table)->config;
|
|
|
|
|
|
$info = Dever::db($table)->one($id);
|
|
@@ -401,6 +404,7 @@ class Set
|
|
|
$pay_type = 1;
|
|
|
if ($type == 'shop_sell') {
|
|
|
$pay_type = '2,3';
|
|
|
+ $type = 'shop';
|
|
|
}
|
|
|
|
|
|
$config = Dever::db($table)->config;
|
|
@@ -478,20 +482,22 @@ class Set
|
|
|
}
|
|
|
|
|
|
$type = Dever::input('type', 'shop');
|
|
|
+
|
|
|
+ $table = 'cash/' . $type;
|
|
|
+
|
|
|
$pay_type = 1;
|
|
|
if ($type == 'shop') {
|
|
|
$name = '门店';
|
|
|
} elseif ($type == 'shop_sell') {
|
|
|
$pay_type = '2,3';
|
|
|
$name = '门店';
|
|
|
+ $type = 'shop';
|
|
|
} elseif ($type == 'store') {
|
|
|
$name = '仓库';
|
|
|
} elseif ($type == 'factory') {
|
|
|
$name = '工厂';
|
|
|
}
|
|
|
|
|
|
- $table = 'cash/' . $type;
|
|
|
-
|
|
|
$config = Dever::db($table)->config;
|
|
|
|
|
|
$info = Dever::db($table)->one($id);
|