Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
aabbb0e5
authored
2022-03-11 10:20:38 -0500
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
invoices
1 parent
8d381d01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
com/Notifications/Notifications.php
com/Notifications/Notifications.php
View file @
aabbb0e
...
...
@@ -5,6 +5,8 @@ use Tz\WordPress\CBV;
use
Tz\WordPress\CBV\User
;
use
Tz\WordPress\Tools
;
use
Tz\WordPress\Tools\Sequencer
;
use
Tz\WordPress\CBV\Invoice
;
const
OPTION_NAME
=
'notif_options'
;
const
NOTIFICATION_STATUS_READ
=
'read'
;
...
...
@@ -421,6 +423,10 @@ function send_triggered_notification($uid = 0, $trigger = 'NO_TRIGGER', $args =
}
}
if
(
isset
(
$args
[
'invoice_id'
])){
$invoiceView
=
new
Invoice\InvoiceView
();
$pdf
=
$invoiceView
->
pdf_create
(
$args
[
'invoice_id'
]);
}
$contents
=
$email
;
...
...
@@ -524,7 +530,9 @@ function send_triggered_notification($uid = 0, $trigger = 'NO_TRIGGER', $args =
$att1
=
isset
(
$attachments
[
0
])
?
$attachments
[
0
]
:
''
;
$att2
=
isset
(
$attachments
[
1
])
?
$attachments
[
1
]
:
''
;
$att3
=
isset
(
$attachments
[
2
])
?
$attachments
[
2
]
:
''
;
if
(
$pdf
!=
""
){
$attachments
[
0
]
=
$pdf
;
}
$attachments
=
array_map
(
function
(
$attachmentPath
)
{
return
realpath
(
__DIR__
.
'/../../../uploads/notifications/'
.
$attachmentPath
);
...
...
Please
register
or
sign in
to post a comment