mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
NEW : option to allow freezing qty in BOM service's line (#29990)
* Some manufacturing needs to freeze quantities for services to : in printing for example, the machine needs time to be tuned before starting the manufacturing, and this time is not dependant of the number of pieces printed * No more option to allow qty freeze for BOM services, it's now always authorized * No more option to allow qty freeze for BOM services, it's now always authorized
This commit is contained in:
parent
fb05e2851f
commit
24748edb59
|
|
@ -8,6 +8,7 @@
|
|||
* Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 Vincent Maury <vmaury@timgroup.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
|
||||
|
|
@ -88,6 +89,8 @@ if ($nolinesbefore) {
|
|||
print '<td class="linecollost right">' . $form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')) . '</td>';
|
||||
} else {
|
||||
print '<td class="linecolunit right">' . $form->textwithpicto($langs->trans('Unit'), '').'</td>';
|
||||
print '<td class="linecolqtyfrozen right">' .$form->textwithpicto($langs->trans('QtyFrozen'), $langs->trans("QuantityConsumedInvariable")) . '</td>';
|
||||
|
||||
if (isModEnabled('workstation')) {
|
||||
print '<td class="linecolworkstation right">' . $form->textwithpicto($langs->trans('Workstation'), '') . '</td>';
|
||||
}
|
||||
|
|
@ -185,6 +188,10 @@ if ($filtertype != 1) {
|
|||
print $formproduct->selectMeasuringUnits("fk_unit", "time", $fk_unit_default, 0, 0);
|
||||
print '</td>';
|
||||
|
||||
$coldisplay++;
|
||||
print '<td class="bordertop nobottom linecolqtyfrozen right"><input type="checkbox" name="qty_frozen" id="qty_frozen" class="flat right" value="1"' . (GETPOST("qty_frozen", 'alpha') ? ' checked="checked"' : '') . '>';
|
||||
print '</td>';
|
||||
|
||||
$coldisplay++;
|
||||
print '<td class="bordertop nobottom nowrap linecolworkstation right">';
|
||||
print $formproduct->selectWorkstations('', 'idworkstations', 1);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 Vincent Maury <vmaury@timgroup.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
|
||||
|
|
@ -158,6 +159,10 @@ if ($filtertype != 1) {
|
|||
print $formproduct->selectMeasuringUnits("fk_unit", "time", ($line->fk_unit) ? $line->fk_unit : '', 0, 0);
|
||||
print '</td>';
|
||||
|
||||
$coldisplay++;
|
||||
print '<td class="nobottom linecolqtyfrozen right"><input type="checkbox" name="qty_frozen" id="qty_frozen" class="flat right" value="1"' . (GETPOSTISSET("qty_frozen") ? (GETPOST('qty_frozen', 'int') ? ' checked="checked"' : '') : ($line->qty_frozen ? ' checked="checked"' : '')) . '>';
|
||||
print '</td>';
|
||||
|
||||
$coldisplay++;
|
||||
print '<td class="nobottom nowrap linecolworkstation right">';
|
||||
print $formproduct->selectWorkstations($line->fk_default_workstation, 'idworkstations', 1);
|
||||
|
|
|
|||
|
|
@ -90,6 +90,10 @@ if ($filtertype != 1) {
|
|||
} else {
|
||||
print '<td class="linecolunit right">' . $form->textwithpicto($langs->trans('Unit'), '').'</td>';
|
||||
|
||||
// Qty frozen
|
||||
print '<td class="linecolqtyfrozen right">' .$form->textwithpicto($langs->trans('QtyFrozen'), $langs->trans("QuantityConsumedInvariable")) . '</td>';
|
||||
|
||||
// Workstation
|
||||
if (isModEnabled('workstation')) {
|
||||
print '<td class="linecolworkstation right">' . $form->textwithpicto($langs->trans('DefaultWorkstation'), '') . '</td>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,6 +176,12 @@ if ($filtertype != 1) {
|
|||
|
||||
print '</td>';
|
||||
|
||||
// Qty frozen
|
||||
print '<td class="linecolqtyfrozen nowrap right">';
|
||||
$coldisplay++;
|
||||
echo $line->qty_frozen ? yn($line->qty_frozen) : '';
|
||||
print '</td>';
|
||||
|
||||
// Work station
|
||||
if (isModEnabled('workstation')) {
|
||||
$workstation = new Workstation($object->db);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user