|
@@ -28,14 +28,14 @@ class InvoiceItem extends Base{
|
|
|
$code=$model->invoiceCode;
|
|
|
$orderType=$model->order_type;
|
|
|
$change = $model->getChangedData();
|
|
|
- Log::info("修改发票明细状态:".json_encode($change,JSON_UNESCAPED_UNICODE));
|
|
|
- Log::info("跟后数据:".json_encode($model->toArray(),JSON_UNESCAPED_UNICODE));
|
|
|
+ Log::info("InvoiceItem修改发票明细:onAfterUpdate:".json_encode($change,JSON_UNESCAPED_UNICODE));
|
|
|
+ Log::info("InvoiceItem数据:onAfterUpdate:".json_encode($model->toArray(),JSON_UNESCAPED_UNICODE));
|
|
|
if(isset($change['status'])&&in_array($change["status"],[0,1,2])){
|
|
|
- Log::info('跟后数据:'.json_encode($model->toArray(),JSON_UNESCAPED_UNICODE));
|
|
|
+ Log::info('InvoiceItem数据:onAfterUpdate:'.json_encode($model->toArray(),JSON_UNESCAPED_UNICODE));
|
|
|
$num = self::where(['invoiceCode'=>$code,'order_type'=>$orderType,'status'=>0])->count();
|
|
|
if($orderType==2 && $num==0){
|
|
|
$info= PayInvoice::where(['hpNo'=>$code,"status"=>11])->findOrEmpty();
|
|
|
- Log::info('跟后数据:'.json_encode( $info->toArray(),JSON_UNESCAPED_UNICODE));
|
|
|
+ Log::info('InvoiceItem数据:onAfterUpdate:'.json_encode( $info->toArray(),JSON_UNESCAPED_UNICODE));
|
|
|
if(!$info->isEmpty()){
|
|
|
$info->status=12;
|
|
|
$info->save();
|