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
1beaf003
Commit
1beaf003
authored
8 years ago
by
aspangaro
Browse files
Options
Downloads
Patches
Plain Diff
Fix #5875: Links to loans are incorrect in the bank account transactions tab
parent
380ab8bf
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/loan/class/paymentloan.class.php
+5
-5
5 additions, 5 deletions
htdocs/loan/class/paymentloan.class.php
htdocs/loan/payment/payment.php
+1
-1
1 addition, 1 deletion
htdocs/loan/payment/payment.php
with
6 additions
and
6 deletions
htdocs/loan/class/paymentloan.class.php
+
5
−
5
View file @
1beaf003
<?php
/* Copyright (C) 2014
Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2014
-2016
Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -385,6 +385,7 @@ class PaymentLoan extends CommonObject
* All payment properties must have been set first like after a call to create().
*
* @param User $user Object of user making payment
* @param int $fk_loan Id of fk_loan to do link with this payment
* @param string $mode 'payment_loan'
* @param string $label Label to use in bank record
* @param int $accountid Id of bank account to do link with
...
...
@@ -392,7 +393,7 @@ class PaymentLoan extends CommonObject
* @param string $emetteur_banque Name of bank
* @return int <0 if KO, >0 if OK
*/
function
addPaymentToBank
(
$user
,
$mode
,
$label
,
$accountid
,
$emetteur_nom
,
$emetteur_banque
)
function
addPaymentToBank
(
$user
,
$fk_loan
,
$mode
,
$label
,
$accountid
,
$emetteur_nom
,
$emetteur_banque
)
{
global
$conf
;
...
...
@@ -445,11 +446,10 @@ class PaymentLoan extends CommonObject
}
}
// Add link 'company' in bank_url between invoice and bank transaction (for each invoice concerned by payment)
//$linkaddedforthirdparty=array();
// Add link 'loan' in bank_url between invoice and bank transaction (for each invoice concerned by payment)
if
(
$mode
==
'payment_loan'
)
{
$result
=
$acc
->
add_url_line
(
$bank_line_id
,
$
this
->
id
,
DOL_URL_ROOT
.
'/loan/card.php?id='
,
(
$this
->
label
?
$this
->
label
:
''
),
'loan'
);
$result
=
$acc
->
add_url_line
(
$bank_line_id
,
$
fk_loan
,
DOL_URL_ROOT
.
'/loan/card.php?id='
,
(
$this
->
label
?
$this
->
label
:
''
),
'loan'
);
if
(
$result
<=
0
)
dol_print_error
(
$this
->
db
);
}
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/loan/payment/payment.php
+
1
−
1
View file @
1beaf003
...
...
@@ -116,7 +116,7 @@ if ($action == 'add_payment')
if
(
!
$error
)
{
$result
=
$payment
->
addPaymentToBank
(
$user
,
'payment_loan'
,
'(LoanPayment)'
,
GETPOST
(
'accountid'
,
'int'
),
''
,
''
);
$result
=
$payment
->
addPaymentToBank
(
$user
,
$chid
,
'payment_loan'
,
'(LoanPayment)'
,
GETPOST
(
'accountid'
,
'int'
),
''
,
''
);
if
(
!
$result
>
0
)
{
setEventMessages
(
$payment
->
error
,
$payment
->
errors
,
'errors'
);
...
...
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