2
0
forked from Wavyzz/dolibarr

Duplicate link in transaction account view

This commit is contained in:
Laurent Destailleur
2008-10-02 23:08:14 +00:00
parent ddcd75e1f5
commit cacb4f094a
8 changed files with 59 additions and 26 deletions

View File

@@ -380,7 +380,7 @@ if ($account || $_GET["ref"])
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="3">&nbsp;</td>'; print '<td colspan="3">&nbsp;</td>';
print '<td><input type="text" class="flat" name="req_desc" value="'.$_REQUEST["req_desc"].'" size="24"></td>'; print '<td><input type="text" class="flat" name="req_desc" value="'.$_REQUEST["req_desc"].'" size="24"></td>';
print '<td><input type="text" class="flat" name="thirdparty" value="'.$_REQUEST["thirdparty"].'" size="16"></td>'; print '<td><input type="text" class="flat" name="thirdparty" value="'.$_REQUEST["thirdparty"].'" size="14"></td>';
print '<td align="right"><input type="text" class="flat" name="req_debit" value="'.$_REQUEST["req_debit"].'" size="4"></td>'; print '<td align="right"><input type="text" class="flat" name="req_debit" value="'.$_REQUEST["req_debit"].'" size="4"></td>';
print '<td align="right"><input type="text" class="flat" name="req_credit" value="'.$_REQUEST["req_credit"].'" size="4"></td>'; print '<td align="right"><input type="text" class="flat" name="req_credit" value="'.$_REQUEST["req_credit"].'" size="4"></td>';
print '<td align="center">&nbsp;</td>'; print '<td align="center">&nbsp;</td>';
@@ -459,34 +459,46 @@ if ($account || $_GET["ref"])
} }
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print "<td nowrap>".dolibarr_print_date($objp->do,"day")."</td>\n"; print "<td nowrap>".dolibarr_print_date($objp->do,"day")."</td>\n";
print "<td nowrap>&nbsp;".dolibarr_print_date($objp->dv,"day")."</td>\n"; print "<td nowrap>&nbsp;".dolibarr_print_date($objp->dv,"day")."</td>\n";
print "<td nowrap>&nbsp;".$objp->fk_type." ".($objp->num_chq?$objp->num_chq:"")."</td>\n"; print "<td nowrap>&nbsp;".$objp->fk_type." ".($objp->num_chq?$objp->num_chq:"")."</td>\n";
print '<td><a href="ligne.php?rowid='.$objp->rowid.'&amp;account='.$acct->id.'">';
if (eregi('^\((.*)\)$',$objp->label,$reg)) // Description
{ print '<td>';
// Label g<>n<EFBFBD>rique car entre parenth<74>ses. On l'affiche en le traduisant
print $langs->trans($reg[1]); $links = $acct->get_url($objp->rowid);
}
else $isbanktransfert=false;
{ foreach($links as $key=>$val) { if ($val['type']=='banktransfert') $isbanktransfert=true; }
print $objp->label;
if (sizeof($links) == 0 || $isbanktransfert)
{
if (eregi('^\((.*)\)$',$objp->label,$reg))
{
// Label g<>n<EFBFBD>rique car entre parenth<74>ses. On l'affiche en le traduisant
print $langs->trans($reg[1]);
}
else
{
print $objp->label;
}
} }
print '</a>';
/* /*
* Ajout les liens autres que tiers * Ajout les liens autres que tiers
*/ */
$links = $acct->get_url($objp->rowid);
foreach($links as $key=>$val) foreach($links as $key=>$val)
{ {
if ($links[$key]['type']=='payment') { if ($links[$key]['type']=='payment') {
print ' - '; //print ' - ';
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$links[$key]['url_id'].'">'; print '<a href="'.DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$links[$key]['url_id'].'">';
if (eregi('^\((.*)\)$',$links[$key]['label'],$reg)) if (eregi('^\((.*)\)$',$links[$key]['label'],$reg))
{ {
// Label g<>n<EFBFBD>rique car entre parenth<74>ses. On l'affiche en le traduisant // Label g<>n<EFBFBD>rique car entre parenth<74>ses. On l'affiche en le traduisant
if ($reg[1]=='paiement') $reg[1]='Payment'; if ($reg[1]=='paiement') $reg[1]='CustomerInvoicePayment';
print $langs->trans($reg[1]); print $langs->trans($reg[1]);
} }
else else
@@ -496,12 +508,12 @@ if ($account || $_GET["ref"])
print '</a>'; print '</a>';
} }
else if ($links[$key]['type']=='payment_supplier') { else if ($links[$key]['type']=='payment_supplier') {
print ' - '; //print ' - ';
print '<a href="'.DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$links[$key]['url_id'].'">'; print '<a href="'.DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$links[$key]['url_id'].'">';
if (eregi('^\((.*)\)$',$links[$key]['label'],$reg)) if (eregi('^\((.*)\)$',$links[$key]['label'],$reg))
{ {
// Label g<>n<EFBFBD>rique car entre parenth<74>ses. On l'affiche en le traduisant // Label g<>n<EFBFBD>rique car entre parenth<74>ses. On l'affiche en le traduisant
if ($reg[1]=='paiement') $reg[1]='Payment'; if ($reg[1]=='paiement') $reg[1]='SupplierInvoicePayment';
print $langs->trans($reg[1]); print $langs->trans($reg[1]);
} }
else else
@@ -515,25 +527,19 @@ if ($account || $_GET["ref"])
else if ($links[$key]['type']=='sc') { else if ($links[$key]['type']=='sc') {
} }
else if ($links[$key]['type']=='payment_sc') { else if ($links[$key]['type']=='payment_sc') {
print ' - '; //print ' - ';
print '<a href="'.DOL_URL_ROOT.'/compta/sociales/xxx.php?id='.$links[$key]['url_id'].'">'; print '<a href="'.DOL_URL_ROOT.'/compta/sociales/xxx.php?id='.$links[$key]['url_id'].'">';
//print img_object($langs->trans('ShowPayment'),'payment').' '; //print img_object($langs->trans('ShowPayment'),'payment').' ';
print $langs->trans("SocialContributionPayment"); print $langs->trans("SocialContributionPayment");
print '</a>'; print '</a>';
} }
else if ($links[$key]['type']=='banktransfert') { else if ($links[$key]['type']=='banktransfert') {
/* Do not show this link (avoid confusion). Can be accessed from transaction detail. /* Do not show this link (avoid confusion). Can already be accessed from transaction detail */
print ' - ';
print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$links[$key]['url_id'].'">';
//print img_object($langs->trans('ShowPayment'),'payment').' ';
print $langs->trans("TransactionWithOtherAccount");
print '</a>';
*/
} }
else if ($links[$key]['type']=='member') { else if ($links[$key]['type']=='member') {
} }
else { else {
print ' - '; //print ' - ';
print '<a href="'.$links[$key]['url'].$links[$key]['url_id'].'">'; print '<a href="'.$links[$key]['url'].$links[$key]['url_id'].'">';
if (eregi('^\((.*)\)$',$links[$key]['label'],$reg)) if (eregi('^\((.*)\)$',$links[$key]['label'],$reg))
{ {
@@ -611,7 +617,11 @@ if ($account || $_GET["ref"])
// Relev<65> rappro ou lien edition // Relev<65> rappro ou lien edition
if ($objp->rappro && $acct->type != 2) // Si non compte cash if ($objp->rappro && $acct->type != 2) // Si non compte cash
{ {
print "<td align=\"center\" nowrap>&nbsp; "; print "<td align=\"center\" nowrap>";
print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&amp;account='.$acct->id.'&amp;page='.$page.'">';
print img_view();
print '</a>';
print "&nbsp; ";
print "<a href=\"releve.php?num=$objp->num_releve&amp;account=$acct->id\">$objp->num_releve</a>"; print "<a href=\"releve.php?num=$objp->num_releve&amp;account=$acct->id\">$objp->num_releve</a>";
print "</td>"; print "</td>";
} }
@@ -622,6 +632,12 @@ if ($account || $_GET["ref"])
{ {
print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&amp;account='.$acct->id.'&amp;page='.$page.'">'; print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&amp;account='.$acct->id.'&amp;page='.$page.'">';
print img_edit(); print img_edit();
print '</a>';
}
else
{
print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&amp;account='.$acct->id.'&amp;page='.$page.'">';
print img_view();
print '</a>'; print '</a>';
} }
print '&nbsp;'; print '&nbsp;';

View File

@@ -987,6 +987,23 @@ function img_edit($alt = "default", $float=0, $other='')
return $img; return $img;
} }
/**
\brief Affiche logo voir fiche
\param alt Texte sur le alt de l'image
\param float Si il faut y mettre le style "float: right"
\return string Retourne tag img
*/
function img_view($alt = "default", $float=0, $other='')
{
global $conf,$langs;
if ($alt=="default") $alt=$langs->trans("View");
$img='<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/view.png" border="0" alt="'.$alt.'" title="'.$alt.'"';
if ($float) $img.=' style="float: right"';
if ($other) $img.=' '.$other;
$img.='>';
return $img;
}
/** /**
\brief Affiche logo effacer \brief Affiche logo effacer
\param alt Texte sur le alt de l'image \param alt Texte sur le alt de l'image

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB