mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04: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);
|
$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;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/*User notifications*/
|
/*User notifications*/
|
||||||
foreach ($payment->company->company_users as $company_user) {
|
foreach ($payment->company->company_users as $company_user) {
|
||||||
|
@ -5062,6 +5062,7 @@ $LANG = array(
|
|||||||
'here' => 'here',
|
'here' => 'here',
|
||||||
'industry_Restaurant & Catering' => 'Restaurant & Catering',
|
'industry_Restaurant & Catering' => 'Restaurant & Catering',
|
||||||
'show_credits_table' => 'Show Credits Table',
|
'show_credits_table' => 'Show Credits Table',
|
||||||
|
'manual_payment' => 'Payment Manual',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user