mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix error management
This commit is contained in:
@@ -2395,18 +2395,23 @@ if ($action == 'create') {
|
||||
|
||||
$productstatic = new Product($db);
|
||||
|
||||
$object->fetch($id, $ref);
|
||||
$result = $object->fetch_thirdparty();
|
||||
if ($result < 0) {
|
||||
dol_print_error($db);
|
||||
$result = $object->fetch($id, $ref);
|
||||
if ($result <= 0) {
|
||||
$langs->load("errors");
|
||||
print $langs->trans("ErrorRecordNotFound");
|
||||
llxFooter();
|
||||
$db->close();
|
||||
exit;
|
||||
}
|
||||
|
||||
$societe = new Fournisseur($db);
|
||||
$result = $societe->fetch($object->socid);
|
||||
$result = $object->fetch_thirdparty();
|
||||
if ($result < 0) {
|
||||
dol_print_error($db);
|
||||
dol_print_error($db, $object->error, $object->errors);
|
||||
exit;
|
||||
}
|
||||
|
||||
$societe = $object->thirdparty;
|
||||
|
||||
$totalpaye = $object->getSommePaiement();
|
||||
$totalcreditnotes = $object->getSumCreditNotesUsed();
|
||||
$totaldeposits = $object->getSumDepositsUsed();
|
||||
|
||||
Reference in New Issue
Block a user