diff --git a/htdocs/langs/en_US/salaries.lang b/htdocs/langs/en_US/salaries.lang
index cc28f87d883..504f0fbcc16 100644
--- a/htdocs/langs/en_US/salaries.lang
+++ b/htdocs/langs/en_US/salaries.lang
@@ -17,8 +17,8 @@ TJM=Average daily rate
CurrentSalary=Current salary
THMDescription=This value may be used to calculate the cost of time consumed on a project entered by users if module project is used
TJMDescription=This value is currently for information only and is not used for any calculation
-LastSalaries=Latest %s salary payments
-AllSalaries=All salary payments
+LastSalaries=Latest %s salaries
+AllSalaries=All salaries
SalariesStatistics=Salary statistics
SalariesAndPayments=Salaries and payments
-ConfirmDeleteSalaryPayment=Do you want to delete this payment of salary ?
\ No newline at end of file
+ConfirmDeleteSalaryPayment=Do you want to delete this salary payment ?
\ No newline at end of file
diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php
index 2f87fdd99d2..35ceb8a1931 100644
--- a/htdocs/salaries/class/salary.class.php
+++ b/htdocs/salaries/class/salary.class.php
@@ -502,6 +502,9 @@ class Salary extends CommonObject
if ($this->datesp && $this->dateep) {
$label .= '
'.$langs->trans('Period').': '.dol_print_date($this->datesp, 'day').' - '.dol_print_date($this->dateep, 'day');
}
+ if (isset($this->amount)) {
+ $label .= '
'.$langs->trans('Amount').': '.price($this->amount);
+ }
$url = DOL_URL_ROOT.'/salaries/card.php?id='.$this->id;
diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php
index 0b179653487..fc9002e13fb 100644
--- a/htdocs/user/bank.php
+++ b/htdocs/user/bank.php
@@ -366,12 +366,12 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
$payment_salary = new PaymentSalary($db);
$salary = new Salary($db);
- $sql = "SELECT s.rowid as sid, s.ref as sref, s.label, s.datesp, s.dateep, s.paye, SUM(ps.amount) as alreadypaid";
+ $sql = "SELECT s.rowid as sid, s.ref as sref, s.label, s.datesp, s.dateep, s.paye, s.amount, SUM(ps.amount) as alreadypaid";
$sql .= " FROM ".MAIN_DB_PREFIX."salary as s";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_salary as ps ON (s.rowid = ps.fk_salary)";
$sql .= " WHERE s.fk_user = ".$object->id;
$sql .= " AND s.entity IN (".getEntity('salary').")";
- $sql .= " GROUP BY s.rowid, s.ref, s.label, s.datesp, s.dateep, s.paye";
+ $sql .= " GROUP BY s.rowid, s.ref, s.label, s.datesp, s.dateep, s.paye, s.amount";
$sql .= " ORDER BY s.dateep DESC";
$resql = $db->query($sql);
@@ -381,7 +381,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
print '
';
print '';
- print '| '.$langs->trans("LastSalaries", ($num <= $MAXLIST ? "" : $MAXLIST)).' | '.$langs->trans("AllSalaries").''.$num.' | ';
+ print ' | ';
print ' ';
@@ -389,16 +389,17 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
while ($i < $num && $i < $MAXLIST) {
$objp = $db->fetch_object($resql);
- $payment_salary->id = $objp->rowid;
- $payment_salary->ref = $objp->ref;
- $payment_salary->datep = $db->jdate($objp->datep);
-
$salary->id = $objp->sid;
$salary->ref = $objp->sref ? $objp->sref : $objp->sid;
$salary->label = $objp->label;
$salary->datesp = $db->jdate($objp->datesp);
$salary->dateep = $db->jdate($objp->dateep);
$salary->paye = $objp->paye;
+ $salary->amount = $objp->amount;
+
+ $payment_salary->id = $objp->rowid;
+ $payment_salary->ref = $objp->ref;
+ $payment_salary->datep = $db->jdate($objp->datep);
print '';
print '| ';
@@ -407,7 +408,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
print ' | '.dol_print_date($db->jdate($objp->datesp), 'day')." | \n";
print ''.dol_print_date($db->jdate($objp->dateep), 'day')." | \n";
- //print ''.price($objp->amount).' | ';
+ print ''.price($objp->amount).' | ';
print ''.$salary->getLibStatut(5, $objp->alreadypaid).' | ';
print ' ';
@@ -416,7 +417,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
$db->free($resql);
if ($num <= 0) {
- print ''.$langs->trans("None").'';
+ print ' | '.$langs->trans("None").'';
}
print " | ";
} else {
@@ -424,9 +425,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
}
}
- /*
- * Last holidays
- */
+ // Latest leave requests
if (!empty($conf->holiday->enabled) &&
($user->rights->holiday->readall || ($user->rights->holiday->read && $object->id == $user->id))
) {
@@ -478,9 +477,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
}
}
- /*
- * Last expense report
- */
+ // Latest expense report
if (!empty($conf->expensereport->enabled) &&
($user->rights->expensereport->readall || ($user->rights->expensereport->lire && $object->id == $user->id))
) {
@@ -516,7 +513,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
print ' | ';
print $exp->getNomUrl(1);
print ' | '.dol_print_date($db->jdate($objp->date_debut), 'day')." | \n";
- print ''.price($objp->total_ttc).' | ';
+ print ''.price($objp->total_ttc).' | ';
print ''.$exp->LibStatut($objp->status, 5).' |
';
$i++;
}