This commit is contained in:
ludo
2025-02-15 12:12:42 +01:00
parent 0f32386406
commit 08fc49cb61
53 changed files with 1098 additions and 404 deletions

View File

@@ -19,7 +19,7 @@ class Deliveries
public static function getByCustomer($customerId = false)
{
$customer = $customerId ? Customers::get($customerId) : Customers::getAuth();
$saleChannels = $customer ? $customer->sale_channels->pluck('id')->toArray() : false;
$saleChannels = $customer ? $customer->sale_channels->pluck('id')->toArray() : [SaleChannels::getDefaultID()];
return $saleChannels ? self::getBySaleChannels($saleChannels) : false;
}