FIX #5470 User of expense report in bank transactions page is not correct

This commit is contained in:
Marcos García de La Fuente 2016-07-09 14:31:41 +02:00
parent 47d7ac8031
commit d01796a214

View File

@ -57,6 +57,9 @@ if ($action == 'add_payment')
exit;
}
$expensereport = new ExpenseReport($db);
$expensereport->fetch($chid);
$datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
if (! $_POST["fk_typepayment"] > 0)
@ -85,8 +88,7 @@ if ($action == 'add_payment')
{
if (substr($key,0,7) == 'amount_')
{
$other_chid = substr($key,7);
$amounts[$other_chid] = price2num($_POST[$key]);
$amounts[$expensereport->fk_user_author] = price2num($_POST[$key]);
$total += price2num($_POST[$key]);
}
}