|
@@ -29,8 +29,8 @@ class InvoiceItem extends \think\Model {
|
|
|
$change = $model->getChangedData();
|
|
|
Log::info("修改发票明细状态:".json_encode($change,JSON_UNESCAPED_UNICODE));
|
|
|
Log::info("跟后数据:".json_encode($model->toArray(),JSON_UNESCAPED_UNICODE));
|
|
|
- if(in_array("status",$change) && ($model->status==1||$model->status==2)){
|
|
|
- $num = self::where(['invoiceCode'=>$code,'order_type'=>$orderType,'status'=>0])->count(1);
|
|
|
+ if(in_array($change["status"],[1,2])){
|
|
|
+ $num = self::where(['invoiceCode'=>$code,'order_type'=>$orderType,'status'=>0])->count();
|
|
|
if($num==0){
|
|
|
if($orderType==1){
|
|
|
$info= InvoicePool::where(['invNo'=>$code,'is_del'=>0])->findOrEmpty();
|