|
|
@@ -19,11 +19,11 @@ class WeightUpdateInstantBill implements ShouldQueue
|
|
|
/**
|
|
|
* Create a new job instance.
|
|
|
*
|
|
|
- * @param OrderPackage $package
|
|
|
+ * @param OrderPackage|null $package
|
|
|
*
|
|
|
* @return void
|
|
|
*/
|
|
|
- public function __construct(OrderPackage $package)
|
|
|
+ public function __construct(?OrderPackage $package)
|
|
|
{
|
|
|
$this->package = $package;
|
|
|
}
|
|
|
@@ -38,6 +38,7 @@ class WeightUpdateInstantBill implements ShouldQueue
|
|
|
*/
|
|
|
public function handle(OrderService $service)
|
|
|
{
|
|
|
+ if (!$this->package)return;
|
|
|
if (!$this->package->weight)return;
|
|
|
$this->package->loadMissing("order");
|
|
|
if (!$this->package->order)return;
|