mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Show ‘Expired’ for overdue quotes in list view
This commit is contained in:
parent
9c0eaac6b8
commit
d6697171f6
@ -160,8 +160,8 @@ class InvoiceService extends BaseService
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
'invoice_status_name',
|
'invoice_status_name',
|
||||||
function ($model) {
|
function ($model) use ($entityType) {
|
||||||
return $model->quote_invoice_id ? link_to("invoices/{$model->quote_invoice_id}/edit", trans('texts.converted'))->toHtml() : self::getStatusLabel($model);
|
return $model->quote_invoice_id ? link_to("invoices/{$model->quote_invoice_id}/edit", trans('texts.converted'))->toHtml() : self::getStatusLabel($entityType, $model);
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
@ -237,12 +237,13 @@ class InvoiceService extends BaseService
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getStatusLabel($model)
|
private function getStatusLabel($entityType, $model)
|
||||||
{
|
{
|
||||||
// check if invoice is overdue
|
// check if invoice is overdue
|
||||||
if (Utils::parseFloat($model->balance) && $model->due_date && $model->due_date != '0000-00-00') {
|
if (Utils::parseFloat($model->balance) && $model->due_date && $model->due_date != '0000-00-00') {
|
||||||
if (\DateTime::createFromFormat('Y-m-d', $model->due_date) < new \DateTime("now")) {
|
if (\DateTime::createFromFormat('Y-m-d', $model->due_date) < new \DateTime("now")) {
|
||||||
return "<h4><div class=\"label label-danger\">".trans('texts.overdue')."</div></h4>";
|
$label = $entityType == ENTITY_INVOICE ? trans('texts.overdue') : trans('texts.expired');
|
||||||
|
return "<h4><div class=\"label label-danger\">" . $label . "</div></h4>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1057,6 +1057,9 @@ $LANG = array(
|
|||||||
'enable_portal_password_help'=>'Allows you to set a password for each contact. If a password is set, the contact will be required to enter a password before viewing invoices.',
|
'enable_portal_password_help'=>'Allows you to set a password for each contact. If a password is set, the contact will be required to enter a password before viewing invoices.',
|
||||||
'send_portal_password'=>'Generate password automatically',
|
'send_portal_password'=>'Generate password automatically',
|
||||||
'send_portal_password_help'=>'If no password is set, one will be generated and sent with the first invoice.',
|
'send_portal_password_help'=>'If no password is set, one will be generated and sent with the first invoice.',
|
||||||
|
|
||||||
|
'expired' => 'Expired',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return $LANG;
|
return $LANG;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user