mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Add manual payment notifications
This commit is contained in:
parent
b51eb5e23c
commit
252effabef
@ -56,8 +56,39 @@ class PaymentNotification implements ShouldQueue
|
||||
$this->trackRevenue($event);
|
||||
}
|
||||
|
||||
if($payment->is_manual)
|
||||
/* Manual Payment Notifications */
|
||||
if($payment->is_manual){
|
||||
|
||||
foreach ($payment->company->company_users as $company_user) {
|
||||
$user = $company_user->user;
|
||||
|
||||
$methods = $this->findUserEntityNotificationType(
|
||||
$payment,
|
||||
$company_user,
|
||||
[
|
||||
'payment_manual',
|
||||
'payment_manual_all',
|
||||
'payment_manual_user',
|
||||
'all_notifications', ]
|
||||
);
|
||||
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo = new NinjaMailerObject;
|
||||
$nmo->mailable = new NinjaMailer((new EntityPaidObject($payment))->build());
|
||||
$nmo->company = $event->company;
|
||||
$nmo->settings = $event->company->settings;
|
||||
$nmo->to_user = $user;
|
||||
|
||||
(new NinjaMailerJob($nmo))->handle();
|
||||
|
||||
$nmo = null;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*User notifications*/
|
||||
foreach ($payment->company->company_users as $company_user) {
|
||||
|
@ -5062,6 +5062,7 @@ $LANG = array(
|
||||
'here' => 'here',
|
||||
'industry_Restaurant & Catering' => 'Restaurant & Catering',
|
||||
'show_credits_table' => 'Show Credits Table',
|
||||
'manual_payment' => 'Payment Manual',
|
||||
);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user