From 77c335c5f36a45fb6343c9b38d2cacb4ca3e6e23 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 23 Dec 2020 09:19:56 +0100 Subject: [PATCH 1/3] fix colspan balance accountanty --- htdocs/accountancy/bookkeeping/balance.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 29e56cd4233..94a927d676c 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -302,7 +302,7 @@ if ($action != 'export_csv') { // Display a sub-total per account if ($displayed_account != "") { - print ''.$langs->trans("SubTotal").':'.price($sous_total_opening_balance).''.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_credit - $sous_total_debit)).''; + print ''.$langs->trans("SubTotal").':'.price($sous_total_opening_balance).''.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_credit - $sous_total_debit)).''; print " \n"; print ''; } From 7d1d58822589fde6947531260c1e850c08c08e3f Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 23 Dec 2020 23:48:45 +0100 Subject: [PATCH 2/3] fix service right problem for mass action --- htdocs/product/list.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index d2f212df8da..50001d25026 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -240,6 +240,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 @@ -275,8 +278,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'; } @@ -507,8 +510,6 @@ 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'] = "".$langs->trans("Delete"); if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); From 60d8fb47199261c92c3ab416674bd70fdcc2157d Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 24 Dec 2020 00:48:48 +0100 Subject: [PATCH 3/3] fic porject mass action right --- htdocs/projet/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 5c36044dcd1..9bb383e9803 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -436,7 +436,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'] = ''.$langs->trans("Delete"); +if ($user->rights->projet->supprimer) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions);