To change a bill owner if mistaking

This parameters should be used for troubleshooting using FACTURE_CHANGE_THIRDPARTY
This commit is contained in:
Philippe Grand
2011-06-29 15:48:02 +00:00
parent 3a4079446b
commit 9156bb719c
2 changed files with 64 additions and 6 deletions

View File

@@ -31,7 +31,7 @@
* \file htdocs/core/class/html.form.class.php
* \ingroup core
* \brief File of class with all html predefined components
* \version $Id: html.form.class.php,v 1.183 2011/06/29 11:22:36 eldy Exp $
* \version $Id: html.form.class.php,v 1.184 2011/06/29 15:48:03 grandoc Exp $
*/
@@ -2511,6 +2511,42 @@ class Form
}
}
}
/**
* \brief Affiche formulaire de selection des tiers
* \param page Page
* \param selected Id contact pre-selectionne
* \param htmlname Nom du formulaire select
*/
function form_thirdparty($page, $selected='', $htmlname='socid')
{
global $langs;
if ($htmlname != "none")
{
print '<form method="post" action="'.$page.'">';
print '<input type="hidden" name="action" value="set_thirdparty">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
print '<tr><td>';
$num=$this->select_societes($selected , $htmlname);
print '</td>';
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print '</tr></table></form>';
}
else
{
if ($selected)
{
require_once(DOL_DOCUMENT_ROOT ."/societe/class/societe.class.php");
$soc = new Societe($this->db);
$soc->fetch($selected);
print $soc->getNomUrl($langs);
} else {
print "&nbsp;";
}
}
}
/**
* \brief Affiche formulaire de selection de l'adresse