commit
993ab9461e
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2020 Lenin Rivas <lenin@leninrivas.com>
|
* Copyright (C) 2020 Lenin Rivas <lenin@leninrivas.com>
|
||||||
* Copyright (C) ---Put here your own copyright and developer email---
|
* Copyright (C) 2023 Frédéric France <frederic.france@free.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -26,8 +26,6 @@
|
|||||||
// Put here all includes required by your class file
|
// Put here all includes required by your class file
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php';
|
||||||
//require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
|
||||||
//require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class for Mo
|
* Class for Mo
|
||||||
@ -1118,7 +1116,8 @@ class Mo extends CommonObject
|
|||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$langs->load('mrp');
|
$langs->loadLangs(['mrp', 'products']);
|
||||||
|
$nofetch = isset($params['nofetch']) ? true : false;
|
||||||
|
|
||||||
$datas = [];
|
$datas = [];
|
||||||
|
|
||||||
@ -1133,6 +1132,21 @@ class Mo extends CommonObject
|
|||||||
if (isset($this->mrptype)) {
|
if (isset($this->mrptype)) {
|
||||||
$datas['type'] = '<br><b>'.$langs->trans('Type').':</b> '.$this->fields['mrptype']['arrayofkeyval'][$this->mrptype];
|
$datas['type'] = '<br><b>'.$langs->trans('Type').':</b> '.$this->fields['mrptype']['arrayofkeyval'][$this->mrptype];
|
||||||
}
|
}
|
||||||
|
if (isset($this->qty)) {
|
||||||
|
$datas['qty'] = '<br><b>'.$langs->trans('QtyToProduce').':</b> '.$this->qty;
|
||||||
|
}
|
||||||
|
if (!$nofetch && isset($this->fk_product)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||||
|
$product = new Product($this->db);
|
||||||
|
$product->fetch($this->fk_product);
|
||||||
|
$datas['product'] = '<br><b>'.$langs->trans('Product').':</b> '.$product->getNomUrl(1, '', 0, -1, 1);
|
||||||
|
}
|
||||||
|
if (!$nofetch && isset($this->fk_warehouse)) {
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php';
|
||||||
|
$warehouse = new Entrepot($this->db);
|
||||||
|
$warehouse->fetch($this->fk_warehouse);
|
||||||
|
$datas['warehouse'] = '<br><b>'.$langs->trans('WarehouseForProduction').':</b> '.$warehouse->getNomUrl(1, '', 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
return $datas;
|
return $datas;
|
||||||
}
|
}
|
||||||
@ -1160,13 +1174,13 @@ class Mo extends CommonObject
|
|||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'objecttype' => $this->element,
|
'objecttype' => $this->element,
|
||||||
'option' => $option,
|
'option' => $option,
|
||||||
|
'nofetch' => 1,
|
||||||
];
|
];
|
||||||
$classfortooltip = 'classfortooltip';
|
$classfortooltip = 'classfortooltip';
|
||||||
$dataparams = '';
|
$dataparams = '';
|
||||||
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
|
||||||
$classfortooltip = 'classforajaxtooltip';
|
$classfortooltip = 'classforajaxtooltip';
|
||||||
$dataparams = " data-params='".json_encode($params)."'";
|
$dataparams = " data-params='".json_encode($params)."'";
|
||||||
// $label = $langs->trans('Loading');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$label = implode($this->getTooltipContentArray($params));
|
$label = implode($this->getTooltipContentArray($params));
|
||||||
|
|||||||
@ -706,9 +706,9 @@ class Entrepot extends CommonObject
|
|||||||
if (isset($this->statut)) {
|
if (isset($this->statut)) {
|
||||||
$datas['picto'] .= ' '.$this->getLibStatut(5);
|
$datas['picto'] .= ' '.$this->getLibStatut(5);
|
||||||
}
|
}
|
||||||
$datas['ref'] .= '<br><b>'.$langs->trans('Ref').':</b> '.(empty($this->ref) ? $this->label : $this->ref);
|
$datas['ref'] = '<br><b>'.$langs->trans('Ref').':</b> '.(empty($this->ref) ? $this->label : $this->ref);
|
||||||
if (!empty($this->lieu)) {
|
if (!empty($this->lieu)) {
|
||||||
$datas['locationsummary'] .= '<br><b>'.$langs->trans('LocationSummary').':</b> '.$this->lieu;
|
$datas['locationsummary'] = '<br><b>'.$langs->trans('LocationSummary').':</b> '.$this->lieu;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $datas;
|
return $datas;
|
||||||
|
|||||||
@ -694,7 +694,7 @@ class Workstation extends CommonObject
|
|||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$langs->load('holiday');
|
$langs->load('mrp');
|
||||||
|
|
||||||
$datas = [];
|
$datas = [];
|
||||||
$datas['picto'] = img_picto('', $this->picto).' <u>'.$langs->trans("Workstation").'</u>';
|
$datas['picto'] = img_picto('', $this->picto).' <u>'.$langs->trans("Workstation").'</u>';
|
||||||
|
|||||||
@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('workstation', 'other'));
|
$langs->loadLangs(array('mrp', 'other'));
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
|
|||||||
@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstationusergroup.class.ph
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('workstation', 'other'));
|
$langs->loadLangs(array('mrp', 'other'));
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
|
|||||||
@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('companies', 'mails', 'other', 'workstation'));
|
$langs->loadLangs(array('companies', 'mails', 'other', 'mrp'));
|
||||||
|
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
|
|||||||
@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('workstation', 'other'));
|
$langs->loadLangs(array('mrp', 'other'));
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
||||||
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
||||||
|
|||||||
@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('workstation', 'companies'));
|
$langs->loadLangs(array('mrp', 'companies'));
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user