Fix: complete labels of operation if bank journal
This commit is contained in:
parent
a8ad9fb77d
commit
47cb9aef50
@ -271,7 +271,8 @@ if ($result) {
|
|||||||
|
|
||||||
if ($links[$key]['type'] == 'payment') {
|
if ($links[$key]['type'] == 'payment') {
|
||||||
$paymentstatic->id = $links[$key]['url_id'];
|
$paymentstatic->id = $links[$key]['url_id'];
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
|
$paymentstatic->ref = $links[$key]['url_id'];
|
||||||
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2, '', ''); // TODO Do not include list of invoice in tooltip, the dol_string_nohtmltag is ko with this
|
||||||
$tabpay[$obj->rowid]["paymentid"] = $paymentstatic->id;
|
$tabpay[$obj->rowid]["paymentid"] = $paymentstatic->id;
|
||||||
} else if ($links[$key]['type'] == 'payment_supplier') {
|
} else if ($links[$key]['type'] == 'payment_supplier') {
|
||||||
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
||||||
@ -320,11 +321,12 @@ if ($result) {
|
|||||||
}
|
}
|
||||||
} else if ($links[$key]['type'] == 'payment_donation') {
|
} else if ($links[$key]['type'] == 'payment_donation') {
|
||||||
$paymentdonstatic->id = $links[$key]['url_id'];
|
$paymentdonstatic->id = $links[$key]['url_id'];
|
||||||
|
$paymentdonstatic->ref = $links[$key]['url_id'];
|
||||||
$paymentdonstatic->fk_donation = $links[$key]['url_id'];
|
$paymentdonstatic->fk_donation = $links[$key]['url_id'];
|
||||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentdonstatic->getNomUrl(2);
|
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentdonstatic->getNomUrl(2);
|
||||||
$tabpay[$obj->rowid]["paymentdonationid"] = $paymentdonstatic->id;
|
$tabpay[$obj->rowid]["paymentdonationid"] = $paymentdonstatic->id;
|
||||||
$tabtp[$obj->rowid][$account_pay_donation] += $obj->amount;
|
$tabtp[$obj->rowid][$account_pay_donation] += $obj->amount;
|
||||||
} else if ($links[$key]['type'] == 'payment_vat') {
|
} else if ($links[$key]['type'] == 'payment_vat') { // Payment VAT
|
||||||
$paymentvatstatic->id = $links[$key]['url_id'];
|
$paymentvatstatic->id = $links[$key]['url_id'];
|
||||||
$paymentvatstatic->ref = $links[$key]['url_id'];
|
$paymentvatstatic->ref = $links[$key]['url_id'];
|
||||||
$paymentvatstatic->label = $links[$key]['label'];
|
$paymentvatstatic->label = $links[$key]['label'];
|
||||||
@ -428,11 +430,10 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
{
|
{
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = $langs->trans("Bank");
|
$reflabel = '';
|
||||||
$reflabel.= ' '.$val['bank_account_ref'];
|
if (! empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib']) . " - ";
|
||||||
if (! empty($val['soclib'])) {
|
$reflabel.= $langs->trans("Bank").' '.dol_string_nohtmltag($val['bank_account_ref']);
|
||||||
$reflabel .= " - " . dol_string_nohtmltag($val['soclib']);
|
if (! empty($val['soclib'])) $reflabel .= " - " . dol_string_nohtmltag($val['soclib']);
|
||||||
}
|
|
||||||
|
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
@ -486,7 +487,9 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = dol_string_nohtmltag($val['soclib']);
|
$reflabel = '';
|
||||||
|
if (! empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib']) . ($val['soclib']?" - ":"");
|
||||||
|
$reflabel.= dol_string_nohtmltag($val['soclib']);
|
||||||
|
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
@ -586,7 +589,9 @@ if (! $error && $action == 'writebookkeeping') {
|
|||||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = 'WaitingAccount';
|
$reflabel = '';
|
||||||
|
if (! empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib']) . " - ";
|
||||||
|
$reflabel.= dol_string_nohtmltag('WaitingAccount');
|
||||||
|
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
$bookkeeping->doc_date = $val["date"];
|
$bookkeeping->doc_date = $val["date"];
|
||||||
@ -717,11 +722,10 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = $langs->trans("Bank");
|
$reflabel = '';
|
||||||
$reflabel.= ' '.$val['bank_account_ref'];
|
if (! empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib']) . " - ";
|
||||||
if (! empty($val['soclib'])) {
|
$reflabel.= $langs->trans("Bank").' '.dol_string_nohtmltag($val['bank_account_ref']);
|
||||||
$reflabel .= " - " . dol_string_nohtmltag($val['soclib']);
|
if (! empty($val['soclib'])) $reflabel .= " - " . dol_string_nohtmltag($val['soclib']);
|
||||||
}
|
|
||||||
|
|
||||||
print '"' . $key . '"' . $sep;
|
print '"' . $key . '"' . $sep;
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
@ -743,7 +747,9 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = dol_string_nohtmltag($val['soclib']);
|
$reflabel = '';
|
||||||
|
if (! empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib']) . ($val['soclib']?" - ":"");
|
||||||
|
$reflabel.= dol_string_nohtmltag($val['soclib']);
|
||||||
|
|
||||||
print '"' . $key . '"' . $sep;
|
print '"' . $key . '"' . $sep;
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
@ -773,7 +779,9 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
|||||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = 'WaitingAccount';
|
$reflabel = '';
|
||||||
|
if (! empty($val['lib'])) $reflabel .= dol_string_nohtmltag($val['lib']) . " - ";
|
||||||
|
$reflabel.= dol_string_nohtmltag('WaitingAccount');
|
||||||
|
|
||||||
print '"' . $key . '"' . $sep;
|
print '"' . $key . '"' . $sep;
|
||||||
print '"' . $date . '"' . $sep;
|
print '"' . $date . '"' . $sep;
|
||||||
@ -904,11 +912,10 @@ if (empty($action) || $action == 'view') {
|
|||||||
{
|
{
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = $langs->trans("Bank");
|
$reflabel = '';
|
||||||
$reflabel.= ' '.$val['bank_account_ref'];
|
if (! empty($val['lib'])) $reflabel .= $val['lib'] . " - ";
|
||||||
if (! empty($val['soclib'])) {
|
$reflabel.= $langs->trans("Bank").' '.$val['bank_account_ref'];
|
||||||
$reflabel .= " - " . $val['soclib'];
|
if (! empty($val['soclib'])) $reflabel .= " - " . $val['soclib'];
|
||||||
}
|
|
||||||
|
|
||||||
//var_dump($tabpay[$key]);
|
//var_dump($tabpay[$key]);
|
||||||
print '<!-- Bank bank.rowid='.$key.' type='.$tabpay[$key]['type'].' ref='.$tabpay[$key]['ref'].'-->';
|
print '<!-- Bank bank.rowid='.$key.' type='.$tabpay[$key]['type'].' ref='.$tabpay[$key]['ref'].'-->';
|
||||||
@ -949,7 +956,9 @@ if (empty($action) || $action == 'view') {
|
|||||||
foreach ( $tabtp[$key] as $k => $mt ) {
|
foreach ( $tabtp[$key] as $k => $mt ) {
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = $val['soclib'];
|
$reflabel = '';
|
||||||
|
if (! empty($val['lib'])) $reflabel .= $val['lib'] . ($val['soclib']?" - ":"");
|
||||||
|
$reflabel.= $val['soclib'];
|
||||||
|
|
||||||
print '<!-- Thirdparty bank.rowid='.$key.' -->';
|
print '<!-- Thirdparty bank.rowid='.$key.' -->';
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
@ -1024,7 +1033,9 @@ if (empty($action) || $action == 'view') {
|
|||||||
foreach ( $tabbq[$key] as $k => $mt ) {
|
foreach ( $tabbq[$key] as $k => $mt ) {
|
||||||
if ($mt)
|
if ($mt)
|
||||||
{
|
{
|
||||||
$reflabel = 'WaitingAccount';
|
$reflabel = '';
|
||||||
|
if (! empty($val['lib'])) $reflabel .= $val['lib'] . " - ";
|
||||||
|
$reflabel.= 'WaitingAccount';
|
||||||
|
|
||||||
print '<!-- Wait bank.rowid='.$key.' -->';
|
print '<!-- Wait bank.rowid='.$key.' -->';
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|||||||
@ -1042,12 +1042,15 @@ class Paiement extends CommonObject
|
|||||||
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||||
* @param string $option Sur quoi pointe le lien
|
* @param string $option Sur quoi pointe le lien
|
||||||
* @param string $mode 'withlistofinvoices'=Include list of invoices into tooltip
|
* @param string $mode 'withlistofinvoices'=Include list of invoices into tooltip
|
||||||
|
* @param int $notooltip 1=Disable tooltip
|
||||||
* @return string Chaine avec URL
|
* @return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option='',$mode='withlistofinvoices')
|
function getNomUrl($withpicto=0, $option='', $mode='withlistofinvoices', $notooltip=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
|
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
$label = $langs->trans("ShowPayment").': '.$this->ref;
|
$label = $langs->trans("ShowPayment").': '.$this->ref;
|
||||||
if ($mode == 'withlistofinvoices')
|
if ($mode == 'withlistofinvoices')
|
||||||
@ -1064,12 +1067,31 @@ class Paiement extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$link = '<a href="'.DOL_URL_ROOT.'/compta/paiement/card.php?id='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
|
||||||
|
$linkclose='';
|
||||||
|
if (empty($notooltip))
|
||||||
|
{
|
||||||
|
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
|
||||||
|
{
|
||||||
|
$label=$langs->trans("ShowMyObject");
|
||||||
|
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||||
|
}
|
||||||
|
$linkclose.=' title="'.dol_escape_htmltag($label, 1).'"';
|
||||||
|
$linkclose.=' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
|
||||||
|
}
|
||||||
|
else $linkclose = ($morecss?' class="'.$morecss.'"':'');
|
||||||
|
|
||||||
|
$url = DOL_URL_ROOT.'/compta/paiement/card.php?id='.$this->id;
|
||||||
|
|
||||||
|
$linkstart = '<a href="'.$url.'"';
|
||||||
|
$linkstart.=$linkclose.'>';
|
||||||
$linkend='</a>';
|
$linkend='</a>';
|
||||||
|
|
||||||
if ($withpicto) $result.=($link.img_object($langs->trans("ShowPayment"), 'payment', 'class="classfortooltip"').$linkend);
|
$result .= $linkstart;
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
|
||||||
if ($withpicto != 2) $result.=$link.($this->ref?$this->ref:$this->id).$linkend;
|
if ($withpicto && $withpicto != 2) $result.= $this->ref;
|
||||||
|
$result .= $linkend;
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -655,9 +655,11 @@ class Tva extends CommonObject
|
|||||||
* @param int $notooltip 1=Disable tooltip
|
* @param int $notooltip 1=Disable tooltip
|
||||||
* @return string Chaine with URL
|
* @return string Chaine with URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0, $option='', $notooltip=0)
|
function getNomUrl($withpicto=0, $option='', $notooltip=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs, $conf;
|
||||||
|
|
||||||
|
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
|
||||||
|
|
||||||
$result='';
|
$result='';
|
||||||
$label=$langs->trans("ShowVatPayment").': '.$this->ref;
|
$label=$langs->trans("ShowVatPayment").': '.$this->ref;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user