Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
b0a75da2
Commit
b0a75da2
authored
8 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix css
parent
e7a45a7f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/expensereport/card.php
+8
-51
8 additions, 51 deletions
htdocs/expensereport/card.php
with
8 additions
and
51 deletions
htdocs/expensereport/card.php
+
8
−
51
View file @
b0a75da2
...
...
@@ -1217,53 +1217,10 @@ if (empty($reshook))
}
}
/*
* Generate or regenerate the PDF document
*/
if
(
$action
==
'builddoc'
)
// GET or POST
{
$depl
=
new
ExpenseReport
(
$db
,
0
,
$_GET
[
'id'
]);
$depl
->
fetch
(
$id
);
if
(
$_REQUEST
[
'model'
])
{
$depl
->
setDocModel
(
$user
,
$_REQUEST
[
'model'
]);
}
$outputlangs
=
$langs
;
if
(
!
empty
(
$_REQUEST
[
'lang_id'
]))
{
$outputlangs
=
new
Translate
(
""
,
$conf
);
$outputlangs
->
setDefaultLang
(
$_REQUEST
[
'lang_id'
]);
}
$result
=
expensereport_pdf_create
(
$db
,
$depl
,
''
,
$depl
->
modelpdf
,
$outputlangs
);
if
(
$result
<=
0
)
{
setEventMessages
(
$object
->
error
,
$object
->
errors
,
'errors'
);
$action
=
''
;
}
}
// Remove file in doc form
else
if
(
$action
==
'remove_file'
)
{
$object
=
new
ExpenseReport
(
$db
,
0
,
$_GET
[
'id'
]);
if
(
$object
->
fetch
(
$id
))
{
require_once
DOL_DOCUMENT_ROOT
.
'/core/lib/files.lib.php'
;
$object
->
fetch_thirdparty
();
$langs
->
load
(
"other"
);
$upload_dir
=
$conf
->
expensereport
->
dir_output
;
$file
=
$upload_dir
.
'/'
.
GETPOST
(
'file'
);
$ret
=
dol_delete_file
(
$file
,
0
,
0
,
0
,
$object
);
if
(
$ret
)
setEventMessages
(
$langs
->
trans
(
"FileWasRemoved"
,
GETPOST
(
'urlfile'
)),
null
,
'mesgs'
);
else
setEventMessages
(
$langs
->
trans
(
"ErrorFailToDeleteFile"
,
GETPOST
(
'urlfile'
)),
null
,
'errors'
);
$action
=
''
;
}
}
// Actions to build doc
$upload_dir
=
$conf
->
expensereport
->
dir_output
;
$permissioncreate
=
$user
->
rights
->
expensereport
->
creer
;
include
DOL_DOCUMENT_ROOT
.
'/core/actions_builddoc.inc.php'
;
}
...
...
@@ -1352,8 +1309,8 @@ if ($action == 'create')
// Public note
print
'<tr>'
;
print
'<td class="
border" valign="
top">'
.
$langs
->
trans
(
'NotePublic'
)
.
'</td>'
;
print
'<td
class="tdtop"
>'
;
print
'<td class="
td
top">'
.
$langs
->
trans
(
'NotePublic'
)
.
'</td>'
;
print
'<td>'
;
$doleditor
=
new
DolEditor
(
'note_public'
,
$note_public
,
''
,
80
,
'dolibarr_notes'
,
'In'
,
0
,
false
,
true
,
ROWS_3
,
'90%'
);
print
$doleditor
->
Create
(
1
);
...
...
@@ -1362,8 +1319,8 @@ if ($action == 'create')
// Private note
if
(
empty
(
$user
->
societe_id
))
{
print
'<tr>'
;
print
'<td class="
border" valign="
top">'
.
$langs
->
trans
(
'NotePrivate'
)
.
'</td>'
;
print
'<td
class="tdtop"
>'
;
print
'<td class="
td
top">'
.
$langs
->
trans
(
'NotePrivate'
)
.
'</td>'
;
print
'<td>'
;
$doleditor
=
new
DolEditor
(
'note_private'
,
$note_private
,
''
,
80
,
'dolibarr_notes'
,
'In'
,
0
,
false
,
true
,
ROWS_3
,
'90%'
);
print
$doleditor
->
Create
(
1
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment