mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
contacts array sorter
This commit is contained in:
parent
57c0a91de8
commit
7f6f34b302
@ -100,13 +100,11 @@ class ClientRepository extends BaseRepository
|
||||
$first = true;
|
||||
$contacts = isset($data['contact']) ? [$data['contact']] : $data['contacts'];
|
||||
$contactIds = [];
|
||||
|
||||
Log::info($contacts);
|
||||
|
||||
usort($contacts, function ($left, $right) {
|
||||
return $left['is_primary'] - $right['is_primary'];
|
||||
});
|
||||
|
||||
usort($contacts, function ($left, $right) {
|
||||
return $right['is_primary'] - $left['is_primary'];
|
||||
});
|
||||
|
||||
Log::info($contacts);
|
||||
|
||||
foreach ($contacts as $contact) {
|
||||
|
Loading…
Reference in New Issue
Block a user