Skip to content

Commit

Permalink
Fix popup message
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 5, 2024
1 parent 7680504 commit 1d4e076
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion htdocs/langs/en_US/mrp.lang
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Manufacturing=Manufacturing
Disassemble=Disassemble
ProducedBy=Produced by
QtyTot=Qty Total

MOIsClosed=Manufacturing Order is closed
QtyCantBeSplit= Quantity cannot be split
NoRemainQtyToDispatch=No quantity remaining to divide
THMOperatorEstimatedHelp=Estimated cost of operator per hour. Will be used to estimate cost of a BOM using this workstation.
Expand Down
9 changes: 7 additions & 2 deletions htdocs/mrp/mo_production.php
Original file line number Diff line number Diff line change
Expand Up @@ -817,17 +817,22 @@

// Lines to consume

print '<!-- Lines to consume -->'."\n";
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
print '<div class="clearboth"></div>';

$url = $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addconsumeline&token='.newToken();
$permissiontoaddaconsumeline = $object->status != $object::STATUS_PRODUCED && $object->status != $object::STATUS_CANCELED;
$permissiontoaddaconsumeline = ($object->status != $object::STATUS_PRODUCED && $object->status != $object::STATUS_CANCELED) ? 1 : -2;
$parameters = array('morecss' => 'reposition');
$helpText = '';
if ($permissiontoaddaconsumeline == -2) {
$helpText = $langs->trans('MOIsClosed');
}

$newcardbutton = '';
if ($action != 'consumeorproduce' && $action != 'consumeandproduceall') {
$newcardbutton = dolGetButtonTitle($langs->trans('AddNewConsumeLines'), '', 'fa fa-plus-circle size15x', $url, '', $permissiontoaddaconsumeline, $parameters);
$newcardbutton = dolGetButtonTitle($langs->trans('AddNewConsumeLines'), $helpText, 'fa fa-plus-circle size15x', $url, '', $permissiontoaddaconsumeline, $parameters);
}

print load_fiche_titre($langs->trans('Consumption'), $newcardbutton, '', 0, '', '', '');
Expand Down

0 comments on commit 1d4e076

Please sign in to comment.