';
@@ -1975,14 +1975,15 @@ if ($action == 'create' && $user->rights->commande->creer)
} else {
$form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'none');
}
- // Removed because using dictionary is an admin feature, not a user feature. Ther is already the "star" to show info to admin users.
+ // Removed because using dictionary is an admin feature, not a user feature. There is already the "star" to show info to admin users.
// This is to avoid too heavy screens and have an uniform look and feel for all screens.
// print '
';
@@ -373,15 +403,14 @@ if ($id > 0 || ! empty($ref))
* Lignes de commandes avec quantite livrees et reste a livrer
* Les quantites livrees sont stockees dans $commande->expeditions[fk_product]
*/
- print '
';
+ print '
';
- $sql = "SELECT cd.rowid, cd.fk_product, cd.product_type, cd.label, cd.description,";
+ $sql = "SELECT cd.rowid, cd.fk_product, cd.product_type as type, cd.label, cd.description,";
$sql.= " cd.price, cd.tva_tx, cd.subprice,";
$sql.= " cd.qty,";
$sql.= ' cd.date_start,';
$sql.= ' cd.date_end,';
- $sql.= ' p.label as product_label, p.entity, p.ref, p.fk_product_type, p.rowid as prodid,';
- $sql.= ' p.description as product_desc, p.fk_product_type as product_type';
+ $sql.= ' p.rowid as prodid, p.label as product_label, p.entity, p.ref, p.fk_product_type as product_type, p.description as product_desc';
$sql.= " FROM ".MAIN_DB_PREFIX."commandedet as cd";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid";
$sql.= " WHERE cd.fk_commande = ".$commande->id;
@@ -419,7 +448,8 @@ if ($id > 0 || ! empty($ref))
$var=!$var;
// Show product and description
- $type=$objp->product_type?$objp->product_type:$objp->fk_product_type;
+ $type=isset($objp->type)?$objp->type:$objp->product_type;
+
// Try to enhance type detection using date_start and date_end for free lines where type
// was not saved.
if (! empty($objp->date_start)) $type=1;
@@ -459,7 +489,7 @@ if ($id > 0 || ! empty($ref))
print ''; // ancre pour retourner sur la ligne
// Show product and description
- $product_static->type=$objp->fk_product_type;
+ $product_static->type=$type;
$product_static->id=$objp->fk_product;
$product_static->ref=$objp->ref;
$product_static->entity = $objp->entity;
diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql
index 22d441d70a5..53034338932 100755
--- a/htdocs/install/mysql/migration/repair.sql
+++ b/htdocs/install/mysql/migration/repair.sql
@@ -54,6 +54,7 @@ delete from llx_adherent_extrafields where fk_object not in (select rowid from l
delete from llx_product_extrafields where fk_object not in (select rowid from llx_product);
--delete from llx_societe_commerciaux where fk_soc not in (select rowid from llx_societe);
+update llx_product_batch set batch = '' where batch = 'Non défini';
-- Fix: delete category child with no category parent.
drop table tmp_categorie;
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index a95eb99012d..a0edf6bbef5 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -68,6 +68,7 @@ Country=Country
CountryCode=Country code
CountryId=Country id
Phone=Phone
+PhoneShort=Phone
Skype=Skype
Call=Call
Chat=Chat
diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang
index 4db67dc6335..8a46433ff9c 100644
--- a/htdocs/langs/en_US/stocks.lang
+++ b/htdocs/langs/en_US/stocks.lang
@@ -134,7 +134,7 @@ IsInPackage=Contained into package
ShowWarehouse=Show warehouse
MovementCorrectStock=Stock correction for product %s
MovementTransferStock=Stock transfer of product %s into another warehouse
-WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn=Source warehouse must be defined here when "Product lot" module is on. It will be used to list wich lot/serial is available for product that required lot/serial data for movement. If you want to send products from different warehouses, just make the shipment into several steps.
+WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn=Source warehouse must be defined here when "Product lot" module is on. It will be used to list which lot/serial are available for products requiring lot/serial data for movement. If you want to send products from different warehouses, just make the shipment into several steps.
InventoryCodeShort=Inv./Mov. code
NoPendingReceptionOnSupplierOrder=No pending reception due to open supplier order
ThisSerialAlreadyExistWithDifferentDate=This lot/serial number (%s) already exists but with different eatby or sellby date (found %s but you enter %s).
diff --git a/htdocs/product/class/productbatch.class.php b/htdocs/product/class/productbatch.class.php
index ee49302407d..5495584ea5f 100644
--- a/htdocs/product/class/productbatch.class.php
+++ b/htdocs/product/class/productbatch.class.php
@@ -462,16 +462,17 @@ class Productbatch extends CommonObject
/**
* Return all batch detail records for given product and warehouse
*
- * @param DoliDB $db database object
- * @param int $fk_product_stock id product_stock for objet
- * @param int $with_qty doesn't return line with 0 quantity
- * @return int <0 if KO, >0 if OK
+ * @param DoliDB $db database object
+ * @param int $fk_product_stock id product_stock for objet
+ * @param int $with_qty doesn't return line with 0 quantity
+ * @return int <0 if KO, >0 if OK
*/
public static function findAll($db,$fk_product_stock,$with_qty=0)
{
global $langs;
$ret = array();
- $sql = "SELECT";
+
+ $sql = "SELECT";
$sql.= " t.rowid,";
$sql.= " t.tms,";
$sql.= " t.fk_product_stock,";
@@ -480,12 +481,10 @@ class Productbatch extends CommonObject
$sql.= " t.batch,";
$sql.= " t.qty,";
$sql.= " t.import_key";
-
-
- $sql.= " FROM ".MAIN_DB_PREFIX.self::$_table_element." as t";
+ $sql.= " FROM ".MAIN_DB_PREFIX."product_batch as t";
$sql.= " WHERE fk_product_stock=".$fk_product_stock;
-
if ($with_qty) $sql.= " AND qty<>0";
+
dol_syslog("productbatch::findAll", LOG_DEBUG);
$resql=$db->query($sql);
if ($resql)
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index b0165c94760..f7e7106ce45 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -411,7 +411,7 @@ if ($action == 'create' && $user->rights->projet->creer)
print '';
print '';
- print dol_fiche_head();
+ dol_fiche_head();
print '