Début ajout de la gestion des adresses de livraison
This commit is contained in:
parent
c8cd2d6293
commit
e1f79bc604
@ -1588,7 +1588,7 @@ class Form
|
|||||||
*/
|
*/
|
||||||
function form_adresse_livraison($page, $selected='', $socid, $htmlname='adresse_livraison_id')
|
function form_adresse_livraison($page, $selected='', $socid, $htmlname='adresse_livraison_id')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs,$conf;
|
||||||
if ($htmlname != "none")
|
if ($htmlname != "none")
|
||||||
{
|
{
|
||||||
print '<form method="post" action="'.$page.'">';
|
print '<form method="post" action="'.$page.'">';
|
||||||
@ -1596,9 +1596,14 @@ class Form
|
|||||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||||
print '<table class="noborder" cellpadding="0" cellspacing="0">';
|
print '<table class="noborder" cellpadding="0" cellspacing="0">';
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
$this->select_adresse_livraison($selected, $_GET['socid'], $htmlname);
|
$numaddress = $this->select_adresse_livraison($selected, $_GET['socid'], $htmlname);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
|
if ($numaddress==0)
|
||||||
|
{
|
||||||
|
$langs->load("companies");
|
||||||
|
print ' <a href='.DOL_DOCUMENT_ROOT .'/comm/adresse_livraison.php?socid='.$socid.'&action=create>'.$langs->trans("AddAddress").'</a>';
|
||||||
|
}
|
||||||
print '</tr></table></form>';
|
print '</tr></table></form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user