shish 2 ani în urmă
părinte
comite
5e2a2df920
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      app-ghs/controllers/ProductController.php

+ 3 - 1
app-ghs/controllers/ProductController.php

@@ -667,7 +667,9 @@ class ProductController extends BaseController
                         }
                         $chainMainId = $chain->mainId ?? 0;
                         $staff = ShopAdminClass::getByCondition(['mainId' => $chainMainId, 'adminId' => $adminId], true);
-                        $changeParams2 = ['staffId' => $staff->id, 'staffName' => $staff->name, 'changeType' => $changeType, 'targetId' => $targetId];
+                        $staffId = $staff->id ?? 0;
+                        $staffName = $staff->name ?? '';
+                        $changeParams2 = ['staffId' => $staffId, 'staffName' => $staffName, 'changeType' => $changeType, 'targetId' => $targetId];
                         ProductClass::changeSinglePrice($chain, $ptItemId, $price, $skPrice, $hjPrice, $changeParams2);
                     }
                 }