Support for deposit invoices

This commit is contained in:
Laurent Destailleur 2009-03-02 16:06:52 +00:00
parent 2bc9e2ff08
commit d92ab8874b
3 changed files with 25 additions and 15 deletions

View File

@ -343,6 +343,13 @@ if ($_socid > 0)
$facturestatic->type=$obj->type; $facturestatic->type=$obj->type;
print $langs->trans("CreditNote").' '.$facturestatic->getNomURl(1); print $langs->trans("CreditNote").' '.$facturestatic->getNomURl(1);
} }
elseif ($obj->description == '(DEPOSIT)')
{
$facturestatic->id=$obj->fk_facture_source;
$facturestatic->ref=$obj->ref;
$facturestatic->type=$obj->type;
print $langs->trans("InvoiceDeposit").' '.$facturestatic->getNomURl(1);
}
else else
{ {
print $obj->description; print $obj->description;

View File

@ -2140,7 +2140,7 @@ else
print '</tr>'; print '</tr>';
} }
// Tiers Société // Third party
print '<tr><td>'.$langs->trans('Company').'</td>'; print '<tr><td>'.$langs->trans('Company').'</td>';
print '<td colspan="5">'.$soc->getNomUrl(1,'compta').'</td>'; print '<td colspan="5">'.$soc->getNomUrl(1,'compta').'</td>';
print '</tr>'; print '</tr>';
@ -2207,7 +2207,8 @@ else
// If validated, we show link "add credit note to payment" // If validated, we show link "add credit note to payment"
if ($fac->statut != 1 || $fac->type == 2 || $fac->type == 3) if ($fac->statut != 1 || $fac->type == 2 || $fac->type == 3)
{ {
print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie)).'. '; $text=$langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie));
print $html->textwithhelp($text,$langs->trans("CreditNoteDepositUse"));
} }
else else
{ {

View File

@ -145,12 +145,12 @@ class Form
} }
/** /**
\brief Affiche un texte avec picto help qui affiche un tooltip * \brief Affiche un texte avec picto help qui affiche un tooltip
\param text Texte à afficher * \param text Texte à afficher
\param htmltooltip Contenu html du tooltip * \param htmltooltip Contenu html du tooltip
\param direction 1=Le picto est après, -1=le picto est avant * \param direction 1=Le picto est après, -1=le picto est avant
\param usehelpcursor 1=Utilise curseur help, 0=Curseur par defaut * \param usehelpcursor 1=Utilise curseur help, 0=Curseur par defaut
\return string Code html du texte,picto * \return string Code html du texte,picto
*/ */
function textwithhelp($text,$htmltext,$direction=1,$usehelpcursor=1) function textwithhelp($text,$htmltext,$direction=1,$usehelpcursor=1)
{ {
@ -161,19 +161,21 @@ class Form
} }
/** /**
\brief Affiche un texte avec picto warning qui affiche un tooltip * \brief Affiche un texte avec picto warning qui affiche un tooltip
\param text Texte à afficher * \param text Texte à afficher
\param htmltooltip Contenu html du tooltip * \param htmltooltip Contenu html du tooltip
\param direction 1=Le picto est après, -1=le picto est avant * \param direction 1=Le picto est après, -1=le picto est avant
\return string Code html du texte,picto * \return string Code html du texte,picto
*/ */
function textwithwarning($text,$htmltext,$direction=1) function textwithwarning($text,$htmltext,$direction=1)
{ {
return $this->textwithtooltip($text,$htmltext,2,$direction,img_warning("")); global $conf;
$alt='';
if (empty($conf->use_javascript_ajax)) $alt='Help disabled (javascript disabled)';
return $this->textwithtooltip($text,$htmltext,2,$direction,img_warning($alt));
} }
/** /**
* \brief Retourne la liste déroulante des pays actifs, dans la langue de l'utilisateur * \brief Retourne la liste déroulante des pays actifs, dans la langue de l'utilisateur
* \param selected Id ou Code pays ou Libelle pays pré-sélectionné * \param selected Id ou Code pays ou Libelle pays pré-sélectionné