From 0f77fbaea2099af02d8fa04673b8ca5ece6daf3c Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 17 Jun 2014 11:18:30 +0200 Subject: [PATCH 1/5] Fix [ bug #1349 ] AJAX contact selector does not work fine in Project card --- ChangeLog | 1 + htdocs/core/js/lib_head.js | 1 + htdocs/core/lib/ajax.lib.php | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index c44642dd3f4..2ad59346161 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,7 @@ Fix: [ bug #1451 ] Interrupted order clone through trigger, loads nonexistent or Fix: [ bug #1454 ] Mention de bas de page erroné Fix: Do not display dictionnay for non activated module Fix: Link element from element project pages +Fix: [ bug #1349 ] AJAX contact selector does not work fine in Project card ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. diff --git a/htdocs/core/js/lib_head.js b/htdocs/core/js/lib_head.js index cfb2977c370..9221843d575 100644 --- a/htdocs/core/js/lib_head.js +++ b/htdocs/core/js/lib_head.js @@ -808,6 +808,7 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton, var input = this.input = $( "" ) .insertAfter( select ) .val( value ) + .attr('id', 'inputautocomplete'+select.attr('id')) .autocomplete({ delay: 0, minLength: this.options.minLengthToAutocomplete, diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index f111551cc51..e24d12dbc52 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -358,6 +358,13 @@ function ajax_combobox($htmlname, $event=array(), $minLengthToAutocomplete=0) } }); $("select#" + htmlname).html(response.value); + if (response.num) { + var selecthtml_str = response.value; + var selecthtml_dom=$.parseHTML(selecthtml_str); + $("#inputautocomplete"+htmlname).val(selecthtml_dom[0][0].innerHTML); + } else { + $("#inputautocomplete"+htmlname).val(""); + } }); } });'; From 03156b58e3242e329ca795d316fc9d6a12f5d056 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 17 Jun 2014 11:30:41 +0200 Subject: [PATCH 2/5] [ bug #1452 ] variable used but not defined --- htdocs/fourn/facture/fiche.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index af06e4b0bbc..62022c7e5e4 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -1167,7 +1167,7 @@ if ($action == 'create') print ''; // Ref supplier - print ''.$langs->trans('RefSupplier').''; + print ''.$langs->trans('RefSupplier').''; print ''; print ''.$langs->trans('Type').''; @@ -1254,7 +1254,7 @@ if ($action == 'create') print ''; // Label - print ''.$langs->trans('Label').''; + print ''.$langs->trans('Label').''; // Date invoice print ''.$langs->trans('DateInvoice').''; From 7f92031583e16509e7e097be96de5b2fbb544359 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 17 Jun 2014 11:31:20 +0200 Subject: [PATCH 3/5] Changelog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 2ad59346161..e997d097dd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,7 @@ Fix: [ bug #1454 ] Mention de bas de page erroné Fix: Do not display dictionnay for non activated module Fix: Link element from element project pages Fix: [ bug #1349 ] AJAX contact selector does not work fine in Project card +Fix: [ bug #1452 ] variable used but not defined ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. From 0645189432634fead60e2ccc64c0cee6dfaead76 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 18 Jun 2014 10:56:38 +0200 Subject: [PATCH 4/5] If multiprice level is used the VAT on addline is not correct --- ChangeLog | 1 + htdocs/comm/propal.php | 2 ++ htdocs/commande/fiche.php | 2 ++ htdocs/compta/facture.php | 2 ++ 4 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index e997d097dd8..748f60a2f5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ Fix: Do not display dictionnay for non activated module Fix: Link element from element project pages Fix: [ bug #1349 ] AJAX contact selector does not work fine in Project card Fix: [ bug #1452 ] variable used but not defined +Fix: If multiprice level is used the VAT on addline is not correct ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index a4d984951cd..ddec39d90d2 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -738,6 +738,8 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $pu_ttc = $prod->multiprices_ttc[$object->client->price_level]; $price_min = $prod->multiprices_min[$object->client->price_level]; $price_base_type = $prod->multiprices_base_type[$object->client->price_level]; + $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level]; + $tva_npr ==$prod->multiprices_recuperableonly[$object->client->price_level]; } else { diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 6630477d740..12d62904dd8 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -686,6 +686,8 @@ else if ($action == 'addline' && $user->rights->commande->creer) $pu_ttc = $prod->multiprices_ttc[$object->client->price_level]; $price_min = $prod->multiprices_min[$object->client->price_level]; $price_base_type = $prod->multiprices_base_type[$object->client->price_level]; + $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level]; + $tva_npr ==$prod->multiprices_recuperableonly[$object->client->price_level]; } else { diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index d685f9ad1ed..4f00678b514 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1259,6 +1259,8 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $pu_ttc = $prod->multiprices_ttc[$object->client->price_level]; $price_min = $prod->multiprices_min[$object->client->price_level]; $price_base_type = $prod->multiprices_base_type[$object->client->price_level]; + $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level]; + $tva_npr ==$prod->multiprices_recuperableonly[$object->client->price_level]; } else { From 40f5911f52cfe2d92ccc524c3950d45a1e322f70 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 20 Jun 2014 09:36:31 +0200 Subject: [PATCH 5/5] Fix: [ bug #1254 ] Error when using "Enter" on qty input box of a product (on supplier order part) --- ChangeLog | 1 + htdocs/fourn/commande/fiche.php | 64 +++++++++++++++++++++++++++------ 2 files changed, 54 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 748f60a2f5b..31928d2b0ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ Fix: Link element from element project pages Fix: [ bug #1349 ] AJAX contact selector does not work fine in Project card Fix: [ bug #1452 ] variable used but not defined Fix: If multiprice level is used the VAT on addline is not correct +Fix: [ bug #1254 ] Error when using "Enter" on qty input box of a product (on supplier order part) ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 5f3ef882fcf..287c2ed1c83 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1731,6 +1731,30 @@ elseif (! empty($object->id)) // TODO Use the predefinedproductline_create.tpl.php file // Add free products/services form + + //Fix Bug [ bug #1254 ] Error when using "Enter" on qty input box of a product + //this Fix Will be obsolete in 3.6 because 3.6 get one form to do every things + if (! empty($conf->use_javascript_ajax)) { + print ''; + } + $var=true; print ''; print ''; @@ -1755,22 +1779,40 @@ elseif (! empty($object->id)) print ''; print $form->load_tva('tva_tx',(GETPOST('tva_tx')?GETPOST('tva_tx'):-1),$object->thirdparty,$mysoc); print ''; - print ''; - print ''; - print '%'; - print ''; + print ''; + print ''; + print '%'; + print ''; print ''; // Ajout de produits/services predefinis if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { - print ''; + + if (! empty($conf->use_javascript_ajax)) { + print ''; + } print ''; print '';