Debug MO module
This commit is contained in:
parent
5740d17450
commit
bfa13e16ed
@ -7,7 +7,7 @@ English Dolibarr ChangeLog
|
||||
For Users:
|
||||
|
||||
NEW: Module BOM is now stable.
|
||||
NEW: Module MO - Manufacturing Order available with experimental status.
|
||||
NEW: Module MO (Manufacturing Order) is available with experimental status.
|
||||
NEW: Can set the Address/Contact by default on third parties.
|
||||
NEW: Add a dictionary to edit list of Social networks.
|
||||
NEW: A nicer dashboard for open elements on Home page.
|
||||
|
||||
@ -50,6 +50,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
|
||||
dol_include_once('/mrp/class/mo.class.php');
|
||||
dol_include_once('/mrp/lib/mrp_mo.lib.php');
|
||||
@ -371,10 +372,10 @@ if (empty($reshook))
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
$formproject = new FormProjets($db);
|
||||
$formproduct = new FormProduct($db);
|
||||
$tmpwarehouse = new Entrepot($db);
|
||||
$tmpbatch = new Productlot($db);
|
||||
|
||||
llxHeader('', $langs->trans('Mo'), '');
|
||||
|
||||
@ -606,7 +607,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print load_fiche_titre($langs->trans('Consumption'), '', '');
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table id="tablelines" class="noborder noshadow nobottom centpercent">';
|
||||
print '<table id="tablelines" class="noborder noshadow centpercent'.' nobottom'.'">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Product").'</td>';
|
||||
@ -664,7 +665,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
jQuery("#expandtoproduce'.$line->id.'").click(function() {
|
||||
console.log("Expand mrp_production line '.$line->id.'");
|
||||
jQuery(".expanddetail'.$line->id.'").toggle();';
|
||||
if ($nblinetoconsume == $nblinetoconsumecursor) {
|
||||
if ($nblinetoconsume == $nblinetoconsumecursor) { // If it is the last line
|
||||
print 'if (jQuery("#tablelines").hasClass("nobottom")) { jQuery("#tablelines").removeClass("nobottom"); } else { jQuery("#tablelines").addClass("nobottom"); }';
|
||||
}
|
||||
print '
|
||||
@ -674,6 +675,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
if (empty($conf->use_javascript_ajax)) print '<a href="'.$_SERVER["PHP_SELF"].'?collapse='.$collapse.','.$line->id.'">';
|
||||
print img_picto($langs->trans("ShowDetails"), "chevron-down", 'id="expandtoproduce'.$line->id.'"');
|
||||
if (empty($conf->use_javascript_ajax)) print '</a>';
|
||||
} else {
|
||||
if ($nblinetoconsume == $nblinetoconsumecursor) { // If it is the last line
|
||||
print '<script>jQuery("#tablelines").removeClass("nobottom");</script>';
|
||||
}
|
||||
}
|
||||
print ' '.$alreadyconsumed;
|
||||
print '</td>';
|
||||
@ -695,10 +700,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '<td>';
|
||||
if ($line2['fk_warehouse'] > 0) {
|
||||
$tmpwarehouse->fetch($line2['fk_warehouse']);
|
||||
print $tmpwarehouse->getNomUrl();
|
||||
print $tmpwarehouse->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
// Lot Batch
|
||||
print '<td>';
|
||||
if ($line2['batch'] != '') {
|
||||
$tmpbatch->fetch(0, $line2['fk_product'], $line2['batch']);
|
||||
print $tmpbatch->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>'.$line2['batch'].'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -721,6 +732,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
} else {
|
||||
print '<span class="opacitymedium">'.$langs->trans("NoStockChangeOnServices").'</span>';
|
||||
}
|
||||
// Lot / Batch
|
||||
print '</td>';
|
||||
if ($conf->productbatch->enabled) {
|
||||
print '<td>';
|
||||
@ -826,10 +838,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '<td>';
|
||||
if ($line2['fk_warehouse'] > 0) {
|
||||
$tmpwarehouse->fetch($line2['fk_warehouse']);
|
||||
print $tmpwarehouse->getNomUrl();
|
||||
print $tmpwarehouse->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
if ($line2['batch'] != '') {
|
||||
$tmpbatch->fetch(0, $line2['fk_product'], $line2['batch']);
|
||||
print $tmpbatch->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
print '<td>'.$line2['batch'].'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -220,9 +220,9 @@ class Productlot extends CommonObject
|
||||
/**
|
||||
* Load object in memory from the database
|
||||
*
|
||||
* @param int $id Id object
|
||||
* @param int $product_id Id of product, batch number parameter required
|
||||
* @param string $batch batch number
|
||||
* @param int $id Id of lot/batch
|
||||
* @param int $product_id Id of product, batch number parameter required
|
||||
* @param string $batch batch number
|
||||
*
|
||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||
*/
|
||||
|
||||
@ -336,17 +336,17 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
|
||||
// Eat by
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey($langs->trans('Eatby'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
print '</td><td>';
|
||||
print $form->editfieldval($langs->trans('Eatby'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Sell by
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey($langs->trans('Sellby'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
print $form->editfieldkey($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
print '</td><td>';
|
||||
print $form->editfieldval($langs->trans('Sellby'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
print $form->editfieldval($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user