Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 13.0
This commit is contained in:
commit
01cf608ef4
@ -5252,7 +5252,7 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
// Create a credit note
|
||||
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate)
|
||||
if (($object->type == Facture::TYPE_STANDARD || ($object->type == Facture::TYPE_DEPOSIT && empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS) ) || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate)
|
||||
{
|
||||
if (!$objectidnext)
|
||||
{
|
||||
|
||||
@ -658,7 +658,7 @@ class Mo extends CommonObject
|
||||
if ($line->qty_frozen) {
|
||||
$moline->qty = $line->qty; // Qty to consume does not depends on quantity to produce
|
||||
} else {
|
||||
$moline->qty = price2num(($line->qty / $bom->qty) * $this->qty / $line->efficiency, 'MS'); // Calculate with Qty to produce and more presition
|
||||
$moline->qty = price2num(($line->qty / ( ! empty($bom->qty) ? $bom->qty : 1 ) ) * $this->qty / ( ! empty($line->efficiency) ? $line->efficiency : 1 ), 'MS'); // Calculate with Qty to produce and more presition
|
||||
}
|
||||
if ($moline->qty <= 0) {
|
||||
$error++;
|
||||
|
||||
@ -25,7 +25,7 @@ if (empty($conf) || !is_object($conf))
|
||||
|
||||
if (!is_object($form)) $form = new Form($db);
|
||||
|
||||
$qtytoconsumeforline = $this->tpl['qty'] / $this->tpl['efficiency'];
|
||||
$qtytoconsumeforline = $this->tpl['qty'] / ( ! empty($this->tpl['efficiency']) ? $this->tpl['efficiency'] : 1 );
|
||||
/*if ((empty($this->tpl['qty_frozen']) && $this->tpl['qty_bom'] > 1)) {
|
||||
$qtytoconsumeforline = $qtytoconsumeforline / $this->tpl['qty_bom'];
|
||||
}*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user