diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php index b5ab67a90f7..09b30cdbeb5 100644 --- a/htdocs/adherents/class/api_members.class.php +++ b/htdocs/adherents/class/api_members.class.php @@ -46,7 +46,7 @@ class Members extends DolibarrApi */ public function __construct() { - global $db, $conf; + global $db; $this->db = $db; } diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 5afd1ce8c85..08822da9a59 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -121,7 +121,7 @@ if ($action == 'add_currency') { $currency = new MultiCurrency($db); if ($currency->fetch($fk_multicurrency) > 0) { - if ($currency->delete() > 0) { + if ($currency->delete($user) > 0) { setEventMessages($langs->trans('RecordDeleted'), array()); } else { setEventMessages($langs->trans('ErrorDeleteCurrencyFail'), array(), 'errors'); diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index c26a10cec34..6bd2223a627 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -261,7 +261,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as t"; $sql .= " WHERE t.date_ech between ".$wheretail; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; - //$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT; + //$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_UNPAID; if (!empty($projectid)) { $sql .= " AND fk_projet = ".((int) $projectid); } diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 89b6db0e0cc..c670676806b 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -85,7 +85,7 @@ if ($id > 0 || $ref) { $permissiontoread = $user->rights->tax->charges->lire; $permissiontoadd = $user->rights->tax->charges->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php -$permissiontodelete = $user->rights->tax->charges->supprimer || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); +$permissiontodelete = $user->rights->tax->charges->supprimer || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_UNPAID); $permissionnote = $user->rights->tax->charges->creer; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->tax->charges->creer; // Used by the include of actions_dellink.inc.php $upload_dir = $conf->tax->multidir_output[isset($object->entity) ? $object->entity : 1]; diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index c0751d0f842..5ca22da196c 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -84,7 +84,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ $permissiontoread = $user->rights->tax->charges->lire; $permissiontoadd = $user->rights->tax->charges->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php -$permissiontodelete = $user->rights->tax->charges->supprimer || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); +$permissiontodelete = $user->rights->tax->charges->supprimer || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_UNPAID); $permissionnote = $user->rights->tax->charges->creer; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->tax->charges->creer; // Used by the include of actions_dellink.inc.php $upload_dir = $conf->tax->multidir_output[isset($object->entity) ? $object->entity : 1].'/vat';