FIX: accountancy lettering: better error management
This commit is contained in:
parent
a107682dbc
commit
1c57b75510
@ -797,6 +797,12 @@ if (!$error && $action == 'writebookkeeping') {
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
|
||||
$lettering_static = new Lettering($db);
|
||||
$nb_lettering = $lettering_static->bookkeepingLetteringAll(array($bookkeeping->id));
|
||||
|
||||
if ($nb_lettering < 0) {
|
||||
$error++;
|
||||
$errorforline++;
|
||||
setEventMessages($lettering_static->error, $lettering_static->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -380,6 +380,12 @@ if ($action == 'writebookkeeping') {
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
|
||||
$lettering_static = new Lettering($db);
|
||||
$nb_lettering = $lettering_static->bookkeepingLettering(array($bookkeeping->id), 'supplier_invoice');
|
||||
|
||||
if ($nb_lettering < 0) {
|
||||
$error++;
|
||||
$errorforline++;
|
||||
setEventMessages($lettering_static->error, $lettering_static->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -393,6 +393,13 @@ if ($action == 'writebookkeeping') {
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
|
||||
$lettering_static = new Lettering($db);
|
||||
$nb_lettering = $lettering_static->bookkeepingLettering(array($bookkeeping->id), 'customer_invoice');
|
||||
|
||||
if ($nb_lettering < 0) {
|
||||
$error++;
|
||||
$errorforline++;
|
||||
$errorforinvoice[$key] = 'other';
|
||||
setEventMessages($lettering_static->error, $lettering_static->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user