Merge branch '3.9' of github.com:Dolibarr/dolibarr into 3.9_dalibo

This commit is contained in:
arnaud 2017-03-10 11:46:59 +01:00
commit 1d31603ad2
14 changed files with 91 additions and 20 deletions

View File

@ -11,6 +11,61 @@ during migration.
Upgrading to any other version or any other database system is abolutely required BEFORE trying Upgrading to any other version or any other database system is abolutely required BEFORE trying
make a Dolibarr upgrade. make a Dolibarr upgrade.
***** ChangeLog for 3.9.4 compared to 3.9.3 *****
FIX: #2853
FIX: #3128
FIX: #4447
FIX: #5128 if create method return duplicated code error not use GETPOST in order to get a new code
FIX: #5340
FIX: #5473
FIX: #5474 Country_id of "Don" object is still empty
FIX: #5534
FIX: #5535 bad dependency.
FIX: #5537 AJAX project search does not work properly
FIX: #5540 getFormMail is not registered as addReplace hook
FIX: #5544 Disabled Contact still appear in lists to send emails
FIX: #5549 getNomUrl tooltips show Order info even if user has no rights to read them
FIX: #5568
FIX: #5594
FIX: #5629 PgSQL Interger string stylish error
FIX: #5651
FIX: #5660
FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1
FIX: #5907
FIX: #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
FIX: #6051
FIX: #6088
FIX: Can correct stock of lot using eatby or sell by date
FIX: Can make a movement on "out of sell" products
FIX: cannot update bank account on invoice if module order not activated
FIX: Can't create withdrawal document
FIX: delete contract extrafields on contract deletion
FIX: Direction of movement lost if an error occurs
FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is daughter of an already linked to object
FIX: export extrafields must not include separe type
FIX: External user must not be able to edit its discounts
FIX: Failed to export contact categories with contact extra fields
FIX: header title in commercial area
FIX: HT and TTC price should always be displayed together
FIX: incoterms
FIX: incoterms do not output into crabe invoice PDF
FIX: in PgSQL no quote "word style" is permitted around column name
FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
FIX: margin tab on customer card must filter on current entity invoices
FIX: missing column into SQL on thridparty list
FIX: only show projects of related third if external user
FIX: PgSQL Module Ressource list crash #5637
FIX: php Strict
FIX: Regression when deleting product
FIX: Security to restrict email sending was not efficient
FIX: tag for date rfc in odt substitution
FIX: Update intervention lline crash with PgSQL
FIX: update limit stock on product stock
FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
FIX: wrong test on dict.php
***** ChangeLog for 3.9.3 compared to 3.9.2 ***** ***** ChangeLog for 3.9.3 compared to 3.9.2 *****
FIX: #4383 $userid not defined FIX: #4383 $userid not defined
FIX: #4448 $filebonprev is not used, $this->filename now FIX: #4448 $filebonprev is not used, $this->filename now

View File

@ -109,7 +109,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
$newdiscount2->amount_ttc=price2num($discount->amount_ttc-$newdiscount1->amount_ttc); $newdiscount2->amount_ttc=price2num($discount->amount_ttc-$newdiscount1->amount_ttc);
$newdiscount1->amount_ht=price2num($newdiscount1->amount_ttc/(1+$newdiscount1->tva_tx/100),'MT'); $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'); $newdiscount2->amount_ht=price2num($newdiscount2->amount_ttc/(1+$newdiscount2->tva_tx/100),'MT');
$newdiscount1->amount_tva=price2num($newdiscount1->amount_ttc-$newdiscount2->amount_ht); $newdiscount1->amount_tva=price2num($newdiscount1->amount_ttc-$newdiscount1->amount_ht);
$newdiscount2->amount_tva=price2num($newdiscount2->amount_ttc-$newdiscount2->amount_ht); $newdiscount2->amount_tva=price2num($newdiscount2->amount_ttc-$newdiscount2->amount_ht);
$db->begin(); $db->begin();

View File

@ -275,6 +275,7 @@ if ($resql)
if ($search_sale > 0) $param.='&search_sale='.$search_sale; if ($search_sale > 0) $param.='&search_sale='.$search_sale;
if ($search_total_ht != '') $param.='&search_total_ht='.$search_total_ht; if ($search_total_ht != '') $param.='&search_total_ht='.$search_total_ht;
if ($optioncss != '') $param.='&optioncss='.$optioncss; if ($optioncss != '') $param.='&optioncss='.$optioncss;
if ($billed != '') $param.='&billed='.$billed;
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
print_barre_liste($title, $page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_commercial.png'); print_barre_liste($title, $page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_commercial.png');

View File

@ -87,6 +87,17 @@ if ($action == 'delete')
{ {
if (GETPOST('categid')) if (GETPOST('categid'))
{ {
// Delete bank class
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class";
$sql.= " WHERE fk_categ = '".GETPOST('categid')."'";
$result = $db->query($sql);
if (!$result)
{
dol_print_error($db);
}
// Delete bank categ
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ";
$sql.= " WHERE rowid = '".GETPOST('categid')."'"; $sql.= " WHERE rowid = '".GETPOST('categid')."'";
$sql.= " AND entity = ".$conf->entity; $sql.= " AND entity = ".$conf->entity;

View File

@ -135,13 +135,15 @@ class FormProjets
// Search all projects // Search all projects
$sql = 'SELECT p.rowid, p.ref, p.title, p.fk_soc, p.fk_statut, p.public'; $sql = 'SELECT p.rowid, p.ref, p.title, p.fk_soc, p.fk_statut, p.public';
$sql.= ' FROM '.MAIN_DB_PREFIX .'projet as p'; $sql.= ' FROM '.MAIN_DB_PREFIX .'projet as p';
$sql.= " WHERE p.entity = ".$conf->entity; $sql.= " WHERE p.entity IN (".getEntity('project',1).")";
if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")"; if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")";
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)"; if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
if ($socid > 0) $sql.= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)"; if ($socid > 0) $sql.= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)";
if (!empty($filterkey)) { if (!empty($filterkey)) {
$sql .= " AND p.title LIKE '%".$this->db->escape($filterkey)."%'"; $sql .= ' AND (';
$sql .= " OR p.ref LIKE '%".$this->db->escape($filterkey)."%'"; $sql .= ' p.title LIKE "%'.$this->db->escape($filterkey).'%"';
$sql .= ' OR p.ref LIKE "%'.$this->db->escape($filterkey).'%"';
$sql .= ')';
} }
$sql.= " ORDER BY p.ref ASC"; $sql.= " ORDER BY p.ref ASC";

View File

@ -110,8 +110,8 @@ class pdf_einstein extends ModelePDFCommandes
{ {
$this->posxtva=99; $this->posxtva=99;
$this->posxup=114; $this->posxup=114;
$this->posxqty=133; $this->posxqty=130;
$this->posxunit=150; $this->posxunit=147;
} }
else else
{ {

View File

@ -120,8 +120,8 @@ class pdf_crabe extends ModelePDFFactures
{ {
$this->posxtva=99; $this->posxtva=99;
$this->posxup=114; $this->posxup=114;
$this->posxqty=133; $this->posxqty=130;
$this->posxunit=150; $this->posxunit=147;
} }
else else
{ {

View File

@ -252,7 +252,7 @@ class mod_codeproduct_elephant extends ModeleProductCode
// Get Mask value // Get Mask value
$mask = ''; $mask = '';
if ($type==0) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT)?'':$conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT; if ($type==0) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT)?'':$conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT;
if ($type==1) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_SSERVICE)?'':$conf->global->PRODUCT_ELEPHANT_MASK_SERVICE; if ($type==1) $mask = empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE)?'':$conf->global->PRODUCT_ELEPHANT_MASK_SERVICE;
if (! $mask) if (! $mask)
{ {
$this->error='NotConfigured'; $this->error='NotConfigured';

View File

@ -108,8 +108,8 @@ class pdf_azur extends ModelePDFPropales
{ {
$this->posxtva=99; $this->posxtva=99;
$this->posxup=114; $this->posxup=114;
$this->posxqty=133; $this->posxqty=130;
$this->posxunit=150; $this->posxunit=147;
} }
else else
{ {

View File

@ -102,8 +102,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
if($conf->global->PRODUCT_USE_UNITS) { if($conf->global->PRODUCT_USE_UNITS) {
$this->posxtva=99; $this->posxtva=99;
$this->posxup=114; $this->posxup=114;
$this->posxqty=133; $this->posxqty=130;
$this->posxunit=150; $this->posxunit=147;
} }
//if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup; //if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images $this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images

View File

@ -111,8 +111,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
{ {
$this->posxtva=99; $this->posxtva=99;
$this->posxup=114; $this->posxup=114;
$this->posxqty=133; $this->posxqty=130;
$this->posxunit=150; $this->posxunit=147;
} else { } else {
$this->posxtva=112; $this->posxtva=112;
$this->posxup=126; $this->posxup=126;

View File

@ -524,13 +524,14 @@ class PaymentExpenseReport extends CommonObject
{ {
if ($mode == 'payment_expensereport') if ($mode == 'payment_expensereport')
{ {
$euser = new User($this->db); $er = new ExpenseReport($this->db);
$euser->fetch($key); $er->fetch($key);
$er->fetch_user($er->fk_user_author);
$result=$acc->add_url_line( $result=$acc->add_url_line(
$bank_line_id, $bank_line_id,
$euser->id, $er->user->id,
DOL_URL_ROOT.'/user/card.php?id=', DOL_URL_ROOT.'/user/card.php?id=',
$euser->getFullName($langs), $er->user->getFullName($langs),
'user' 'user'
); );
if ($result <= 0) if ($result <= 0)

View File

@ -31,7 +31,7 @@
*/ */
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr'); if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.9.4'); if (! defined('DOL_VERSION')) define('DOL_VERSION','3.9.5');
if (! defined('EURO')) define('EURO',chr(128)); if (! defined('EURO')) define('EURO',chr(128));

View File

@ -126,6 +126,7 @@ $sql.= ", ".MAIN_DB_PREFIX."facturedet as d";
$sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= ", ".MAIN_DB_PREFIX."user as u"; $sql.= ", ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE f.fk_soc = s.rowid"; $sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND f.entity = ".$conf->entity;
$sql.= " AND sc.fk_soc = f.fk_soc"; $sql.= " AND sc.fk_soc = f.fk_soc";
$sql.= " AND (d.product_type = 0 OR d.product_type = 1)"; $sql.= " AND (d.product_type = 0 OR d.product_type = 1)";
if (! empty($conf->global->AGENT_CONTACT_TYPE)) if (! empty($conf->global->AGENT_CONTACT_TYPE))