1
0
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:
David Bomba 2016-04-17 20:50:06 +10:00
parent 57c0a91de8
commit 7f6f34b302

View File

@ -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) {