From 608b09993421adb56eb2493d7f38c7ba5882c9df Mon Sep 17 00:00:00 2001 From: AcceTT Soluciones Computacionales Date: Mon, 26 Jan 2015 21:38:43 -0600 Subject: [PATCH 1/6] Currency symbol in Mexico I tried to change the order of the currency symbol in Mexico is before. --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 271a9f900ae..910ea42e124 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2905,7 +2905,7 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou { if ($currency_code == 'auto') $currency_code=$conf->currency; - $listofcurrenciesbefore=array('USD','GBP','AUD'); + $listofcurrenciesbefore=array('USD','GBP','AUD','MXN'); if (in_array($currency_code,$listofcurrenciesbefore)) $cursymbolbefore.=$outlangs->getCurrencySymbol($currency_code); else { From 3403979ed7065d9814b7a232ed383bce840d00c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 28 Jan 2015 21:27:07 +0100 Subject: [PATCH 2/6] Speed up listing with Is Order Shippable icon --- htdocs/commande/list.php | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 2c30f4128c6..d8ac06f37da 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -323,6 +323,7 @@ if ($resql) $var=true; $total=0; $subtotal=0; + $productstat_cache=array(); $generic_commande = new Commande($db); $generic_product = new Product($db); @@ -351,18 +352,33 @@ if ($resql) if ($generic_commande->lines[$lig]->product_type==0) { $nbprod++; // order contains real products $generic_product->id = $generic_commande->lines[$lig]->fk_product; - $generic_product->load_stock(); + if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product])) { + $generic_product->load_stock(true); + $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_reel; + } else { + $generic_product->stock_reel = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel']; + } // stock order and stock order_supplier $stock_order=0; $stock_order_supplier=0; if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)) { if (! empty($conf->commande->enabled)) { - $generic_product->load_stats_commande(0,'1,2'); - $stock_order=$generic_product->stats_commande['qty']; + if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'])) { + $generic_product->load_stats_commande(0,'1,2',true); + $stock_order=$generic_product->stats_commande['qty']; + $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'] = $generic_product->stats_commande['qty']; + } else { + $generic_product->stats_commande['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer']; + } } if (! empty($conf->fournisseur->enabled)) { - $generic_product->load_stats_commande_fournisseur(0,'3'); - $stock_order_supplier=$generic_product->stats_commande_fournisseur['qty']; + if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'])) { + $generic_product->load_stats_commande_fournisseur(0,'3',true); + $stock_order_supplier=$generic_product->stats_commande_fournisseur['qty']; + $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'] = $generic_product->stats_commande_fournisseur['qty']; + } else { + $generic_product->stats_commande_fournisseur['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier']; + } } } $text_info .= $generic_commande->lines[$lig]->qty.' X '.$generic_commande->lines[$lig]->ref.' '.dol_trunc($generic_commande->lines[$lig]->product_label, 25); From 355c5f0b52a6d3b2b872fc6c66fa0cee425059be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 28 Jan 2015 21:32:23 +0100 Subject: [PATCH 3/6] Update list.php --- htdocs/commande/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index d8ac06f37da..f42920850c2 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -365,20 +365,20 @@ if ($resql) if (! empty($conf->commande->enabled)) { if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'])) { $generic_product->load_stats_commande(0,'1,2',true); - $stock_order=$generic_product->stats_commande['qty']; $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'] = $generic_product->stats_commande['qty']; } else { $generic_product->stats_commande['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer']; } + $stock_order=$generic_product->stats_commande['qty']; } if (! empty($conf->fournisseur->enabled)) { if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'])) { $generic_product->load_stats_commande_fournisseur(0,'3',true); - $stock_order_supplier=$generic_product->stats_commande_fournisseur['qty']; $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'] = $generic_product->stats_commande_fournisseur['qty']; } else { $generic_product->stats_commande_fournisseur['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier']; } + $stock_order_supplier=$generic_product->stats_commande_fournisseur['qty']; } } $text_info .= $generic_commande->lines[$lig]->qty.' X '.$generic_commande->lines[$lig]->ref.' '.dol_trunc($generic_commande->lines[$lig]->product_label, 25); From f86db9d6865c6c77448c7c91b0260f11c45baa02 Mon Sep 17 00:00:00 2001 From: Drosis Nikos Date: Wed, 28 Jan 2015 23:55:12 +0200 Subject: [PATCH 4/6] Correct view link --- htdocs/langs/en_US/admin.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 98d25118126..4d63e6224e1 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -292,7 +292,7 @@ DoNotUseInProduction=Do not use in production ThisIsProcessToFollow=This is setup to process: StepNb=Step %s FindPackageFromWebSite=Find a package that provides feature you want (for example on official web site %s). -DownloadPackageFromWebSite=Download package. +DownloadPackageFromWebSite=Download package %s. UnpackPackageInDolibarrRoot=Unpack package file into Dolibarr's root directory %s SetupIsReadyForUse=Install is finished and Dolibarr is ready to use with this new component. NotExistsDirect=The alternative root directory is not defined.
From 4e14f6913abb4b44b8d314d29500b6b2fd2d145c Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 29 Jan 2015 14:22:13 +0100 Subject: [PATCH 5/6] Fix contract if only service modules is enabled --- htdocs/contrat/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index f27d47f2dd5..e3f6c0efeb9 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1237,7 +1237,7 @@ else * Lines of contracts */ - if ($conf->product->enabled) { + if ($conf->product->enabled || $conf->service->enabled) { $productstatic=new Product($db); } From 44a2bef29d919c70ce47258cdbae1a9458d840ea Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 30 Jan 2015 11:31:04 +0100 Subject: [PATCH 6/6] Better syntax in contract card --- htdocs/contrat/card.php | 2 +- htdocs/contrat/class/index.html | 0 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 htdocs/contrat/class/index.html diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index e3f6c0efeb9..b2b99a9dde3 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1306,7 +1306,7 @@ else $productstatic->ref=$objp->label; print $productstatic->getNomUrl(0,'',16); } - if (! empty($conf->global->PRODUIT_DESC_IN_FORM) and $objp->description) + if (! empty($conf->global->PRODUIT_DESC_IN_FORM) && !empty($objp->description)) print '
'.dol_nl2br($objp->description); print ''; } diff --git a/htdocs/contrat/class/index.html b/htdocs/contrat/class/index.html deleted file mode 100644 index e69de29bb2d..00000000000