mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 21:52:35 +01:00
33 lines
493 B
PHP
Executable File
33 lines
493 B
PHP
Executable File
<?php
|
|
|
|
class Payment extends Eloquent implements iEntity
|
|
{
|
|
protected $softDelete = true;
|
|
|
|
public function scopeScope($query)
|
|
{
|
|
return $query->whereAccountId(Auth::user()->account_id);
|
|
}
|
|
|
|
public function invoice()
|
|
{
|
|
return $this->belongsTo('Invoice');
|
|
}
|
|
|
|
public function getName()
|
|
{
|
|
return '';
|
|
//return $this->invoice_number;
|
|
}
|
|
|
|
public function getEntityType()
|
|
{
|
|
return ENTITY_PAYMENT;
|
|
}
|
|
|
|
}
|
|
|
|
Payment::created(function($payment)
|
|
{
|
|
Activity::createPayment($payment);
|
|
}); |