Skip to content

Commit

Permalink
fix: error return in mo creation when qty to consume is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
FHenry committed Sep 26, 2024
1 parent 1e12801 commit 83ac267
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions htdocs/langs/en_US/mrp.lang
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,8 @@ Manufacturing=Manufacturing
Disassemble=Disassemble
ProducedBy=Produced by
QtyTot=Qty Total

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.
THMMachineEstimatedHelp=Estimated cost of machine per hour. Will be used to estimate cost of a BOM using this workstation.

BadValueForquantityToConsume=Quantity to consume for a material cannot be 0 or negative
8 changes: 3 additions & 5 deletions htdocs/langs/fr_FR/mrp.lang
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ DateStartPlannedMo=Date de début prévue
DateEndPlannedMo=Date de fin prévue
KeepEmptyForAsap=Vide signifie 'Dès que possible'
EstimatedDuration=Durée estimée
EstimatedDurationDesc=Durée de fabrication (ou décomposition) planifiée pour ce produit avec cette BOM
EstimatedDurationDesc=Durée de fabrication (ou décomposition) planifiée pour ce produit avec cette BOM
ConfirmValidateBom=Voulez-vous vraiment valider la nomenclature (BOM) avec la référence <strong>%s</strong> (vous pourrez l'utiliser pour créer de nouveaux Ordres de Fabrication)
ConfirmCloseBom=Voulez-vous vraiment annuler cette nomenclature (vous ne pourrez plus l'utiliser pour créer de nouveaux Ordres de Fabrication)?
ConfirmReopenBom=Êtes-vous sûr de vouloir rouvrir cette nomenclature (vous pourrez l'utiliser pour créer de nouveaux Ordres de Fabrication)
Expand Down Expand Up @@ -97,7 +97,7 @@ Workstation=Poste de travail
Workstations=Postes de travail
WorkstationsDescription=Gestion des postes de travail
WorkstationSetup = Configuration du module Poste de travail
WorkstationSetupPage = Configuration du module Poste de travail
WorkstationSetupPage = Configuration du module Poste de travail
WorkstationList=Liste des postes de travail
WorkstationCreate=Ajouter un nouveau poste de travail
ConfirmEnableWorkstation=Voulez-vous vraiment activer le poste de travail <b>%s</b>?
Expand Down Expand Up @@ -130,10 +130,8 @@ Manufacturing=Fabrication
Disassemble=Déassemblage
ProducedBy=Produit par
QtyTot=Qté totale

QtyCantBeSplit= Quantité non fractionnable
NoRemainQtyToDispatch=Aucune quantité restant à fractionner

THMOperatorEstimatedHelp=Coût estimé de l'opérateur par heure. Sera utilisé pour estimer le coût d'une nomenclature utilisant ce poste de travail.
THMMachineEstimatedHelp=Coût estimé de la machine par heure. Sera utilisé pour estimer le coût d'une nomenclature utilisant ce poste de travail.

BadValueForquantityToConsume=La quantité à consommer d'un composant ne peut être 0 ou négative
2 changes: 2 additions & 0 deletions htdocs/mrp/class/mo.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,8 @@ public function update(User $user, $notrigger = false)
*/
public function createProduction(User $user, $notrigger = true)
{
global $langs;

$error = 0;
$role = "";

Expand Down

0 comments on commit 83ac267

Please sign in to comment.