forked from Wavyzz/dolibarr
Merge branch 'develop' of github.com:Dolibarr/dolibarr into 12.0_new_allow_extrafields_on_pdf_extend_to_line_desc
This commit is contained in:
@@ -111,6 +111,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
|
||||
$newdiscount1->description = $discount->description.' (1)';
|
||||
$newdiscount2->description = $discount->description.' (2)';
|
||||
}
|
||||
|
||||
$newdiscount1->fk_user = $discount->fk_user;
|
||||
$newdiscount2->fk_user = $discount->fk_user;
|
||||
$newdiscount1->fk_soc = $discount->fk_soc;
|
||||
@@ -121,7 +122,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
|
||||
$newdiscount2->datec = $discount->datec;
|
||||
$newdiscount1->tva_tx = $discount->tva_tx;
|
||||
$newdiscount2->tva_tx = $discount->tva_tx;
|
||||
$newdiscount1->amount_ttc = $_POST["amount_ttc_1"];
|
||||
$newdiscount1->amount_ttc = $amount_ttc_1;
|
||||
$newdiscount2->amount_ttc = price2num($discount->amount_ttc - $newdiscount1->amount_ttc);
|
||||
$newdiscount1->amount_ht = price2num($newdiscount1->amount_ttc / (1 + $newdiscount1->tva_tx / 100), 'MT');
|
||||
$newdiscount2->amount_ht = price2num($newdiscount2->amount_ttc / (1 + $newdiscount2->tva_tx / 100), 'MT');
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2020 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@@ -83,6 +84,7 @@ class box_contacts extends ModeleBoxes
|
||||
if ($user->rights->societe->lire && $user->rights->societe->contact->lire)
|
||||
{
|
||||
$sql = "SELECT sp.rowid as id, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc, sp.statut as status";
|
||||
|
||||
$sql .= ", sp.address, sp.zip, sp.town, sp.phone, sp.phone_perso, sp.phone_mobile, sp.email as spemail";
|
||||
$sql .= ", s.nom as socname, s.name_alias, s.email as semail";
|
||||
$sql .= ", s.client, s.fournisseur, s.code_client, s.code_fournisseur";
|
||||
|
||||
@@ -393,6 +393,7 @@ class ExtraFields
|
||||
if (empty($required)) $required = 0;
|
||||
if (empty($unique)) $unique = 0;
|
||||
if (empty($alwayseditable)) $alwayseditable = 0;
|
||||
if (empty($totalizable)) $totalizable = 0;
|
||||
|
||||
if (!empty($attrname) && preg_match("/^\w[a-zA-Z0-9-_]*$/", $attrname) && !is_numeric($attrname))
|
||||
{
|
||||
@@ -456,7 +457,7 @@ class ExtraFields
|
||||
$sql .= "'".$this->db->idate(dol_now())."',";
|
||||
$sql .= " ".($enabled ? "'".$this->db->escape($enabled)."'" : "1").",";
|
||||
$sql .= " ".($help ? "'".$this->db->escape($help)."'" : "null").",";
|
||||
$sql .= " ".($totalizable ? '1' : '0');
|
||||
$sql .= " ".($totalizable ? 'TRUE' : 'FALSE');
|
||||
$sql .= ')';
|
||||
|
||||
dol_syslog(get_class($this)."::create_label", LOG_DEBUG);
|
||||
@@ -805,7 +806,7 @@ class ExtraFields
|
||||
$sql .= " '".$this->db->escape($params)."',";
|
||||
$sql .= " '".$this->db->escape($list)."', ";
|
||||
$sql .= " '".$this->db->escape($printable)."', ";
|
||||
$sql .= " ".$totalizable.",";
|
||||
$sql .= " ".($totalizable ? 'TRUE' : 'FALSE').",";
|
||||
$sql .= " ".(($default != '') ? "'".$this->db->escape($default)."'" : "null").",";
|
||||
$sql .= " ".($computed ? "'".$this->db->escape($computed)."'" : "null").",";
|
||||
$sql .= " ".$user->id.",";
|
||||
@@ -945,7 +946,7 @@ class ExtraFields
|
||||
$this->attributes[$tab->elementtype]['langfile'][$tab->name] = $tab->langs;
|
||||
$this->attributes[$tab->elementtype]['list'][$tab->name] = $tab->list;
|
||||
$this->attributes[$tab->elementtype]['printable'][$tab->name] = $tab->printable;
|
||||
$this->attributes[$tab->elementtype]['totalizable'][$tab->name] = $tab->totalizable;
|
||||
$this->attributes[$tab->elementtype]['totalizable'][$tab->name] = ($tab->totalizable ? 1 : 0);
|
||||
$this->attributes[$tab->elementtype]['entityid'][$tab->name] = $tab->entity;
|
||||
$this->attributes[$tab->elementtype]['enabled'][$tab->name] = $tab->enabled;
|
||||
$this->attributes[$tab->elementtype]['help'][$tab->name] = $tab->help;
|
||||
|
||||
@@ -1298,7 +1298,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
||||
$tabsname = str_replace("@", "", $picto);
|
||||
$out .= '<div id="moretabs'.$tabsname.'" class="inline-block tabsElem">';
|
||||
$out .= '<a href="#" class="tab moretab inline-block tabunactive reposition">'.$langs->trans("More").'... ('.$nbintab.')</a>';
|
||||
$out .= '<div id="moretabsList'.$tabsname.'" style="position: absolute; '.$left.': -999em; text-align: '.$left.'; margin:0px; padding:2px">';
|
||||
$out .= '<div id="moretabsList'.$tabsname.'" style="position: absolute; '.$left.': -999em; text-align: '.$left.'; margin:0px; padding:2px; z-index:10;">';
|
||||
$out .= $outmore;
|
||||
$out .= '</div>';
|
||||
$out .= '<div></div>';
|
||||
|
||||
@@ -107,7 +107,7 @@ function dol_decode($chain, $key = '1')
|
||||
* If constant MAIN_SECURITY_SALT is defined, we use it as a salt (used only if hashing algorightm is something else than 'password_hash').
|
||||
*
|
||||
* @param string $chain String to hash
|
||||
* @param string $type Type of hash ('0':auto will use MAIN_SECURITY_HASH_ALGO else md5, '1':sha1, '2':sha1+md5, '3':md5, '4':md5 for OpenLdap, '5':sha256). Use '3' here, if hash is not needed for security purpose, for security need, prefer '0'.
|
||||
* @param string $type Type of hash ('0':auto will use MAIN_SECURITY_HASH_ALGO else md5, '1':sha1, '2':sha1+md5, '3':md5, '4':md5 for OpenLdap with no salt, '5':sha256). Use '3' here, if hash is not needed for security purpose, for security need, prefer '0'.
|
||||
* @return string Hash of string
|
||||
* @see getRandomPassword()
|
||||
*/
|
||||
@@ -122,7 +122,7 @@ function dol_hash($chain, $type = '0')
|
||||
}
|
||||
|
||||
// Salt value
|
||||
if (!empty($conf->global->MAIN_SECURITY_SALT)) $chain = $conf->global->MAIN_SECURITY_SALT.$chain;
|
||||
if (! empty($conf->global->MAIN_SECURITY_SALT) && $type != '4' && $type !== 'md5openldap') $chain = $conf->global->MAIN_SECURITY_SALT.$chain;
|
||||
|
||||
if ($type == '1' || $type == 'sha1') return sha1($chain);
|
||||
elseif ($type == '2' || $type == 'sha1md5') return sha1(md5($chain));
|
||||
|
||||
@@ -1320,9 +1320,9 @@ class Cronjob extends CommonObject
|
||||
if ($processing) $moretext = ' ('.$langs->trans("Running").')';
|
||||
elseif ($lastresult) $moretext .= ' ('.$langs->trans("Error").')';
|
||||
|
||||
$this->labelStatus[self::STATUS_DISABLED] = $langs->trans('Draft').$moretext;
|
||||
$this->labelStatus[self::STATUS_DISABLED] = $langs->trans('Disabled').$moretext;
|
||||
$this->labelStatus[self::STATUS_ENABLED] = $langs->trans('Enabled').$moretext;
|
||||
$this->labelStatusShort[self::STATUS_DISABLED] = $langs->trans('Draft');
|
||||
$this->labelStatusShort[self::STATUS_DISABLED] = $langs->trans('Disabled');
|
||||
$this->labelStatusShort[self::STATUS_ENABLED] = $langs->trans('Enabled');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user