Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
e91d263a6a
@ -1,5 +1,6 @@
|
|||||||
<?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) ---Put here your own copyright and developer email---
|
* Copyright (C) ---Put here your own copyright and developer email---
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -590,7 +591,7 @@ class Mo extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Erase and update the line to produce.
|
* Erase and update the line to consume and to produce.
|
||||||
*
|
*
|
||||||
* @param User $user User that modifies
|
* @param User $user User that modifies
|
||||||
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
||||||
@ -648,7 +649,7 @@ class Mo extends CommonObject
|
|||||||
if ($line->qty_frozen) {
|
if ($line->qty_frozen) {
|
||||||
$moline->qty = $line->qty; // Qty to consume does not depends on quantity to produce
|
$moline->qty = $line->qty; // Qty to consume does not depends on quantity to produce
|
||||||
} else {
|
} else {
|
||||||
$moline->qty = round($line->qty * $this->qty / $line->efficiency, 2);
|
$moline->qty = price2num(($line->qty / $bom->qty) * $this->qty / $line->efficiency, 'MS'); // Calculate with Qty to produce and more presition
|
||||||
}
|
}
|
||||||
if ($moline->qty <= 0) {
|
if ($moline->qty <= 0) {
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user