From a9e5668ea4b4444c8d86b1cfd49d226a1990f27d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 28 Aug 2016 15:58:52 +0200 Subject: [PATCH 1/6] Fix for jmobile --- htdocs/product/class/product.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 79c21cfcbdf..afff7d6f1c6 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -3690,11 +3690,11 @@ class Product extends CommonObject if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) { $return.= ''; - $return.= 'dol_use_jmobile?'max-height':'height').'="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$this->entity.'&file='.urlencode($pdirthumb.$photo_vignette).'" title="'.dol_escape_htmltag($alt).'">'; + $return.= ''; } else { $return.= ''; - $return.= 'dol_use_jmobile?'max-height':'height').'="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$this->entity.'&file='.urlencode($pdir.$photo).'" title="'.dol_escape_htmltag($alt).'">'; + $return.= ''; } if (empty($nolink)) $return.= ''; From 18cf2f8f8b04a50e2f8c7eb4f604b2eb01907020 Mon Sep 17 00:00:00 2001 From: gauthier Date: Wed, 31 Aug 2016 10:19:40 +0200 Subject: [PATCH 2/6] FIX : header title in commercial area --- htdocs/comm/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 7dc359b4568..2d473efc310 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -66,7 +66,7 @@ $companystatic=new Societe($db); if (! empty($conf->propal->enabled)) $propalstatic=new Propal($db); if (! empty($conf->commande->enabled)) $orderstatic=new Commande($db); -llxHeader(); +llxHeader("",$langs->trans("CommercialArea")); print_fiche_titre($langs->trans("CommercialArea"),'','title_commercial.png'); From 10ced563b30063f6faaa2cbf2689f907c6bdff97 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Aug 2016 19:39:12 +0200 Subject: [PATCH 3/6] Fix var $conf not defined --- htdocs/compta/prelevement/class/bonprelevement.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 9a569a46f7c..bd2fd150d75 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1673,8 +1673,9 @@ class BonPrelevement extends CommonObject * @return string String with SEPA Sender */ function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n') - { // SEPA INITIALISATION - global $confs; + { + // SEPA INITIALISATION + global $conf; $dateTime_YMD = dol_print_date($ladate, '%Y%m%d'); $dateTime_ETAD = dol_print_date($ladate, '%Y-%m-%d'); From 1c626c01eee96e1720e3aee0bd3fa3555c1d4645 Mon Sep 17 00:00:00 2001 From: fappels Date: Fri, 2 Sep 2016 11:29:28 +0200 Subject: [PATCH 4/6] Ignore time when checking lot dates --- .../stock/class/mouvementstock.class.php | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index dde89bfb6e5..f9c844cd7c5 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -137,17 +137,26 @@ class MouvementStock extends CommonObject while ($i < $num) { $obj = $this->db->fetch_object($resql); - if ($this->db->jdate($obj->eatby) != $eatby) + // only check date values + $tmparray=dol_getdate($eatby, true); + $eatby=dol_mktime(0, 0, 0, $tmparray['mon'], $tmparray['mday'], $tmparray['year']); + $tmparray=dol_getdate($sellby, true); + $sellby=dol_mktime(0, 0, 0, $tmparray['mon'], $tmparray['mday'], $tmparray['year']); + $tmparray=dol_getdate($this->db->jdate($obj->eatby), true); + $dbEatby=dol_mktime(0, 0, 0, $tmparray['mon'], $tmparray['mday'], $tmparray['year']); + $tmparray=dol_getdate($this->db->jdate($obj->sellby), true); + $dbSellby=dol_mktime(0, 0, 0, $tmparray['mon'], $tmparray['mday'], $tmparray['year']); + if ($dbEatby != $eatby) { - $this->errors[]=$langs->trans("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($this->db->jdate($obj->eatby)), dol_print_date($eatby)); - dol_syslog($langs->transnoentities("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($this->db->jdate($obj->eatby)), dol_print_date($eatby)), LOG_ERR); + $this->errors[]=$langs->trans("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($dbEatby), dol_print_date($eatby)); + dol_syslog($langs->transnoentities("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($dbEatby), dol_print_date($eatby)), LOG_ERR); $this->db->rollback(); return -3; } - if ($this->db->jdate($obj->sellby) != $sellby) + if ($dbSellby != $sellby) { - $this->errors[]=$langs->trans("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($this->db->jdate($obj->sellby)), dol_print_date($sellby)); - dol_syslog($langs->transnoentities("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($this->db->jdate($obj->sellby)), dol_print_date($sellby)), LOG_ERR); + $this->errors[]=$langs->trans("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($dbSellby), dol_print_date($sellby)); + dol_syslog($langs->transnoentities("ThisSerialAlreadyExistWithDifferentDate", $batch, dol_print_date($dbSellby), dol_print_date($sellby)), LOG_ERR); $this->db->rollback(); return -3; } From 416a0892d75438a4083c94176d803a5c723d8fa9 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Fri, 2 Sep 2016 12:32:14 +0200 Subject: [PATCH 5/6] Fix: An empty variable is used to update multiprice --- htdocs/product/price.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index cfdcfd33db7..ef807d2f603 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -10,6 +10,7 @@ * Copyright (C) 2014 Ion agorria * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2015 Marcos GarcĂ­a + * Copyright (C) 2016 Ferran Marcet * * 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 @@ -213,7 +214,7 @@ if (empty($reshook)) 'price' => $newprice[$i], 'price_min' => $newprice_min[$i], 'price_base_type' => $newpricebase[$i], - 'vat_tx' => $tva_tx, + 'vat_tx' => $tva_tx_txt, 'npr' => $npr, 'localtaxes_array' => array('0'=>$localtax1_type, '1'=>$localtax1, '2'=>$localtax2_type, '3'=>$localtax2) ); From fcd5e1fb2c529a5eb9c5e501c23094bab5e9a05e Mon Sep 17 00:00:00 2001 From: phf Date: Fri, 2 Sep 2016 15:30:42 +0200 Subject: [PATCH 6/6] Fix lost value if use double quote --- htdocs/societe/soc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 3a5ed38e2d5..d2fccc12f9b 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -252,7 +252,7 @@ if (empty($reshook)) $object->name_alias = GETPOST('name_alias'); } - $object->address = GETPOST('address', 'alpha'); + $object->address = GETPOST('address'); $object->zip = GETPOST('zipcode', 'alpha'); $object->town = GETPOST('town', 'alpha'); $object->country_id = GETPOST('country_id', 'int');