forked from Wavyzz/dolibarr
NEW Better autoselect customer or supplier fields to save clicks
This commit is contained in:
@@ -1376,7 +1376,7 @@ if ($action == 'create')
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>' . "\n";
|
||||
|
||||
@@ -1492,7 +1492,7 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>' . "\n";
|
||||
|
||||
@@ -2256,7 +2256,7 @@ if ($action == 'create')
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>' . "\n";
|
||||
|
||||
@@ -1459,7 +1459,7 @@ if ($action=='create')
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=0&fournisseur=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
@@ -1487,7 +1487,7 @@ if ($action == 'create')
|
||||
});
|
||||
</script>';
|
||||
}
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=0&fournisseur=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@@ -1044,7 +1044,7 @@ else
|
||||
// Prospect/Customer
|
||||
print '<tr><td class="titlefieldcreate">'.fieldLabel('ProspectCustomer','customerprospect',1).'</td>';
|
||||
print '<td class="maxwidthonsmartphone">';
|
||||
$selected=isset($_POST['client'])?GETPOST('client'):$object->client;
|
||||
$selected=GETPOST('client','int')!=''?GETPOST('client','int'):$object->client;
|
||||
print '<select class="flat" name="client" id="customerprospect">';
|
||||
if (GETPOST("type") == '') print '<option value="-1"> </option>';
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="2"'.($selected==2?' selected':'').'>'.$langs->trans('Prospect').'</option>';
|
||||
@@ -1071,7 +1071,7 @@ else
|
||||
print '<td>'.fieldLabel('Supplier','fournisseur',1).'</td><td>';
|
||||
$default = -1;
|
||||
if (! empty($conf->global->THIRDPARTY_SUPPLIER_BY_DEFAULT)) $default=1;
|
||||
print $form->selectyesno("fournisseur", (isset($_POST['fournisseur'])?GETPOST('fournisseur'):(GETPOST("type") == '' ? $default : $object->fournisseur)), 1, 0, (GETPOST("type") == '' ? 1 : 0));
|
||||
print $form->selectyesno("fournisseur", (GETPOST('fournisseur','int')!=''?GETPOST('fournisseur','int'):(GETPOST("type",'alpha') == '' ? $default : $object->fournisseur)), 1, 0, (GETPOST("type",'alpha') == '' ? 1 : 0));
|
||||
print '</td>';
|
||||
print '<td>'.fieldLabel('SupplierCode','supplier_code').'</td><td>';
|
||||
print '<table class="nobordernopadding"><tr><td>';
|
||||
|
||||
@@ -1063,7 +1063,7 @@ if ($action == 'create')
|
||||
} else {
|
||||
print '<td colspan="2">';
|
||||
print $form->select_company('', 'socid', 's.fournisseur = 1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300');
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
|
||||
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=0&fournisseur=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'">'.$langs->trans("AddThirdParty").'</a>';
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>' . "\n";
|
||||
|
||||
Reference in New Issue
Block a user