diff --git a/htdocs/langs/en_US/receptions.lang b/htdocs/langs/en_US/receptions.lang index 34b2276fca7..6c8a8f7346b 100644 --- a/htdocs/langs/en_US/receptions.lang +++ b/htdocs/langs/en_US/receptions.lang @@ -53,3 +53,4 @@ RestoreWithCurrentQtySaved=Fill quantities with latest saved values ReceptionsRecorded=Receptions recorded ReceptionUpdated=Reception successfully updated ReceptionDistribution=Reception distribution +ReceptionMustBeInTheSameCurrencyThanOther=Reception have to be int the same currency than the other diff --git a/htdocs/langs/fr_FR/receptions.lang b/htdocs/langs/fr_FR/receptions.lang index ff11e7d8555..b5e3027a467 100644 --- a/htdocs/langs/fr_FR/receptions.lang +++ b/htdocs/langs/fr_FR/receptions.lang @@ -53,4 +53,5 @@ RestoreWithCurrentQtySaved=Remplir les quantités avec les dernières valeurs en ReceptionsRecorded=Réceptions enregistrées ReceptionUpdated=Réception mise à jour avec succès ReceptionDistribution=Distribution de réception +ReceptionMustBeInTheSameCurrencyThanOther=Cette Reception n'est pas dans la même devise que les autres AutoValidationNotPossibleWhenStockIsDecreasedOnInvoiceValidation=La validation automatique n'est pas possible lorsque le stock est réduit sur facture validation diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index e5cabbe26d5..0ba90f42d0f 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -373,7 +373,7 @@ if ($action == "correct_stock" && $permissiontoadd) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors'); $action = 'correction'; } - if (!is_numeric(GETPOST("nbpiece"))) { + if (!GETPOSTFLOAT("nbpiece")) { $error++; setEventMessages($langs->trans("ErrorFieldMustBeANumeric", $langs->transnoentitiesnoconv("NumberOfUnit")), null, 'errors'); $action = 'correction'; @@ -399,7 +399,7 @@ if ($action == "correct_stock" && $permissiontoadd) { $result = $product->correct_stock_batch( $user, $id, - GETPOSTINT("nbpiece"), + GETPOSTFLOAT("nbpiece"), GETPOSTINT("mouvement"), GETPOST("label", 'alphanohtml'), price2num(GETPOST('unitprice'), 'MT'), @@ -416,7 +416,7 @@ if ($action == "correct_stock" && $permissiontoadd) { $result = $product->correct_stock( $user, $id, - GETPOSTINT("nbpiece"), + GETPOSTFLOAT("nbpiece"), GETPOSTINT("mouvement"), GETPOST("label", 'alphanohtml'), price2num(GETPOST('unitprice'), 'MT'), @@ -461,7 +461,7 @@ if ($action == "transfert_stock" && $permissiontoadd && !$cancel) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors'); $action = 'transfert'; } - if (!GETPOSTINT("nbpiece")) { + if (!GETPOSTFLOAT("nbpiece")) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumberOfUnit")), null, 'errors'); $error++; $action = 'transfert'; @@ -530,7 +530,7 @@ if ($action == "transfert_stock" && $permissiontoadd && !$cancel) { $result1 = $product->correct_stock_batch( $user, $srcwarehouseid, - GETPOSTINT("nbpiece"), + GETPOSTFLOAT("nbpiece"), 1, GETPOST("label", 'san_alpha'), $pricesrc, @@ -547,7 +547,7 @@ if ($action == "transfert_stock" && $permissiontoadd && !$cancel) { $result2 = $product->correct_stock_batch( $user, GETPOSTINT("id_entrepot_destination"), - GETPOSTINT("nbpiece"), + GETPOSTFLOAT("nbpiece"), 0, GETPOST("label", 'san_alpha'), $pricedest, @@ -566,9 +566,9 @@ if ($action == "transfert_stock" && $permissiontoadd && !$cancel) { $result1 = $product->correct_stock( $user, $id, - GETPOST("nbpiece"), + GETPOSTFLOAT("nbpiece"), 1, - GETPOST("label", 'san_alpha'), + GETPOST("label", 'alphanohtml'), $pricesrc, GETPOST('inventorycode', 'alphanohtml'), '', @@ -581,9 +581,9 @@ if ($action == "transfert_stock" && $permissiontoadd && !$cancel) { $result2 = $product->correct_stock( $user, GETPOST("id_entrepot_destination"), - GETPOST("nbpiece"), + GETPOSTFLOAT("nbpiece"), 0, - GETPOST("label", 'san_alpha'), + GETPOST("label", 'alphanohtml'), $pricedest, GETPOST('inventorycode', 'alphanohtml'), '', diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index f416f4fc55d..60cf4e489dc 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -1306,12 +1306,12 @@ foreach ($listofreferent as $key => $value) { if (!empty($element->close_code) && $element->close_code == 'replaced') { $qualifiedfortotal = false; // Replacement invoice, do not include into total } - } elseif ($key == 'order_supplier' && $element->status == 7) { + } elseif ($key == 'order_supplier' && ($element->status == 6 || $element->status == 7)) { $qualifiedfortotal = false; // It makes no sense to include canceled orders in the total } - if ($key == "order_supplier" && $element->status == 7) { - print '