Merge remote-tracking branch 'origin/3.7' into develop
This commit is contained in:
commit
29d399ba79
@ -932,6 +932,10 @@ if (empty($reshook))
|
|||||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2538,7 +2538,8 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Confirmation de la validation
|
// Confirmation de la validation
|
||||||
if ($action == 'valid') {
|
if ($action == 'valid')
|
||||||
|
{
|
||||||
// on verifie si l'objet est en numerotation provisoire
|
// on verifie si l'objet est en numerotation provisoire
|
||||||
$objectref = substr($object->ref, 1, 4);
|
$objectref = substr($object->ref, 1, 4);
|
||||||
if ($objectref == 'PROV') {
|
if ($objectref == 'PROV') {
|
||||||
@ -2569,7 +2570,8 @@ if ($action == 'create')
|
|||||||
$qualified_for_stock_change = $object->hasProductsOrServices(1);
|
$qualified_for_stock_change = $object->hasProductsOrServices(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($object->type != Facture::TYPE_DEPOSIT && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change) {
|
if ($object->type != Facture::TYPE_DEPOSIT && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $qualified_for_stock_change)
|
||||||
|
{
|
||||||
$langs->load("stocks");
|
$langs->load("stocks");
|
||||||
require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php';
|
||||||
|
|||||||
@ -947,7 +947,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Triggers call
|
// Triggers call
|
||||||
if (! $error && $notrigger)
|
if (! $error && empty($notrigger))
|
||||||
{
|
{
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('BILL_SUPPLIER_VALIDATE',$user);
|
$result=$this->call_trigger('BILL_SUPPLIER_VALIDATE',$user);
|
||||||
|
|||||||
@ -534,8 +534,8 @@ if ($action == 'confirm_valid' && $confirm == 'yes' &&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($object->error, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we have permission, and if we don't need to provide the idwarehouse, we go directly on approved step
|
// If we have permission, and if we don't need to provide the idwarehouse, we go directly on approved step
|
||||||
|
|||||||
@ -157,8 +157,7 @@ elseif ($action == 'confirm_valid' && $confirm == 'yes' &&
|
|||||||
$result = $object->validate($user,'',$idwarehouse);
|
$result = $object->validate($user,'',$idwarehouse);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
setEventMessage($object->error,'errors');
|
setEventMessages($object->error,$object->errors,'errors');
|
||||||
setEventMessage($object->errors,'errors');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user