Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
Conflicts: htdocs/expensereport/payment/payment.php
This commit is contained in:
commit
9d0cb07ff9
@ -506,7 +506,7 @@ class PaymentExpenseReport extends CommonObject
|
|||||||
|
|
||||||
$total=$this->total;
|
$total=$this->total;
|
||||||
if ($mode == 'payment_expensereport') $amount=$total;
|
if ($mode == 'payment_expensereport') $amount=$total;
|
||||||
|
|
||||||
// Insert payment into llx_bank
|
// Insert payment into llx_bank
|
||||||
$bank_line_id = $acc->addline(
|
$bank_line_id = $acc->addline(
|
||||||
$this->datepaid,
|
$this->datepaid,
|
||||||
@ -543,25 +543,25 @@ class PaymentExpenseReport extends CommonObject
|
|||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add link 'user' in bank_url between user and bank transaction
|
// Add link 'user' in bank_url between user and bank transaction
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
foreach ($this->amounts as $key => $value) // We should have always same third party but we loop in case of.
|
foreach ($this->amounts as $key => $value) // We should have always same user but we loop in case of.
|
||||||
{
|
{
|
||||||
if ($mode == 'payment_expensereport')
|
if ($mode == 'payment_expensereport')
|
||||||
{
|
{
|
||||||
$er = new ExpenseReport($this->db);
|
$fuser = new User($this->db);
|
||||||
$er->fetch($key);
|
$fuser->fetch($key);
|
||||||
$er->fetch_user($er->fk_user_author);
|
|
||||||
$result=$acc->add_url_line(
|
$result=$acc->add_url_line(
|
||||||
$bank_line_id,
|
$bank_line_id,
|
||||||
$er->user->id,
|
$fuser->id,
|
||||||
DOL_URL_ROOT.'/user/card.php?id=',
|
DOL_URL_ROOT.'/user/card.php?id=',
|
||||||
$er->user->getFullName($langs),
|
$fuser->getFullName($langs),
|
||||||
'user'
|
'user'
|
||||||
);
|
);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
$this->error=$this->db->lasterror();
|
$this->error=$this->db->lasterror();
|
||||||
dol_syslog(get_class($this).'::addPaymentToBank '.$this->error);
|
dol_syslog(get_class($this).'::addPaymentToBank '.$this->error);
|
||||||
|
|||||||
@ -80,7 +80,7 @@ if ($action == 'add_payment')
|
|||||||
setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountToDebit")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountToDebit")), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$paymentid = 0;
|
$paymentid = 0;
|
||||||
@ -190,19 +190,19 @@ if ($action == 'create' || empty($action))
|
|||||||
print '<input type="hidden" name="id" value="'.$chid.'">';
|
print '<input type="hidden" name="id" value="'.$chid.'">';
|
||||||
print '<input type="hidden" name="chid" value="'.$chid.'">';
|
print '<input type="hidden" name="chid" value="'.$chid.'">';
|
||||||
print '<input type="hidden" name="action" value="add_payment">';
|
print '<input type="hidden" name="action" value="add_payment">';
|
||||||
|
|
||||||
dol_fiche_head(null, '0', '', -1);
|
dol_fiche_head(null, '0', '', -1);
|
||||||
|
|
||||||
$linkback = '';
|
$linkback = '';
|
||||||
// $linkback = '<a href="' . DOL_URL_ROOT . '/expensereport/payment/list.php">' . $langs->trans("BackToList") . '</a>';
|
// $linkback = '<a href="' . DOL_URL_ROOT . '/expensereport/payment/list.php">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
dol_banner_tab($expensereport, 'ref', $linkback, 1, 'ref', 'ref', '');
|
dol_banner_tab($expensereport, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border centpercent">'."\n";
|
print '<table class="border centpercent">'."\n";
|
||||||
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Period").'</td><td>'.get_date_range($expensereport->date_debut,$expensereport->date_fin,"",$langs,0).'</td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans("Period").'</td><td>'.get_date_range($expensereport->date_debut,$expensereport->date_fin,"",$langs,0).'</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($expensereport->total_ttc,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($expensereport->total_ttc,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';
|
||||||
|
|
||||||
@ -221,13 +221,13 @@ if ($action == 'create' || empty($action))
|
|||||||
print '<tr><td class="tdtop">'.$langs->trans("RemainderToPay").'</td><td>'.price($total-$sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';
|
print '<tr><td class="tdtop">'.$langs->trans("RemainderToPay").'</td><td>'.price($total-$sumpaid,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border centpercent">'."\n";
|
print '<table class="border centpercent">'."\n";
|
||||||
|
|
||||||
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("Date").'</td><td colspan="2">';
|
print '<tr><td class="titlefield fieldrequired">'.$langs->trans("Date").'</td><td colspan="2">';
|
||||||
$datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
|
$datepaid = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
|
||||||
$datepayment=empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaid):0;
|
$datepayment=empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaid):0;
|
||||||
@ -248,7 +248,7 @@ if ($action == 'create' || empty($action))
|
|||||||
$form->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$expensereport->accountid, "accountid", 0, '',1); // Show open bank account list
|
$form->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$expensereport->accountid, "accountid", 0, '',1); // Show open bank account list
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Number
|
// Number
|
||||||
print '<tr><td>'.$langs->trans('Numero');
|
print '<tr><td>'.$langs->trans('Numero');
|
||||||
print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>';
|
print ' <em>('.$langs->trans("ChequeOrTransferNumber").')</em>';
|
||||||
@ -263,7 +263,7 @@ if ($action == 'create' || empty($action))
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
// List of expenses ereport not already paid completely
|
// List of expenses ereport not already paid completely
|
||||||
@ -304,7 +304,7 @@ if ($action == 'create' || empty($action))
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$total+=$objp->total;
|
$total+=$objp->total;
|
||||||
$total_ttc+=$objp->total_ttc;
|
$total_ttc+=$objp->total_ttc;
|
||||||
$totalrecu+=$objp->am;
|
$totalrecu+=$objp->am;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user