Fix: Bad translation of payment type
This commit is contained in:
parent
2809631a4f
commit
be1ef0ccbe
@ -515,8 +515,9 @@ if ($account || $_GET["ref"])
|
||||
|
||||
// Payment type
|
||||
print "<td nowrap>";
|
||||
if ($objp->fk_type == 'SOLD') print ' ';
|
||||
else print $langs->trans("PaymentTypeShort".$objp->fk_type);
|
||||
$label=($langs->trans("PaymentTypeShort".$objp->fk_type)!="PaymentTypeShort".$objp->fk_type)?$langs->trans("PaymentTypeShort".$objp->fk_type):$objp->fk_type;
|
||||
if ($objp->fk_type == 'SOLD') $label=' ';
|
||||
print $label;
|
||||
print "</td>\n";
|
||||
print '<td nowrap>'.($objp->num_chq?$objp->num_chq:"")."</td>\n";
|
||||
|
||||
|
||||
@ -227,7 +227,9 @@ if ($resql)
|
||||
}
|
||||
|
||||
// Number
|
||||
print '<td nowrap="nowrap">'.$objp->type.($objp->num_chq?' '.$objp->num_chq:'').'</td>';
|
||||
$label=($langs->trans("PaymentType".$objp->type)!="PaymentType".$objp->type)?$langs->trans("PaymentType".$objp->type):$objp->type; // $objp->type is a code
|
||||
if ($label=='SOLD') $label='';
|
||||
print '<td nowrap="nowrap">'.$label.($objp->num_chq?' '.$objp->num_chq:'').'</td>';
|
||||
|
||||
// Description
|
||||
print '<td valign="center"><a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&account='.$acct->id.'">';
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
/**
|
||||
* \file htdocs/compta/facture.php
|
||||
* \ingroup facture
|
||||
* \brief Page de creation/visu facture
|
||||
* \brief Page to cree=ate/see an invoice
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
@ -1348,6 +1348,7 @@ $html = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* Mode creation
|
||||
@ -2395,8 +2396,9 @@ else
|
||||
*/
|
||||
|
||||
// Payments already done (from payment on this invoice)
|
||||
$sql = 'SELECT datep as dp, pf.amount,';
|
||||
$sql.= ' c.libelle as paiement_type, p.num_paiement, p.rowid';
|
||||
$sql = 'SELECT p.datep as dp, p.num_paiement, p.rowid,';
|
||||
$sql.= ' c.code as payment_code, c.libelle as payment_label,';
|
||||
$sql.= ' pf.amount';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiement as p, '.MAIN_DB_PREFIX.'c_paiement as c, '.MAIN_DB_PREFIX.'paiement_facture as pf';
|
||||
$sql.= ' WHERE pf.fk_facture = '.$fac->id.' AND p.fk_paiement = c.id AND pf.fk_paiement = p.rowid';
|
||||
$sql.= ' ORDER BY dp, tms';
|
||||
@ -2416,7 +2418,8 @@ else
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans('ShowPayment'),'payment').' ';
|
||||
print dol_print_date($db->jdate($objp->dp),'day').'</a></td>';
|
||||
print '<td>'.$objp->paiement_type.' '.$objp->num_paiement.'</td>';
|
||||
$label=($langs->trans("PaymentType".$objp->payment_code)!=("PaymentType".$objp->payment_code))?$langs->trans("PaymentType".$objp->payment_code):$obj->payment_label;
|
||||
print '<td>'.$label.' '.$objp->num_paiement.'</td>';
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user