mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 14:42:42 +01:00
39 lines
526 B
PHP
Executable File
39 lines
526 B
PHP
Executable File
<?php
|
|
|
|
class Credit extends EntityModel
|
|
{
|
|
public function invoice()
|
|
{
|
|
return $this->belongsTo('Invoice');
|
|
}
|
|
|
|
public function client()
|
|
{
|
|
return $this->belongsTo('Client');
|
|
}
|
|
|
|
public function getName()
|
|
{
|
|
return '';
|
|
}
|
|
|
|
public function getEntityType()
|
|
{
|
|
return ENTITY_CREDIT;
|
|
}
|
|
}
|
|
|
|
Credit::created(function($credit)
|
|
{
|
|
Activity::createCredit($credit);
|
|
});
|
|
|
|
Credit::updating(function($credit)
|
|
{
|
|
Activity::updateCredit($credit);
|
|
});
|
|
|
|
Credit::deleting(function($credit)
|
|
{
|
|
Activity::archiveCredit($credit);
|
|
}); |