From fa1606387561fd5d12ede6ad8b27d4e4d3f871f8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Feb 2020 22:39:01 +0100 Subject: [PATCH 1/3] Fix bad accounting code set --- htdocs/product/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index ebf9c093c02..27bf63f08fd 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1187,7 +1187,7 @@ else { print ''.$langs->trans("ProductAccountancySellIntraCode").''; print ''; - if($type = 0) { + if($type == 0) { $accountancy_code_sell_intra = (GETPOST('accountancy_code_sell_intra', 'alpha')?(GETPOST('accountancy_code_sell_intra', 'alpha')):$conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT); } else { $accountancy_code_sell_intra = GETPOST('accountancy_code_sell_intra', 'alpha'); @@ -1199,7 +1199,7 @@ else // Accountancy_code_sell_export print ''.$langs->trans("ProductAccountancySellExportCode").''; print ''; - if($type = 0) + if($type == 0) { $accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export', 'alpha')?(GETPOST('accountancy_code_sell_export', 'alpha')):$conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT); } else { From b0016764c40e508f7f3c9109fa3eb22a2b21c0bf Mon Sep 17 00:00:00 2001 From: oscim Date: Mon, 17 Feb 2020 11:18:34 +0100 Subject: [PATCH 2/3] Update bank.php For authorize line manager to see wages paid --- htdocs/user/bank.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index 188a6b59d31..9ff7bd56634 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -289,7 +289,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco * Last salaries */ if (!empty($conf->salaries->enabled) && - ($user->rights->salaries->read && $object->id == $user->id) + ( ($object->fk_user == $user->id) || ($user->rights->salaries->read && $object->id == $user->id) ) ) { $salary = new PaymentSalary($db); From ce09ec88057d4fe8c8727b1b4717c087ac8d4829 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Feb 2020 23:35:45 +0100 Subject: [PATCH 3/3] Fix phpcs --- htdocs/core/modules/modProjet.class.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index 668bf22104e..aa68fdeb698 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -216,29 +216,6 @@ class modProjet extends DolibarrModules $this->export_label[$r]='ProjectsAndTasksLines'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_permission[$r]=array(array("projet","export")); $this->export_dependencies_array[$r]=array('projecttask'=>'pt.rowid', 'task_time'=>'ptt.rowid'); -/* - if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { - print ' '; - $htmltext = $langs->trans("ProjectFollowOpportunity"); - print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); - print '
'; - } - if (empty($conf->global->PROJECT_HIDE_TASKS)) - { - print ' '; - $htmltext = $langs->trans("ProjectFollowTasks"); - print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); - print '
'; - } - if (!empty($conf->global->PROJECT_BILL_TIME_SPENT)) - { - print ' '; - $htmltext = $langs->trans("ProjectBillTimeDescription"); - print $form->textwithpicto($langs->trans("BillTime"), $htmltext); - print '
'; - } -*/ $this->export_TypeFields_array[$r]=array( 's.rowid'=>"List:societe:nom::thirdparty",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_country:label',