mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
26 lines
370 B
PHP
Executable File
26 lines
370 B
PHP
Executable File
<?php
|
|
|
|
class Credit extends Eloquent implements iEntity
|
|
{
|
|
protected $softDelete = true;
|
|
|
|
public function invoice()
|
|
{
|
|
return $this->belongsTo('Invoice');
|
|
}
|
|
|
|
public function getName()
|
|
{
|
|
return $this->credit_number;
|
|
}
|
|
|
|
public function getEntityType()
|
|
{
|
|
return ENTITY_CREDIT;
|
|
}
|
|
}
|
|
|
|
Credit::created(function($credit)
|
|
{
|
|
Activity::creaateCredit($credit);
|
|
}); |