1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/app/models/Credit.php

29 lines
390 B
PHP
Raw Normal View History

2013-12-01 21:58:25 +01:00
<?php
2013-12-04 17:20:14 +01:00
class Credit extends EntityModel
2013-12-01 21:58:25 +01:00
{
public function invoice()
{
return $this->belongsTo('Invoice');
}
2013-12-05 16:23:24 +01:00
public function client()
{
return $this->belongsTo('Client');
}
2013-12-01 21:58:25 +01:00
public function getName()
{
return $this->credit_number;
}
public function getEntityType()
{
return ENTITY_CREDIT;
}
}
Credit::created(function($credit)
{
2013-12-05 16:23:24 +01:00
Activity::createCredit($credit);
2013-12-01 21:58:25 +01:00
});