26 if (!defined(
'NOTOKENRENEWAL')) {
27 define(
'NOTOKENRENEWAL', 1);
29 if (!defined(
'NOREQUIREMENU')) {
30 define(
'NOREQUIREMENU',
'1');
32 if (!defined(
'NOREQUIREHTML')) {
33 define(
'NOREQUIREHTML',
'1');
35 if (!defined(
'NOREQUIREAJAX')) {
36 define(
'NOREQUIREAJAX',
'1');
38 if (!defined(
'NOREQUIRESOC')) {
39 define(
'NOREQUIRESOC',
'1');
41 if (!defined(
'NOCSRFCHECK')) {
42 define(
'NOCSRFCHECK',
'1');
45 require
'../../main.inc.php';
46 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
62 dol_syslog(
'location_incoterms call with MAIN_USE_LOCATION_INCOTERMS_DICTIONNARY='.(empty($conf->global->MAIN_USE_LOCATION_INCOTERMS_DICTIONNARY) ?
'' : $conf->global->MAIN_USE_LOCATION_INCOTERMS_DICTIONNARY));
66 if (
GETPOST(
'location_incoterms')) {
67 $return_arr = array();
70 $location_incoterms =
GETPOST(
'location_incoterms');
72 if (!empty($conf->global->MAIN_USE_LOCATION_INCOTERMS_DICTIONNARY)) {
73 $sql =
"SELECT z.location as location_incoterms, z.label as label";
74 $sql .=
" FROM ".MAIN_DB_PREFIX.
"c_location_incoterms as z";
75 $sql .=
" WHERE z.active = 1 AND UPPER(z.location) LIKE UPPER('%".$db->escape($location_incoterms).
"%')";
76 $sql .=
" ORDER BY z.location";
77 $sql .= $db->plimit(100);
80 $sql =
"SELECT DISTINCT s.location_incoterms FROM ".MAIN_DB_PREFIX.
'commande as s';
81 $sql .=
" WHERE UPPER(s.location_incoterms) LIKE UPPER('%".$db->escape($location_incoterms).
"%')";
88 $sql .=
" ORDER BY s.location_incoterms";
89 $sql .= $db->plimit(100);
96 while ($row = $db->fetch_array(
$resql)) {
97 $row_array[
'label'] = $row[
'location_incoterms'].($row[
'label']?
' - '.$row[
'label'] :
'');
98 if ($location_incoterms) {
99 $row_array[
'value'] = $row[
'location_incoterms'];
103 array_push($return_arr, $row_array);
107 echo json_encode($return_arr);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if(!defined('NOREQUIREMENU')) if(!function_exists("llxHeader")) top_httphead($contenttype= 'text/html', $forcenocache=0)
Show HTTP header.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
if(isModEnabled('facture')&&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur')&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)&&$user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice')&&$user->rights->supplier_invoice->lire)) if(isModEnabled('don')&&!empty($user->rights->don->lire)) if(isModEnabled('tax')&&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture')&&isModEnabled('commande')&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.