From 40969813787f7d0dc72b76750a4d9c982ef1a77a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Sep 2016 03:10:18 +0200 Subject: [PATCH 1/7] FIX #3128 --- htdocs/compta/prelevement/class/bonprelevement.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index bd2fd150d75..f007fa41d21 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1558,7 +1558,7 @@ class BonPrelevement extends CommonObject $XML_DEBITOR =''; $XML_DEBITOR .=' '.$CrLf; $XML_DEBITOR .=' '.$CrLf; - $XML_DEBITOR .=' '.('AS-'.$row_facnumber.'-'.$Rowing).''.$CrLf; + $XML_DEBITOR .=' '.('AS-'.dol_trunc($row_facnumber,20).'-'.$Rowing).''.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters $XML_DEBITOR .=' '.$CrLf; $XML_DEBITOR .=' '.round($row_somme, 2).''.$CrLf; $XML_DEBITOR .=' '.$CrLf; From 1d95720644f85dfd24ece036918644daf9e41b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 13 Sep 2016 11:35:16 +0200 Subject: [PATCH 2/7] Fixed product description field name in line edit. The POST value 'desc' was never evaluated and caused fields to blank out on update action. --- htdocs/core/tpl/objectline_edit.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 1e9a13069ae..83d596dbd61 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -99,7 +99,7 @@ $coldisplay=-1; // We remove first td $doleditor=new DolEditor('product_desc',$line->description,'',164,$toolbarname,'',false,true,$enable,$nbrows,'98%'); $doleditor->Create(); } else { - print ''; + print ''; } ?> From 5840ed825827424b8d8d5a9ac435db88af29740a Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 15 Sep 2016 12:08:47 +0200 Subject: [PATCH 3/7] No ORDER BY needed for a COUNT sql, causes PGSQL error --- htdocs/fourn/card.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 956d4b52452..b52e8db0af6 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -411,7 +411,6 @@ if ($object->id > 0) $sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as p "; $sql.= " WHERE p.fk_soc =".$object->id; $sql.= " AND p.entity =".$conf->entity; - $sql.= " ORDER BY p.date_commande DESC"; $resql=$db->query($sql); if ($resql) { From 64dc44b796618fffff2fbc283ddee98b3c2a7ac3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 19 Sep 2016 16:27:01 +0200 Subject: [PATCH 4/7] FIX Value of payment term and project are not set on correct default value when invoice generated from template. --- htdocs/compta/facture.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 0f459a28625..a19262144eb 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1995,8 +1995,10 @@ if ($action == 'create') if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; } - if(!empty($soc->id)) $absolute_discount = $soc->getAvailableDiscounts(); - + if (!empty($soc->id)) $absolute_discount = $soc->getAvailableDiscounts(); + $note_public = $object->getDefaultCreateValueFor('note_public', (is_object($objectsrc)?$objectsrc->note_public:null)); + $note_private = $object->getDefaultCreateValueFor('note_private', ((! empty($origin) && ! empty($originid) && is_object($objectsrc))?$objectsrc->note_private:null)); + if (! empty($conf->use_javascript_ajax)) { require_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; @@ -2077,13 +2079,19 @@ if ($action == 'create') } print '' . "\n"; - // Predefined invoices + // Overwrite value if creation of invoice is from a predefined invoice if (empty($origin) && empty($originid) && GETPOST('fac_rec','int') > 0) { $invoice_predefined = new FactureRec($db); $invoice_predefined->fetch(GETPOST('fac_rec','int')); $dateinvoice = $invoice_predefined->date_when; // To use next gen date by default later + if (empty($projectid)) $projectid = $invoice_predefined->fk_project; + $cond_reglement_id = $invoice_predefined->cond_reglement_id; + $mode_reglement_id = $invoice_predefined->mode_reglement_id; + $fk_account = $invoice_predefined->fk_account; + $note_public = $invoice_predefined->note_public; + $note_private = $invoice_predefined->note_private; $sql = 'SELECT r.rowid, r.titre, r.total_ttc'; $sql .= ' FROM ' . MAIN_DB_PREFIX . 'facture_rec as r'; @@ -2467,7 +2475,6 @@ if ($action == 'create') print ''; print '' . $langs->trans('NotePublic') . ''; print ''; - $note_public = $object->getDefaultCreateValueFor('note_public', (is_object($objectsrc)?$objectsrc->note_public:null)); $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); @@ -2477,7 +2484,6 @@ if ($action == 'create') print ''; print '' . $langs->trans('NotePrivate') . ''; print ''; - $note_private = $object->getDefaultCreateValueFor('note_private', ((! empty($origin) && ! empty($originid) && is_object($objectsrc))?$objectsrc->note_private:null)); $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); // print ' From 891297d165cc7eb284f61cdd89b3dfa28797037e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 19 Sep 2016 17:12:53 +0200 Subject: [PATCH 5/7] Fix alignement --- htdocs/projet/activity/perday.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 0c509240684..aa5044da610 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -386,7 +386,7 @@ if ($usertoprocess->id == $user->id) print ''.$langs->trans("T else print ''.$langs->trans("TimeSpentByUser").''; print ''.$langs->trans("HourStart").''; print ''.$langs->trans("Duration").''; -print ''.$langs->trans("Note").''; +print ''.$langs->trans("Note").''; print "\n"; // By default, we can edit only tasks we are assigned to From 494d4783a7eb77077ed3f56dc43f7658bf9f04ba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 21 Sep 2016 18:13:27 +0200 Subject: [PATCH 6/7] Fix tab works when editing prices --- htdocs/core/tpl/objectline_edit.tpl.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 98c5a03c5da..bc79a403002 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -257,8 +257,14 @@ $coldisplay=-1; // We remove first td jQuery(document).ready(function() { - jQuery("#price_ht").keyup(function() { jQuery("#price_ttc").val(''); }); - jQuery("#price_ttc").keyup(function() { jQuery("#price_ht").val(''); }); + jQuery("#price_ht").keyup(function(event) { + // console.log(event.which); // discard event tag and arrows + if (event.which != 9 && (event.which < 37 ||event.which > 40) && jQuery("#price_ht").val() != '') jQuery("#price_ttc").val(''); + }); + jQuery("#price_ttc").keyup(function(event) { + // console.log(event.which); // discard event tag and arrows + if (event.which != 9 && (event.which < 37 || event.which > 40) && jQuery("#price_ttc").val() != '') jQuery("#price_ht").val(''); + }); margin->enabled)) From 9c12444a03786e6f54b96290680e7a5aa71f3217 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 21 Sep 2016 18:20:18 +0200 Subject: [PATCH 7/7] Fix size of warehouse and height of confirm box --- htdocs/core/class/html.form.class.php | 2 +- htdocs/product/class/html.formproduct.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ce0458dead4..e2d4aa8f27c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3263,7 +3263,7 @@ class Form * @param int $width Force width of bow * @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form */ - function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500) + function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=200, $width=500) { global $langs,$conf; global $useglobalvars; diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index a69880f7fa5..cedf40678d2 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -144,7 +144,7 @@ class FormProduct * @param string $morecss Add more css classes * @return string HTML select */ - function selectWarehouses($selected='',$htmlname='idwarehouse',$filtertype='',$empty=0,$disabled=0,$fk_product=0,$empty_label='', $showstock=0, $forcecombo=0, $events=array(), $morecss='') + function selectWarehouses($selected='',$htmlname='idwarehouse',$filtertype='',$empty=0,$disabled=0,$fk_product=0,$empty_label='', $showstock=0, $forcecombo=0, $events=array(), $morecss='minwidth200') { global $conf,$langs,$user;