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');
43 require
'../../main.inc.php';
44 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
60 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));
64 if (
GETPOST(
'location_incoterms')) {
65 $return_arr = array();
68 $location_incoterms =
GETPOST(
'location_incoterms');
70 if (!empty($conf->global->MAIN_USE_LOCATION_INCOTERMS_DICTIONNARY)) {
71 $sql =
"SELECT z.location as location_incoterms, z.label as label";
72 $sql .=
" FROM ".MAIN_DB_PREFIX.
"c_location_incoterms as z";
73 $sql .=
" WHERE z.active = 1 AND UPPER(z.location) LIKE UPPER('%".$db->escape($location_incoterms).
"%')";
74 $sql .=
" ORDER BY z.location";
75 $sql .= $db->plimit(100);
78 $sql =
"SELECT DISTINCT s.location_incoterms FROM ".MAIN_DB_PREFIX.
'commande as s';
79 $sql .=
" WHERE UPPER(s.location_incoterms) LIKE UPPER('%".$db->escape($location_incoterms).
"%')";
86 $sql .=
" ORDER BY s.location_incoterms";
87 $sql .= $db->plimit(100);
94 while ($row = $db->fetch_array(
$resql)) {
95 $row_array[
'label'] = $row[
'location_incoterms'].($row[
'label']?
' - '.$row[
'label'] :
'');
96 if ($location_incoterms) {
97 $row_array[
'value'] = $row[
'location_incoterms'];
101 array_push($return_arr, $row_array);
105 echo json_encode($return_arr);
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("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->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
if(!defined('NOREQUIREMENU')) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.