diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 6dba7fa0d9333..ad1f0633c96b3 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -238,7 +238,7 @@ // Label print ''.$langs->trans("Label").''; print ''; - print ''; + print ''; // Bank line if (isModEnabled("bank") && (getDolGlobalString('ADHERENT_BANK_USE') || $object->fk_bank)) { @@ -334,7 +334,7 @@ print ''.$langs->trans("Amount").''.price($object->amount).''; // Label - print ''.$langs->trans("Label").''.dol_string_onlythesehtmltags(dol_htmlentitiesbr($object->note_private)).''; + print ''.$langs->trans("Label").''.dol_string_onlythesehtmltags(dol_htmlentitiesbr($object->note_public)).''; // Bank line if (isModEnabled("bank") && (getDolGlobalString('ADHERENT_BANK_USE') || $object->fk_bank)) { diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 930c01db9fe24..8102984f3b20b 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -258,7 +258,7 @@ $pricetowithdraw = $bprev->SommeAPrelever($type, 'salary'); } if ($nb < 0) { - dol_print_error($bprev->error); + dol_print_error($db, $bprev->error); } print ''; @@ -479,7 +479,7 @@ } $title = $langs->trans("InvoiceWaitingWithdraw"); $picto = 'bill'; - if ($type =='bank-transfer') { + if ($type == 'bank-transfer') { if ($sourcetype != 'salary') { $title = $langs->trans("InvoiceWaitingPaymentByBankTransfer"); } else { diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 4fdefef202b61..8c259b63e2a10 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -506,7 +506,7 @@ } } elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->hasRight('expedition', 'supprimer')) { $also_update_stock = (GETPOST('alsoUpdateStock', 'alpha') ? 1 : 0); - $result = $object->delete(0, $also_update_stock); + $result = $object->delete($user, 0, $also_update_stock); if ($result > 0) { header("Location: ".DOL_URL_ROOT.'/expedition/index.php'); exit; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 1079f83402415..b9b21899b28c8 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1242,7 +1242,7 @@ public function cancel($notrigger = 0, $also_update_stock = false) $mouvS = new MouvementStock($this->db); // we do not log origin because it will be deleted - $mouvS->origin = null; + $mouvS->origin = ''; // get lot/serial $lotArray = null; if (isModEnabled('productbatch')) { @@ -1440,7 +1440,7 @@ public function delete($user = null, $notrigger = 0, $also_update_stock = false) $mouvS = new MouvementStock($this->db); // we do not log origin because it will be deleted - $mouvS->origin = null; + $mouvS->origin = ''; // get lot/serial $lotArray = $shipmentlinebatch->fetchAll($obj->expeditiondet_id); if (!is_array($lotArray)) { diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 2a40c0406c5f2..cce2244df4281 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -530,6 +530,8 @@ public function delete(User $user, int $notrigger = 0) require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $rowid = $this->id; + $error = 0; $this->db->begin();