diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index e98d0018e7a..20eb2dd35cb 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -458,13 +458,16 @@ class FormProjets if ($table_element == 'projet_task') return ''; // Special cas of element we never link to a project (already always done) $linkedtothirdparty=false; - if (! in_array($table_element, array('don','expensereport_det','expensereport'))) $linkedtothirdparty=true; + if (! in_array($table_element, array('don','expensereport_det','expensereport','loan'))) $linkedtothirdparty=true; $sqlfilter=''; $projectkey="fk_projet"; //print $table_element; switch ($table_element) { + case "loan": + $sql = "SELECT t.rowid, t.label as ref"; + break; case "facture": $sql = "SELECT t.rowid, t.facnumber as ref"; break; diff --git a/htdocs/langs/en_US/loan.lang b/htdocs/langs/en_US/loan.lang index de0a6fd0295..b45a70dff72 100644 --- a/htdocs/langs/en_US/loan.lang +++ b/htdocs/langs/en_US/loan.lang @@ -43,6 +43,7 @@ LoanCalcDesc=This mortgage calculator can be used to figure out monthly p GoToInterest=%s will go towards INTEREST GoToPrincipal=%s will go towards PRINCIPAL YouWillSpend=You will spend %s in year %s +ListLoanAssociatedProject=List of loan associated with the project # Admin ConfigLoan=Configuration of the module loan LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Accounting account capital by default diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 0ed39ead170..bb51cf3b8f1 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -24,8 +24,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; -/** \class Loan - * \brief Class to manage loan +/** + * Loan */ class Loan extends CommonObject { @@ -404,7 +404,7 @@ class Loan extends CommonObject * @param int $maxlen Label max length * @return string Chaine with URL */ - function getLinkUrl($withpicto=0,$maxlen=0) + function getNomUrl($withpicto=0,$maxlen=0) { global $langs; diff --git a/htdocs/loan/index.php b/htdocs/loan/index.php index a03abce6350..289bd8dbee4 100644 --- a/htdocs/loan/index.php +++ b/htdocs/loan/index.php @@ -157,7 +157,7 @@ if ($resql) print "