|
@@ -30,6 +30,7 @@ class InvoiceItem extends \think\Model {
|
|
|
Log::info("修改发票明细状态:".json_encode($change,JSON_UNESCAPED_UNICODE));
|
|
|
Log::info("跟后数据:".json_encode($model->toArray(),JSON_UNESCAPED_UNICODE));
|
|
|
if(in_array($change["status"],[0,1,2])){
|
|
|
+ Log::info('跟后数据:'.json_encode($model->toArray(),JSON_UNESCAPED_UNICODE));
|
|
|
$num = self::where(['invoiceCode'=>$code,'order_type'=>$orderType,'status'=>0])->count();
|
|
|
if($orderType==1){
|
|
|
$info= InvoicePool::where(['invNo'=>$code,'is_del'=>0])->findOrEmpty();
|
|
@@ -45,8 +46,10 @@ class InvoiceItem extends \think\Model {
|
|
|
}
|
|
|
if($orderType==2){
|
|
|
$info= PayInvoice::where(['hpNo'=>$code,'is_del'=>0])->findOrEmpty();
|
|
|
+ Log::info('跟后数据:'.json_encode( $info->toArray(),JSON_UNESCAPED_UNICODE));
|
|
|
if(!$info->isEmpty()){
|
|
|
$pay = Pay::where(['payNo'=>$info->payNo,'is_del'=>0])->findOrEmpty();
|
|
|
+ Log::info('跟后数据:'.json_encode( $pay->toArray(),JSON_UNESCAPED_UNICODE));
|
|
|
if(!$pay->isEmpty() && $pay->status==2){
|
|
|
if($num==0 && $info->status==11){
|
|
|
$info->status=12;
|