|
@@ -251,6 +251,9 @@ class Manage extends Auth
|
|
|
$total = $db->count($where);
|
|
|
|
|
|
$zongjine = $db->find($where, array('col' => 'sum(cash) as cash'));
|
|
|
+ if (!$zongjine) {
|
|
|
+ $zongjine['cash'] = 0;
|
|
|
+ }
|
|
|
|
|
|
$where['status'] = 10;
|
|
|
$yes = $db->count($where);
|
|
@@ -262,6 +265,15 @@ class Manage extends Auth
|
|
|
$czongjine = $db->find($where, array('col' => 'sum(cash) as cash'));
|
|
|
$szongjine = $db->find($where, array('col' => 'sum(price) as cash'));
|
|
|
$kzongjine = $db->find($where, array('col' => 'sum(buy_price) as cash'));
|
|
|
+ if (!$czongjine) {
|
|
|
+ $czongjine['cash'] = 0;
|
|
|
+ }
|
|
|
+ if (!$szongjine) {
|
|
|
+ $szongjine['cash'] = 0;
|
|
|
+ }
|
|
|
+ if (!$kzongjine) {
|
|
|
+ $kzongjine['cash'] = 0;
|
|
|
+ }
|
|
|
$lirun = $szongjine['cash'] - $kzongjine['cash'];
|
|
|
|
|
|
$where['status'] = array('<', 10);
|
|
@@ -269,6 +281,9 @@ class Manage extends Auth
|
|
|
|
|
|
$where['status'] = 11;
|
|
|
$shibaijine = $db->find($where, array('col' => 'sum(price) as cash'));
|
|
|
+ if (!$shibaijine) {
|
|
|
+ $shibaijine['cash'] = 0;
|
|
|
+ }
|
|
|
$shibai = $db->count($where);
|
|
|
|
|
|
return array
|
|
@@ -368,7 +383,7 @@ class Manage extends Auth
|
|
|
{
|
|
|
$seller = Dever::db('info', 'seller')->find($data['seller_id']);
|
|
|
$channel = array();
|
|
|
- if ($data['channel_id']) {
|
|
|
+ if (isset($data['channel_id']) && $data['channel_id']) {
|
|
|
$channel = Dever::db('info', 'channel')->find($data['channel_id']);
|
|
|
}
|
|
|
$value = $this->showOrderStatus($data['status']);
|