Fixed sorting for contracts.

This commit is contained in:
James Cole 2015-09-08 19:36:54 +02:00
parent c9bab3e5c3
commit 204e521ba4
2 changed files with 6 additions and 3 deletions

View File

@ -39,8 +39,8 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Bill whereSkip($value)
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Bill whereNameEncrypted($value)
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Bill whereMatchEncrypted($value)
* @property-read \Carbon\Carbon $nextExpectedMatch
* @property-read \Carbon\Carbon $lastFoundMatch
* @property \Carbon\Carbon $nextExpectedMatch
* @property \Carbon\Carbon $lastFoundMatch
*/
class Bill extends Model
{

View File

@ -97,7 +97,10 @@ class BillRepository implements BillRepositoryInterface
$set = $set->sortBy(
function (Bill $bill) {
return strtolower($bill->name);
$int = $bill->active == 1 ? 0 : 1;
return $int.strtolower($bill->name);
}
);