From 7b9ba4bd26313a3010cb02552e9fa33ebf61e032 Mon Sep 17 00:00:00 2001 From: frederic34 Date: Sun, 29 Mar 2015 13:37:17 +0200 Subject: [PATCH] debug payment --- htdocs/loan/class/paymentloan.class.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index a4e5aa4ad61..5c24621d802 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -445,16 +445,11 @@ class PaymentLoan extends CommonObject } // Add link 'company' in bank_url between invoice and bank transaction (for each invoice concerned by payment) - $linkaddedforthirdparty=array(); - foreach ($this->amounts as $key => $value) + //$linkaddedforthirdparty=array(); + if ($mode == 'payment_loan') { - if ($mode == 'payment_loan') - { - $loan = new Loan($this->db); - $loan->fetch($key); - $result=$acc->add_url_line($bank_line_id, $loan->id, DOL_URL_ROOT.'/loan/card.php?id=', $loan->type_libelle.(($loan->lib && $loan->lib!=$loan->type_libelle)?' ('.$loan->lib.')':''),'loan'); - if ($result <= 0) dol_print_error($this->db); - } + $result=$acc->add_url_line($bank_line_id, $this->id, DOL_URL_ROOT.'/loan/card.php?id=', $this->type_libelle.(($this->label && $this->label!=$this->type_libelle)?' ('.$this->label.')':''),'loan'); + if ($result <= 0) dol_print_error($this->db); } } else