1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00
invoiceninja/app/Models/InvoiceStatus.php

39 lines
856 B
PHP
Raw Normal View History

2017-01-30 20:40:43 +01:00
<?php
namespace App\Models;
2015-03-16 22:45:25 +01:00
2015-03-25 20:56:31 +01:00
use Eloquent;
/**
2017-01-30 20:40:43 +01:00
* Class InvoiceStatus.
*/
2015-03-16 22:45:25 +01:00
class InvoiceStatus extends Eloquent
{
/**
* @var bool
*/
2015-03-16 22:45:25 +01:00
public $timestamps = false;
2017-04-05 21:20:11 +02:00
public static function getIdFromAlias($status)
{
switch ($status) {
case 'draft':
return INVOICE_STATUS_DRAFT;
case 'sent':
return INVOICE_STATUS_SENT;
case 'viewed':
return INVOICE_STATUS_VIEWED;
case 'approved':
return INVOICE_STATUS_APPROVED;
case 'partial':
return INVOICE_STATUS_PARTIAL;
case 'overdue':
return INVOICE_STATUS_OVERDUE;
case 'unpaid':
return INVOICE_STATUS_UNPAID;
default:
return false;
}
}
2015-03-16 22:45:25 +01:00
}