fixed #258
This commit is contained in:
parent
96a55a8225
commit
b51163ae02
@ -73,7 +73,7 @@ class BillReminder extends Command
|
||||
$date = Date::today()->addDays($day)->toDateString();
|
||||
|
||||
// Get upcoming bills
|
||||
$bills = Bill::with('vendor')->due($date)->get();
|
||||
$bills = Bill::with('vendor')->accrued()->due($date)->get();
|
||||
|
||||
foreach ($bills as $bill) {
|
||||
// Notify all users assigned to this company
|
||||
|
@ -73,7 +73,7 @@ class InvoiceReminder extends Command
|
||||
$date = Date::today()->subDays($day)->toDateString();
|
||||
|
||||
// Get upcoming bills
|
||||
$invoices = Invoice::with('customer')->due($date)->get();
|
||||
$invoices = Invoice::with('customer')->accrued()->due($date)->get();
|
||||
|
||||
foreach ($invoices as $invoice) {
|
||||
// Notify the customer
|
||||
|
@ -100,7 +100,7 @@ class Bill extends Model
|
||||
|
||||
public function scopeAccrued($query)
|
||||
{
|
||||
return $query->where('bill_status_code', '!=', 'new');
|
||||
return $query->where('bill_status_code', '<>', 'draft');
|
||||
}
|
||||
|
||||
public function onCloning($src, $child = null)
|
||||
|
@ -108,7 +108,7 @@ class Invoice extends Model
|
||||
|
||||
public function scopeAccrued($query)
|
||||
{
|
||||
return $query->where('invoice_status_code', '!=', 'draft');
|
||||
return $query->where('invoice_status_code', '<>', 'draft');
|
||||
}
|
||||
|
||||
public function onCloning($src, $child = null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user