refactor sales reports

This commit is contained in:
jayvirsinh_gohil
2019-11-14 18:59:31 +05:30
parent eee69a5d42
commit 0d9ca2a0fd
3 changed files with 3 additions and 4 deletions

View File

@ -26,8 +26,7 @@ class ReportController extends Controller
$query->whereBetween( $query->whereBetween(
'invoice_date', 'invoice_date',
[$start->format('Y-m-d'), $end->format('Y-m-d')] [$start->format('Y-m-d'), $end->format('Y-m-d')]
) );
->where('paid_status', Invoice::STATUS_PAID);
}]) }])
->customer() ->customer()
->whereCompany($company->id) ->whereCompany($company->id)

View File

@ -60,7 +60,7 @@ class InvoiceItem extends Model
$query->whereBetween( $query->whereBetween(
'invoice_date', 'invoice_date',
[$start->format('Y-m-d'), $end->format('Y-m-d')] [$start->format('Y-m-d'), $end->format('Y-m-d')]
)->where('paid_status', Invoice::STATUS_PAID); );
}); });
} }

View File

@ -216,7 +216,7 @@ class User extends Authenticatable implements HasMedia
$query->whereBetween( $query->whereBetween(
'invoice_date', 'invoice_date',
[$start->format('Y-m-d'), $end->format('Y-m-d')] [$start->format('Y-m-d'), $end->format('Y-m-d')]
)->where('paid_status', Invoice::STATUS_PAID); );
}); });
} }