Add SOCIETE_SHOW_VAT_IN_LIST option to let the possibility to display (and search) VAT number in list of 'societe'
This commit is contained in:
parent
06eb138b47
commit
2889af9fae
@ -1268,6 +1268,7 @@ class Form
|
||||
$selected_input_value = $societetmp->name;
|
||||
unset($societetmp);
|
||||
}
|
||||
|
||||
// mode 1
|
||||
$urloption = 'htmlname='.urlencode($htmlname).'&outjson=1&filter='.urlencode($filter).(empty($excludeids) ? '' : '&excludeids='.join(',', $excludeids)).($showtype ? '&showtype='.urlencode($showtype) : '');
|
||||
$out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions);
|
||||
@ -1443,6 +1444,10 @@ class Form
|
||||
$label .= ' ('.$obj->name_alias.')';
|
||||
}
|
||||
|
||||
if ($conf->global->SOCIETE_SHOW_VAT_IN_LIST && !empty($obj->tva_intra)) {
|
||||
$label .= ' - '.$obj->tva_intra.'';
|
||||
}
|
||||
|
||||
if ($showtype) {
|
||||
if ($obj->client || $obj->fournisseur) {
|
||||
$label .= ' (';
|
||||
|
||||
@ -1041,7 +1041,7 @@ DictionaryFees=Expense report - Types of expense report lines
|
||||
DictionarySendingMethods=Shipping methods
|
||||
DictionaryStaff=Number of Employees
|
||||
DictionaryAvailability=Delivery delay
|
||||
DictionaryOrderMethods=Ordering methods
|
||||
DictionaryOrderMethods=Orderinsg methods
|
||||
DictionarySource=Origin of proposals/orders
|
||||
DictionaryAccountancyCategory=Personalized groups for reports
|
||||
DictionaryAccountancysystem=Models for chart of accounts
|
||||
@ -1348,6 +1348,7 @@ BrowserIsKO=You are using the %s web browser. This browser is known to be a bad
|
||||
PHPModuleLoaded=PHP component %s is loaded
|
||||
PreloadOPCode=Preloaded OPCode is used
|
||||
AddRefInList=Display Customer/Vendor ref. info list (select list or combobox) and most of hyperlink.<br>Third Parties will appear with a name format of "CC12345 - SC45678 - The Big Company corp." instead of "The Big Company corp".
|
||||
AddVatInList=Display Customer/Vendor VAT number. info list (select list or combobox).
|
||||
AddAdressInList=Display Customer/Vendor adress info list (select list or combobox)<br>Third Parties will appear with a name format of "The Big Company corp. - 21 jump street 123456 Big town - USA" instead of "The Big Company corp".
|
||||
AddEmailPhoneTownInContactList=Display Contact email (or phones if not defined) and town info list (select list or combobox)<br>Contacts will appear with a name format of "Dupond Durand - dupond.durand@email.com - Paris" or "Dupond Durand - 06 07 59 65 66 - Paris" instead of "Dupond Durand".
|
||||
AskForPreferredShippingMethod=Ask for preferred shipping method for Third Parties.
|
||||
|
||||
@ -1341,6 +1341,7 @@ BrowserIsKO=Vous utilisez le navigateur %s. Ce navigateur est déconseillé pour
|
||||
PHPModuleLoaded=Le composant PHP %s est chargé
|
||||
PreloadOPCode=Le code OP préchargé est utilisé
|
||||
AddRefInList=Afficher les références client/fournisseur dans les listes (listes déroulantes ou à autocomplétion) et les libellés des liens clicables.<br>Les tiers apparaîtront alors sous la forme "CC12345 - SC45678 - La big company coorp", au lieu de "La big company coorp".
|
||||
AddVatInList=Afficher le numéro de TVA client/fournisseur dans les listes (listes déroulantes ou à autocomplétion).
|
||||
AddAdressInList=Affiche les informations sur l’adresse du client/fournisseur (liste de sélection ou liste déroulante) <br> Les tiers apparaîtront avec le format de nom suivant: "The Big Company corp. - 21, rue du saut 123456 Big town - USA" au lieu de "The Big Company corp".
|
||||
AddEmailPhoneTownInContactList=Afficher l'adresse e-mail du contact (ou les téléphones si non définis) et la ville <br> Les contacts apparaîtront avec un nom au format "Dupond Durand - dupond.durand@email.com - Paris" ou "Dupond Durand - 06 07 59 65 66 - Paris" au lieu de "Dupond Durand".
|
||||
AskForPreferredShippingMethod=Demander la méthode d'expédition préférée pour les Tiers
|
||||
|
||||
@ -183,6 +183,20 @@ if ($action == "setaddrefinlist") {
|
||||
}
|
||||
}
|
||||
|
||||
//Activate Set vat in list
|
||||
if ($action == "setvatinlist") {
|
||||
$setvatinlist = GETPOST('value', 'int');
|
||||
$res = dolibarr_set_const($db, "SOCIETE_SHOW_VAT_IN_LIST", $setvatinlist, 'yesno', 0, '', $conf->entity);
|
||||
if (!($res > 0)) {
|
||||
$error++;
|
||||
}
|
||||
if (!$error) {
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
//Activate Set adress in list
|
||||
if ($action == "setaddadressinlist") {
|
||||
$val = GETPOST('value', 'int');
|
||||
@ -776,6 +790,20 @@ if (!empty($conf->global->SOCIETE_ADD_REF_IN_LIST)) {
|
||||
print '</a></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="80%">'.$langs->trans("AddVatInList").'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td class="center">';
|
||||
if (!empty($conf->global->SOCIETE_SHOW_VAT_IN_LIST)) {
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setvatinlist&token='.newToken().'&value=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
} else {
|
||||
print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setvatinlist&token='.newToken().'&value=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
}
|
||||
print '</a></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="80%">'.$langs->trans("AddAdressInList").'</td>';
|
||||
print '<td> </td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user