From 4418a35e5180ced74c8dcaa50b65ab33ceb1968d Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Tue, 27 May 2014 15:17:59 +0200 Subject: [PATCH 1/8] Update fournisseur.facture.class.php rowid not declared but used --- htdocs/fourn/class/fournisseur.facture.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 549a9caed32..016ed4117b6 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -42,6 +42,7 @@ class FactureFournisseur extends CommonInvoice public $fk_element='fk_facture_fourn'; protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + var $rowid; var $ref; var $product_ref; var $ref_supplier; From c091009afb1b3830892b9611af3eb6daf34f210f Mon Sep 17 00:00:00 2001 From: nicolasb827 Date: Wed, 28 May 2014 01:07:27 +0200 Subject: [PATCH 2/8] fetch product_type field from DB When loading propal line on edit, product_type is reset to 0 --- htdocs/comm/propal/class/propal.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 9c35faef31f..75144ea7e11 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2783,7 +2783,7 @@ class PropaleLigne extends CommonObject $sql.= ' pd.info_bits, pd.total_ht, pd.total_tva, pd.total_ttc, pd.fk_product_fournisseur_price as fk_fournprice, pd.buy_price_ht as pa_ht, pd.special_code, pd.rang,'; $sql.= ' pd.localtax1_tx, pd.localtax2_tx, pd.total_localtax1, pd.total_localtax2,'; $sql.= ' p.ref as product_ref, p.label as product_label, p.description as product_desc,'; - $sql.= ' pd.date_start, pd.date_end'; + $sql.= ' pd.date_start, pd.date_end, pd.product_type'; $sql.= ' FROM '.MAIN_DB_PREFIX.'propaldet as pd'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pd.fk_product = p.rowid'; $sql.= ' WHERE pd.rowid = '.$rowid; @@ -2820,6 +2820,7 @@ class PropaleLigne extends CommonObject $this->marque_tx = $marginInfos[2]; $this->special_code = $objp->special_code; + $this->product_type = $objp->product_type; $this->rang = $objp->rang; $this->ref = $objp->product_ref; // deprecated From 83aba41c6c8ed086536fc4a4f71fafcae41ad00d Mon Sep 17 00:00:00 2001 From: nicolasb827 Date: Wed, 28 May 2014 01:18:31 +0200 Subject: [PATCH 3/8] copy type on line update --- htdocs/comm/propal/class/propal.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 75144ea7e11..9d279484995 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -546,6 +546,7 @@ class Propal extends CommonObject $this->line->label = $label; $this->line->desc = $desc; $this->line->qty = $qty; + $this->line->type = $type; $this->line->tva_tx = $txtva; $this->line->localtax1_tx = $txlocaltax1; $this->line->localtax2_tx = $txlocaltax2; From c3ebece1ef856ac08dd4f11dcfb7c051ed904dfd Mon Sep 17 00:00:00 2001 From: nicolasb827 Date: Wed, 28 May 2014 01:25:36 +0200 Subject: [PATCH 4/8] fix update SQL request --- htdocs/comm/propal/class/propal.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 9d279484995..070f0232215 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -546,7 +546,7 @@ class Propal extends CommonObject $this->line->label = $label; $this->line->desc = $desc; $this->line->qty = $qty; - $this->line->type = $type; + $this->line->product_type = $type; $this->line->tva_tx = $txtva; $this->line->localtax1_tx = $txlocaltax1; $this->line->localtax2_tx = $txlocaltax2; @@ -3056,6 +3056,7 @@ class PropaleLigne extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."propaldet SET"; $sql.= " description='".$this->db->escape($this->desc)."'"; $sql.= " , label=".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null"); + $sql.= " , product_type=".$this->product_type; $sql.= " , tva_tx='".price2num($this->tva_tx)."'"; $sql.= " , localtax1_tx=".price2num($this->localtax1_tx); $sql.= " , localtax2_tx=".price2num($this->localtax2_tx); From e856e64bc94e28f4475a569db3d3afde45e0be2b Mon Sep 17 00:00:00 2001 From: aspangaro Date: Wed, 28 May 2014 06:17:09 +0200 Subject: [PATCH 5/8] Typo --- htdocs/core/class/html.form.class.php | 8 ++++---- htdocs/langs/fr_FR/stocks.lang | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d16c9f19a5a..74fabe1be0a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1258,7 +1258,7 @@ class Form * Return list of products for customer in Ajax if Ajax activated or go to select_produits_list * * @param int $selected Preselected products - * @param string $htmlname Name of HTML seletc field (must be unique in page) + * @param string $htmlname Name of HTML select field (must be unique in page) * @param int $filtertype Filter on product type (''=nofilter, 0=product, 1=service) * @param int $limit Limit on number of returned lines * @param int $price_level Level of price to show @@ -1267,7 +1267,7 @@ class Form * @param string $selected_input_value Value of preselected input text (with ajax) * @param int $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after) * @param array $ajaxoptions Options for ajax_autocompleter - * @param int $socid Thridparty Id + * @param int $socid Thirdparty Id * @return void */ function select_produits($selected='', $htmlname='productid', $filtertype='', $limit=20, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(),$socid=0) @@ -1319,13 +1319,13 @@ class Form * @param int $selected Preselected product * @param string $htmlname Name of select html * @param string $filtertype Filter on product type (''=nofilter, 0=product, 1=service) - * @param int $limit Limite sur le nombre de lignes retournees + * @param int $limit Limit on number of returned lines * @param int $price_level Level of price to show * @param string $filterkey Filter on product * @param int $status -1=Return all products, 0=Products not on sell, 1=Products on sell * @param int $finished Filter on finished field: 2=No filter * @param int $outputmode 0=HTML select string, 1=Array - * @param int $socid Thridparty Id + * @param int $socid Thirdparty Id * @return array Array of keys for json */ function select_produits_list($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$filterkey='',$status=1,$finished=2,$outputmode=0,$socid=0) diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang index fa2c3228966..3f16232098c 100644 --- a/htdocs/langs/fr_FR/stocks.lang +++ b/htdocs/langs/fr_FR/stocks.lang @@ -103,7 +103,7 @@ CurentlyUsingVirtualStock=Stock théorique CurentlyUsingPhysicalStock=Stock réel RuleForStockReplenishment=Règle de gestion du réapprovisionnement des stocks SelectProductWithNotNullQty=Sélectionnez au moins un produit avec une quantité non nulle et un fournisseur -AlertOnly= Alertes seulement +AlertOnly=Alertes seulement WarehouseForStockDecrease=L'entrepôt %s sera utilisé pour la décrémentation du stock WarehouseForStockIncrease=L'entrepôt %s sera utilisé pour l'incrémentation du stock ForThisWarehouse=Pour cet entrepôt From b62fd30505ea9a538febe9355f1c8eae0019cb9d Mon Sep 17 00:00:00 2001 From: aspangaro Date: Wed, 28 May 2014 06:17:28 +0200 Subject: [PATCH 6/8] Missing key language --- htdocs/langs/en_US/stocks.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 7a28c1a0d1d..08992207628 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -112,6 +112,7 @@ ReplenishmentOrdersDesc=This is list of all opened supplier orders Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) +MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert From a725a08c13e38c79b6f32a011c5f82ab73ab38dc Mon Sep 17 00:00:00 2001 From: aspangaro Date: Wed, 28 May 2014 06:20:56 +0200 Subject: [PATCH 7/8] Fix :: List limit is not defined or based on limit product configuration Discussion http://www.dolibarr.fr/forum/527-bugs-sur-la-version-stable-courante/50579-transfert-stock-pas-sur-tous-les-produits#51265 --- htdocs/product/stock/massstockmove.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php index 54aa307fc95..7831baa5865 100644 --- a/htdocs/product/stock/massstockmove.php +++ b/htdocs/product/stock/massstockmove.php @@ -265,7 +265,15 @@ print ''; print ''; $filtertype=0; if (! empty($conf->global->STOCK_SUPPORTS_SERVICES)) $filtertype=''; -print $form->select_produits($id_product,'productid',$filtertype); +if ($conf->global->PRODUIT_LIMIT_SIZE <= 0) +{ + $limit=''; +} +else +{ + $limit = $conf->global->PRODUIT_LIMIT_SIZE; +} +print $form->select_produits($id_product,'productid',$filtertype,$limit); print ''; // In warehouse print ''; From 66d8b50159e2443110615be389823eb1b0f4a3b9 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 29 May 2014 04:48:57 +0200 Subject: [PATCH 8/8] Missing key language --- htdocs/langs/fr_FR/products.lang | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index f65bfcb080e..c354e5aaf4d 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -28,8 +28,10 @@ ProductsAndServicesStatistics=Statistiques produits et services ProductsStatistics=Statistiques produits ProductsOnSell=Produits en vente ou en achat ProductsNotOnSell=Produits hors vente et hors achat +ProductsOnSellAndOnBuy=Produits en vente et en achat ServicesOnSell=Services en vente ou en achat ServicesNotOnSell=Services hors vente et hors achat +ServicesOnSellAndOnBuy=Services en vente et en achat InternalRef=Référence interne LastRecorded=Derniers produits/services en vente enregistrés LastRecordedProductsAndServices=Les %s derniers produits/services enregistrés