Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 13.0

Conflicts:
	htdocs/accountancy/bookkeeping/balance.php
	htdocs/product/list.php
This commit is contained in:
Laurent Destailleur 2020-12-27 19:40:03 +01:00
commit 81ab33ff12
3 changed files with 8 additions and 4 deletions

View File

@ -314,7 +314,6 @@ if ($action != 'export_csv')
if (empty($accountingaccountstatic->account_number)) {
$link = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/card.php?action=create&accountingaccount='.length_accountg($line->numero_compte).'">'.img_edit_add().'</a>';
}
print '<tr class="oddeven">';
if (!empty($show_subgroup))
{
@ -343,6 +342,7 @@ if ($action != 'export_csv')
}
}
print '<tr class="oddeven">';
print '<td>'.$accounting_account.'</td>';
print '<td class="nowraponall right">'.price($opening_balance).'</td>';
print '<td class="nowraponall right">'.price($line->debit).'</td>';

View File

@ -261,6 +261,9 @@ $parameters = array();
$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');
$rightskey = 'produit';
if ($type == Product::TYPE_SERVICE) $rightskey = 'service';
if (empty($reshook))
{
// Selection of new fields
@ -299,8 +302,8 @@ if (empty($reshook))
if ((string) $search_type == '1') { $objectlabel = 'Services'; }
if ((string) $search_type == '0') { $objectlabel = 'Products'; }
$permissiontoread = $user->rights->produit->lire;
$permissiontodelete = $user->rights->produit->supprimer;
$permissiontoread = $user->rights->{$rightskey}->lire;
$permissiontodelete = $user->rights->{$rightskey}->supprimer;
$uploaddir = $conf->product->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
@ -530,6 +533,7 @@ if ($resql)
//'builddoc'=>$langs->trans("PDFMerge"),
//'presend'=>$langs->trans("SendByMail"),
);
$rightskey = 'produit';
if ($type == Product::TYPE_SERVICE) $rightskey = 'service';
if ($user->rights->{$rightskey}->supprimer) $arrayofmassactions['predelete'] = "<span class='fa fa-trash paddingrightonly'></span>".$langs->trans("Delete");

View File

@ -454,7 +454,7 @@ $arrayofmassactions = array(
);
//if($user->rights->societe->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer");
if ($user->rights->projet->creer) $arrayofmassactions['close'] = $langs->trans("Close");
if ($user->rights->societe->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
if ($user->rights->projet->supprimer) $arrayofmassactions['predelete'] = '<span class="fa fa-trash paddingrightonly"></span>'.$langs->trans("Delete");
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);