1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 21:52:35 +01:00
invoiceninja/app/models/Payment.php
Hillel Coren d1d3d75915 bug fixes
2014-01-14 11:52:56 +00:00

45 lines
617 B
PHP
Executable File

<?php
class Payment extends EntityModel
{
public function invoice()
{
return $this->belongsTo('Invoice');
}
public function invitation()
{
return $this->belongsTo('Invitation');
}
public function client()
{
return $this->belongsTo('Client');
}
public function getName()
{
return '';
}
public function getEntityType()
{
return ENTITY_PAYMENT;
}
}
Payment::created(function($payment)
{
Activity::createPayment($payment);
});
Payment::updating(function($payment)
{
Activity::updatePayment($payment);
});
Payment::deleting(function($payment)
{
Activity::archivePayment($payment);
});