New: Change preselected value when creating a third party to save clicks.
This commit is contained in:
parent
b05373a5bc
commit
1891932ac8
@ -181,6 +181,8 @@ class Societe extends CommonObject
|
|||||||
$this->error = $langs->trans("ErrorBadEMail",$this->email);
|
$this->error = $langs->trans("ErrorBadEMail",$this->email);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if (empty($this->client)) $this->client=0;
|
||||||
|
if (empty($this->fournisseur)) $this->fournisseur=0;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
|||||||
@ -558,10 +558,11 @@ else
|
|||||||
/*
|
/*
|
||||||
* Company Fact creation mode
|
* Company Fact creation mode
|
||||||
*/
|
*/
|
||||||
if ($_GET["type"]=='f') { $soc->fournisseur=1; }
|
//if ($_GET["type"]=='cp') { $soc->client=3; }
|
||||||
|
if ($_GET["type"]!='f') $soc->client=3;
|
||||||
if ($_GET["type"]=='c') { $soc->client=1; }
|
if ($_GET["type"]=='c') { $soc->client=1; }
|
||||||
if ($_GET["type"]=='p') { $soc->client=2; }
|
if ($_GET["type"]=='p') { $soc->client=2; }
|
||||||
if ($_GET["type"]=='cp') { $soc->client=3; }
|
if ($conf->fournisseur->enabled && ($_GET["type"]=='f' || $_GET["type"]=='')) { $soc->fournisseur=1; }
|
||||||
if ($_REQUEST["private"]==1) { $soc->particulier=1; }
|
if ($_REQUEST["private"]==1) { $soc->particulier=1; }
|
||||||
|
|
||||||
$soc->nom=$_POST["nom"];
|
$soc->nom=$_POST["nom"];
|
||||||
@ -717,6 +718,8 @@ else
|
|||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
if ($conf->fournisseur->enabled)
|
||||||
|
{
|
||||||
// Supplier
|
// Supplier
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td><span class="fieldrequired">'.$langs->trans('Supplier').'</span></td><td>';
|
print '<td><span class="fieldrequired">'.$langs->trans('Supplier').'</span></td><td>';
|
||||||
@ -731,7 +734,6 @@ else
|
|||||||
$s=$modCodeFournisseur->getToolTip($langs,$soc,1);
|
$s=$modCodeFournisseur->getToolTip($langs,$soc,1);
|
||||||
print $form->textwithpicto('',$s,1);
|
print $form->textwithpicto('',$s,1);
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Category
|
// Category
|
||||||
@ -749,6 +751,7 @@ else
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Barcode
|
// Barcode
|
||||||
if ($conf->global->MAIN_MODULE_BARCODE)
|
if ($conf->global->MAIN_MODULE_BARCODE)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user