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
7b6e6007
Commit
7b6e6007
authored
7 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
FIX id of user not saved when making a payment of expense report
parent
4290be7e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/expensereport/class/paymentexpensereport.class.php
+9
-9
9 additions, 9 deletions
htdocs/expensereport/class/paymentexpensereport.class.php
htdocs/expensereport/payment/payment.php
+3
-3
3 additions, 3 deletions
htdocs/expensereport/payment/payment.php
with
12 additions
and
12 deletions
htdocs/expensereport/class/paymentexpensereport.class.php
+
9
−
9
View file @
7b6e6007
...
...
@@ -479,7 +479,7 @@ class PaymentExpenseReport extends CommonObject
$total
=
$this
->
total
;
if
(
$mode
==
'payment_expensereport'
)
$amount
=
$total
;
// Insert payment into llx_bank
$bank_line_id
=
$acc
->
addline
(
$this
->
datepaid
,
...
...
@@ -516,25 +516,25 @@ class PaymentExpenseReport extends CommonObject
dol_print_error
(
$this
->
db
);
}
}
// Add link 'user' in bank_url between user and bank transaction
if
(
!
$error
)
{
foreach
(
$this
->
amounts
as
$key
=>
$value
)
// We should have always same
third party
but we loop in case of.
foreach
(
$this
->
amounts
as
$key
=>
$value
)
// We should have always same
user
but we loop in case of.
{
if
(
$mode
==
'payment_expensereport'
)
{
$er
=
new
ExpenseReport
(
$this
->
db
);
$er
->
fetch
(
$key
);
$er
->
fetch_user
(
$er
->
fk_user_author
);
$
fus
er
=
new
User
(
$this
->
db
);
$
fus
er
->
fetch
(
$key
);
$result
=
$acc
->
add_url_line
(
$bank_line_id
,
$
er
->
user
->
id
,
$
f
user
->
id
,
DOL_URL_ROOT
.
'/user/card.php?id='
,
$
er
->
user
->
getFullName
(
$langs
),
$
f
user
->
getFullName
(
$langs
),
'user'
);
if
(
$result
<=
0
)
if
(
$result
<=
0
)
{
$this
->
error
=
$this
->
db
->
lasterror
();
dol_syslog
(
get_class
(
$this
)
.
'::addPaymentToBank '
.
$this
->
error
);
...
...
This diff is collapsed.
Click to expand it.
htdocs/expensereport/payment/payment.php
+
3
−
3
View file @
7b6e6007
...
...
@@ -78,7 +78,7 @@ if ($action == 'add_payment')
setEventMessages
(
$langs
->
trans
(
"ErrorFieldRequired"
,
$langs
->
transnoentities
(
"AccountToDebit"
)),
null
,
'errors'
);
$error
++
;
}
if
(
!
$error
)
{
$paymentid
=
0
;
...
...
@@ -176,7 +176,7 @@ if (GETPOST("action") == 'create')
print
'<input type="hidden" name="id" value="'
.
$chid
.
'">'
;
print
'<input type="hidden" name="chid" value="'
.
$chid
.
'">'
;
print
'<input type="hidden" name="action" value="add_payment">'
;
dol_fiche_head
();
print
'<table cellspacing="0" class="border" width="100%" cellpadding="2">'
;
...
...
@@ -225,7 +225,7 @@ if (GETPOST("action") == 'create')
$form
->
select_comptes
(
isset
(
$_POST
[
"accountid"
])
?
$_POST
[
"accountid"
]
:
$expensereport
->
accountid
,
"accountid"
,
0
,
''
,
1
);
// Show open bank account list
print
'</td></tr>'
;
}
// Number
print
'<tr><td>'
.
$langs
->
trans
(
'Numero'
);
print
' <em>('
.
$langs
->
trans
(
"ChequeOrTransferNumber"
)
.
')</em>'
;
...
...
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