FIX : getNomUrl()
This commit is contained in:
parent
e6bea60409
commit
bed723aec0
@ -44,7 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
||||
@ -384,7 +384,7 @@ $memberstatic = new Adherent($db);
|
||||
$paymentstatic = new Paiement($db);
|
||||
$paymentsupplierstatic = new PaiementFourn($db);
|
||||
$paymentvatstatic = new TVA($db);
|
||||
$paymentsalstatic = new Salary($db);
|
||||
$paymentsalstatic = new PaymentSalary($db);
|
||||
$paymentvariousstatic = new PaymentVarious($db);
|
||||
$donstatic = new Don($db);
|
||||
$paymentexpensereportstatic = new PaymentExpenseReport($db);
|
||||
@ -1307,6 +1307,9 @@ if ($resql)
|
||||
elseif ($links[$key]['type'] == 'sc')
|
||||
{
|
||||
}
|
||||
elseif ($links[$key]['type'] == 'salary')
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
// Show link with label $links[$key]['label']
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/sociales/class/paymentsocialcontribution.class.php
|
||||
* \file htdocs/salaries/class/paymentsalary.class.php
|
||||
* \ingroup facture
|
||||
* \brief File of class to manage payment of social contributions
|
||||
* \brief File of class to manage payment of salaries
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
||||
@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Class to manage payments of social contributions
|
||||
* Class to manage payments of salaries
|
||||
*/
|
||||
class PaymentSalary extends CommonObject
|
||||
{
|
||||
@ -107,7 +107,7 @@ class PaymentSalary extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Create payment of social contribution into database.
|
||||
* Create payment of salary into database.
|
||||
* Use this->amounts to have list of lines for the payment
|
||||
*
|
||||
* @param User $user User making payment
|
||||
@ -127,7 +127,7 @@ class PaymentSalary extends CommonObject
|
||||
// Validate parametres
|
||||
if (!$this->datepaye)
|
||||
{
|
||||
$this->error = 'ErrorBadValueForParameterCreatePaymentSocialContrib';
|
||||
$this->error = 'ErrorBadValueForParameterCreatePaymentSalary';
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ class PaymentSalary extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
$result = $this->call_trigger('PAYMENTSOCIALCONTRIBUTION_CREATE', $user);
|
||||
$result = $this->call_trigger('PAYMENTSALARY_CREATE', $user);
|
||||
if ($result < 0) $error++;
|
||||
|
||||
if ($totalamount != 0 && !$error)
|
||||
@ -436,7 +436,7 @@ class PaymentSalary extends CommonObject
|
||||
{
|
||||
$error = 0;
|
||||
|
||||
$object = new PaymentSocialContribution($this->db);
|
||||
$object = new PaymentSalary($this->db);
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@ -704,17 +704,31 @@ class PaymentSalary extends CommonObject
|
||||
$result = '';
|
||||
|
||||
if (empty($this->ref)) $this->ref = $this->lib;
|
||||
$label = $langs->trans("ShowPayment").': '.$this->ref;
|
||||
|
||||
if (!empty($this->id)) {
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/salaries/payment_salary/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$linkend = '</a>';
|
||||
$label = img_picto('', $this->picto).' <u>'.$langs->trans("SalaryPayment").'</u>';
|
||||
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
if (!empty($this->label)) {
|
||||
$labeltoshow = $this->label;
|
||||
$reg = array();
|
||||
if (preg_match('/^\((.*)\)$/i', $this->label, $reg))
|
||||
{
|
||||
// Label generique car entre parentheses. On l'affiche en le traduisant
|
||||
if ($reg[1] == 'paiement') $reg[1] = 'Payment';
|
||||
$labeltoshow = $langs->trans($reg[1]);
|
||||
}
|
||||
$label .= '<br><b>'.$langs->trans('Label').':</b> '.$labeltoshow;
|
||||
}
|
||||
if ($this->datep) $label .= '<br><b>'.$langs->trans('Date').':</b> '.dol_print_date($this->datep, 'day');
|
||||
|
||||
if ($withpicto) $result .= ($link.img_object($label, 'payment', 'class="classfortooltip"').$linkend.' ');
|
||||
if ($withpicto && $withpicto != 2) $result .= ' ';
|
||||
if ($withpicto != 2) $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend;
|
||||
}
|
||||
if (!empty($this->id)) {
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/salaries/payment_salary/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$linkend = '</a>';
|
||||
|
||||
return $result;
|
||||
}
|
||||
if ($withpicto) $result .= ($link.img_object($label, 'payment', 'class="classfortooltip"').$linkend.' ');
|
||||
if ($withpicto && $withpicto != 2) $result .= ' ';
|
||||
if ($withpicto != 2) $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -542,7 +542,7 @@ class Salary extends CommonObject
|
||||
|
||||
$result = '';
|
||||
|
||||
$label = '<u>'.$langs->trans("ShowSalaryPayment").'</u>';
|
||||
$label = '<u>'.$langs->trans("Salary").'</u>';
|
||||
$label .= '<br>';
|
||||
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user