dever 3 years ago
parent
commit
cad73a5976
1 changed files with 2 additions and 2 deletions
  1. 2 2
      service/option/lib/Cash.php

+ 2 - 2
service/option/lib/Cash.php

@@ -238,13 +238,13 @@ class Cash
     # 确认期权价值
     public function setValue_commit($info)
     {
-        $state = Dever::db('option/bill_jiaofu')->upYes(array('where_start' => $info['jiaofu_date'], 'where_aid' => $info['aid'], 'where_status' => 2, 'set_agreement_id' => $info['id'], 'set_status' => 1, 'set_qdate' => time()));
+        $state = Dever::db('option/bill_jiaofu')->upYes(array('where_end' => $info['jiaofu_date'], 'where_aid' => $info['aid'], 'where_status' => 2, 'set_agreement_id' => $info['id'], 'set_status' => 1, 'set_qdate' => time()));
 
         if ($state) {
             $account_cash = Dever::db('option/cash')->select(array('aid' => $info['aid']));
             if ($account_cash) {
                 foreach ($account_cash as $k => $v) {
-                    $cash = Dever::db('option/bill_jiaofu')->getTotal(array('where_start' => $info['jiaofu_date'], 'where_type' => $v['type'], 'where_aid' => $info['aid'], 'where_status' => 2));
+                    $cash = Dever::db('option/bill_jiaofu')->getTotal(array('where_end' => $info['jiaofu_date'], 'where_type' => $v['type'], 'where_aid' => $info['aid'], 'where_status' => 2));
                     if ($cash) {
                         $update['where_id'] = $v['id'];
                         $update['daijiaofu'] = $v['daijiaofu'] - $cash['total'];