PEAR FunctionCallSignature
This commit is contained in:
parent
580e5c42d2
commit
1e43f8e54a
@ -345,12 +345,6 @@
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket">
|
||||
<severity>0</severity>
|
||||
|
||||
@ -173,7 +173,7 @@ while ($obj = $db->fetch_object($resql)) {
|
||||
|
||||
$sql.= $db->plimit($limit+1, $offset);
|
||||
|
||||
dol_syslog ( "/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG );
|
||||
dol_syslog ("/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
@ -183,7 +183,7 @@ if (! $resql)
|
||||
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
dol_syslog ( "/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG );
|
||||
dol_syslog ("/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
@ -475,7 +475,7 @@ class AccountancyExport
|
||||
// elarifr: date format must be fixed format : 6 char ddmmyy = %d%m%yand not defined by user / dolibarr setting
|
||||
if (! empty($data->date_echeance))
|
||||
//$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
|
||||
$Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y' ); // elarifr: format must be ddmmyy
|
||||
$Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y'); // elarifr: format must be ddmmyy
|
||||
else
|
||||
$Tab['date_echeance'] = '000000';
|
||||
|
||||
|
||||
@ -633,12 +633,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["refsologest"] . '"' . $sep;
|
||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ). '"' . $sep;
|
||||
print '"' . utf8_decode (dol_trunc($companystatic->name, 32)). '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $langs->trans("Thirdparty") . '"' . $sep;
|
||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Thirdparty") . '"' . $sep;
|
||||
print '"' . utf8_decode (dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Thirdparty") . '"' . $sep;
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep;
|
||||
print '"' . $journal . '"' ;
|
||||
@ -654,12 +654,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["refsologest"] . '"' . $sep;
|
||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep;
|
||||
print '"' . utf8_decode (dol_trunc($companystatic->name, 32)) . '"' . $sep;
|
||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||
print '""' . $sep;
|
||||
print '"' . utf8_decode ( dol_trunc($accountingaccount->label, 32) ) . '"' . $sep;
|
||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
|
||||
print '"' . utf8_decode (dol_trunc($accountingaccount->label, 32)) . '"' . $sep;
|
||||
print '"' . utf8_decode (dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
|
||||
print '"' . $journal . '"' ;
|
||||
@ -679,12 +679,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["refsologest"] . '"' . $sep;
|
||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep;
|
||||
print '"' . utf8_decode (dol_trunc($companystatic->name, 32)) . '"' . $sep;
|
||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
|
||||
print '""' . $sep;
|
||||
print '"' . $langs->trans("VAT") . ' - ' . $def_tva[$key] . '"' . $sep;
|
||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . join(', ', $def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
|
||||
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . join(', ', $def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
|
||||
print '"' . $journal . '"' ;
|
||||
@ -700,12 +700,12 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
|
||||
print '"' . $key . '"' . $sep;
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["refsologest"] . '"' . $sep;
|
||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ). '"' . $sep;
|
||||
print '"' . utf8_decode (dol_trunc($companystatic->name, 32)). '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
|
||||
print '"' . $langs->trans("Thirdparty") . '"' . $sep;
|
||||
print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . ' NPR"' . $sep;
|
||||
print '"' . utf8_decode (dol_trunc($companystatic->name, 16)) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . ' NPR"' . $sep;
|
||||
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
|
||||
print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep;
|
||||
print '"' . $journal . '"' ;
|
||||
|
||||
@ -1297,7 +1297,7 @@ else
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Categories
|
||||
if (! empty( $conf->categorie->enabled ) && !empty( $user->rights->categorie->lire ))
|
||||
if (! empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire))
|
||||
{
|
||||
print '<tr><td>' . $form->editfieldkey("Categories", 'memcats', '', $object, 0) . '</td>';
|
||||
print '<td>';
|
||||
|
||||
@ -608,7 +608,7 @@ if ($rowid > 0)
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre( $langs->trans("Name")." / ".$langs->trans("Company"), $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"), $_SERVER["PHP_SELF"], "d.lastname", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Login", $_SERVER["PHP_SELF"], "d.login", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Nature", $_SERVER["PHP_SELF"], "d.morphy", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("EMail", $_SERVER["PHP_SELF"], "d.email", $param, "", "", $sortfield, $sortorder);
|
||||
|
||||
@ -493,7 +493,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print '<tr class="oddeven"><td><label for="profid2">'.$langs->transcountry("ProfId2", $mysoc->country_code).'</label></td><td>';
|
||||
if (! empty($mysoc->country_code))
|
||||
{
|
||||
print '<input name="siret" id="profid2" class="minwidth200" value="' . dol_escape_htmltag(! empty($conf->global->MAIN_INFO_SIRET) ? $conf->global->MAIN_INFO_SIRET : '' ) . '">';
|
||||
print '<input name="siret" id="profid2" class="minwidth200" value="' . dol_escape_htmltag(! empty($conf->global->MAIN_INFO_SIRET) ? $conf->global->MAIN_INFO_SIRET : '') . '">';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -262,12 +262,12 @@ class Dolistore
|
||||
if ($this->version_compare($product->dolibarr_min, DOL_VERSION) <= 0) {
|
||||
if ($this->version_compare($product->dolibarr_max, DOL_VERSION) >= 0) {
|
||||
//compatible
|
||||
$version = '<span class="compatible">'.$langs->trans('CompatibleUpTo', $product->dolibarr_max,
|
||||
$version = '<span class="compatible">'.$langs->trans('CompatibleUpTo', $product->dolibarr_max,
|
||||
$product->dolibarr_min, $product->dolibarr_max).'</span>';
|
||||
$compatible = '';
|
||||
} else {
|
||||
//never compatible, module expired
|
||||
$version = '<span class="notcompatible">'.$langs->trans('NotCompatible', DOL_VERSION,
|
||||
$version = '<span class="notcompatible">'.$langs->trans('NotCompatible', DOL_VERSION,
|
||||
$product->dolibarr_min, $product->dolibarr_max).'</span>';
|
||||
$compatible = 'NotCompatible';
|
||||
}
|
||||
|
||||
@ -207,7 +207,7 @@ elseif ($action == 'set_FICHINTER_PRINT_PRODUCTS')
|
||||
}
|
||||
} elseif ($action == 'set_FICHINTER_USE_SERVICE_DURATION') {
|
||||
$val = GETPOST('FICHINTER_USE_SERVICE_DURATION', 'alpha');
|
||||
$res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '',
|
||||
$res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '',
|
||||
$conf->entity);
|
||||
|
||||
if (!$res > 0) {
|
||||
|
||||
@ -170,7 +170,7 @@ elseif ($action == 'set_SUPPLIER_ORDER_OTHER')
|
||||
{
|
||||
$freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT', 'none'); // No alpha here, we want exact string
|
||||
$doubleapproval = GETPOST('SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED', 'alpha');
|
||||
$doubleapproval = price2num($doubleapproval );
|
||||
$doubleapproval = price2num($doubleapproval);
|
||||
|
||||
$res1 = dolibarr_set_const($db, "SUPPLIER_ORDER_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
|
||||
$res2 = dolibarr_set_const($db, "SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED", $doubleapproval, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
@ -281,7 +281,7 @@ if ($mode == 'overwrite')
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre( $langs->trans("Language").' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Language").' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Key", $_SERVER["PHP_SELF"], 'transkey', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("NewTranslationStringToShow", $_SERVER["PHP_SELF"], 'transvalue', '', $param, '', $sortfield, $sortorder);
|
||||
//if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity"),$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder);
|
||||
@ -470,7 +470,7 @@ if ($mode == 'searchkey')
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre( $langs->trans("Language").' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder).'</td>';
|
||||
print_liste_field_titre($langs->trans("Language").' (en_US, es_MX, ...)', $_SERVER["PHP_SELF"], 'lang,transkey', '', $param, '', $sortfield, $sortorder).'</td>';
|
||||
print_liste_field_titre("Key", $_SERVER["PHP_SELF"], 'transkey', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("CurrentTranslationString", $_SERVER["PHP_SELF"], 'transvalue', '', $param, '', $sortfield, $sortorder);
|
||||
//if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre("Entity",$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder);
|
||||
|
||||
@ -161,7 +161,7 @@ class BlockedLogAuthority
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."blockedlog_authority as b";
|
||||
|
||||
if ($id) $sql.= " WHERE b.rowid = ". $id;
|
||||
elseif($signature)$sql.= " WHERE b.signature = '". $this->db->escape( $signature ) ."'" ;
|
||||
elseif($signature)$sql.= " WHERE b.signature = '". $this->db->escape($signature) ."'" ;
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@ -394,7 +394,7 @@ class BlockedLog
|
||||
// Add more fields to exclude depending on object type
|
||||
if ($this->element == 'cashcontrol')
|
||||
{
|
||||
$arrayoffieldstoexclude = array_merge($arrayoffieldstoexclude, array(
|
||||
$arrayoffieldstoexclude = array_merge($arrayoffieldstoexclude, array(
|
||||
'name','lastname','firstname','region','region_id','region_code','state','state_id','state_code','country','country_id','country_code',
|
||||
'total_ht','total_tva','total_ttc','total_localtax1','total_localtax2',
|
||||
'barcode_type','barcode_type_code','barcode_type_label','barcode_type_coder','mode_reglement_id','cond_reglement_id','mode_reglement','cond_reglement','shipping_method_id',
|
||||
@ -459,7 +459,7 @@ class BlockedLog
|
||||
$lineid++;
|
||||
foreach($tmpline as $keyline => $valueline)
|
||||
{
|
||||
if (! in_array($keyline, array(
|
||||
if (! in_array($keyline, array(
|
||||
'ref','multicurrency_code','multicurrency_total_ht','multicurrency_total_tva','multicurrency_total_ttc','qty','product_type','vat_src_code','tva_tx','info_bits','localtax1_tx','localtax2_tx','total_ht','total_tva','total_ttc','total_localtax1','total_localtax2'
|
||||
))) continue; // Discard if not into a dedicated list
|
||||
|
||||
@ -575,7 +575,7 @@ class BlockedLog
|
||||
foreach($tmpobject->thirdparty as $key=>$value)
|
||||
{
|
||||
if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties
|
||||
if (! in_array($key, array(
|
||||
if (! in_array($key, array(
|
||||
'name','name_alias','ref_ext','address','zip','town','state_code','country_code','idprof1','idprof2','idprof3','idprof4','idprof5','idprof6','phone','fax','email','barcode',
|
||||
'tva_intra', 'localtax1_assuj', 'localtax1_value', 'localtax2_assuj', 'localtax2_value', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur'
|
||||
))) continue; // Discard if not into a dedicated list
|
||||
@ -592,7 +592,7 @@ class BlockedLog
|
||||
foreach($tmpobject as $key=>$value)
|
||||
{
|
||||
if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties
|
||||
if (! in_array($key, array(
|
||||
if (! in_array($key, array(
|
||||
'ref','ref_client','ref_supplier','date','datef','type','total_ht','total_tva','total_ttc','localtax1','localtax2','revenuestamp','datepointoftax','note_public'
|
||||
))) continue; // Discard if not into a dedicated list
|
||||
if (!is_object($value))
|
||||
|
||||
@ -701,10 +701,10 @@ class Categorie extends CommonObject
|
||||
// For backward compatibility
|
||||
if ($type == 'societe') {
|
||||
$type = 'customer';
|
||||
dol_syslog( get_class( $this ) . "::del_type(): type 'societe' is deprecated, please use 'customer' instead", LOG_WARNING);
|
||||
dol_syslog(get_class($this) . "::del_type(): type 'societe' is deprecated, please use 'customer' instead", LOG_WARNING);
|
||||
} elseif ($type == 'fournisseur') {
|
||||
$type = 'supplier';
|
||||
dol_syslog( get_class( $this ) . "::del_type(): type 'fournisseur' is deprecated, please use 'supplier' instead", LOG_WARNING);
|
||||
dol_syslog(get_class($this) . "::del_type(): type 'fournisseur' is deprecated, please use 'supplier' instead", LOG_WARNING);
|
||||
}
|
||||
|
||||
$this->db->begin();
|
||||
@ -758,7 +758,7 @@ class Categorie extends CommonObject
|
||||
$sql = "SELECT c.fk_" . $this->MAP_CAT_FK[$type];
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "categorie_" . $this->MAP_CAT_TABLE[$type] . " as c";
|
||||
$sql .= ", " . MAIN_DB_PREFIX . $this->MAP_OBJ_TABLE[$type] . " as o";
|
||||
$sql .= " WHERE o.entity IN (" . getEntity( $obj->element).")";
|
||||
$sql .= " WHERE o.entity IN (" . getEntity($obj->element).")";
|
||||
$sql.= " AND c.fk_categorie = ".$this->id;
|
||||
$sql .= " AND c.fk_" . $this->MAP_CAT_FK[$type] . " = o.rowid";
|
||||
|
||||
@ -775,7 +775,7 @@ class Categorie extends CommonObject
|
||||
else
|
||||
{
|
||||
$obj = new $this->MAP_OBJ_CLASS[$type]( $this->db );
|
||||
$obj->fetch( $rec['fk_' . $this->MAP_CAT_FK[$type]]);
|
||||
$obj->fetch($rec['fk_' . $this->MAP_CAT_FK[$type]]);
|
||||
$objs[] = $obj;
|
||||
}
|
||||
}
|
||||
@ -1008,7 +1008,7 @@ class Categorie extends CommonObject
|
||||
if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= ", t.label as label_trans, t.description as description_trans";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."categorie as c";
|
||||
if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$current_lang."'";
|
||||
$sql .= " WHERE c.entity IN (" . getEntity( 'category') . ")";
|
||||
$sql .= " WHERE c.entity IN (" . getEntity('category') . ")";
|
||||
$sql .= " AND c.type = " . $type;
|
||||
|
||||
dol_syslog(get_class($this)."::get_full_arbo get category list", LOG_DEBUG);
|
||||
@ -1418,7 +1418,7 @@ class Categorie extends CommonObject
|
||||
$sql = "SELECT ct.fk_categorie, c.label, c.rowid";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "categorie_" . $this->MAP_CAT_TABLE[$type] . " as ct, " . MAIN_DB_PREFIX . "categorie as c";
|
||||
$sql .= " WHERE ct.fk_categorie = c.rowid AND ct.fk_" . $this->MAP_CAT_FK[$type] . " = " . (int) $id . " AND c.type = " . $this->MAP_ID[$type];
|
||||
$sql .= " AND c.entity IN (" . getEntity( 'category') . ")";
|
||||
$sql .= " AND c.entity IN (" . getEntity('category') . ")";
|
||||
|
||||
$res = $this->db->query($sql);
|
||||
if ($res)
|
||||
@ -1470,16 +1470,16 @@ class Categorie extends CommonObject
|
||||
// For backward compatibility
|
||||
if (is_numeric($type)) {
|
||||
// We want to reverse lookup
|
||||
$map_type = array_flip( $this->MAP_ID );
|
||||
$map_type = array_flip($this->MAP_ID);
|
||||
$type = $map_type[$type];
|
||||
dol_syslog( get_class( $this ) . "::rechercher(): numeric types are deprecated, please use string instead",
|
||||
dol_syslog( get_class($this) . "::rechercher(): numeric types are deprecated, please use string instead",
|
||||
LOG_WARNING );
|
||||
}
|
||||
|
||||
// Generation requete recherche
|
||||
$sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "categorie";
|
||||
$sql .= " WHERE type = " . $this->MAP_ID[$type];
|
||||
$sql .= " AND entity IN (" . getEntity( 'category') . ")";
|
||||
$sql .= " AND entity IN (" . getEntity('category') . ")";
|
||||
if ($nom)
|
||||
{
|
||||
if (! $exact)
|
||||
|
||||
@ -77,7 +77,7 @@ if (isset($_FILES['userfile']) && $_FILES['userfile']['size'] > 0 && $_POST["sen
|
||||
{
|
||||
if(empty($file['tmp_name'][$i]) || intval($conf->global->MAIN_UPLOAD_DOC) * 1000 <= filesize($file['tmp_name'][$i]) )
|
||||
{
|
||||
setEventMessage($file['name'][$i] .' : '. $langs->trans(empty($file['tmp_name'][$i])? 'ErrorFailedToSaveFile' : 'MaxSizeForUploadedFiles' ) );
|
||||
setEventMessage($file['name'][$i] .' : '. $langs->trans(empty($file['tmp_name'][$i])? 'ErrorFailedToSaveFile' : 'MaxSizeForUploadedFiles'));
|
||||
unset($file['name'][$i], $file['type'][$i], $file['tmp_name'][$i], $file['error'][$i], $file['size'][$i]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -487,7 +487,7 @@ if ($object->id > 0)
|
||||
$langs->load("categories");
|
||||
print '<tr><td>' . $langs->trans("CustomersCategoriesShort") . '</td>';
|
||||
print '<td>';
|
||||
print $form->showCategories( $object->id, 'customer', 1 );
|
||||
print $form->showCategories($object->id, 'customer', 1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@ -64,17 +64,17 @@ class FormAdvTargetEmailing extends Form
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "c_prospectlevel";
|
||||
$sql .= " WHERE active > 0";
|
||||
$sql .= " ORDER BY sortorder";
|
||||
dol_syslog ( get_class( $this ) . '::multiselectProspectionStatus sql=' . $sql, LOG_DEBUG );
|
||||
$resql = $this->db->query( $sql );
|
||||
dol_syslog (get_class($this) . '::multiselectProspectionStatus sql=' . $sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows( $resql );
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
while ( $i < $num ) {
|
||||
$obj = $this->db->fetch_object( $resql );
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$level = $langs->trans( $obj->code );
|
||||
$level = $langs->trans($obj->code);
|
||||
if ($level == $obj->code)
|
||||
$level = $langs->trans( $obj->label );
|
||||
$level = $langs->trans($obj->label);
|
||||
$options_array[$obj->code] = $level;
|
||||
|
||||
$i ++;
|
||||
@ -120,10 +120,10 @@ class FormAdvTargetEmailing extends Form
|
||||
$foundselected = false;
|
||||
|
||||
while ($i < $num) {
|
||||
$obj = $this->db->fetch_object ( $resql );
|
||||
$obj = $this->db->fetch_object ($resql);
|
||||
$countryArray [$i] ['rowid'] = $obj->rowid;
|
||||
$countryArray [$i] ['code_iso'] = $obj->code_iso;
|
||||
$countryArray [$i] ['label'] = ($obj->code_iso && $langs->transnoentitiesnoconv("Country" . $obj->code_iso ) != "Country" . $obj->code_iso ? $langs->transnoentitiesnoconv ( "Country" . $obj->code_iso ) : ($obj->label != '-' ? $obj->label : ''));
|
||||
$countryArray [$i] ['label'] = ($obj->code_iso && $langs->transnoentitiesnoconv("Country" . $obj->code_iso) != "Country" . $obj->code_iso ? $langs->transnoentitiesnoconv ("Country" . $obj->code_iso) : ($obj->label != '-' ? $obj->label : ''));
|
||||
$label[$i] = $countryArray[$i]['label'];
|
||||
$i ++;
|
||||
}
|
||||
@ -166,25 +166,25 @@ class FormAdvTargetEmailing extends Form
|
||||
$sql_usr .= " WHERE u2.entity IN (0," . $conf->entity . ")";
|
||||
$sql_usr .= " AND u2.rowid = sc.fk_user ";
|
||||
|
||||
if (! empty ( $conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX ))
|
||||
if (! empty ($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX))
|
||||
$sql_usr .= " AND u2.statut<>0 ";
|
||||
$sql_usr .= " ORDER BY name ASC";
|
||||
// print $sql_usr;exit;
|
||||
|
||||
$resql_usr = $this->db->query ( $sql_usr );
|
||||
$resql_usr = $this->db->query ($sql_usr);
|
||||
if ($resql_usr) {
|
||||
while ( $obj_usr = $this->db->fetch_object ( $resql_usr ) ) {
|
||||
while ( $obj_usr = $this->db->fetch_object ($resql_usr) ) {
|
||||
|
||||
$label = $obj_usr->firstname . " " . $obj_usr->name . " (" . $obj_usr->login . ')';
|
||||
|
||||
$options_array [$obj_usr->rowid] = $label;
|
||||
}
|
||||
$this->db->free ( $resql_usr );
|
||||
$this->db->free ($resql_usr);
|
||||
} else {
|
||||
dol_print_error ( $this->db );
|
||||
dol_print_error ($this->db);
|
||||
}
|
||||
|
||||
return $this->advMultiselectarray ( $htmlname, $options_array, $selected_array );
|
||||
return $this->advMultiselectarray ($htmlname, $options_array, $selected_array);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -227,8 +227,8 @@ class FormAdvTargetEmailing extends Form
|
||||
|
||||
if (is_array($sqlqueryparam))
|
||||
{
|
||||
$param_list = array_keys ( $sqlqueryparam );
|
||||
$InfoFieldList = explode ( ":", $param_list [0] );
|
||||
$param_list = array_keys ($sqlqueryparam);
|
||||
$InfoFieldList = explode (":", $param_list [0]);
|
||||
|
||||
// 0 1 : tableName
|
||||
// 1 2 : label field name Nom du champ contenant le libelle
|
||||
@ -237,8 +237,8 @@ class FormAdvTargetEmailing extends Form
|
||||
|
||||
$keyList = 'rowid';
|
||||
|
||||
if (count ( $InfoFieldList ) >= 3) {
|
||||
if (strpos ( $InfoFieldList [3], 'extra.' ) !== false) {
|
||||
if (count ($InfoFieldList) >= 3) {
|
||||
if (strpos ($InfoFieldList [3], 'extra.') !== false) {
|
||||
$keyList = 'main.' . $InfoFieldList [2] . ' as rowid';
|
||||
} else {
|
||||
$keyList = $InfoFieldList [2] . ' as rowid';
|
||||
@ -247,10 +247,10 @@ class FormAdvTargetEmailing extends Form
|
||||
|
||||
$sql = 'SELECT ' . $keyList . ', ' . $InfoFieldList [1];
|
||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . $InfoFieldList [0];
|
||||
if (! empty ( $InfoFieldList [3] )) {
|
||||
if (! empty ($InfoFieldList [3])) {
|
||||
|
||||
// We have to join on extrafield table
|
||||
if (strpos ( $InfoFieldList [3], 'extra' ) !== false) {
|
||||
if (strpos ($InfoFieldList [3], 'extra') !== false) {
|
||||
$sql .= ' as main, ' . MAIN_DB_PREFIX . $InfoFieldList [0] . '_extrafields as extra';
|
||||
$sql .= ' WHERE extra.fk_object=main.' . $InfoFieldList [2] . ' AND ' . $InfoFieldList [3];
|
||||
} else {
|
||||
@ -270,13 +270,13 @@ class FormAdvTargetEmailing extends Form
|
||||
$i = 0;
|
||||
if ($num) {
|
||||
while ( $i < $num ) {
|
||||
$obj = $this->db->fetch_object ( $resql );
|
||||
$labeltoshow = dol_trunc ( $obj->$InfoFieldList [1], 90 );
|
||||
$obj = $this->db->fetch_object ($resql);
|
||||
$labeltoshow = dol_trunc ($obj->$InfoFieldList [1], 90);
|
||||
$options_array[$obj->rowid]=$labeltoshow;
|
||||
$i ++;
|
||||
}
|
||||
}
|
||||
$this->db->free ( $resql );
|
||||
$this->db->free ($resql);
|
||||
}
|
||||
}
|
||||
|
||||
@ -328,7 +328,7 @@ class FormAdvTargetEmailing extends Form
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
return $this->advMultiselectarray ( $htmlname, $options_array, $selected_array );
|
||||
return $this->advMultiselectarray ($htmlname, $options_array, $selected_array);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -415,7 +415,7 @@ class FormAdvTargetEmailing extends Form
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
return $this->advMultiselectarray( $htmlname, $options_array, $selected_array );
|
||||
return $this->advMultiselectarray($htmlname, $options_array, $selected_array);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -438,19 +438,19 @@ class FormAdvTargetEmailing extends Form
|
||||
$sql .= " WHERE type_element='$type_element'";
|
||||
$sql .= " ORDER BY c.name";
|
||||
|
||||
dol_syslog ( get_class ( $this ) . "::".__METHOD__, LOG_DEBUG );
|
||||
$resql = $this->db->query ( $sql );
|
||||
dol_syslog (get_class ($this) . "::".__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query ($sql);
|
||||
if ($resql) {
|
||||
|
||||
|
||||
$out .= '<select id="' . $htmlname . '" class="flat" name="' . $htmlname . '">';
|
||||
if ($showempty)
|
||||
$out .= '<option value=""></option>';
|
||||
$num = $this->db->num_rows ( $resql );
|
||||
$num = $this->db->num_rows ($resql);
|
||||
$i = 0;
|
||||
if ($num) {
|
||||
while ( $i < $num ) {
|
||||
$obj = $this->db->fetch_object ( $resql );
|
||||
$obj = $this->db->fetch_object ($resql);
|
||||
$label = $obj->name;
|
||||
if (empty($label)) {
|
||||
$label=$obj->fk_element;
|
||||
@ -466,9 +466,9 @@ class FormAdvTargetEmailing extends Form
|
||||
}
|
||||
$out .= '</select>';
|
||||
} else {
|
||||
dol_print_error ( $this->db );
|
||||
dol_print_error ($this->db);
|
||||
}
|
||||
$this->db->free ( $resql );
|
||||
$this->db->free ($resql);
|
||||
return $out;
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,7 +165,7 @@ if (empty($reshook))
|
||||
if ($object->id > 0) {
|
||||
if (!empty($conf->global->PROPAL_CLONE_DATE_DELIVERY)) {
|
||||
//Get difference between old and new delivery date and change lines according to difference
|
||||
$date_delivery = dol_mktime(12, 0, 0,
|
||||
$date_delivery = dol_mktime(12, 0, 0,
|
||||
GETPOST('date_deliverymonth', 'int'),
|
||||
GETPOST('date_deliveryday', 'int'),
|
||||
GETPOST('date_deliveryyear', 'int')
|
||||
@ -173,7 +173,7 @@ if (empty($reshook))
|
||||
if (!empty($object->date_livraison) && !empty($date_delivery))
|
||||
{
|
||||
//Attempt to get the date without possible hour rounding errors
|
||||
$old_date_delivery = dol_mktime(12, 0, 0,
|
||||
$old_date_delivery = dol_mktime(12, 0, 0,
|
||||
dol_print_date($object->date_livraison, '%m'),
|
||||
dol_print_date($object->date_livraison, '%d'),
|
||||
dol_print_date($object->date_livraison, '%Y')
|
||||
@ -724,7 +724,7 @@ if (empty($reshook))
|
||||
{
|
||||
$lineId = intval($lineId);
|
||||
$originLine = new $lineClassName($db);
|
||||
if(intval($fromElementid) > 0 && $originLine->fetch( $lineId ) > 0)
|
||||
if(intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0)
|
||||
{
|
||||
$originLine->fetch_optionals($lineId);
|
||||
$desc = $originLine->desc;
|
||||
@ -1895,7 +1895,7 @@ if ($action == 'create')
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
|
||||
$notify = new Notify($db);
|
||||
$formquestion = array_merge($formquestion, array(
|
||||
$formquestion = array_merge($formquestion, array(
|
||||
array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PROPAL_CLOSE_SIGNED', $object->socid, $object)),
|
||||
));
|
||||
}
|
||||
|
||||
@ -665,7 +665,7 @@ class Proposals extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
$result = $this->propal->classifyBilled(DolibarrApiAccess::$user );
|
||||
$result = $this->propal->classifyBilled(DolibarrApiAccess::$user);
|
||||
if ($result < 0) {
|
||||
throw new RestException(500, 'Error : '.$this->propal->error);
|
||||
}
|
||||
|
||||
@ -667,7 +667,7 @@ class Propal extends CommonObject
|
||||
{
|
||||
global $mysoc;
|
||||
|
||||
dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise_percent=$remise_percent,
|
||||
dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise_percent=$remise_percent,
|
||||
txtva=$txtva, desc=$desc, price_base_type=$price_base_type, info_bits=$info_bits, special_code=$special_code, fk_parent_line=$fk_parent_line, pa_ht=$pa_ht, type=$type, date_start=$date_start, date_end=$date_end");
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
|
||||
@ -1078,7 +1078,7 @@ class Propal extends CommonObject
|
||||
$vatrate = $line->tva_tx;
|
||||
if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')';
|
||||
|
||||
$result = $this->addline(
|
||||
$result = $this->addline(
|
||||
$line->desc,
|
||||
$line->subprice,
|
||||
$line->qty,
|
||||
|
||||
@ -1347,7 +1347,7 @@ if (empty($reshook))
|
||||
{
|
||||
$lineId = intval($lineId);
|
||||
$originLine = new $lineClassName($db);
|
||||
if(intval($fromElementid) > 0 && $originLine->fetch( $lineId ) > 0)
|
||||
if(intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0)
|
||||
{
|
||||
$originLine->fetch_optionals($lineId);
|
||||
$desc = $originLine->desc;
|
||||
|
||||
@ -885,7 +885,7 @@ class Commande extends CommonOrder
|
||||
$vatrate = $line->tva_tx;
|
||||
if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')';
|
||||
|
||||
$result = $this->addline(
|
||||
$result = $this->addline(
|
||||
$line->desc,
|
||||
$line->subprice,
|
||||
$line->qty,
|
||||
|
||||
@ -290,7 +290,7 @@ if (($action == 'create' || $action == 'add') && !$error)
|
||||
$array_options = $lines[$i]->array_options;
|
||||
}
|
||||
|
||||
$result = $object->addline(
|
||||
$result = $object->addline(
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->qty,
|
||||
|
||||
@ -1614,7 +1614,7 @@ class Account extends CommonObject
|
||||
//Replace the old AccountNumber key with the new BankAccountNumber key
|
||||
$fieldlists = explode(
|
||||
' ',
|
||||
preg_replace('/ ?[^Bank]AccountNumber ?/', 'BankAccountNumber',
|
||||
preg_replace('/ ?[^Bank]AccountNumber ?/', 'BankAccountNumber',
|
||||
$conf->global->BANK_SHOW_ORDER_OPTION)
|
||||
);
|
||||
}
|
||||
|
||||
@ -406,7 +406,7 @@ class PaymentVarious extends CommonObject
|
||||
$sign=1;
|
||||
if ($this->sens == '0') $sign=-1;
|
||||
|
||||
$bank_line_id = $acc->addline(
|
||||
$bank_line_id = $acc->addline(
|
||||
$this->datep,
|
||||
$this->type_payment,
|
||||
$this->label,
|
||||
|
||||
@ -463,7 +463,7 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read))
|
||||
|
||||
print "<br>";
|
||||
|
||||
print load_fiche_titre( $langs->trans("SalariesPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', '');
|
||||
print load_fiche_titre($langs->trans("SalariesPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', '');
|
||||
|
||||
$sql = "SELECT s.rowid, s.amount, s.label, s.datep as datep, s.datev as datev, s.datesp, s.dateep, s.salary, s.fk_bank, u.salary as current_salary,";
|
||||
$sql.= " pct.code as payment_code,";
|
||||
|
||||
@ -1449,7 +1449,7 @@ if (empty($reshook))
|
||||
$localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty);
|
||||
$localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty);
|
||||
|
||||
$result = $object->addline(
|
||||
$result = $object->addline(
|
||||
$desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $localtax1_tx, $localtax2_tx, $lines[$i]->fk_product,
|
||||
$lines[$i]->remise_percent, $date_start, $date_end, 0, $lines[$i]->info_bits, $lines[$i]->fk_remise_except,
|
||||
'HT', 0, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $object->origin, $lines[$i]->rowid,
|
||||
@ -2118,7 +2118,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
$result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, $qty, GETPOST('remise_percent'),
|
||||
$result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, $qty, GETPOST('remise_percent'),
|
||||
$date_start, $date_end, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $info_bits, $type,
|
||||
GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $special_code, $array_options, GETPOST('progress'),
|
||||
$_POST['units'], $pu_ht_devise);
|
||||
@ -2352,7 +2352,7 @@ if (empty($reshook))
|
||||
{
|
||||
$lineId = intval($lineId);
|
||||
$originLine = new $lineClassName($db);
|
||||
if(intval($fromElementid) > 0 && $originLine->fetch( $lineId ) > 0)
|
||||
if(intval($fromElementid) > 0 && $originLine->fetch($lineId) > 0)
|
||||
{
|
||||
$originLine->fetch_optionals($lineId);
|
||||
$desc = $originLine->desc;
|
||||
|
||||
@ -337,7 +337,7 @@ class Invoices extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
$request_data = (object) $request_data;
|
||||
$updateRes = $this->invoice->updateline(
|
||||
$updateRes = $this->invoice->updateline(
|
||||
$lineid,
|
||||
$request_data->desc,
|
||||
$request_data->subprice,
|
||||
|
||||
@ -225,7 +225,7 @@ class FactureRec extends CommonInvoice
|
||||
$tva_tx = $facsrc->lines[$i]->tva_tx;
|
||||
if (! empty($facsrc->lines[$i]->vat_src_code) && ! preg_match('/\(/', $tva_tx)) $tva_tx .= ' ('.$facsrc->lines[$i]->vat_src_code.')';
|
||||
|
||||
$result_insert = $this->addline(
|
||||
$result_insert = $this->addline(
|
||||
$facsrc->lines[$i]->desc,
|
||||
$facsrc->lines[$i]->subprice,
|
||||
$facsrc->lines[$i]->qty,
|
||||
@ -1858,7 +1858,7 @@ class FactureLigneRec extends CommonInvoiceLine
|
||||
}
|
||||
$sql.= ", rang=".$this->rang;
|
||||
$sql.= ", special_code=".$this->special_code;
|
||||
$sql.= ", fk_unit=".($this->fk_unit ?"'".$this->db->escape($this->fk_unit )."'":"null");
|
||||
$sql.= ", fk_unit=".($this->fk_unit ?"'".$this->db->escape($this->fk_unit)."'":"null");
|
||||
$sql.= ", fk_contract_line=".($this->fk_contract_line?$this->fk_contract_line:"null");
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
|
||||
|
||||
@ -675,7 +675,7 @@ class Facture extends CommonInvoice
|
||||
$vatrate = $line->tva_tx;
|
||||
if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')';
|
||||
|
||||
$result = $this->addline(
|
||||
$result = $this->addline(
|
||||
$line->desc,
|
||||
$line->subprice,
|
||||
$line->qty,
|
||||
@ -749,7 +749,7 @@ class Facture extends CommonInvoice
|
||||
$localtax1_tx = $_facrec->lines[$i]->localtax1_tx;
|
||||
$localtax2_tx = $_facrec->lines[$i]->localtax2_tx;
|
||||
|
||||
$result_insert = $this->addline(
|
||||
$result_insert = $this->addline(
|
||||
$_facrec->lines[$i]->desc,
|
||||
$_facrec->lines[$i]->subprice,
|
||||
$_facrec->lines[$i]->qty,
|
||||
|
||||
@ -855,7 +855,7 @@ if (empty($reshook))
|
||||
// Update line
|
||||
if (! $error)
|
||||
{
|
||||
$result = $object->updateline(
|
||||
$result = $object->updateline(
|
||||
GETPOST('lineid'),
|
||||
$description,
|
||||
$pu_ht,
|
||||
|
||||
@ -303,7 +303,7 @@ if ($massaction == 'withdrawrequest')
|
||||
$error++;
|
||||
setEventMessages($objecttmp->ref.' '.$langs->trans("RequestAlreadyDone"), $objecttmp->errors, 'warnings');
|
||||
}
|
||||
elseif (!empty($objecttmp->mode_reglement_code ) && $objecttmp->mode_reglement_code != 'PRE'){
|
||||
elseif (!empty($objecttmp->mode_reglement_code) && $objecttmp->mode_reglement_code != 'PRE'){
|
||||
$error++;
|
||||
setEventMessages($objecttmp->ref.' '.$langs->trans("BadPaymentMethod"), $objecttmp->errors, 'errors');
|
||||
}
|
||||
|
||||
@ -725,7 +725,7 @@ class Paiement extends CommonObject
|
||||
// Add link 'WithdrawalPayment' in bank_url
|
||||
if (! $error && $label == '(WithdrawalPayment)')
|
||||
{
|
||||
$result=$acc->add_url_line(
|
||||
$result=$acc->add_url_line(
|
||||
$bank_line_id,
|
||||
$this->id_prelevement,
|
||||
DOL_URL_ROOT.'/compta/prelevement/card.php?id=',
|
||||
|
||||
@ -424,7 +424,7 @@ class PaymentSalary extends CommonObject
|
||||
|
||||
// Insert payment into llx_bank
|
||||
// Add link 'payment_salary' in bank_url between payment and bank transaction
|
||||
$bank_line_id = $acc->addline(
|
||||
$bank_line_id = $acc->addline(
|
||||
$this->datep,
|
||||
$this->type_payment,
|
||||
$this->label,
|
||||
@ -467,7 +467,7 @@ class PaymentSalary extends CommonObject
|
||||
$fuser->fetch($this->fk_user);
|
||||
|
||||
// Add link 'user' in bank_url between operation and bank transaction
|
||||
$result=$acc->add_url_line(
|
||||
$result=$acc->add_url_line(
|
||||
$bank_line_id,
|
||||
$this->fk_user,
|
||||
DOL_URL_ROOT.'/user/card.php?id=',
|
||||
|
||||
@ -321,7 +321,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
|
||||
// Array header
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Product"),
|
||||
$_SERVER["PHP_SELF"],
|
||||
"ref",
|
||||
@ -331,7 +331,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans('Quantity'),
|
||||
$_SERVER["PHP_SELF"],
|
||||
"qty",
|
||||
@ -341,7 +341,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Percentage"),
|
||||
$_SERVER["PHP_SELF"],
|
||||
"qty",
|
||||
@ -351,7 +351,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans('AmountHT'),
|
||||
$_SERVER["PHP_SELF"],
|
||||
"amount",
|
||||
@ -361,7 +361,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans("AmountTTC"),
|
||||
$_SERVER["PHP_SELF"],
|
||||
"amount_ttc",
|
||||
@ -371,7 +371,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Percentage"),
|
||||
$_SERVER["PHP_SELF"],
|
||||
"amount_ttc",
|
||||
|
||||
@ -378,10 +378,10 @@ if (! $error && $massaction == 'confirm_presend')
|
||||
|
||||
$parameters=array('mode'=>'formemail');
|
||||
|
||||
if ( ! empty( $listofobjectthirdparties ) ) {
|
||||
if ( ! empty($listofobjectthirdparties) ) {
|
||||
$parameters['listofobjectthirdparties'] = $listofobjectthirdparties;
|
||||
}
|
||||
if ( ! empty( $listofobjectref ) ) {
|
||||
if ( ! empty($listofobjectref) ) {
|
||||
$parameters['listofobjectref'] = $listofobjectref;
|
||||
}
|
||||
|
||||
|
||||
@ -1292,21 +1292,20 @@ class CMailFile
|
||||
|
||||
dol_syslog("Try socket connection to host=".$host." port=".$port);
|
||||
//See if we can connect to the SMTP server
|
||||
if ($socket = @fsockopen(
|
||||
if ($socket = @fsockopen(
|
||||
$host, // Host to test, IP or domain. Add ssl:// for SSL/TLS.
|
||||
$port, // which Port number to use
|
||||
$errno, // actual system level error
|
||||
$errstr, // and any text that goes with the error
|
||||
$timeout
|
||||
)) // timeout for reading/writing data over the socket
|
||||
{
|
||||
$timeout // timeout for reading/writing data over the socket
|
||||
)) {
|
||||
// Windows still does not have support for this timeout function
|
||||
if (function_exists('stream_set_timeout')) stream_set_timeout($socket, $timeout, 0);
|
||||
|
||||
dol_syslog("Now we wait for answer 220");
|
||||
|
||||
// Check response from Server
|
||||
if ( $_retVal = $this->server_parse($socket, "220") ) $_retVal = $socket;
|
||||
if ($_retVal = $this->server_parse($socket, "220")) $_retVal = $socket;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -882,7 +882,7 @@ abstract class CommonDocGenerator
|
||||
|
||||
|
||||
// Sorting
|
||||
uasort ( $this->cols, array( $this, 'columnSort' ) );
|
||||
uasort ($this->cols, array( $this, 'columnSort' ));
|
||||
|
||||
// Positionning
|
||||
$curX = $this->page_largeur-$this->marge_droite; // start from right
|
||||
@ -899,7 +899,7 @@ abstract class CommonDocGenerator
|
||||
|
||||
if(!empty($colDef['scale'])){
|
||||
// In case of column widht is defined by percentage
|
||||
$colDef['width'] = abs($arrayWidth * $colDef['scale'] / 100 );
|
||||
$colDef['width'] = abs($arrayWidth * $colDef['scale'] / 100);
|
||||
}
|
||||
|
||||
if(empty($colDef['width'])){
|
||||
@ -1049,7 +1049,7 @@ abstract class CommonDocGenerator
|
||||
if(empty($columnText)) return;
|
||||
$pdf->SetXY($this->getColumnContentXStart($colKey), $curY); // Set curent position
|
||||
$colDef = $this->cols[$colKey];
|
||||
$pdf->writeHTMLCell( $this->getColumnContentWidth($colKey), 2, $this->getColumnContentXStart($colKey), $curY, $columnText, 0, 0, 0, true, $colDef['content']['align']);
|
||||
$pdf->writeHTMLCell($this->getColumnContentWidth($colKey), 2, $this->getColumnContentXStart($colKey), $curY, $columnText, 0, 0, 0, true, $colDef['content']['align']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7183,8 +7183,8 @@ abstract class CommonObject
|
||||
if (! $error)
|
||||
{
|
||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql.= ' ('.implode( ", ", $keys ).')';
|
||||
$sql.= ' VALUES ('.implode( ", ", $values ).')';
|
||||
$sql.= ' ('.implode(", ", $keys).')';
|
||||
$sql.= ' VALUES ('.implode(", ", $values).')';
|
||||
|
||||
$res = $this->db->query($sql);
|
||||
if ($res===false) {
|
||||
@ -7312,7 +7312,7 @@ abstract class CommonObject
|
||||
}*/
|
||||
}
|
||||
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode( ',', $tmp ).' WHERE rowid='.$this->id ;
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET '.implode(',', $tmp).' WHERE rowid='.$this->id ;
|
||||
|
||||
$this->db->begin();
|
||||
if (! $error)
|
||||
|
||||
@ -1346,11 +1346,11 @@ class ExtraFields
|
||||
// Init des compteurs
|
||||
$nbPregRepl = $nbPregSel = 0;
|
||||
// On retire toutes les parenthèses sans = avant
|
||||
$InfoFieldList[4]=preg_replace( '#([^=])(\([^)^(]*(' . $word . ')[^)^(]*\))#', '$1 $3 ', $InfoFieldList[4], -1, $nbPregRepl);
|
||||
$InfoFieldList[4]=preg_replace('#([^=])(\([^)^(]*(' . $word . ')[^)^(]*\))#', '$1 $3 ', $InfoFieldList[4], -1, $nbPregRepl);
|
||||
// On retire les espaces autour des = et parenthèses
|
||||
$InfoFieldList[4]=preg_replace('# *(=|\(|\)) *#', '$1', $InfoFieldList[4]);
|
||||
// On retire toutes les parenthèses avec = avant
|
||||
$InfoFieldList[4]=preg_replace( '#\b[a-zA-Z0-9-\.-_]+\b=\([^)^(]*(' . $word . ')[^)^(]*\)#', '$1 ', $InfoFieldList[4], -1, $nbPregSel);
|
||||
$InfoFieldList[4]=preg_replace('#\b[a-zA-Z0-9-\.-_]+\b=\([^)^(]*(' . $word . ')[^)^(]*\)#', '$1 ', $InfoFieldList[4], -1, $nbPregSel);
|
||||
// On retire les espaces autour des = et parenthèses
|
||||
$InfoFieldList[4]=preg_replace('# *(=|\(|\)) *#', '$1', $InfoFieldList[4]);
|
||||
|
||||
|
||||
@ -145,7 +145,7 @@ class HookManager
|
||||
|
||||
// Define type of hook ('output' or 'addreplace'. 'returnvalue' is deprecated because a 'addreplace' hook can also return resPrint and resArray).
|
||||
$hooktype='output';
|
||||
if (in_array(
|
||||
if (in_array(
|
||||
$method,
|
||||
array(
|
||||
'addCalendarChoice',
|
||||
|
||||
@ -1526,7 +1526,7 @@ class Form
|
||||
'showsoc'=>$showsoc,
|
||||
);
|
||||
|
||||
$reshook = $hookmanager->executeHooks( 'afterSelectContactOptions', $parameters, $this, $action ); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('afterSelectContactOptions', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
if ($htmlname != 'none' && ! $options_only)
|
||||
{
|
||||
|
||||
@ -1722,7 +1722,7 @@ class FormFile
|
||||
|
||||
print '<table width="100%" class="liste">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Links"),
|
||||
$_SERVER['PHP_SELF'],
|
||||
"name",
|
||||
@ -1732,7 +1732,7 @@ class FormFile
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
@ -1740,7 +1740,7 @@ class FormFile
|
||||
"",
|
||||
'class="right"'
|
||||
);
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Date"),
|
||||
$_SERVER['PHP_SELF'],
|
||||
"date",
|
||||
@ -1750,7 +1750,7 @@ class FormFile
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
'',
|
||||
$_SERVER['PHP_SELF'],
|
||||
"",
|
||||
|
||||
@ -426,12 +426,11 @@ class FormMail extends Form
|
||||
$out.= '<input class="button" type="submit" value="'.$langs->trans('Apply').'" name="modelselected" id="modelselected">';
|
||||
$out.= ' ';
|
||||
$out.= '</div>';
|
||||
}
|
||||
elseif (! empty($this->param['models']) && in_array($this->param['models'], array(
|
||||
} elseif (! empty($this->param['models']) && in_array($this->param['models'], array(
|
||||
'propal_send','order_send','facture_send',
|
||||
'shipping_send','fichinter_send','supplier_proposal_send','order_supplier_send',
|
||||
'invoice_supplier_send','thirdparty','contract','user','all'
|
||||
)))
|
||||
)))
|
||||
{
|
||||
// If list of template is empty
|
||||
$out.= '<div class="center" style="padding: 0px 0 12px 0">'."\n";
|
||||
|
||||
@ -90,7 +90,7 @@ class FormProjets
|
||||
$selected_input_value=$project->ref;
|
||||
}
|
||||
$urloption='socid='.$socid.'&htmlname='.$htmlname.'&discardclosed='.$discard_closed;
|
||||
$out.=ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array(
|
||||
$out.=ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array(
|
||||
// 'update' => array(
|
||||
// 'projectid' => 'id'
|
||||
// )
|
||||
|
||||
@ -530,7 +530,7 @@ class Notify
|
||||
if (! empty($hookmanager->resArray['message'])) $message.=$hookmanager->resArray['message'];
|
||||
}
|
||||
|
||||
$mailfile = new CMailFile(
|
||||
$mailfile = new CMailFile(
|
||||
$subject,
|
||||
$sendto,
|
||||
$replyto,
|
||||
@ -758,7 +758,7 @@ class Notify
|
||||
if (! empty($hookmanager->resArray['subject'])) $subject.=$hookmanager->resArray['subject'];
|
||||
if (! empty($hookmanager->resArray['message'])) $message.=$hookmanager->resArray['message'];
|
||||
}
|
||||
$mailfile = new CMailFile(
|
||||
$mailfile = new CMailFile(
|
||||
$subject,
|
||||
$sendto,
|
||||
$replyto,
|
||||
|
||||
@ -377,14 +377,13 @@ class SMTPs
|
||||
else
|
||||
{
|
||||
//See if we can connect to the SMTP server
|
||||
if ($this->socket = @fsockopen(
|
||||
if ($this->socket = @fsockopen(
|
||||
preg_replace('@tls://@i', '', $this->getHost()), // Host to 'hit', IP or domain
|
||||
$this->getPort(), // which Port number to use
|
||||
$this->errno, // actual system level error
|
||||
$this->errstr, // and any text that goes with the error
|
||||
$this->_smtpTimeout
|
||||
)) // timeout for reading/writing data over the socket
|
||||
{
|
||||
$this->_smtpTimeout // timeout for reading/writing data over the socket
|
||||
)) {
|
||||
// Fix from PHP SMTP class by 'Chris Ryan'
|
||||
// Sometimes the SMTP server takes a little longer to respond
|
||||
// so we will give it a longer timeout for the first read
|
||||
@ -990,7 +989,7 @@ class SMTPs
|
||||
$aryHost = $this->_msgRecipients;
|
||||
|
||||
// Only run this if we have something
|
||||
if ( !empty ($_addrList ))
|
||||
if ( !empty ($_addrList))
|
||||
{
|
||||
// $_addrList can be a STRING or an array
|
||||
if ( is_string($_addrList) )
|
||||
|
||||
@ -93,7 +93,7 @@ function SendError($number, $text)
|
||||
if ( $_GET['Command'] == 'FileUpload' )
|
||||
SendUploadResults($number, "", "", $text);
|
||||
|
||||
if ( isset( $GLOBALS['HeaderSent'] ) && $GLOBALS['HeaderSent'] )
|
||||
if ( isset($GLOBALS['HeaderSent']) && $GLOBALS['HeaderSent'] )
|
||||
{
|
||||
SendErrorNode($number, $text);
|
||||
CreateXmlFooter();
|
||||
|
||||
@ -140,7 +140,7 @@ function CreateFolder($resourceType, $currentFolder)
|
||||
$sErrorNumber = '0' ;
|
||||
$sErrorMsg = '' ;
|
||||
|
||||
if ( isset( $_GET['NewFolderName'] ) )
|
||||
if ( isset($_GET['NewFolderName']) )
|
||||
{
|
||||
$sNewFolderName = $_GET['NewFolderName'] ;
|
||||
$sNewFolderName = SanitizeFolderName($sNewFolderName);
|
||||
@ -202,7 +202,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
|
||||
$sErrorNumber = '0' ;
|
||||
$sFileName = '' ;
|
||||
|
||||
if ( isset( $_FILES['NewFile'] ) && !is_null($_FILES['NewFile']['tmp_name'])
|
||||
if ( isset($_FILES['NewFile']) && !is_null($_FILES['NewFile']['tmp_name'])
|
||||
// This is for the QuickUpload tab box
|
||||
or (isset($_FILES['upload']) && !is_null($_FILES['upload']['tmp_name'])))
|
||||
{
|
||||
@ -223,7 +223,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
|
||||
$sExtension = substr($sFileName, (strrpos($sFileName, '.') + 1));
|
||||
$sExtension = strtolower($sExtension);
|
||||
|
||||
if ( isset( $Config['SecureImageUploads'] ) )
|
||||
if ( isset($Config['SecureImageUploads']) )
|
||||
{
|
||||
if ( ( $isImageValid = IsImageValid($oFile['tmp_name'], $sExtension) ) === false )
|
||||
{
|
||||
@ -231,7 +231,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $Config['HtmlExtensions'] ) )
|
||||
if ( isset($Config['HtmlExtensions']) )
|
||||
{
|
||||
if (!IsHtmlExtension($sExtension, $Config['HtmlExtensions']) &&
|
||||
($detectHtml = DetectHtml($oFile['tmp_name'])) === true)
|
||||
@ -261,13 +261,13 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
|
||||
|
||||
if ( is_file($sFilePath) )
|
||||
{
|
||||
if ( isset( $Config['ChmodOnUpload'] ) && !$Config['ChmodOnUpload'] )
|
||||
if ( isset($Config['ChmodOnUpload']) && !$Config['ChmodOnUpload'] )
|
||||
{
|
||||
break ;
|
||||
}
|
||||
|
||||
$permissions = '0777';
|
||||
if ( isset( $Config['ChmodOnUpload'] ) && $Config['ChmodOnUpload'] )
|
||||
if ( isset($Config['ChmodOnUpload']) && $Config['ChmodOnUpload'] )
|
||||
{
|
||||
$permissions = (string) $Config['ChmodOnUpload'] ;
|
||||
}
|
||||
@ -285,12 +285,12 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
|
||||
if ( file_exists($sFilePath) )
|
||||
{
|
||||
//previous checks failed, try once again
|
||||
if ( isset( $isImageValid ) && $isImageValid === -1 && IsImageValid($sFilePath, $sExtension) === false )
|
||||
if ( isset($isImageValid) && $isImageValid === -1 && IsImageValid($sFilePath, $sExtension) === false )
|
||||
{
|
||||
@unlink($sFilePath);
|
||||
$sErrorNumber = '202' ;
|
||||
}
|
||||
elseif ( isset( $detectHtml ) && $detectHtml === -1 && DetectHtml($sFilePath) === true )
|
||||
elseif ( isset($detectHtml) && $detectHtml === -1 && DetectHtml($sFilePath) === true )
|
||||
{
|
||||
@unlink($sFilePath);
|
||||
$sErrorNumber = '202' ;
|
||||
@ -318,7 +318,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
|
||||
else
|
||||
{
|
||||
//issue the CKEditor Callback
|
||||
SendCKEditorResults(
|
||||
SendCKEditorResults(
|
||||
$CKEcallback,
|
||||
$sFileUrl,
|
||||
($sErrorNumber != 0 ? 'Error '. $sErrorNumber. ' upload failed.' : 'Upload Successful')
|
||||
|
||||
@ -45,7 +45,7 @@ function DoResponse()
|
||||
if (!isset($_GET)) {
|
||||
global $_GET;
|
||||
}
|
||||
if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) )
|
||||
if ( !isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder']) )
|
||||
return;
|
||||
|
||||
// Get the main request informaiton.
|
||||
|
||||
@ -175,14 +175,14 @@ function CreateServerFolder($folderPath, $lastFolder = null)
|
||||
// Enable error tracking to catch the error.
|
||||
ini_set('track_errors', '1');
|
||||
|
||||
if ( isset( $Config['ChmodOnFolderCreate'] ) && !$Config['ChmodOnFolderCreate'] )
|
||||
if ( isset($Config['ChmodOnFolderCreate']) && !$Config['ChmodOnFolderCreate'] )
|
||||
{
|
||||
mkdir($folderPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
$permissions = '0777';
|
||||
if ( isset( $Config['ChmodOnFolderCreate'] ) && $Config['ChmodOnFolderCreate'])
|
||||
if ( isset($Config['ChmodOnFolderCreate']) && $Config['ChmodOnFolderCreate'])
|
||||
{
|
||||
$permissions = (string) $Config['ChmodOnFolderCreate'];
|
||||
}
|
||||
@ -315,7 +315,7 @@ function GetCurrentFolder()
|
||||
if (!isset($_GET)) {
|
||||
global $_GET;
|
||||
}
|
||||
$sCurrentFolder = isset( $_GET['CurrentFolder'] ) ? GETPOST('CurrentFolder', '', 1) : '/' ;
|
||||
$sCurrentFolder = isset($_GET['CurrentFolder']) ? GETPOST('CurrentFolder', '', 1) : '/' ;
|
||||
|
||||
// Check the current folder syntax (must begin and start with a slash).
|
||||
if (!preg_match('|/$|', $sCurrentFolder))
|
||||
|
||||
@ -47,7 +47,7 @@ if ( !$Config['Enabled'] )
|
||||
$sCommand = 'QuickUpload' ;
|
||||
|
||||
// The file type (from the QueryString, by default 'File').
|
||||
$sType = isset( $_GET['Type'] ) ? $_GET['Type'] : 'File' ;
|
||||
$sType = isset($_GET['Type']) ? $_GET['Type'] : 'File' ;
|
||||
|
||||
$sCurrentFolder = "/" ;
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@ function dol_time_plus_duree($time, $duration_value, $duration_unit)
|
||||
$interval = new DateInterval($deltastring);
|
||||
|
||||
if($sub) $date->sub($interval);
|
||||
else $date->add( $interval );
|
||||
else $date->add($interval);
|
||||
|
||||
return $date->getTimestamp();
|
||||
}
|
||||
@ -809,7 +809,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR',
|
||||
// Easter sunday
|
||||
|
||||
// Monday after easter
|
||||
$date_eastermonday = mktime(
|
||||
$date_eastermonday = mktime(
|
||||
date("H", $date_paques),
|
||||
date("i", $date_paques),
|
||||
date("s", $date_paques),
|
||||
@ -823,7 +823,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR',
|
||||
// Easter monday
|
||||
|
||||
// Christi Himmelfahrt (39 days after easter sunday)
|
||||
$date_ch = mktime(
|
||||
$date_ch = mktime(
|
||||
date("H", $date_paques),
|
||||
date("i", $date_paques),
|
||||
date("s", $date_paques),
|
||||
@ -837,7 +837,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR',
|
||||
// Christi Himmelfahrt
|
||||
|
||||
// Pfingsten (50 days after easter sunday)
|
||||
$date_pentecote = mktime(
|
||||
$date_pentecote = mktime(
|
||||
date("H", $date_paques),
|
||||
date("i", $date_paques),
|
||||
date("s", $date_paques),
|
||||
@ -851,7 +851,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $countrycode = 'FR',
|
||||
// Pfingsten
|
||||
|
||||
// Fronleichnam (60 days after easter sunday)
|
||||
$date_fronleichnam = mktime(
|
||||
$date_fronleichnam = mktime(
|
||||
date("H", $date_paques),
|
||||
date("i", $date_paques),
|
||||
date("s", $date_paques),
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -843,7 +843,7 @@ function dol_string_unaccent($str)
|
||||
else
|
||||
{
|
||||
// See http://www.ascii-code.com/
|
||||
$string = strtr(
|
||||
$string = strtr(
|
||||
$str,
|
||||
"\xC0\xC1\xC2\xC3\xC4\xC5\xC7
|
||||
\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1
|
||||
@ -2969,12 +2969,11 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
$picto .= '.png';
|
||||
}
|
||||
$fullpathpicto = $picto;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$pictowithoutext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto);
|
||||
|
||||
//if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on')))
|
||||
if (empty($srconly) && in_array($pictowithoutext, array(
|
||||
if (empty($srconly) && in_array($pictowithoutext, array(
|
||||
'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
|
||||
'note', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow',
|
||||
'jabber','skype','twitter','facebook'
|
||||
@ -5247,7 +5246,7 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart)
|
||||
// We will enhance here a common way of forging path for document storage
|
||||
// Here, object->id, object->ref and modulepart are required.
|
||||
//var_dump($modulepart);
|
||||
if (in_array($modulepart, array('thirdparty','contact','member','propal','proposal','commande','order','facture','invoice',
|
||||
if (in_array($modulepart, array('thirdparty','contact','member','propal','proposal','commande','order','facture','invoice',
|
||||
'supplier_order','supplier_proposal','shipment','contract','expensereport')))
|
||||
{
|
||||
$path=($object->ref?$object->ref:$object->id);
|
||||
@ -5306,7 +5305,7 @@ function dol_mkdir($dir, $dataroot = '', $newmask = null)
|
||||
umask(0);
|
||||
$dirmaskdec=octdec($newmask);
|
||||
if (empty($newmask)) {
|
||||
$dirmaskdec = empty( $conf->global->MAIN_UMASK ) ? octdec( '0755' ) : octdec( $conf->global->MAIN_UMASK );
|
||||
$dirmaskdec = empty($conf->global->MAIN_UMASK) ? octdec('0755') : octdec($conf->global->MAIN_UMASK);
|
||||
}
|
||||
$dirmaskdec |= octdec('0111'); // Set x bit required for directories
|
||||
if (! @mkdir($ccdir_osencoded, $dirmaskdec))
|
||||
@ -5792,7 +5791,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
// Add SIGNATURE into substitutionarray first, so, when we will make the substitution,
|
||||
// this will include signature content first and then replace var found into content of signature
|
||||
$signature = $user->signature;
|
||||
$substitutionarray=array_merge($substitutionarray, array(
|
||||
$substitutionarray=array_merge($substitutionarray, array(
|
||||
'__USER_SIGNATURE__' => (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : '')
|
||||
)
|
||||
);
|
||||
@ -5802,7 +5801,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
$substitutionarray['__SIGNATURE__'] = (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : '');
|
||||
}
|
||||
|
||||
$substitutionarray=array_merge($substitutionarray, array(
|
||||
$substitutionarray=array_merge($substitutionarray, array(
|
||||
'__USER_ID__' => (string) $user->id,
|
||||
'__USER_LOGIN__' => (string) $user->login,
|
||||
'__USER_LASTNAME__' => (string) $user->lastname,
|
||||
@ -5815,7 +5814,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
}
|
||||
if ((empty($exclude) || ! in_array('mycompany', $exclude)) && is_object($mysoc))
|
||||
{
|
||||
$substitutionarray=array_merge($substitutionarray, array(
|
||||
$substitutionarray=array_merge($substitutionarray, array(
|
||||
'__MYCOMPANY_NAME__' => $mysoc->name,
|
||||
'__MYCOMPANY_EMAIL__' => $mysoc->email,
|
||||
'__MYCOMPANY_PROFID1__' => $mysoc->idprof1,
|
||||
@ -6072,7 +6071,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
$tmp4=dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']);
|
||||
$tmp5=dol_get_next_month($tmp['mon'], $tmp['year']);
|
||||
|
||||
$substitutionarray=array_merge($substitutionarray, array(
|
||||
$substitutionarray=array_merge($substitutionarray, array(
|
||||
'__DAY__' => (string) $tmp['mday'],
|
||||
'__DAY_TEXT__' => $outputlangs->trans('Day'.$tmp['wday']), // Monday
|
||||
'__DAY_TEXT_SHORT__' => $outputlangs->trans($tmp['weekday'].'Min'), // Mon
|
||||
|
||||
@ -2318,7 +2318,7 @@ function getModuleDirForApiClass($module)
|
||||
*/
|
||||
function random_color_part($min = 0, $max = 255)
|
||||
{
|
||||
return str_pad( dechex( mt_rand( $min, $max) ), 2, '0', STR_PAD_LEFT);
|
||||
return str_pad(dechex(mt_rand($min, $max)), 2, '0', STR_PAD_LEFT);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -273,7 +273,7 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = '
|
||||
if ($val['default'] != '')
|
||||
{
|
||||
if (preg_match('/^null$/i', $val['default'])) $texttoinsert.= " DEFAULT NULL";
|
||||
elseif (preg_match('/varchar/', $type )) $texttoinsert.= " DEFAULT '".$db->escape($val['default'])."'";
|
||||
elseif (preg_match('/varchar/', $type)) $texttoinsert.= " DEFAULT '".$db->escape($val['default'])."'";
|
||||
else $texttoinsert.= (($val['default'] > 0)?' DEFAULT '.$val['default']:'');
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
|
||||
$invoicefieldref='ref';
|
||||
}
|
||||
|
||||
if ( strpos( $type, 'localtax' ) === 0 ) {
|
||||
if ( strpos($type, 'localtax') === 0 ) {
|
||||
$f_rate = $type . '_tx';
|
||||
} else {
|
||||
$f_rate = 'tva_tx';
|
||||
@ -593,7 +593,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire
|
||||
$invoicefieldref='ref';
|
||||
}
|
||||
|
||||
if ( strpos( $type, 'localtax' ) === 0 ) {
|
||||
if ( strpos($type, 'localtax') === 0 ) {
|
||||
$f_rate = $type . '_tx';
|
||||
} else {
|
||||
$f_rate = 'tva_tx';
|
||||
|
||||
@ -339,7 +339,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->commande->dir_temp,
|
||||
|
||||
@ -1228,7 +1228,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
|
||||
if (empty($hidetop))
|
||||
{
|
||||
$pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0] );
|
||||
$pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0]);
|
||||
|
||||
$textWidth = $colDef['width'] - $colDef['title']['padding'][3] -$colDef['title']['padding'][1];
|
||||
$pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']);
|
||||
|
||||
@ -343,7 +343,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->contrat->dir_temp,
|
||||
|
||||
@ -337,7 +337,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->expedition->dir_temp,
|
||||
|
||||
@ -601,7 +601,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalttc, 4, price($object->lines[$linenumber]->total_ttc), 0, 'R');
|
||||
|
||||
// Comments
|
||||
$pdf->SetXY($this->posxcomment, $curY );
|
||||
$pdf->SetXY($this->posxcomment, $curY);
|
||||
$comment = $outputlangs->trans("Date").':'. dol_print_date($object->lines[$linenumber]->date, "day", false, $outputlangs).' ';
|
||||
$comment .= $outputlangs->trans("Type").':'. $expensereporttypecodetoshow.'<br>';
|
||||
if (! empty($object->lines[$linenumber]->projet_ref)) {
|
||||
|
||||
@ -344,7 +344,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->facture->dir_temp,
|
||||
|
||||
@ -1519,7 +1519,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
if (empty($hidetop))
|
||||
{
|
||||
$pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0] );
|
||||
$pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0]);
|
||||
|
||||
$textWidth = $colDef['width'] - $colDef['title']['padding'][3] -$colDef['title']['padding'][1];
|
||||
$pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']);
|
||||
|
||||
@ -44,7 +44,7 @@ class modHRM extends DolibarrModules
|
||||
|
||||
$this->family = "hr";
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = preg_replace( '/^mod/i', '', get_class($this));
|
||||
$this->name = preg_replace('/^mod/i', '', get_class($this));
|
||||
$this->description = "Management of employees carrier and feelings (department, employment contract)";
|
||||
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
||||
|
||||
@ -438,7 +438,7 @@ class modProduct extends DolibarrModules
|
||||
if (is_object($mysoc) && $mysoc->useNPR()) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array('sp.recuperableonly'=>'VATNPR'));
|
||||
if (is_object($mysoc) && $mysoc->useLocalTax(1)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array('sp.localtax1_tx'=>'LT1', 'sp.localtax1_type'=>'LT1Type'));
|
||||
if (is_object($mysoc) && $mysoc->useLocalTax(2)) $this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array('sp.localtax2_tx'=>'LT2', 'sp.localtax2_type'=>'LT2Type'));
|
||||
$this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array(
|
||||
$this->import_fields_array[$r]=array_merge($this->import_fields_array[$r], array(
|
||||
'sp.price'=>"PriceQtyMinHT*",
|
||||
'sp.unitprice'=>'UnitPriceHT*', // TODO Make this field not required and calculate it from price and qty
|
||||
'sp.remise_percent'=>'DiscountQtyMin'
|
||||
|
||||
@ -95,7 +95,7 @@ class printing_printgcp extends PrintingDriver
|
||||
$storage = new DoliStorage($this->db, $this->conf);
|
||||
//$storage->clearToken($this->OAUTH_SERVICENAME_GOOGLE);
|
||||
// Setup the credentials for the requests
|
||||
$credentials = new Credentials(
|
||||
$credentials = new Credentials(
|
||||
$this->google_id,
|
||||
$this->google_secret,
|
||||
$urlwithroot.'/core/modules/oauth/google_oauthcallback.php'
|
||||
|
||||
@ -357,7 +357,7 @@ class doc_generic_product_odt extends ModelePDFProduct
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->produit->dir_temp,
|
||||
|
||||
@ -677,7 +677,7 @@ class pdf_standard extends ModelePDFProduct
|
||||
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
|
||||
if (empty($hidetop)) {
|
||||
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '',
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '',
|
||||
'C');
|
||||
}
|
||||
}
|
||||
|
||||
@ -588,7 +588,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->projet->dir_temp,
|
||||
|
||||
@ -515,7 +515,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->projet->dir_temp,
|
||||
|
||||
@ -369,7 +369,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->propal->multidir_temp[$object->entity],
|
||||
|
||||
@ -1398,7 +1398,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
|
||||
if (empty($hidetop))
|
||||
{
|
||||
$pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0] );
|
||||
$pdf->SetXY($colDef['xStartPos'] + $colDef['title']['padding'][3], $tab_top + $colDef['title']['padding'][0]);
|
||||
|
||||
$textWidth = $colDef['width'] - $colDef['title']['padding'][3] -$colDef['title']['padding'][1];
|
||||
$pdf->MultiCell($textWidth, 2, $colDef['title']['label'], '', $colDef['title']['align']);
|
||||
|
||||
@ -318,7 +318,7 @@ class doc_generic_reception_odt extends ModelePdfReception
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->reception->dir_temp,
|
||||
|
||||
@ -265,7 +265,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->societe->multidir_temp[$object->entity],
|
||||
|
||||
@ -357,7 +357,7 @@ class doc_generic_stock_odt extends ModelePDFStock
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->produit->dir_temp,
|
||||
|
||||
@ -909,7 +909,7 @@ class pdf_standard extends ModelePDFStock
|
||||
if (empty($hidetop))
|
||||
{
|
||||
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '',
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '',
|
||||
'C');
|
||||
}
|
||||
|
||||
|
||||
@ -365,7 +365,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->supplier_proposal->dir_temp,
|
||||
|
||||
@ -1244,7 +1244,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
|
||||
if (empty($hidetop)) {
|
||||
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '',
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("Unit"), '',
|
||||
'C');
|
||||
}
|
||||
}
|
||||
|
||||
@ -331,7 +331,7 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->user->dir_temp,
|
||||
|
||||
@ -353,7 +353,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||
// Open and load template
|
||||
require_once ODTPHP_PATH.'odf.php';
|
||||
try {
|
||||
$odfHandler = new odf(
|
||||
$odfHandler = new odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->user->dir_temp,
|
||||
|
||||
@ -146,7 +146,7 @@ print '<script type="text/javascript" language="javascript">
|
||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||
}
|
||||
print '</td><td>';
|
||||
print $formadvtargetemaling->advMultiselectarray('cust_status', array (
|
||||
print $formadvtargetemaling->advMultiselectarray('cust_status', array (
|
||||
'0' => $langs->trans('ActivityCeased'),
|
||||
'1' => $langs->trans('InActivity')
|
||||
), $array_query['cust_status']);
|
||||
@ -289,7 +289,7 @@ print '<script type="text/javascript" language="javascript">
|
||||
print '</td><td>' . "\n";
|
||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help');
|
||||
} elseif (($extrafields->attribute_type[$key] == 'boolean')) {
|
||||
print $form->selectarray('options_' . $key, array (
|
||||
print $form->selectarray('options_' . $key, array (
|
||||
'' => '',
|
||||
'1' => $langs->trans('Yes'),
|
||||
'0' => $langs->trans('No')
|
||||
@ -341,7 +341,7 @@ print '<script type="text/javascript" language="javascript">
|
||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||
}
|
||||
print '</td><td>';
|
||||
print $formadvtargetemaling->advMultiselectarray('contact_status', array (
|
||||
print $formadvtargetemaling->advMultiselectarray('contact_status', array (
|
||||
'0' => $langs->trans('ActivityCeased'),
|
||||
'1' => $langs->trans('InActivity')
|
||||
), $array_query['contact_status']);
|
||||
@ -390,7 +390,7 @@ print '<script type="text/javascript" language="javascript">
|
||||
print img_picto($langs->trans('AdvTgtUse'), 'ok.png@advtargetemailing');
|
||||
}
|
||||
print '</td><td>' . "\n";
|
||||
print $form->selectarray('contact_no_email', array (
|
||||
print $form->selectarray('contact_no_email', array (
|
||||
'' => '',
|
||||
'1' => $langs->trans('Yes'),
|
||||
'0' => $langs->trans('No')
|
||||
@ -478,7 +478,7 @@ print '<script type="text/javascript" language="javascript">
|
||||
print '</td><td>' . "\n";
|
||||
print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help');
|
||||
} elseif (($extrafields->attribute_type[$key] == 'boolean')) {
|
||||
print $form->selectarray('options_' . $key . '_cnct', array (
|
||||
print $form->selectarray('options_' . $key . '_cnct', array (
|
||||
'' => '',
|
||||
'1' => $langs->trans('Yes'),
|
||||
'0' => $langs->trans('No')
|
||||
|
||||
@ -52,7 +52,7 @@ if (in_array($modulepart, array('product', 'produit', 'societe', 'user', 'ticket
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$langs->load("companies"); // Need for string DeleteFile+ConfirmDeleteFiles
|
||||
print $form->formconfirm(
|
||||
print $form->formconfirm(
|
||||
$_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int') . (empty($param)?'':$param),
|
||||
$langs->trans('DeleteFile'),
|
||||
$langs->trans('ConfirmDeleteFile'),
|
||||
|
||||
@ -33,10 +33,9 @@
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($object) || ! is_object($object))
|
||||
{
|
||||
print "Error: this template page cannot be called directly as an URL";
|
||||
exit;
|
||||
if (empty($object) || ! is_object($object)) {
|
||||
print "Error: this template page cannot be called directly as an URL";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@ -450,8 +449,8 @@ if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $da
|
||||
//There will be an edit and a delete button
|
||||
$colspan += 2;
|
||||
|
||||
// With this, there is a column move button ONLY if lines > 1
|
||||
if (in_array($object->element, array(
|
||||
// With this, there is a column move button ONLY if lines > 1
|
||||
if (in_array($object->element, array(
|
||||
'propal',
|
||||
'supplier_proposal',
|
||||
'facture',
|
||||
@ -461,8 +460,8 @@ if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $da
|
||||
'order',
|
||||
'order_supplier',
|
||||
'invoice_supplier'
|
||||
))) {
|
||||
$colspan++;
|
||||
))) {
|
||||
$colspan++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -102,7 +102,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
// Order classify billed proposal
|
||||
if ($action == 'ORDER_CLASSIFY_BILLED')
|
||||
{
|
||||
dol_syslog( "Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id );
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
if (! empty($conf->propal->enabled) && ! empty($conf->workflow->enabled) && ! empty($conf->global->WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL))
|
||||
{
|
||||
$object->fetchObjectLinked('', 'propal', $object->id, $object->element);
|
||||
@ -113,7 +113,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
{
|
||||
if ($element->statut == Propal::STATUS_SIGNED || $element->statut == Propal::STATUS_BILLED) $totalonlinkedelements += $element->total_ht;
|
||||
}
|
||||
dol_syslog( "Amount of linked proposals = ".$totalonlinkedelements.", of order = ".$object->total_ht.", egality is ".($totalonlinkedelements == $object->total_ht) );
|
||||
dol_syslog("Amount of linked proposals = ".$totalonlinkedelements.", of order = ".$object->total_ht.", egality is ".($totalonlinkedelements == $object->total_ht));
|
||||
if ( ($totalonlinkedelements == $object->total_ht) || (! empty($conf->global->WORKFLOW_CLASSIFY_IF_AMOUNTS_ARE_DIFFERENTS)) )
|
||||
{
|
||||
foreach($object->linkedObjects['propal'] as $element)
|
||||
@ -129,7 +129,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
// classify billed order & billed propososal
|
||||
if ($action == 'BILL_VALIDATE')
|
||||
{
|
||||
dol_syslog( "Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id );
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
// First classify billed the order to allow the proposal classify process
|
||||
if (! empty($conf->commande->enabled) && ! empty($conf->workflow->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER))
|
||||
@ -142,7 +142,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
{
|
||||
if ($element->statut == Commande::STATUS_VALIDATED || $element->statut == Commande::STATUS_SHIPMENTONPROCESS || $element->statut == Commande::STATUS_CLOSED) $totalonlinkedelements += $element->total_ht;
|
||||
}
|
||||
dol_syslog( "Amount of linked orders = ".$totalonlinkedelements.", of invoice = ".$object->total_ht.", egality is ".($totalonlinkedelements == $object->total_ht) );
|
||||
dol_syslog("Amount of linked orders = ".$totalonlinkedelements.", of invoice = ".$object->total_ht.", egality is ".($totalonlinkedelements == $object->total_ht));
|
||||
if ( ($totalonlinkedelements == $object->total_ht) || (! empty($conf->global->WORKFLOW_CLASSIFY_IF_AMOUNTS_ARE_DIFFERENTS)) )
|
||||
{
|
||||
foreach($object->linkedObjects['commande'] as $element)
|
||||
@ -165,7 +165,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
{
|
||||
if ($element->statut == Propal::STATUS_SIGNED || $element->statut == Propal::STATUS_BILLED) $totalonlinkedelements += $element->total_ht;
|
||||
}
|
||||
dol_syslog( "Amount of linked proposals = ".$totalonlinkedelements.", of invoice = ".$object->total_ht.", egality is ".($totalonlinkedelements == $object->total_ht) );
|
||||
dol_syslog("Amount of linked proposals = ".$totalonlinkedelements.", of invoice = ".$object->total_ht.", egality is ".($totalonlinkedelements == $object->total_ht));
|
||||
if ( ($totalonlinkedelements == $object->total_ht) || (! empty($conf->global->WORKFLOW_CLASSIFY_IF_AMOUNTS_ARE_DIFFERENTS)) )
|
||||
{
|
||||
foreach($object->linkedObjects['propal'] as $element)
|
||||
@ -181,7 +181,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
// classify billed order & billed propososal
|
||||
if ($action == 'BILL_SUPPLIER_VALIDATE')
|
||||
{
|
||||
dol_syslog( "Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id );
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
// First classify billed the order to allow the proposal classify process
|
||||
if (! empty($conf->fournisseur->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER))
|
||||
@ -194,7 +194,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
{
|
||||
if ($element->statut == CommandeFournisseur::STATUS_ACCEPTED || $element->statut == CommandeFournisseur::STATUS_ORDERSENT || $element->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY || $element->statut == CommandeFournisseur::STATUS_RECEIVED_COMPLETELY) $totalonlinkedelements += $element->total_ht;
|
||||
}
|
||||
dol_syslog( "Amount of linked orders = ".$totalonlinkedelements.", of invoice = ".$object->total_ht.", egality is ".($totalonlinkedelements == $object->total_ht) );
|
||||
dol_syslog("Amount of linked orders = ".$totalonlinkedelements.", of invoice = ".$object->total_ht.", egality is ".($totalonlinkedelements == $object->total_ht));
|
||||
if ( ($totalonlinkedelements == $object->total_ht) || (! empty($conf->global->WORKFLOW_CLASSIFY_IF_AMOUNTS_ARE_DIFFERENTS)) )
|
||||
{
|
||||
foreach($object->linkedObjects['order_supplier'] as $element)
|
||||
@ -217,7 +217,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
{
|
||||
if ($element->statut == SupplierProposal::STATUS_SIGNED || $element->statut == SupplierProposal::STATUS_BILLED) $totalonlinkedelements += $element->total_ht;
|
||||
}
|
||||
dol_syslog( "Amount of linked supplier proposals = ".$totalonlinkedelements.", of supplier invoice = ".$object->total_ht.", egality is ".($totalonlinkedelements == $object->total_ht) );
|
||||
dol_syslog("Amount of linked supplier proposals = ".$totalonlinkedelements.", of supplier invoice = ".$object->total_ht.", egality is ".($totalonlinkedelements == $object->total_ht));
|
||||
if ( ($totalonlinkedelements == $object->total_ht) || (! empty($conf->global->WORKFLOW_CLASSIFY_IF_AMOUNTS_ARE_DIFFERENTS)) )
|
||||
{
|
||||
foreach($object->linkedObjects['supplier_proposal'] as $element)
|
||||
@ -233,7 +233,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
// Invoice classify billed order
|
||||
if ($action == 'BILL_PAYED')
|
||||
{
|
||||
dol_syslog( "Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id );
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
if (! empty($conf->commande->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER))
|
||||
{
|
||||
@ -245,7 +245,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
{
|
||||
if ($element->statut == Commande::STATUS_VALIDATED || $element->statut == Commande::STATUS_SHIPMENTONPROCESS || $element->statut == Commande::STATUS_CLOSED) $totalonlinkedelements += $element->total_ht;
|
||||
}
|
||||
dol_syslog( "Amount of linked orders = ".$totalonlinkedelements.", of invoice = ".$object->total_ht.", egality is ".($totalonlinkedelements == $object->total_ht) );
|
||||
dol_syslog("Amount of linked orders = ".$totalonlinkedelements.", of invoice = ".$object->total_ht.", egality is ".($totalonlinkedelements == $object->total_ht));
|
||||
if ( ($totalonlinkedelements == $object->total_ht) || (! empty($conf->global->WORKFLOW_CLASSIFY_IF_AMOUNTS_ARE_DIFFERENTS)) )
|
||||
{
|
||||
foreach($object->linkedObjects['commande'] as $element)
|
||||
@ -260,7 +260,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
||||
|
||||
if ($action=='SHIPPING_VALIDATE')
|
||||
{
|
||||
dol_syslog( "Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id );
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
if (! empty($conf->commande->enabled) && ! empty($conf->expedition->enabled) && ! empty($conf->workflow->enabled) && ! empty($conf->global->WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING))
|
||||
{
|
||||
|
||||
@ -86,7 +86,7 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
|
||||
{
|
||||
$qualified++;
|
||||
|
||||
if (in_array($action, array(
|
||||
if (in_array($action, array(
|
||||
'MEMBER_SUBSCRIPTION_CREATE','MEMBER_SUBSCRIPTION_MODIFY','MEMBER_SUBSCRIPTION_DELETE',
|
||||
'DON_VALIDATE','DON_MODIFY','DON_DELETE'))) $amounts = (double) $object->amount;
|
||||
elseif ($action == 'CASHCONTROL_VALIDATE')
|
||||
|
||||
@ -300,7 +300,7 @@ class Don extends CommonObject
|
||||
$len=dol_strlen($this->amount);
|
||||
for ($i = 0; $i < $len; $i++)
|
||||
{
|
||||
if (!isset($map[substr($this->amount, $i, 1)] ))
|
||||
if (!isset($map[substr($this->amount, $i, 1)]))
|
||||
{
|
||||
$error_string[] = $langs->trans('ErrorFieldRequired', $langs->trans('Amount'));
|
||||
$err++;
|
||||
|
||||
@ -209,7 +209,7 @@ if ($action == 'add') {
|
||||
} elseif ($action == 'setdate_when' && $user->rights->ficheinter->creer) {
|
||||
// Set next date of execution
|
||||
$object->fetch($id);
|
||||
$date = dol_mktime(
|
||||
$date = dol_mktime(
|
||||
GETPOST('date_whenhour'), GETPOST('date_whenmin'), 0,
|
||||
GETPOST('date_whenmonth'), GETPOST('date_whenday'), GETPOST('date_whenyear')
|
||||
);
|
||||
@ -294,7 +294,7 @@ if ($action == 'create') {
|
||||
if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) {
|
||||
// Duration
|
||||
print '<tr><td>'.$langs->trans("TotalDuration").'</td>';
|
||||
print '<td colspan="3">'.convertSecondToTime(
|
||||
print '<td colspan="3">'.convertSecondToTime(
|
||||
$object->duration, 'all',
|
||||
$conf->global->MAIN_DURATION_OF_WORKDAY
|
||||
).'</td>';
|
||||
@ -307,7 +307,7 @@ if ($action == 'create') {
|
||||
print "<tr><td>".$langs->trans("Project")."</td><td>";
|
||||
$projectid = GETPOST('projectid')?GETPOST('projectid'):$object->fk_project;
|
||||
|
||||
$numprojet = $formproject->select_projects(
|
||||
$numprojet = $formproject->select_projects(
|
||||
$object->thirdparty->id, $projectid, 'projectid',
|
||||
0, 0, 1, 0, 0, 0, 0, '', 0, 0, ''
|
||||
);
|
||||
@ -342,7 +342,7 @@ if ($action == 'create') {
|
||||
print $form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency'));
|
||||
print "</td><td>";
|
||||
print "<input type='text' name='frequency' value='".GETPOST('frequency', 'int')."' size='4' /> ";
|
||||
print $form->selectarray(
|
||||
print $form->selectarray(
|
||||
'unit_frequency',
|
||||
array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')),
|
||||
(GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m')
|
||||
@ -352,7 +352,7 @@ if ($action == 'create') {
|
||||
// First date of execution for cron
|
||||
print "<tr><td>".$langs->trans('NextDateToExecution')."</td><td>";
|
||||
if ($date_next_execution != "")
|
||||
$date_next_execution = (GETPOST('remonth') ? dol_mktime(
|
||||
$date_next_execution = (GETPOST('remonth') ? dol_mktime(
|
||||
12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')
|
||||
) : -1);
|
||||
print $form->selectDate($date_next_execution, '', 1, 1, '', "add", 1, 1);
|
||||
@ -495,13 +495,13 @@ if ($action == 'create') {
|
||||
$morehtmlref.='<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
|
||||
$morehtmlref.='<input type="hidden" name="action" value="classin">';
|
||||
$morehtmlref.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
$morehtmlref.=$formproject->select_projects(
|
||||
$morehtmlref.=$formproject->select_projects(
|
||||
$object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1
|
||||
);
|
||||
$morehtmlref.='<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||
$morehtmlref.='</form>';
|
||||
} else {
|
||||
$morehtmlref.=$form->form_project(
|
||||
$morehtmlref.=$form->form_project(
|
||||
$_SERVER['PHP_SELF'].'?id='.$object->id,
|
||||
$object->socid, $object->fk_project,
|
||||
'none', 0, 0, 0, 1
|
||||
@ -560,7 +560,7 @@ if ($action == 'create') {
|
||||
print '</td><td>';
|
||||
if ($action == 'contrat') {
|
||||
$formcontract= new Formcontract($db);
|
||||
$formcontract->formSelectContract(
|
||||
$formcontract->formSelectContract(
|
||||
$_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid,
|
||||
$object->fk_contrat, 'contratid', 0, 1
|
||||
);
|
||||
@ -672,7 +672,7 @@ if ($action == 'create') {
|
||||
if ($object->frequency > 0) {
|
||||
print '<br>';
|
||||
if (empty($conf->cron->enabled)) {
|
||||
$txtinfoadmin=$langs->trans(
|
||||
$txtinfoadmin=$langs->trans(
|
||||
"EnableAndSetupModuleCron",
|
||||
$langs->transnoentitiesnoconv("Module2300Name")
|
||||
);
|
||||
@ -801,7 +801,7 @@ if ($action == 'create') {
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
print_barre_liste(
|
||||
print_barre_liste(
|
||||
$langs->trans("RepeatableInterventional"), $page,
|
||||
$_SERVER['PHP_SELF'], "&socid=$socid", $sortfield, $sortorder,
|
||||
'', $num, '', 'title_commercial.png'
|
||||
@ -812,12 +812,12 @@ if ($action == 'create') {
|
||||
$i = 0;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Ref"), $_SERVER['PHP_SELF'], "f.titre", "", "",
|
||||
'width="200px" align="left"', $sortfiled, $sortorder
|
||||
);
|
||||
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Company"), $_SERVER['PHP_SELF'], "s.nom", "", "",
|
||||
'width="200px" align="left"', $sortfiled, $sortorder
|
||||
);
|
||||
@ -834,29 +834,29 @@ if ($action == 'create') {
|
||||
"f.fk_project", "", "",
|
||||
'width="100px" align="left"', $sortfiled, $sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Duration"), $_SERVER['PHP_SELF'],
|
||||
'f.duree', '', '',
|
||||
'width="50px" align="right"', $sortfiled, $sortorder
|
||||
);
|
||||
// Recurring or not
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans("Frequency"), $_SERVER['PHP_SELF'],
|
||||
"f.frequency", "", "",
|
||||
'width="100px" align="center"', $sortfiled, $sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans("NbOfGenerationDone"), $_SERVER['PHP_SELF'],
|
||||
"f.nb_gen_done", "", "",
|
||||
'width="100px" align="center"', $sortfiled, $sortorder
|
||||
);
|
||||
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans("DateLastGeneration"), $_SERVER['PHP_SELF'],
|
||||
"f.date_last_gen", "", "",
|
||||
'width="100px" align="center"', $sortfiled, $sortorder
|
||||
);
|
||||
print_liste_field_titre(
|
||||
print_liste_field_titre(
|
||||
$langs->trans("NextDateToIntervention"), $_SERVER['PHP_SELF'],
|
||||
"f.date_when", "", "",
|
||||
'width="100px" align="center"', $sortfiled, $sortorder
|
||||
|
||||
@ -365,7 +365,7 @@ if (empty($reshook))
|
||||
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
|
||||
|
||||
$result = $object->addline(
|
||||
$result = $object->addline(
|
||||
$user,
|
||||
$id,
|
||||
$desc,
|
||||
@ -510,7 +510,7 @@ if (empty($reshook))
|
||||
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||
$array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||
|
||||
$result=$object->addline(
|
||||
$result=$object->addline(
|
||||
$user,
|
||||
$id,
|
||||
$desc,
|
||||
|
||||
@ -1293,7 +1293,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
$this->special_code = $this->lines[$i]->special_code; // TODO : remove this in 9.0 and add special_code param to addline()
|
||||
|
||||
$result = $this->addline( // This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set
|
||||
$result = $this->addline( // This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set
|
||||
$this->lines[$i]->desc,
|
||||
$this->lines[$i]->subprice,
|
||||
$this->lines[$i]->qty,
|
||||
|
||||
@ -458,7 +458,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
{
|
||||
$idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det');
|
||||
|
||||
$this->updateline(
|
||||
$this->updateline(
|
||||
$idligne,
|
||||
$line->description,
|
||||
$line->pu_ht,
|
||||
|
||||
@ -626,7 +626,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
$result = $object->updateline(
|
||||
$result = $object->updateline(
|
||||
$lineid,
|
||||
$_POST['product_desc'],
|
||||
$ht,
|
||||
|
||||
@ -344,7 +344,7 @@ if (empty($reshook))
|
||||
{
|
||||
$fk_parent_line = 0;
|
||||
}
|
||||
$result = $object->addline(
|
||||
$result = $object->addline(
|
||||
$desc,
|
||||
$lines[$i]->subprice,
|
||||
$lines[$i]->qty,
|
||||
|
||||
@ -330,8 +330,8 @@ if ($search_montant_localtax2 != '') $sql.= natural_search('f.localtax2', $searc
|
||||
if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1);
|
||||
if ($search_status != '' && $search_status >= 0) $sql.= " AND f.fk_statut = ".$db->escape($search_status);
|
||||
if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$search_paymentmode."";
|
||||
$sql.= dolSqlDateFilter( "f.datef", $day, $month, $year);
|
||||
$sql.= dolSqlDateFilter( "f.date_lim_reglement", $day_lim, $month_lim, $year_lim);
|
||||
$sql.= dolSqlDateFilter("f.datef", $day, $month, $year);
|
||||
$sql.= dolSqlDateFilter("f.date_lim_reglement", $day_lim, $month_lim, $year_lim);
|
||||
if ($option == 'late') $sql.=" AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->fournisseur->warning_delay)."'";
|
||||
if ($search_label) $sql .= natural_search('f.libelle', $search_label);
|
||||
if ($search_status != '' && $search_status >= 0)
|
||||
|
||||
@ -202,7 +202,7 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td>';
|
||||
print '<td>';
|
||||
print $formcompany->select_ziptown(
|
||||
print $formcompany->select_ziptown(
|
||||
GETPOST('zipcode', 'alpha'),
|
||||
'zipcode',
|
||||
array (
|
||||
@ -218,7 +218,7 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td>';
|
||||
print '<td>';
|
||||
print $formcompany->select_ziptown(GETPOST('town', 'alpha'), 'town', array (
|
||||
print $formcompany->select_ziptown(GETPOST('town', 'alpha'), 'town', array (
|
||||
'zipcode',
|
||||
'selectcountry_id'
|
||||
));
|
||||
@ -292,12 +292,12 @@ if (($id || $ref) && $action == 'edit')
|
||||
|
||||
// Zipcode / Town
|
||||
print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td>';
|
||||
print $formcompany->select_ziptown($object->zip, 'zipcode', array (
|
||||
print $formcompany->select_ziptown($object->zip, 'zipcode', array (
|
||||
'town',
|
||||
'selectcountry_id'
|
||||
), 6) . '</tr>';
|
||||
print '<tr><td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td>';
|
||||
print $formcompany->select_ziptown($object->town, 'town', array (
|
||||
print $formcompany->select_ziptown($object->town, 'town', array (
|
||||
'zipcode',
|
||||
'selectcountry_id'
|
||||
)) . '</td></tr>';
|
||||
|
||||
@ -60,8 +60,8 @@ $useforcedwizard=false;
|
||||
$forcedfile="./install.forced.php";
|
||||
if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php"; // Must be after inc.php
|
||||
if (@file_exists($forcedfile)) {
|
||||
$useforcedwizard = true;
|
||||
include_once $forcedfile;
|
||||
$useforcedwizard = true;
|
||||
include_once $forcedfile;
|
||||
}
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ pHeader($langs->trans("ConfigurationFile"), "step1", "set", "", (empty($force_do
|
||||
if (! is_writable($conffile))
|
||||
{
|
||||
print $langs->trans("ConfFileIsNotWritable", $conffiletoshow);
|
||||
dolibarr_install_syslog("fileconf: config file is not writable", LOG_WARNING);
|
||||
dolibarr_install_syslog("fileconf: config file is not writable", LOG_WARNING);
|
||||
dolibarr_install_syslog("- fileconf: end");
|
||||
pFooter(1, $setuplang, 'jscheckparam');
|
||||
exit;
|
||||
@ -509,7 +509,7 @@ if (! empty($force_install_message))
|
||||
$autofill = '';
|
||||
}
|
||||
// Do not autofill password if instance is a production instance
|
||||
if (!empty($_SERVER["SERVER_NAME"]) && !in_array($_SERVER["SERVER_NAME"],
|
||||
if (!empty($_SERVER["SERVER_NAME"]) && !in_array($_SERVER["SERVER_NAME"],
|
||||
array('127.0.0.1', 'localhost', 'localhostgit'))
|
||||
) {
|
||||
$autofill = '';
|
||||
|
||||
@ -452,7 +452,7 @@ class PaymentLoan extends CommonObject
|
||||
if ($mode == 'payment_loan') $total=-$total;
|
||||
|
||||
// Insert payment into llx_bank
|
||||
$bank_line_id = $acc->addline(
|
||||
$bank_line_id = $acc->addline(
|
||||
$this->datep,
|
||||
$this->paymenttype, // Payment mode id or code ("CHQ or VIR for example")
|
||||
$label,
|
||||
|
||||
@ -1551,7 +1551,7 @@ elseif (! empty($module))
|
||||
{ // tabobj = module
|
||||
if ($action == 'deleteproperty')
|
||||
{
|
||||
$formconfirm = $form->formconfirm(
|
||||
$formconfirm = $form->formconfirm(
|
||||
$_SERVER["PHP_SELF"].'?propertykey='.urlencode(GETPOST('propertykey', 'alpha')).'&objectname='.urlencode($objectname).'&tab='.urlencode($tab).'&module='.urlencode($module).'&tabobj='.urlencode($tabobj),
|
||||
$langs->trans('Delete'), $langs->trans('ConfirmDeleteProperty', GETPOST('propertykey', 'alpha')), 'confirm_deleteproperty', '', 0, 1
|
||||
);
|
||||
|
||||
@ -224,7 +224,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
{
|
||||
$this->url('/custom/mymodule/admin/about.php');
|
||||
$this->authenticate();
|
||||
return $this->assertEquals(
|
||||
return $this->assertEquals(
|
||||
'Dolibarr Module Template (aka My Module)',
|
||||
$this->byTag('h1')->text(),
|
||||
"Readme title"
|
||||
@ -254,7 +254,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
{
|
||||
$this->url('/admin/triggers.php');
|
||||
$this->authenticate();
|
||||
return $this->assertContains(
|
||||
return $this->assertContains(
|
||||
'interface_99_modMyModule_MyModuleTriggers.class.php',
|
||||
$this->byTag('body')->text(),
|
||||
"Trigger declared"
|
||||
@ -271,7 +271,7 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
{
|
||||
$this->url('/admin/triggers.php');
|
||||
$this->authenticate();
|
||||
return $this->assertContains(
|
||||
return $this->assertContains(
|
||||
'tick.png',
|
||||
$this->byXPath('//td[text()="interface_99_modMyModule_MyTrigger.class.php"]/following::img')->attribute('src'),
|
||||
"Trigger enabled"
|
||||
|
||||
@ -119,7 +119,7 @@ elseif($action==='save_composed_product')
|
||||
{
|
||||
foreach ($TProduct as $id_product => $row)
|
||||
{
|
||||
if ($row['qty'] > 0) $object->update_sousproduit($id, $id_product, $row['qty'], isset($row['incdec']) ? 1 : 0 );
|
||||
if ($row['qty'] > 0) $object->update_sousproduit($id, $id_product, $row['qty'], isset($row['incdec']) ? 1 : 0);
|
||||
else $object->del_sousproduit($id, $id_product);
|
||||
}
|
||||
setEventMessages('RecordSaved', null);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user