mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
add phpdoc (#29832)
* add phpdoc * fix phan * fix phan * fix phan * fix phan * fix phan * fix phan * fix phan * fix phan * fix phan * add phpdoc * fix phan * fix phan
This commit is contained in:
parent
678c76b80e
commit
741e75ee47
|
|
@ -603,7 +603,7 @@ class Propal extends CommonObject
|
|||
}
|
||||
|
||||
$remise_percent = price2num($remise_percent);
|
||||
$qty = price2num($qty);
|
||||
$qty = (float) price2num($qty);
|
||||
$pu_ht = price2num($pu_ht);
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
$pu_ttc = price2num($pu_ttc);
|
||||
|
|
@ -832,7 +832,7 @@ class Propal extends CommonObject
|
|||
|
||||
// Clean parameters
|
||||
$remise_percent = price2num($remise_percent);
|
||||
$qty = price2num($qty);
|
||||
$qty = (float) price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
$pu_ht_devise = price2num($pu_ht_devise);
|
||||
if (!preg_match('/\((.*)\)/', (string) $txtva)) {
|
||||
|
|
@ -857,7 +857,7 @@ class Propal extends CommonObject
|
|||
return -1;
|
||||
}
|
||||
|
||||
if ($this->statut == self::STATUS_DRAFT) {
|
||||
if ($this->status == self::STATUS_DRAFT) {
|
||||
$this->db->begin();
|
||||
|
||||
// Calcul du total TTC et de la TVA pour la ligne a partir de
|
||||
|
|
@ -3999,6 +3999,10 @@ class PropaleLigne extends CommonObjectLine
|
|||
public $tva_tx;
|
||||
public $vat_src_code;
|
||||
|
||||
/**
|
||||
* Unit price before taxes
|
||||
* @var float
|
||||
*/
|
||||
public $subprice;
|
||||
public $remise_percent;
|
||||
public $fk_remise_except;
|
||||
|
|
|
|||
|
|
@ -3081,7 +3081,11 @@ class ContratLigne extends CommonObjectLine
|
|||
*/
|
||||
public $fk_remise_except;
|
||||
|
||||
public $subprice; // Unit price HT
|
||||
/**
|
||||
* Unit price before taxes
|
||||
* @var float
|
||||
*/
|
||||
public $subprice;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
|
|
@ -3090,6 +3094,9 @@ class ContratLigne extends CommonObjectLine
|
|||
*/
|
||||
public $price;
|
||||
|
||||
/**
|
||||
* @var float price without tax
|
||||
*/
|
||||
public $price_ht;
|
||||
|
||||
public $total_ht;
|
||||
|
|
@ -3473,11 +3480,11 @@ class ContratLigne extends CommonObjectLine
|
|||
$this->tva_tx = trim((string) $this->tva_tx);
|
||||
$this->localtax1_tx = trim($this->localtax1_tx);
|
||||
$this->localtax2_tx = trim($this->localtax2_tx);
|
||||
$this->qty = trim((string) $this->qty);
|
||||
$this->qty = (float) $this->qty;
|
||||
$this->remise_percent = trim((string) $this->remise_percent);
|
||||
$this->fk_remise_except = (int) $this->fk_remise_except;
|
||||
$this->subprice = price2num($this->subprice);
|
||||
$this->price_ht = price2num($this->price_ht);
|
||||
$this->subprice = (float) price2num($this->subprice);
|
||||
$this->price_ht = (float) price2num($this->price_ht);
|
||||
$this->info_bits = (int) $this->info_bits;
|
||||
$this->fk_user_author = (int) $this->fk_user_author;
|
||||
$this->fk_user_ouverture = (int) $this->fk_user_ouverture;
|
||||
|
|
|
|||
|
|
@ -133,6 +133,9 @@ abstract class CommonObjectLine extends CommonObject
|
|||
*/
|
||||
public $fk_product_type;
|
||||
|
||||
/**
|
||||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
public $duree;
|
||||
public $remise_percent;
|
||||
|
|
@ -149,6 +152,11 @@ abstract class CommonObjectLine extends CommonObject
|
|||
* @var int special code
|
||||
*/
|
||||
public $special_code;
|
||||
|
||||
/**
|
||||
* Unit price before taxes
|
||||
* @var float
|
||||
*/
|
||||
public $subprice;
|
||||
public $tva_tx;
|
||||
|
||||
|
|
|
|||
|
|
@ -1215,8 +1215,19 @@ class DeliveryLine extends CommonObjectLine
|
|||
public $libelle;
|
||||
|
||||
// From llx_expeditiondet
|
||||
/**
|
||||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
|
||||
/**
|
||||
* @var float Quantity asked
|
||||
*/
|
||||
public $qty_asked;
|
||||
|
||||
/**
|
||||
* @var float Quantity shiiped
|
||||
*/
|
||||
public $qty_shipped;
|
||||
|
||||
public $fk_product;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,10 @@ class ExpeditionLineBatch extends CommonObject
|
|||
public $sellby;
|
||||
public $eatby;
|
||||
public $batch;
|
||||
|
||||
/**
|
||||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
public $dluo_qty; // deprecated, use qty
|
||||
public $entrepot_id;
|
||||
|
|
|
|||
|
|
@ -1947,7 +1947,7 @@ class ExpenseReport extends CommonObject
|
|||
$fk_project = 0;
|
||||
}
|
||||
|
||||
$qty = price2num($qty);
|
||||
$qty = (float) price2num($qty);
|
||||
if (!preg_match('/\s*\((.*)\)/', $vatrate)) {
|
||||
$vatrate = price2num($vatrate); // $txtva can have format '5.0 (XXX)' or '5'
|
||||
}
|
||||
|
|
@ -2883,6 +2883,10 @@ class ExpenseReportLine extends CommonObjectLine
|
|||
public $rowid;
|
||||
|
||||
public $comments;
|
||||
|
||||
/**
|
||||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
public $value_unit;
|
||||
public $date;
|
||||
|
|
@ -3054,7 +3058,7 @@ class ExpenseReportLine extends CommonObjectLine
|
|||
if (empty($this->value_unit)) {
|
||||
$this->value_unit = 0;
|
||||
}
|
||||
$this->qty = price2num($this->qty);
|
||||
$this->qty = (float) price2num($this->qty);
|
||||
$this->vatrate = price2num($this->vatrate);
|
||||
if (empty($this->fk_c_exp_tax_cat)) {
|
||||
$this->fk_c_exp_tax_cat = 0;
|
||||
|
|
|
|||
|
|
@ -1681,6 +1681,11 @@ class FichinterLigne extends CommonObjectLine
|
|||
public $duration; // Duration of intervention
|
||||
public $rang = 0;
|
||||
public $tva_tx;
|
||||
|
||||
/**
|
||||
* Unit price before taxes
|
||||
* @var float
|
||||
*/
|
||||
public $subprice;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2029,6 +2029,10 @@ class FactureFournisseurLigneRec extends CommonInvoiceLine
|
|||
public $description;
|
||||
public $pu_ht;
|
||||
public $pu_ttc;
|
||||
|
||||
/**
|
||||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
public $remise_percent;
|
||||
public $fk_remise_except;
|
||||
|
|
|
|||
|
|
@ -3852,7 +3852,7 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||
|
||||
/**
|
||||
* Quantity
|
||||
* @var double
|
||||
* @var float
|
||||
*/
|
||||
public $qty;
|
||||
|
||||
|
|
|
|||
|
|
@ -121,6 +121,10 @@ class Mo extends CommonObject
|
|||
*/
|
||||
public $mrptype;
|
||||
public $label;
|
||||
|
||||
/**
|
||||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
public $fk_warehouse;
|
||||
public $fk_soc;
|
||||
|
|
@ -759,7 +763,7 @@ class Mo extends CommonObject
|
|||
if ($line->qty_frozen) {
|
||||
$moline->qty = $line->qty; // Qty to consume does not depends on quantity to produce
|
||||
} else {
|
||||
$moline->qty = price2num(($line->qty / (!empty($bom->qty) ? $bom->qty : 1)) * $this->qty / (!empty($line->efficiency) ? $line->efficiency : 1), 'MS'); // Calculate with Qty to produce and more presition
|
||||
$moline->qty = (float) price2num(($line->qty / (!empty($bom->qty) ? $bom->qty : 1)) * $this->qty / (!empty($line->efficiency) ? $line->efficiency : 1), 'MS'); // Calculate with Qty to produce and more presition
|
||||
}
|
||||
if ($moline->qty <= 0) {
|
||||
$error++;
|
||||
|
|
@ -832,7 +836,7 @@ class Mo extends CommonObject
|
|||
if ($moLine->role == 'toconsume' || $moLine->role == 'toproduce') {
|
||||
if (empty($moLine->qty_frozen)) {
|
||||
$qty = $newQty * $moLine->qty / $oldQty;
|
||||
$moLine->qty = price2num($qty, 'MS');
|
||||
$moLine->qty = (float) price2num($qty, 'MS');
|
||||
$res = $moLine->update($user);
|
||||
if (!$res) {
|
||||
$error++;
|
||||
|
|
@ -2068,7 +2072,15 @@ class MoLine extends CommonObjectLine
|
|||
public $position;
|
||||
public $fk_product;
|
||||
public $fk_warehouse;
|
||||
|
||||
/**
|
||||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
|
||||
/**
|
||||
* @var float Quantity frozen
|
||||
*/
|
||||
public $qty_frozen;
|
||||
public $disable_stock_change;
|
||||
public $efficiency;
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ if (empty($reshook)) {
|
|||
|
||||
$i = 1;
|
||||
while (GETPOSTISSET('qty-'.$line->id.'-'.$i)) {
|
||||
$qtytoprocess = price2num(GETPOST('qty-'.$line->id.'-'.$i));
|
||||
$qtytoprocess = (float) price2num(GETPOST('qty-'.$line->id.'-'.$i));
|
||||
|
||||
if ($qtytoprocess != 0) {
|
||||
// Check warehouse is set if we should have to
|
||||
|
|
@ -326,7 +326,7 @@ if (empty($reshook)) {
|
|||
|
||||
$i = 1;
|
||||
while (GETPOSTISSET('qtytoproduce-'.$line->id.'-'.$i)) {
|
||||
$qtytoprocess = price2num(GETPOST('qtytoproduce-'.$line->id.'-'.$i));
|
||||
$qtytoprocess = (float) price2num(GETPOST('qtytoproduce-'.$line->id.'-'.$i));
|
||||
$pricetoprocess = GETPOST('pricetoproduce-'.$line->id.'-'.$i) ? price2num(GETPOST('pricetoproduce-'.$line->id.'-'.$i)) : 0;
|
||||
|
||||
if ($qtytoprocess != 0) {
|
||||
|
|
|
|||
|
|
@ -49,6 +49,10 @@ class Productbatch extends CommonObject
|
|||
public $fk_product_stock;
|
||||
|
||||
public $batch = '';
|
||||
|
||||
/**
|
||||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
public $warehouseid;
|
||||
|
||||
|
|
|
|||
|
|
@ -851,9 +851,22 @@ class InventoryLine extends CommonObjectLine
|
|||
public $fk_product;
|
||||
public $batch;
|
||||
public $datec;
|
||||
|
||||
/**
|
||||
* @var float Quantity stock
|
||||
*/
|
||||
public $qty_stock;
|
||||
|
||||
/**
|
||||
* @var float|null Quantity viewed
|
||||
*/
|
||||
public $qty_view;
|
||||
|
||||
/**
|
||||
* @var float Quantity regulated
|
||||
*/
|
||||
public $qty_regulated;
|
||||
|
||||
public $pmp_real;
|
||||
public $pmp_expected;
|
||||
|
||||
|
|
|
|||
|
|
@ -290,14 +290,14 @@ if (empty($reshook)) {
|
|||
$resultupdate = 0;
|
||||
|
||||
if (GETPOST("id_".$lineid, 'alpha') != '') { // If a value was set ('0' or something else)
|
||||
$qtytoupdate = price2num(GETPOST("id_".$lineid, 'alpha'), 'MS');
|
||||
$qtytoupdate = (float) price2num(GETPOST("id_".$lineid, 'alpha'), 'MS');
|
||||
$result = $inventoryline->fetch($lineid);
|
||||
if ($qtytoupdate < 0) {
|
||||
$result = -1;
|
||||
setEventMessages($langs->trans("FieldCannotBeNegative", $langs->transnoentitiesnoconv("RealQty")), null, 'errors');
|
||||
}
|
||||
if ($result > 0) {
|
||||
$inventoryline->qty_stock = price2num(GETPOST('stock_qty_'.$lineid, 'alpha'), 'MS'); // The new value that was set in as hidden field
|
||||
$inventoryline->qty_stock = (float) price2num(GETPOST('stock_qty_'.$lineid, 'alpha'), 'MS'); // The new value that was set in as hidden field
|
||||
$inventoryline->qty_view = $qtytoupdate; // The new value we want
|
||||
$inventoryline->pmp_real = price2num(GETPOST('realpmp_'.$lineid, 'alpha'), 'MS');
|
||||
$inventoryline->pmp_expected = price2num(GETPOST('expectedpmp_'.$lineid, 'alpha'), 'MS');
|
||||
|
|
@ -360,7 +360,7 @@ if (empty($reshook)) {
|
|||
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';*/
|
||||
|
||||
if (GETPOST('addline', 'alpha')) {
|
||||
$qty = (GETPOST('qtytoadd') != '' ? price2num(GETPOST('qtytoadd', 'MS')) : null);
|
||||
$qty = (GETPOST('qtytoadd') != '' ? ((float) price2num(GETPOST('qtytoadd'), 'MS')) : null);
|
||||
if ($fk_warehouse <= 0) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Warehouse")), null, 'errors');
|
||||
|
|
|
|||
|
|
@ -60,6 +60,9 @@ class MouvementStock extends CommonObject
|
|||
*/
|
||||
public $warehouse_id;
|
||||
|
||||
/**
|
||||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -98,6 +98,10 @@ class StockTransferLine extends CommonObjectLine
|
|||
);
|
||||
public $rowid;
|
||||
public $amount;
|
||||
|
||||
/**
|
||||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
public $fk_warehouse_destination;
|
||||
public $fk_warehouse_source;
|
||||
|
|
|
|||
|
|
@ -90,7 +90,14 @@ class ReceptionLineBatch extends CommonObjectLine
|
|||
*/
|
||||
public $fk_product;
|
||||
|
||||
/**
|
||||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
|
||||
/**
|
||||
* @var float Quantity asked
|
||||
*/
|
||||
public $qty_asked;
|
||||
|
||||
public $libelle;
|
||||
|
|
@ -167,7 +174,7 @@ class ReceptionLineBatch extends CommonObjectLine
|
|||
$this->fk_elementdet = (int) $this->fk_elementdet;
|
||||
}
|
||||
if (isset($this->qty)) {
|
||||
$this->qty = trim($this->qty);
|
||||
$this->qty = (float) $this->qty;
|
||||
}
|
||||
if (isset($this->fk_entrepot)) {
|
||||
$this->fk_entrepot = (int) $this->fk_entrepot;
|
||||
|
|
@ -374,7 +381,7 @@ class ReceptionLineBatch extends CommonObjectLine
|
|||
$this->fk_elementdet = (int) $this->fk_elementdet;
|
||||
}
|
||||
if (isset($this->qty)) {
|
||||
$this->qty = trim($this->qty);
|
||||
$this->qty = (float) $this->qty;
|
||||
}
|
||||
if (isset($this->fk_entrepot)) {
|
||||
$this->fk_entrepot = (int) $this->fk_entrepot;
|
||||
|
|
@ -640,7 +647,7 @@ class ReceptionLineBatch extends CommonObjectLine
|
|||
$this->fk_element = 0;
|
||||
$this->fk_product = 0;
|
||||
$this->fk_elementdet = 0;
|
||||
$this->qty = '';
|
||||
$this->qty = 0;
|
||||
$this->fk_entrepot = 0;
|
||||
$this->fk_user = 0;
|
||||
$this->datec = '';
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ if ($action == 'updatelines' && $permissiontoreceive) {
|
|||
$error++;
|
||||
} else {
|
||||
$qtystart = $supplierorderdispatch->qty;
|
||||
$supplierorderdispatch->qty = GETPOST($qty);
|
||||
$supplierorderdispatch->qty = (float) price2num(GETPOST($qty));
|
||||
$supplierorderdispatch->fk_entrepot = GETPOSTINT($ent);
|
||||
if ($modebatch == "batch") {
|
||||
$supplierorderdispatch->eatby = $dDLUO;
|
||||
|
|
|
|||
|
|
@ -142,8 +142,20 @@ class RecruitmentJobPosition extends CommonObject
|
|||
* @var string label
|
||||
*/
|
||||
public $label;
|
||||
|
||||
/**
|
||||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
|
||||
/**
|
||||
* @var int ID thirdparty
|
||||
*/
|
||||
public $fk_soc;
|
||||
|
||||
/**
|
||||
* @var int ID project
|
||||
*/
|
||||
public $fk_project;
|
||||
public $fk_user_recruiter;
|
||||
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@ class SupplierProposal extends CommonObject
|
|||
}
|
||||
|
||||
$remise_percent = price2num($remise_percent);
|
||||
$qty = price2num($qty);
|
||||
$qty = (float) price2num($qty);
|
||||
$pu_ht = price2num($pu_ht);
|
||||
$pu_ttc = price2num($pu_ttc);
|
||||
if (!preg_match('/\((.*)\)/', (string) $txtva)) {
|
||||
|
|
@ -682,7 +682,7 @@ class SupplierProposal extends CommonObject
|
|||
|
||||
// Clean parameters
|
||||
$remise_percent = price2num($remise_percent);
|
||||
$qty = price2num($qty);
|
||||
$qty = (float) price2num($qty);
|
||||
$pu = price2num($pu);
|
||||
if (!preg_match('/\((.*)\)/', (string) $txtva)) {
|
||||
$txtva = price2num($txtva); // $txtva can have format '5.0(XXX)' or '5'
|
||||
|
|
@ -697,7 +697,7 @@ class SupplierProposal extends CommonObject
|
|||
$special_code = 0; // Remove option tag
|
||||
}
|
||||
|
||||
if ($this->statut == 0) {
|
||||
if ($this->status == 0) {
|
||||
$this->db->begin();
|
||||
|
||||
// Calcul du total TTC et de la TVA pour la ligne a partir de
|
||||
|
|
@ -2851,10 +2851,17 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
*/
|
||||
public $product_type = Product::TYPE_PRODUCT;
|
||||
|
||||
/**
|
||||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
public $tva_tx;
|
||||
public $vat_src_code;
|
||||
|
||||
/**
|
||||
* Unit price before taxes
|
||||
* @var float
|
||||
*/
|
||||
public $subprice;
|
||||
public $remise_percent;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user