FIX : stickler feedbacks
This commit is contained in:
parent
8e2998a504
commit
8534a96981
@ -655,9 +655,9 @@ function show_stats_for_company($product, $socid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show stats for company
|
* Show stats for product batch
|
||||||
*
|
*
|
||||||
* @param Product $product Product object
|
* @param Productlot $batch Product batch object
|
||||||
* @param int $socid Thirdparty id
|
* @param int $socid Thirdparty id
|
||||||
* @return integer NB of lines shown into array
|
* @return integer NB of lines shown into array
|
||||||
*/
|
*/
|
||||||
@ -681,7 +681,7 @@ function show_stats_for_batch($batch, $socid)
|
|||||||
// Expeditions
|
// Expeditions
|
||||||
if (isModEnabled('expedition') && !empty($user->rights->expedition->lire)) {
|
if (isModEnabled('expedition') && !empty($user->rights->expedition->lire)) {
|
||||||
$nblines++;
|
$nblines++;
|
||||||
$ret = $batch->load_stats_expedition($socid);
|
$ret = $batch->loadStatsExpedition($socid);
|
||||||
if ($ret < 0) {
|
if ($ret < 0) {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
@ -701,7 +701,7 @@ function show_stats_for_batch($batch, $socid)
|
|||||||
if(isModEnabled("reception") && !empty($user->rights->reception->lire)) {
|
if(isModEnabled("reception") && !empty($user->rights->reception->lire)) {
|
||||||
|
|
||||||
$nblines++;
|
$nblines++;
|
||||||
$ret = $batch->load_stats_reception($socid);
|
$ret = $batch->loadStatsReception($socid);
|
||||||
if ($ret < 0) {
|
if ($ret < 0) {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
@ -720,7 +720,7 @@ function show_stats_for_batch($batch, $socid)
|
|||||||
} elseif(isModEnabled('supplier_order') && !empty($user->rights->fournisseur->commande->lire)) {
|
} elseif(isModEnabled('supplier_order') && !empty($user->rights->fournisseur->commande->lire)) {
|
||||||
|
|
||||||
$nblines++;
|
$nblines++;
|
||||||
$ret = $batch->load_stats_supplier_order($socid);
|
$ret = $batch->loadStatsSupplierOrder($socid);
|
||||||
if ($ret < 0) {
|
if ($ret < 0) {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
@ -740,7 +740,7 @@ function show_stats_for_batch($batch, $socid)
|
|||||||
|
|
||||||
if (isModEnabled('mrp') && !empty($user->rights->mrp->read)) {
|
if (isModEnabled('mrp') && !empty($user->rights->mrp->read)) {
|
||||||
$nblines++;
|
$nblines++;
|
||||||
$ret = $batch->load_stats_mo($socid);
|
$ret = $batch->loadStatsMo($socid);
|
||||||
if ($ret < 0) {
|
if ($ret < 0) {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -561,7 +561,7 @@ class Productlot extends CommonObject
|
|||||||
* @param int $socid Id societe
|
* @param int $socid Id societe
|
||||||
* @return int Array of stats in $this->stats_expedition, <0 if ko or >0 if ok
|
* @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
|
// phpcs:enable
|
||||||
global $db, $conf, $user, $hookmanager, $action;
|
global $db, $conf, $user, $hookmanager, $action;
|
||||||
@ -606,7 +606,7 @@ class Productlot extends CommonObject
|
|||||||
// $qtyCoef = $fatherData['qty'];
|
// $qtyCoef = $fatherData['qty'];
|
||||||
//
|
//
|
||||||
// if ($fatherData['incdec']) {
|
// if ($fatherData['incdec']) {
|
||||||
// $pFather->load_stats_expedition($socid);
|
// $pFather->loadStatsExpedition($socid);
|
||||||
//
|
//
|
||||||
// $this->stats_expedition['customers'] += $pFather->stats_expedition['customers'];
|
// $this->stats_expedition['customers'] += $pFather->stats_expedition['customers'];
|
||||||
// $this->stats_expedition['nb'] += $pFather->stats_expedition['nb'];
|
// $this->stats_expedition['nb'] += $pFather->stats_expedition['nb'];
|
||||||
@ -636,7 +636,7 @@ class Productlot extends CommonObject
|
|||||||
* @param int $socid Id societe
|
* @param int $socid Id societe
|
||||||
* @return int Array of stats in $this->stats_expedition, <0 if ko or >0 if ok
|
* @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
|
// phpcs:enable
|
||||||
global $db, $conf, $user, $hookmanager, $action;
|
global $db, $conf, $user, $hookmanager, $action;
|
||||||
@ -711,7 +711,7 @@ class Productlot extends CommonObject
|
|||||||
* @param int $socid Id societe
|
* @param int $socid Id societe
|
||||||
* @return int Array of stats in $this->stats_expedition, <0 if ko or >0 if ok
|
* @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
|
// phpcs:enable
|
||||||
global $db, $conf, $user, $hookmanager, $action;
|
global $db, $conf, $user, $hookmanager, $action;
|
||||||
@ -755,7 +755,7 @@ class Productlot extends CommonObject
|
|||||||
// $qtyCoef = $fatherData['qty'];
|
// $qtyCoef = $fatherData['qty'];
|
||||||
//
|
//
|
||||||
// if ($fatherData['incdec']) {
|
// if ($fatherData['incdec']) {
|
||||||
// $pFather->load_stats_expedition($socid);
|
// $pFather->loadStatsReception($socid);
|
||||||
//
|
//
|
||||||
// $this->stats_expedition['customers'] += $pFather->stats_expedition['customers'];
|
// $this->stats_expedition['customers'] += $pFather->stats_expedition['customers'];
|
||||||
// $this->stats_expedition['nb'] += $pFather->stats_expedition['nb'];
|
// $this->stats_expedition['nb'] += $pFather->stats_expedition['nb'];
|
||||||
@ -785,7 +785,7 @@ class Productlot extends CommonObject
|
|||||||
* @param int $socid Id societe
|
* @param int $socid Id societe
|
||||||
* @return int Array of stats in $this->stats_expedition, <0 if ko or >0 if ok
|
* @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
|
// phpcs:enable
|
||||||
global $user, $hookmanager, $action;
|
global $user, $hookmanager, $action;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user