Merge branch 'NEW/17.0_objets_referents_lots' of github.com:atm-gauthier/dolibarr into NEW/develop_objets_referents_lots
This commit is contained in:
commit
7022f8217c
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2009-2010 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
*
|
||||
* 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
|
||||
@ -654,11 +655,11 @@ function show_stats_for_company($product, $socid)
|
||||
}
|
||||
|
||||
/**
|
||||
* Show stats for company
|
||||
* Show stats for product batch
|
||||
*
|
||||
* @param Product $product Product object
|
||||
* @param int $socid Thirdparty id
|
||||
* @return integer NB of lines shown into array
|
||||
* @param Productlot $batch Product batch object
|
||||
* @param int $socid Thirdparty id
|
||||
* @return integer NB of lines shown into array
|
||||
*/
|
||||
function show_stats_for_batch($batch, $socid)
|
||||
{
|
||||
@ -680,7 +681,7 @@ function show_stats_for_batch($batch, $socid)
|
||||
// Expeditions
|
||||
if (isModEnabled('expedition') && !empty($user->rights->expedition->lire)) {
|
||||
$nblines++;
|
||||
$ret = $batch->load_stats_expedition($socid);
|
||||
$ret = $batch->loadStatsExpedition($socid);
|
||||
if ($ret < 0) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
@ -700,7 +701,7 @@ function show_stats_for_batch($batch, $socid)
|
||||
if(isModEnabled("reception") && !empty($user->rights->reception->lire)) {
|
||||
|
||||
$nblines++;
|
||||
$ret = $batch->load_stats_reception($socid);
|
||||
$ret = $batch->loadStatsReception($socid);
|
||||
if ($ret < 0) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
@ -719,7 +720,7 @@ function show_stats_for_batch($batch, $socid)
|
||||
} elseif(isModEnabled('supplier_order') && !empty($user->rights->fournisseur->commande->lire)) {
|
||||
|
||||
$nblines++;
|
||||
$ret = $batch->load_stats_supplier_order($socid);
|
||||
$ret = $batch->loadStatsSupplierOrder($socid);
|
||||
if ($ret < 0) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
@ -739,7 +740,7 @@ function show_stats_for_batch($batch, $socid)
|
||||
|
||||
if (isModEnabled('mrp') && !empty($user->rights->mrp->read)) {
|
||||
$nblines++;
|
||||
$ret = $batch->load_stats_mo($socid);
|
||||
$ret = $batch->loadStatsMo($socid);
|
||||
if ($ret < 0) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2021 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
*
|
||||
* 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
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
*
|
||||
* 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
|
||||
@ -560,7 +561,7 @@ class Productlot extends CommonObject
|
||||
* @param int $socid Id societe
|
||||
* @return int Array of stats in $this->stats_expedition, <0 if ko or >0 if ok
|
||||
*/
|
||||
public function load_stats_expedition($socid = 0)
|
||||
public function loadStatsExpedition($socid = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $db, $conf, $user, $hookmanager, $action;
|
||||
@ -605,7 +606,7 @@ class Productlot extends CommonObject
|
||||
// $qtyCoef = $fatherData['qty'];
|
||||
//
|
||||
// if ($fatherData['incdec']) {
|
||||
// $pFather->load_stats_expedition($socid);
|
||||
// $pFather->loadStatsExpedition($socid);
|
||||
//
|
||||
// $this->stats_expedition['customers'] += $pFather->stats_expedition['customers'];
|
||||
// $this->stats_expedition['nb'] += $pFather->stats_expedition['nb'];
|
||||
@ -635,7 +636,7 @@ class Productlot extends CommonObject
|
||||
* @param int $socid Id societe
|
||||
* @return int Array of stats in $this->stats_expedition, <0 if ko or >0 if ok
|
||||
*/
|
||||
public function load_stats_supplier_order($socid = 0)
|
||||
public function loadStatsSupplierOrder($socid = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $db, $conf, $user, $hookmanager, $action;
|
||||
@ -710,7 +711,7 @@ class Productlot extends CommonObject
|
||||
* @param int $socid Id societe
|
||||
* @return int Array of stats in $this->stats_expedition, <0 if ko or >0 if ok
|
||||
*/
|
||||
public function load_stats_reception($socid = 0)
|
||||
public function loadStatsReception($socid = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $db, $conf, $user, $hookmanager, $action;
|
||||
@ -754,7 +755,7 @@ class Productlot extends CommonObject
|
||||
// $qtyCoef = $fatherData['qty'];
|
||||
//
|
||||
// if ($fatherData['incdec']) {
|
||||
// $pFather->load_stats_expedition($socid);
|
||||
// $pFather->loadStatsReception($socid);
|
||||
//
|
||||
// $this->stats_expedition['customers'] += $pFather->stats_expedition['customers'];
|
||||
// $this->stats_expedition['nb'] += $pFather->stats_expedition['nb'];
|
||||
@ -784,7 +785,7 @@ class Productlot extends CommonObject
|
||||
* @param int $socid Id societe
|
||||
* @return int Array of stats in $this->stats_expedition, <0 if ko or >0 if ok
|
||||
*/
|
||||
public function load_stats_mo($socid = 0)
|
||||
public function loadStatsMo($socid = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $user, $hookmanager, $action;
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
*
|
||||
* 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
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
*
|
||||
* 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
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2021 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
*
|
||||
* 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
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
*
|
||||
* 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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user