Changed SMS package so it allows separate SMS for each person contract.

This commit is contained in:
Simon Pocrnjič 2025-12-07 09:45:19 +01:00
parent fb7160eb33
commit d2287ef963

View File

@ -223,6 +223,8 @@ public function store(StorePackageRequest $request): RedirectResponse
'created_by' => optional($request->user())->id,
]);
dd($data['items']);
$items = collect($data['items'])
->map(function (array $row) {
return new PackageItem([
@ -457,12 +459,12 @@ public function storeFromContracts(StorePackageFromContractsRequest $request, Ph
continue;
}
$key = $phone->id ? 'id:'.$phone->id : 'num:'.$phone->nu;
if ($seen->contains($key)) {
/*if ($seen->contains($key)) {
// skip duplicates across multiple contracts/persons
$skipped++;
continue;
}
}*/
$seen->push($key);
$items[] = [
'number' => (string) $phone->nu,