FIX : getNomUrl()
This commit is contained in:
parent
c35a13bad0
commit
ae6e1db652
@ -41,6 +41,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
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/sociales/class/chargesociales.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/paymentvat.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.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.'/compta/tva/class/tva.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/salaries/class/paymentsalary.class.php';
|
||||||
@ -382,6 +384,8 @@ $loanstatic = new Loan($db);
|
|||||||
$memberstatic = new Adherent($db);
|
$memberstatic = new Adherent($db);
|
||||||
$paymentstatic = new Paiement($db);
|
$paymentstatic = new Paiement($db);
|
||||||
$paymentsupplierstatic = new PaiementFourn($db);
|
$paymentsupplierstatic = new PaiementFourn($db);
|
||||||
|
$paymentscstatic = new PaymentSocialContribution($db);
|
||||||
|
$paymentvatstatic = new PaymentVAT($db);
|
||||||
$paymentsalstatic = new PaymentSalary($db);
|
$paymentsalstatic = new PaymentSalary($db);
|
||||||
$paymentvariousstatic = new PaymentVarious($db);
|
$paymentvariousstatic = new PaymentVarious($db);
|
||||||
$donstatic = new Don($db);
|
$donstatic = new Don($db);
|
||||||
@ -1221,16 +1225,16 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
elseif ($links[$key]['type'] == 'payment_sc')
|
elseif ($links[$key]['type'] == 'payment_sc')
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$links[$key]['url_id'].'">';
|
$paymentscstatic->id = $links[$key]['url_id'];
|
||||||
print ' '.img_object($langs->trans('ShowPayment'), 'payment').' ';
|
$paymentscstatic->ref = $links[$key]['url_id'];
|
||||||
//print $langs->trans("SocialContributionPayment");
|
$paymentscstatic->label = $links[$key]['label'];
|
||||||
print '</a>';
|
print ' '.$paymentscstatic->getNomUrl(2);
|
||||||
}
|
}
|
||||||
elseif ($links[$key]['type'] == 'payment_vat')
|
elseif ($links[$key]['type'] == 'payment_vat')
|
||||||
{
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/payment_vat/card.php?id='.$links[$key]['url_id'].'">';
|
$paymentvatstatic->id = $links[$key]['url_id'];
|
||||||
print ' '.img_object($langs->trans('ShowPayment'), 'payment').' ';
|
$paymentvatstatic->ref = $links[$key]['url_id'];
|
||||||
print '</a>';
|
print ' '.$paymentvatstatic->getNomUrl(2);
|
||||||
}
|
}
|
||||||
elseif ($links[$key]['type'] == 'payment_salary')
|
elseif ($links[$key]['type'] == 'payment_salary')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -702,17 +702,31 @@ class PaymentSocialContribution extends CommonObject
|
|||||||
$result = '';
|
$result = '';
|
||||||
|
|
||||||
if (empty($this->ref)) $this->ref = $this->lib;
|
if (empty($this->ref)) $this->ref = $this->lib;
|
||||||
$label = $langs->trans("ShowPayment").': '.$this->ref;
|
|
||||||
|
|
||||||
if (!empty($this->id)) {
|
$label = img_picto('', $this->picto).' <u>'.$langs->trans("SocialContributionPayment").'</u>';
|
||||||
$link = '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||||
$linkend = '</a>';
|
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 (!empty($this->id)) {
|
||||||
if ($withpicto && $withpicto != 2) $result .= ' ';
|
$link = '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
if ($withpicto != 2) $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend;
|
$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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -703,17 +703,31 @@ class PaymentVAT extends CommonObject
|
|||||||
$result = '';
|
$result = '';
|
||||||
|
|
||||||
if (empty($this->ref)) $this->ref = $this->lib;
|
if (empty($this->ref)) $this->ref = $this->lib;
|
||||||
$label = $langs->trans("ShowPayment").': '.$this->ref;
|
|
||||||
|
|
||||||
if (!empty($this->id)) {
|
$label = img_picto('', $this->picto).' <u>'.$langs->trans("VATPayment").'</u>';
|
||||||
$link = '<a href="'.DOL_URL_ROOT.'/compta/payment_vat/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||||
$linkend = '</a>';
|
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 (!empty($this->id)) {
|
||||||
if ($withpicto && $withpicto != 2) $result .= ' ';
|
$link = '<a href="'.DOL_URL_ROOT.'/compta/payment_vat/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||||
if ($withpicto != 2) $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend;
|
$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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -739,6 +739,8 @@ class Tva extends CommonObject
|
|||||||
$label = '<u>'.$langs->trans("ShowVatPayment").'</u>';
|
$label = '<u>'.$langs->trans("ShowVatPayment").'</u>';
|
||||||
$label .= '<br>';
|
$label .= '<br>';
|
||||||
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||||
|
if (!empty($this->label))
|
||||||
|
$label .= '<br><b>'.$langs->trans('Label').':</b> '.$this->label;
|
||||||
|
|
||||||
$url = DOL_URL_ROOT.'/compta/tva/card.php?id='.$this->id;
|
$url = DOL_URL_ROOT.'/compta/tva/card.php?id='.$this->id;
|
||||||
|
|
||||||
|
|||||||
@ -259,6 +259,7 @@ if ($result)
|
|||||||
|
|
||||||
$tva_static->id = $obj->rowid;
|
$tva_static->id = $obj->rowid;
|
||||||
$tva_static->ref = $obj->rowid;
|
$tva_static->ref = $obj->rowid;
|
||||||
|
$tva_static->label = $obj->label;
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print "<td>".$tva_static->getNomUrl(1)."</td>\n";
|
print "<td>".$tva_static->getNomUrl(1)."</td>\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user