Your Name vor 3 Jahren
Ursprung
Commit
5fb177df65
2 geänderte Dateien mit 19 neuen und 0 gelöschten Zeilen
  1. 12 0
      service/bill/database/order_stat.php
  2. 7 0
      service/bill/lib/Cron.php

+ 12 - 0
service/bill/database/order_stat.php

@@ -82,6 +82,18 @@ $config = array
             // 'round({cash}, 2)',
         ),
 
+        'agent_cash'        => array
+        (
+            'type'      => 'decimal-11,2',
+            'name'      => '确认代理费',
+            'default'   => '0',
+            'desc'      => '确认代理费',
+            'match'     => 'is_numeric',
+            'search'    => 'order',
+            'list'      => true,
+            // 'round({cash}, 2)',
+        ),
+
         'daili_num'        => array
         (
             'type'      => 'int-11',

+ 7 - 0
service/bill/lib/Cron.php

@@ -185,6 +185,12 @@ class Cron
             } else {
                 $data['cash'] = 0;
             }
+            $agent_cash = Dever::db('agent/order')->getDailiCash($where);
+            if ($agent_cash) {
+                $data['agent_cash'] = $agent_cash['total'];
+            } else {
+                $data['agent_cash'] = 0;
+            }
             $where['status'] = 2;
             $data['daili_num'] = Dever::db('agent/member')->getNum($where);
             $where['status'] = '-2,1,2,3,6';//驳回不加入
@@ -192,6 +198,7 @@ class Cron
             $where['end'] = $where['fend'];
             unset($where['fstart']);
             unset($where['fend']);
+
             $data['no_num'] = Dever::db('agent/order')->getNum($where);
             $no_cash = Dever::db('agent/order')->getCash($where);
             if ($no_cash) {