bank ok
This commit is contained in:
parent
79fe5ee34c
commit
f03574d061
@ -401,7 +401,7 @@ $arrayofmassactions = array(
|
||||
if ($user->rights->adherent->creer) $arrayofmassactions['close'] = $langs->trans("Resiliate");
|
||||
if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
if ($user->rights->societe->creer) $arrayofmassactions['preaffecttag'] = '<span class="fa fa-tag paddingrightonly"></span>'.$langs->trans("AffectTag");
|
||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
|
||||
@ -297,7 +297,7 @@ if ($user->rights->agenda->allactions->delete)
|
||||
{
|
||||
$arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
}
|
||||
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) $arrayofmassactions = array();
|
||||
if ($user->rights->agenda->myactions->create) $arrayofmassactions['preaffecttag'] = '<span class="fa fa-tag paddingrightonly"></span>'.$langs->trans("AffectTag");
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
|
||||
@ -1011,38 +1011,8 @@ class Account extends CommonObject
|
||||
*/
|
||||
public function setCategories($categories)
|
||||
{
|
||||
// Handle single category
|
||||
if (!is_array($categories)) {
|
||||
$categories = array($categories);
|
||||
}
|
||||
|
||||
// Get current categories
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$c = new Categorie($this->db);
|
||||
$existing = $c->containing($this->id, Categorie::TYPE_ACCOUNT, 'id');
|
||||
|
||||
// Diff
|
||||
if (is_array($existing)) {
|
||||
$to_del = array_diff($existing, $categories);
|
||||
$to_add = array_diff($categories, $existing);
|
||||
} else {
|
||||
$to_del = array(); // Nothing to delete
|
||||
$to_add = $categories;
|
||||
}
|
||||
|
||||
// Process
|
||||
foreach ($to_del as $del) {
|
||||
if ($c->fetch($del) > 0) {
|
||||
$c->del_type($this, Categorie::TYPE_ACCOUNT);
|
||||
}
|
||||
}
|
||||
foreach ($to_add as $add) {
|
||||
if ($c->fetch($add) > 0) {
|
||||
$c->add_type($this, Categorie::TYPE_ACCOUNT);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
return parent::setCategoriesCommon($categories, Categorie::TYPE_ACCOUNT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -123,18 +123,26 @@ $parameters = array('socid'=>$socid);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||
if (empty($reshook)) {
|
||||
include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php';
|
||||
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
$search_ref = '';
|
||||
$search_label = '';
|
||||
$search_number = '';
|
||||
$search_status = '';
|
||||
// Purge search criteria
|
||||
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
$search_ref = '';
|
||||
$search_label = '';
|
||||
$search_number = '';
|
||||
$search_status = '';
|
||||
}
|
||||
|
||||
// Mass actions
|
||||
$objectclass = 'Account';
|
||||
$objectlabel = 'FinancialAccount';
|
||||
$permissiontoadd = $user->rights->banque->modifier;
|
||||
$uploaddir = $conf->banque->dir_output;
|
||||
include DOL_DOCUMENT_ROOT . '/core/actions_massactions.inc.php';
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -235,7 +243,8 @@ $arrayofmassactions = array(
|
||||
// 'builddoc'=>$langs->trans("PDFMerge"),
|
||||
);
|
||||
if ($user->rights->banque->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
if ($user->rights->banque->modifier) $arrayofmassactions['preaffecttag'] = '<span class="fa fa-tag paddingrightonly"></span>'.$langs->trans("AffectTag");
|
||||
if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewFinancialAccount'), '', 'fa fa-plus-circle', 'card.php?action=create', '', $user->rights->banque->configurer);
|
||||
@ -251,7 +260,7 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bank_account', 0, $newcardbutton, '', $limit, 1);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bank_account', 0, $newcardbutton, '', $limit, 1);
|
||||
|
||||
$topicmail = "Information";
|
||||
//$modelmail="subscription";
|
||||
|
||||
@ -527,7 +527,7 @@ $arrayofmassactions = array(
|
||||
//if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer");
|
||||
if ($user->rights->societe->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
if ($user->rights->societe->creer) $arrayofmassactions['preaffecttag'] = '<span class="fa fa-tag paddingrightonly"></span>'.$langs->trans("AffectTag");
|
||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewContactAddress'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create', '', $user->rights->societe->contact->creer);
|
||||
|
||||
@ -536,7 +536,7 @@ if ($resql)
|
||||
);
|
||||
if ($user->rights->{$rightskey}->supprimer) $arrayofmassactions['predelete'] = "<span class='fa fa-trash paddingrightonly'></span>".$langs->trans("Delete");
|
||||
if ($user->rights->{$rightskey}->creer) $arrayofmassactions['preaffecttag'] = '<span class="fa fa-tag paddingrightonly"></span>'.$langs->trans("AffectTag");
|
||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) $arrayofmassactions = array();
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = '';
|
||||
|
||||
@ -346,7 +346,7 @@ $arrayofmassactions = array(
|
||||
//'builddoc'=>$langs->trans("PDFMerge"),
|
||||
);
|
||||
//if ($user->rights->stock->supprimer) $arrayofmassactions['predelete']='<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
|
||||
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) $arrayofmassactions = array();
|
||||
if ($user->rights->stock->creer) $arrayofmassactions['preaffecttag'] = '<span class="fa fa-tag paddingrightonly"></span>'.$langs->trans("AffectTag");
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user