|
|
@ -6,6 +6,11 @@ use App\Entities\Projects\Project; |
|
|
use App\Entities\Users\User; |
|
|
use App\Entities\Users\User; |
|
|
use Illuminate\Database\Eloquent\Model; |
|
|
use Illuminate\Database\Eloquent\Model; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Invoice Model. |
|
|
|
|
|
* |
|
|
|
|
|
* @author Nafies Luthfi <nafiesl@gmail.com> |
|
|
|
|
|
*/ |
|
|
class Invoice extends Model |
|
|
class Invoice extends Model |
|
|
{ |
|
|
{ |
|
|
protected $guarded = ['id', 'created_at', 'updated_at']; |
|
|
protected $guarded = ['id', 'created_at', 'updated_at']; |
|
|
@ -49,4 +54,14 @@ class Invoice extends Model |
|
|
|
|
|
|
|
|
return count($this->items); |
|
|
return count($this->items); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function numberLink() |
|
|
|
|
|
{ |
|
|
|
|
|
return link_to_route('invoices.show', $this->number, [$this->number], [ |
|
|
|
|
|
'title' => trans( |
|
|
|
|
|
'app.show_detail_title', |
|
|
|
|
|
['name' => $this->number, 'type' => trans('invoice.invoice')] |
|
|
|
|
|
), |
|
|
|
|
|
]); |
|
|
|
|
|
} |
|
|
} |
|
|
} |