Skip to content

Commit

Permalink
FIX Dolibarr#19241 Project - Fix display salary in overview
Browse files Browse the repository at this point in the history
  • Loading branch information
aspangaro committed Oct 30, 2021
1 parent 82a35f8 commit b1c799e
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions htdocs/projet/element.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2012-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2016 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2021 Noé Cendrier <noe.cendrier@altairis.fr>
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2012-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2016 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2021 Noé Cendrier <noe.cendrier@altairis.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -590,8 +590,8 @@
'name'=>"Salaries",
'title'=>"ListSalariesAssociatedProject",
'class'=>'Salary',
'table'=>'payment_salary',
'datefieldname'=>'datev',
'table'=>'salary',
'datefieldname'=>'datesp',
'margin'=>'minus',
'disableamount'=>0,
'urlnew'=>DOL_URL_ROOT.'/salaries/card.php?action=create&projectid='.$id,
Expand Down Expand Up @@ -816,7 +816,7 @@
}

// Define $total_ht_by_line
if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') {
if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'salary') {
$total_ht_by_line = $element->amount;
} elseif ($tablename == 'fichinter') {
$total_ht_by_line = $element->getAmount();
Expand Down Expand Up @@ -858,7 +858,7 @@
}

// Define $total_ttc_by_line
if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') {
if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'salary') {
$total_ttc_by_line = $element->amount;
} elseif ($tablename == 'fichinter') {
$total_ttc_by_line = $element->getAmount();
Expand Down Expand Up @@ -1075,7 +1075,7 @@
print ''; // if $key == 'project_task', we don't want details per user
} elseif (in_array($tablename, array('payment_various'))) {
print ''; // if $key == 'payment_various', we don't have any thirdparty
} elseif (in_array($tablename, array('expensereport_det', 'don', 'projet_task', 'stock_mouvement', 'payment_salary'))) {
} elseif (in_array($tablename, array('expensereport_det', 'don', 'projet_task', 'stock_mouvement', 'salary'))) {
print $langs->trans("User");
} else {
print $langs->trans("ThirdParty");
Expand Down Expand Up @@ -1233,8 +1233,8 @@
$date = $element->date; // No draft status on lines
} elseif ($tablename == 'stock_mouvement') {
$date = $element->datem;
} elseif ($tablename == 'payment_salary') {
$date = $element->datev;
} elseif ($tablename == 'salary') {
$date = $element->datesp;
} elseif ($tablename == 'payment_various') {
$date = $element->datev;
} elseif ($tablename == 'chargesociales') {
Expand Down Expand Up @@ -1292,7 +1292,7 @@
$tmpuser = new User($db);
$tmpuser->fetch($expensereport->fk_user_author);
print $tmpuser->getNomUrl(1, '', 48);
} elseif ($tablename == 'payment_salary') {
} elseif ($tablename == 'salary') {
$tmpuser = new User($db);
$tmpuser->fetch($element->fk_user);
print $tmpuser->getNomUrl(1, '', 48);
Expand Down Expand Up @@ -1320,7 +1320,7 @@
if (empty($value['disableamount'])) {
$total_ht_by_line = null;
$othermessage = '';
if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') {
if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'salary') {
$total_ht_by_line = $element->amount;
} elseif ($tablename == 'fichinter') {
$total_ht_by_line = $element->getAmount();
Expand Down Expand Up @@ -1374,7 +1374,7 @@
// Amount inc tax
if (empty($value['disableamount'])) {
$total_ttc_by_line = null;
if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') {
if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'salary') {
$total_ttc_by_line = $element->amount;
} elseif ($tablename == 'fichinter') {
$total_ttc_by_line = $element->getAmount();
Expand Down

0 comments on commit b1c799e

Please sign in to comment.