65 public function select_type_socialcontrib($selected =
'', $htmlname =
'actioncode', $useempty = 0, $maxlen = 40, $help = 1, $morecss =
'minwidth300', $noerrorifempty = 0)
68 global $conf, $db, $langs, $user, $mysoc;
70 if (empty($mysoc->country_id) && empty($mysoc->country_code))
72 print $langs->trans(
"ErrorSetupOfCountryMustBeDone");
76 if (!empty($mysoc->country_id))
78 $sql =
"SELECT c.id, c.libelle as type";
79 $sql .=
" FROM ".MAIN_DB_PREFIX.
"c_chargesociales as c";
80 $sql .=
" WHERE c.active = 1";
81 $sql .=
" AND c.fk_pays = ".$mysoc->country_id;
82 $sql .=
" ORDER BY c.libelle ASC";
84 $sql =
"SELECT c.id, c.libelle as type";
85 $sql .=
" FROM ".MAIN_DB_PREFIX.
"c_chargesociales as c, ".MAIN_DB_PREFIX.
"c_country as co";
86 $sql .=
" WHERE c.active = 1 AND c.fk_pays = co.rowid";
87 $sql .=
" AND co.code = '".$this->db->escape($mysoc->country_code).
"'";
88 $sql .=
" ORDER BY c.libelle ASC";
91 dol_syslog(
"Form::select_type_socialcontrib", LOG_DEBUG);
98 print '<select class="'.($morecss ? $morecss :
'').
'" id="'.$htmlname.
'" name="'.$htmlname.
'">';
101 if ($useempty)
print '<option value="0"> </option>';
104 $obj = $this->
db->fetch_object(
$resql);
105 print '<option value="'.$obj->id.
'"';
106 if ($obj->id == $selected)
print ' selected';
107 print '>'.dol_trunc($obj->type, $maxlen);
111 if ($user->admin && $help)
print info_admin($langs->trans(
"YouCanChangeValuesForThisListFromDictionarySetup"), 1);
114 if (empty($noerrorifempty))
print $langs->trans(
"ErrorNoSocialContributionForSellerCountry", $mysoc->country_code);
ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $forcefocus=0, $widthTypeOfAutocomplete= 'resolve')
Convert a html select field into an ajax combobox.
$conf db
API class for accounts.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
print
Draft customers invoices.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin= '1', $morecss= '', $textfordropdown= '')
Show information for admin users or standard users.