Move email/ resources to mail/, added invoice generated email to admin, updated email template
This commit is contained in:
@@ -52,6 +52,22 @@ class InvoiceItem extends Model
|
||||
127 => 'Rounding', // * SERVICE_ID is NULL, MODULE_ID is NULL, MODULE_REF is NULL
|
||||
];
|
||||
|
||||
/* STATIC */
|
||||
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::created(function($model) {
|
||||
// If this items were a charge, we'll update the charge to processed
|
||||
if (($model->module_id === 30) && $model->module_ref) {
|
||||
$o = Charge::findOrfail($model->module_ref);
|
||||
$o->processed = TRUE;
|
||||
$o->save();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* RELATIONS */
|
||||
|
||||
public function invoice()
|
||||
|
Reference in New Issue
Block a user