Merge pull request #6118 from aspangaro/5.0-b3

Fix Loan - Register a payment with a comma
This commit is contained in:
Laurent Destailleur 2016-12-10 17:56:56 +01:00 committed by GitHub
commit 7716d66ea9
2 changed files with 5 additions and 5 deletions

View File

@ -87,9 +87,9 @@ class PaymentLoan extends CommonObject
// Clean parameters
if (isset($this->fk_loan)) $this->fk_loan = trim($this->fk_loan);
if (isset($this->amount_capital)) $this->amount_capital = trim($this->amount_capital?$this->amount_capital:0);
if (isset($this->amount_insurance)) $this->amount_insurance = trim($this->amount_insurance?$this->amount_insurance:0);
if (isset($this->amount_interest)) $this->amount_interest = trim($this->amount_interest?$this->amount_interest:0);
if (isset($this->amount_capital)) $this->amount_capital = price2num($this->amount_capital?$this->amount_capital:0);
if (isset($this->amount_insurance)) $this->amount_insurance = price2num($this->amount_insurance?$this->amount_insurance:0);
if (isset($this->amount_interest)) $this->amount_interest = price2num($this->amount_interest?$this->amount_interest:0);
if (isset($this->fk_typepayment)) $this->fk_typepayment = trim($this->fk_typepayment);
if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment);
if (isset($this->note_private)) $this->note_private = trim($this->note_private);

View File

@ -170,7 +170,7 @@ if ($action == 'create')
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Loan").'</td>';
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="2"><a href="'.DOL_URL_ROOT.'/loan/card.php?id='.$chid.'">'.$chid.'</a></td></tr>';
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td colspan="2"><a href="'.DOL_URL_ROOT.'/loan/card.php?id='.$chid.'">'.$chid.'</a></td></tr>';
print '<tr><td>'.$langs->trans("DateStart").'</td><td colspan="2">'.dol_print_date($loan->datestart,'day')."</td></tr>\n";
print '<tr><td>'.$langs->trans("Label").'</td><td colspan="2">'.$loan->label."</td></tr>\n";
print '<tr><td>'.$langs->trans("Amount").'</td><td colspan="2">'.price($loan->capital,0,$outputlangs,1,-1,-1,$conf->currency).'</td></tr>';
@ -198,7 +198,7 @@ if ($action == 'create')
print '<td colspan="3">'.$langs->trans("Payment").'</td>';
print '</tr>';
print '<tr><td width="25%" class="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, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
$datepayment = empty($conf->global->MAIN_AUTOFILL_DATE)?(empty($_POST["remonth"])?-1:$datepaye):0;
$form->select_date($datepayment, '', '', '', '', "add_payment", 1, 1);