projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed user add to hide projects for client role.
[timetracker.git]
/
invoice_send.php
diff --git
a/invoice_send.php
b/invoice_send.php
index
135453b
..
e94e805
100644
(file)
--- a/
invoice_send.php
+++ b/
invoice_send.php
@@
-29,10
+29,10
@@
require_once('initialize.php');
import('form.Form');
import('ttInvoiceHelper');
require_once('initialize.php');
import('form.Form');
import('ttInvoiceHelper');
-import('tt
Sys
Config');
+import('tt
User
Config');
// Access checks.
// Access checks.
-if (!(ttAccessAllowed('manage_invoices') || ttAccessAllowed('view_
own
_invoices'))) {
+if (!(ttAccessAllowed('manage_invoices') || ttAccessAllowed('view_
client
_invoices'))) {
header('Location: access_denied.php');
exit();
}
header('Location: access_denied.php');
exit();
}
@@
-48,7
+48,7
@@
if (!$invoice) {
}
// End of access checks.
}
// End of access checks.
-$
sc = new ttSysConfig($user->id
);
+$
uc = new ttUserConfig(
);
if ($request->isPost()) {
$cl_receiver = trim($request->getParameter('receiver'));
if ($request->isPost()) {
$cl_receiver = trim($request->getParameter('receiver'));
@@
-56,8
+56,8
@@
if ($request->isPost()) {
$cl_subject = trim($request->getParameter('subject'));
$cl_comment = trim($request->getParameter('comment'));
} else {
$cl_subject = trim($request->getParameter('subject'));
$cl_comment = trim($request->getParameter('comment'));
} else {
- $cl_receiver = $
s
c->getValue(SYSC_LAST_INVOICE_EMAIL);
- $cl_cc = $
s
c->getValue(SYSC_LAST_INVOICE_CC);
+ $cl_receiver = $
u
c->getValue(SYSC_LAST_INVOICE_EMAIL);
+ $cl_cc = $
u
c->getValue(SYSC_LAST_INVOICE_CC);
$cl_subject = $i18n->get('title.invoice').' '.$invoice['name'].', '.$user->group_name;
}
$cl_subject = $i18n->get('title.invoice').' '.$invoice['name'].', '.$user->group_name;
}
@@
-78,8
+78,8
@@
if ($request->isPost()) {
if ($err->no()) {
// Save last invoice emails for future use.
if ($err->no()) {
// Save last invoice emails for future use.
- $
s
c->setValue(SYSC_LAST_INVOICE_EMAIL, $cl_receiver);
- $
s
c->setValue(SYSC_LAST_INVOICE_CC, $cl_cc);
+ $
u
c->setValue(SYSC_LAST_INVOICE_EMAIL, $cl_receiver);
+ $
u
c->setValue(SYSC_LAST_INVOICE_CC, $cl_cc);
$body = ttInvoiceHelper::prepareInvoiceBody($cl_invoice_id, $cl_comment);
$body = ttInvoiceHelper::prepareInvoiceBody($cl_invoice_id, $cl_comment);