mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix: Update typing for qty as float
This commit is contained in:
parent
5887f0a3ab
commit
c5479f4520
|
|
@ -580,7 +580,7 @@ class BOM extends CommonObject
|
|||
*
|
||||
* @param int $fk_product Id of product
|
||||
* @param float $qty Quantity
|
||||
* @param int $qty_frozen Frozen quantity
|
||||
* @param float $qty_frozen Frozen quantity
|
||||
* @param int $disable_stock_change Disable stock change on using in MO
|
||||
* @param float $efficiency Efficiency in MO
|
||||
* @param int $position Position of BOM-Line in BOM-Lines
|
||||
|
|
@ -689,7 +689,7 @@ class BOM extends CommonObject
|
|||
*
|
||||
* @param int $rowid Id of line to update
|
||||
* @param float $qty Quantity
|
||||
* @param int $qty_frozen Frozen quantity
|
||||
* @param float $qty_frozen Frozen quantity
|
||||
* @param int $disable_stock_change Disable stock change on using in MO
|
||||
* @param float $efficiency Efficiency in MO
|
||||
* @param int $position Position of BOM-Line in BOM-Lines
|
||||
|
|
@ -1531,8 +1531,8 @@ class BOM extends CommonObject
|
|||
/**
|
||||
* Get Net needs by product
|
||||
*
|
||||
* @param array $TNetNeeds Array of ChildBom and infos linked to
|
||||
* @param int $qty qty needed
|
||||
* @param array $TNetNeeds Array of ChildBom and infos linked to
|
||||
* @param float $qty qty needed
|
||||
* @return void
|
||||
*/
|
||||
public function getNetNeeds(&$TNetNeeds = array(), $qty = 0)
|
||||
|
|
@ -1557,7 +1557,7 @@ class BOM extends CommonObject
|
|||
* Get Net needs Tree by product or bom
|
||||
*
|
||||
* @param array $TNetNeeds Array of ChildBom and infos linked to
|
||||
* @param int $qty qty needed
|
||||
* @param float $qty qty needed
|
||||
* @param int $level level of recursivity
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -1763,7 +1763,7 @@ class BOMLine extends CommonObjectLine
|
|||
public $qty;
|
||||
|
||||
/**
|
||||
* @var int qty frozen
|
||||
* @var float qty frozen
|
||||
*/
|
||||
public $qty_frozen;
|
||||
|
||||
|
|
|
|||
|
|
@ -413,8 +413,8 @@ class Propal extends CommonObject
|
|||
* $this->thirdparty should be loaded
|
||||
*
|
||||
* @param int $idproduct Product Id to add
|
||||
* @param int $qty Quantity
|
||||
* @param int $remise_percent Discount effected on Product
|
||||
* @param float $qty Quantity
|
||||
* @param float $remise_percent Discount effected on Product
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
*
|
||||
* TODO Replace calls to this function by generation object Ligne
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -37,7 +38,7 @@
|
|||
* '5' : local tax apply on services without vat (localtax is calculated on amount without tax)
|
||||
* '6' : local tax apply on services including vat (localtax is calculated on amount + tax)
|
||||
*
|
||||
* @param int $qty Quantity
|
||||
* @param float $qty Quantity
|
||||
* @param float $pu Unit price (HT or TTC depending on price_base_type. TODO Add also mode 'INCT' when pu is price HT+VAT+LT1+LT2)
|
||||
* @param float $remise_percent_ligne Discount for line
|
||||
* @param float $txtva 0=do not apply VAT tax, VAT rate=apply (this is VAT rate only without text code, we don't need text code because we alreaydy have all tax info into $localtaxes_array)
|
||||
|
|
|
|||
|
|
@ -633,7 +633,7 @@ class Delivery extends CommonObject
|
|||
* Add line
|
||||
*
|
||||
* @param int $origin_id Origin id
|
||||
* @param int $qty Qty
|
||||
* @param float $qty Qty
|
||||
* @param array $array_options Array options
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -493,7 +493,7 @@ class Expedition extends CommonObject
|
|||
*
|
||||
* @param int $entrepot_id Id of warehouse
|
||||
* @param int $origin_line_id Id of source line
|
||||
* @param int $qty Quantity
|
||||
* @param float $qty Quantity
|
||||
* @param int $rang Rang
|
||||
* @param array $array_options extrafields array
|
||||
* @return int Return integer <0 if KO, line_id if OK
|
||||
|
|
@ -895,7 +895,7 @@ class Expedition extends CommonObject
|
|||
*
|
||||
* @param int $entrepot_id Id of warehouse
|
||||
* @param int $id Id of source line (order line)
|
||||
* @param int $qty Quantity
|
||||
* @param float $qty Quantity
|
||||
* @param array $array_options extrafields array
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
* Copyright (C) 2016-2023 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020 Pierre Ardoin <mapiolca@me.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -224,7 +225,7 @@ class ProductFournisseur extends Product
|
|||
|
||||
$this->db = $db;
|
||||
$langs->load("suppliers");
|
||||
$this->reputations = array('-1'=>'', 'FAVORITE'=>$langs->trans('Favorite'), 'NOTTHGOOD'=>$langs->trans('NotTheGoodQualitySupplier'), 'DONOTORDER'=>$langs->trans('DoNotOrderThisProductToThisSupplier'));
|
||||
$this->reputations = array('-1' => '', 'FAVORITE' => $langs->trans('Favorite'), 'NOTTHGOOD' => $langs->trans('NotTheGoodQualitySupplier'), 'DONOTORDER' => $langs->trans('DoNotOrderThisProductToThisSupplier'));
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
|
|
@ -512,7 +513,7 @@ class ProductFournisseur extends Product
|
|||
$productfournisseurprice = new ProductFournisseurPrice($this->db);
|
||||
$res = $productfournisseurprice->fetch($this->product_fourn_price_id);
|
||||
if ($res > 0) {
|
||||
foreach ($options as $key=>$value) {
|
||||
foreach ($options as $key => $value) {
|
||||
$productfournisseurprice->array_options[$key] = $value;
|
||||
}
|
||||
$res = $productfournisseurprice->update($user);
|
||||
|
|
@ -616,7 +617,7 @@ class ProductFournisseur extends Product
|
|||
$productfournisseurprice = new ProductFournisseurPrice($this->db);
|
||||
$res = $productfournisseurprice->fetch($this->product_fourn_price_id);
|
||||
if ($res > 0) {
|
||||
foreach ($options as $key=>$value) {
|
||||
foreach ($options as $key => $value) {
|
||||
$productfournisseurprice->array_options[$key] = $value;
|
||||
}
|
||||
$res = $productfournisseurprice->update($user);
|
||||
|
|
@ -881,7 +882,7 @@ class ProductFournisseur extends Product
|
|||
* Load properties for minimum price
|
||||
*
|
||||
* @param int $prodid Product id
|
||||
* @param int $qty Minimum quantity
|
||||
* @param float $qty Minimum quantity
|
||||
* @param int $socid get min price for specific supplier
|
||||
* @return int Return integer <0 if KO, 0=Not found of no product id provided, >0 if OK
|
||||
* @see list_product_fournisseur_price()
|
||||
|
|
@ -1391,7 +1392,7 @@ class ProductFournisseur extends Product
|
|||
|
||||
global $action;
|
||||
$hookmanager->initHooks(array($this->element . 'dao'));
|
||||
$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
|
||||
$parameters = array('id' => $this->id, 'getnomurl' => &$result);
|
||||
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook > 0) {
|
||||
$result = $hookmanager->resPrint;
|
||||
|
|
|
|||
|
|
@ -4447,7 +4447,7 @@ class Product extends CommonObject
|
|||
*
|
||||
* @param int $id_pere Id of parent product/service
|
||||
* @param int $id_fils Id of child product/service
|
||||
* @param int $qty Quantity
|
||||
* @param float $qty Quantity
|
||||
* @param int $incdec 1=Increase/decrease stock of child when parent stock increase/decrease
|
||||
* @param int $notrigger Disable triggers
|
||||
* @return int Return integer < 0 if KO, > 0 if OK
|
||||
|
|
@ -4520,7 +4520,7 @@ class Product extends CommonObject
|
|||
*
|
||||
* @param int $id_pere Id of parent product/service
|
||||
* @param int $id_fils Id of child product/service
|
||||
* @param int $qty Quantity
|
||||
* @param float $qty Quantity
|
||||
* @param int $incdec 1=Increase/decrease stock of child when parent stock increase/decrease
|
||||
* @param int $notrigger Disable triggers
|
||||
* @return int Return integer < 0 if KO, > 0 if OK
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ class MouvementStock extends CommonObject
|
|||
* @param User $user User object
|
||||
* @param int $fk_product Id of product
|
||||
* @param int $entrepot_id Id of warehouse
|
||||
* @param int $qty Qty of movement (can be <0 or >0 depending on parameter type)
|
||||
* @param float $qty Qty of movement (can be <0 or >0 depending on parameter type)
|
||||
* @param int $type Direction of movement:
|
||||
* 0=input (stock increase by a stock transfer), 1=output (stock decrease by a stock transfer),
|
||||
* 2=output (stock decrease), 3=input (stock increase)
|
||||
|
|
@ -747,7 +747,7 @@ class MouvementStock extends CommonObject
|
|||
* @param User $user Object user
|
||||
* @param int $idProduct Id product
|
||||
* @param int $entrepot_id Warehouse id
|
||||
* @param int $qty Quantity
|
||||
* @param float $qty Quantity
|
||||
* @param int $type Type
|
||||
* @param int $price Price
|
||||
* @param string $label Label of movement
|
||||
|
|
@ -810,7 +810,7 @@ class MouvementStock extends CommonObject
|
|||
* @param User $user Object user
|
||||
* @param int $fk_product Id product
|
||||
* @param int $entrepot_id Warehouse id
|
||||
* @param int $qty Quantity
|
||||
* @param float $qty Quantity
|
||||
* @param int $price Price
|
||||
* @param string $label Label of stock movement
|
||||
* @param int|string $datem Force date of movement
|
||||
|
|
@ -837,7 +837,7 @@ class MouvementStock extends CommonObject
|
|||
* @param User $user Object user
|
||||
* @param int $fk_product Id product
|
||||
* @param int $entrepot_id Warehouse id
|
||||
* @param int $qty Quantity
|
||||
* @param float $qty Quantity
|
||||
* @param int $price Price
|
||||
* @param string $label Label of stock movement
|
||||
* @param integer|string $eatby eat-by date
|
||||
|
|
@ -893,7 +893,7 @@ class MouvementStock extends CommonObject
|
|||
* @param array|int $dluo Could be either
|
||||
* - int if row id of product_batch table (for update)
|
||||
* - or complete array('fk_product_stock'=>, 'batchnumber'=>)
|
||||
* @param int $qty Quantity of product with batch number. May be a negative amount.
|
||||
* @param float $qty Quantity of product with batch number. May be a negative amount.
|
||||
* @return int Return integer <0 if KO, -2 if we try to update a product_batchid that does not exist, else return productbatch id
|
||||
*/
|
||||
private function createBatch($dluo, $qty)
|
||||
|
|
|
|||
|
|
@ -817,7 +817,7 @@ class Reception extends CommonObject
|
|||
*
|
||||
* @param int $entrepot_id Id of warehouse
|
||||
* @param int $id Id of source line (supplier order line)
|
||||
* @param int $qty Quantity
|
||||
* @param float $qty Quantity
|
||||
* @param array $array_options extrafields array
|
||||
* @param string $comment Comment for stock movement
|
||||
* @param int $eatby eat-by date
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
|
||||
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -244,7 +245,7 @@ class SupplierProposal extends CommonObject
|
|||
* Add line into array ->lines
|
||||
*
|
||||
* @param int $idproduct Product Id to add
|
||||
* @param int $qty Quantity
|
||||
* @param float $qty Quantity
|
||||
* @param int $remise_percent Discount effected on Product
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
*
|
||||
|
|
@ -1164,7 +1165,7 @@ class SupplierProposal extends CommonObject
|
|||
if (!$error) {
|
||||
// Hook of thirdparty module
|
||||
if (is_object($hookmanager)) {
|
||||
$parameters = array('objFrom'=>$objFrom);
|
||||
$parameters = array('objFrom' => $objFrom);
|
||||
$action = '';
|
||||
$reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
|
|
@ -2588,7 +2589,7 @@ class SupplierProposal extends CommonObject
|
|||
}
|
||||
global $action;
|
||||
$hookmanager->initHooks(array($this->element . 'dao'));
|
||||
$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
|
||||
$parameters = array('id' => $this->id, 'getnomurl' => &$result);
|
||||
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook > 0) {
|
||||
$result = $hookmanager->resPrint;
|
||||
|
|
@ -2781,7 +2782,7 @@ class SupplierProposal extends CommonObject
|
|||
$return .= '<br><span class="opacitymedium">'.$langs->trans("DateEnd").'</span> : <span class="info-box-label">'.dol_print_date($this->delivery_date).'</span>';
|
||||
}
|
||||
if (property_exists($this, 'total_ttc')) {
|
||||
$return .='<br><span class="opacitymedium" >'.$langs->trans("AmountHT").' : </span><span class="info-box-label amount">'.price($this->total_ttc).'</span>';
|
||||
$return .= '<br><span class="opacitymedium" >'.$langs->trans("AmountHT").' : </span><span class="info-box-label amount">'.price($this->total_ttc).'</span>';
|
||||
}
|
||||
if (method_exists($this, 'getLibStatut')) {
|
||||
$return .= '<br><div class="info-box-status">'.$this->getLibStatut(3).'</div>';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user