Merge branch 'develop' of github.com:Dolibarr/dolibarr into mko_multicurrency_debug
This commit is contained in:
commit
466f89930e
@ -1931,7 +1931,7 @@ class AccountLine extends CommonObject
|
||||
*/
|
||||
function info($id)
|
||||
{
|
||||
$sql = 'SELECT b.rowid, b.datec,';
|
||||
$sql = 'SELECT b.rowid, b.datec, b.tms as datem,';
|
||||
$sql.= ' b.fk_user_author, b.fk_user_rappro';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'bank as b';
|
||||
$sql.= ' WHERE b.rowid = '.$id;
|
||||
@ -1958,6 +1958,7 @@ class AccountLine extends CommonObject
|
||||
}
|
||||
|
||||
$this->date_creation = $this->db->jdate($obj->datec);
|
||||
$this->date_modification = $this->db->jdate($obj->datem);
|
||||
//$this->date_rappro = $obj->daterappro; // Not yet managed
|
||||
}
|
||||
$this->db->free($result);
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
@ -274,8 +274,8 @@ if ($result)
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref")."</td>";
|
||||
print '<td colspan="4">';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Ref")."</td>";
|
||||
print '<td>';
|
||||
print $form->showrefnav($bankline, 'rowid', $linkback, 1, 'rowid', 'rowid');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -285,7 +285,7 @@ if ($result)
|
||||
|
||||
// Bank account
|
||||
print "<tr><td>".$langs->trans("Account")."</td>";
|
||||
print '<td colspan="4">';
|
||||
print '<td>';
|
||||
print $acct->getNomUrl(1,'transactions');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -294,7 +294,7 @@ if ($result)
|
||||
if (count($links))
|
||||
{
|
||||
print "<tr><td>".$langs->trans("Links")."</td>";
|
||||
print '<td colspan="4">';
|
||||
print '<td>';
|
||||
foreach($links as $key=>$val)
|
||||
{
|
||||
if ($key) print '<br>';
|
||||
@ -389,8 +389,6 @@ if ($result)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
$rowspan=0;
|
||||
|
||||
//$user->rights->banque->modifier=false;
|
||||
//$user->rights->banque->consolidate=true;
|
||||
|
||||
@ -399,7 +397,7 @@ if ($result)
|
||||
print "</td>";
|
||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||
{
|
||||
print '<td colspan="3">';
|
||||
print '<td>';
|
||||
$form->select_types_paiements($objp->fk_type,"value",'',2);
|
||||
print '<input type="text" class="flat" name="num_chq" value="'.(empty($objp->num_chq) ? '' : $objp->num_chq).'">';
|
||||
if ($objp->receiptid)
|
||||
@ -411,13 +409,10 @@ if ($result)
|
||||
|
||||
}
|
||||
print '</td>';
|
||||
$rowspan=7;
|
||||
print '<td align="center" rowspan="'.$rowspan.'" width="20%"><input type="submit" class="button" value="'.$langs->trans("Update").'">';
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="4">'.$objp->fk_type.' '.$objp->num_chq.'</td>';
|
||||
print '<td>'.$objp->fk_type.' '.$objp->num_chq.'</td>';
|
||||
}
|
||||
print "</tr>";
|
||||
|
||||
@ -425,13 +420,13 @@ if ($result)
|
||||
print "<tr><td>".$langs->trans("Bank")."</td>";
|
||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||
{
|
||||
print '<td colspan="3">';
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat" size="40" name="banque" value="'.(empty($objp->banque) ? '' : $objp->banque).'">';
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="'.($rowspan?'3':'4').'">'.$objp->banque.'</td>';
|
||||
print '<td>'.$objp->banque.'</td>';
|
||||
}
|
||||
print "</tr>";
|
||||
|
||||
@ -439,13 +434,13 @@ if ($result)
|
||||
print "<tr><td>".$langs->trans("CheckTransmitter")."</td>";
|
||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||
{
|
||||
print '<td colspan="3">';
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat" size="40" name="emetteur" value="'.(empty($objp->emetteur) ? '' : stripslashes($objp->emetteur)).'">';
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="'.($rowspan?'3':'4').'">'.$objp->emetteur.'</td>';
|
||||
print '<td>'.$objp->emetteur.'</td>';
|
||||
}
|
||||
print "</tr>";
|
||||
|
||||
@ -453,13 +448,13 @@ if ($result)
|
||||
print '<tr><td>'.$langs->trans("DateOperation").'</td>';
|
||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||
{
|
||||
print '<td colspan="3">';
|
||||
print '<td>';
|
||||
print $form->select_date($db->jdate($objp->do),'dateo','','','','update',1,0,1,$objp->rappro);
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="'.($rowspan?'3':'4').'">';
|
||||
print '<td>';
|
||||
print dol_print_date($db->jdate($objp->do),"day");
|
||||
print '</td>';
|
||||
}
|
||||
@ -469,7 +464,7 @@ if ($result)
|
||||
print "<tr><td>".$langs->trans("DateValue")."</td>";
|
||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||
{
|
||||
print '<td colspan="3">';
|
||||
print '<td>';
|
||||
print $form->select_date($db->jdate($objp->dv),'datev','','','','update',1,0,1,$objp->rappro);
|
||||
if (! $objp->rappro)
|
||||
{
|
||||
@ -483,7 +478,7 @@ if ($result)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="'.($rowspan?'3':'4').'">';
|
||||
print '<td>';
|
||||
print dol_print_date($db->jdate($objp->dv),"day");
|
||||
print '</td>';
|
||||
}
|
||||
@ -493,7 +488,7 @@ if ($result)
|
||||
print "<tr><td>".$langs->trans("Label")."</td>";
|
||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||
{
|
||||
print '<td colspan="3">';
|
||||
print '<td>';
|
||||
print '<input name="label" class="flat" '.($objp->rappro?' disabled':'').' value="';
|
||||
if (preg_match('/^\((.*)\)$/i',$objp->label,$reg))
|
||||
{
|
||||
@ -509,7 +504,7 @@ if ($result)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="'.($rowspan?'3':'4').'">';
|
||||
print '<td>';
|
||||
if (preg_match('/^\((.*)\)$/i',$objp->label,$reg))
|
||||
{
|
||||
// Label generique car entre parentheses. On l'affiche en le traduisant
|
||||
@ -527,19 +522,22 @@ if ($result)
|
||||
print "<tr><td>".$langs->trans("Amount")."</td>";
|
||||
if ($user->rights->banque->modifier)
|
||||
{
|
||||
print '<td colspan="3">';
|
||||
print '<td>';
|
||||
print '<input name="amount" class="flat" size="10" '.($objp->rappro?' disabled':'').' value="'.price($objp->amount).'"> '.$langs->trans("Currency".$acct->currency_code);
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="'.($rowspan?'3':'4').'">';
|
||||
print '<td>';
|
||||
print price($objp->amount);
|
||||
print '</td>';
|
||||
}
|
||||
print "</tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '<br><div class="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></div>';
|
||||
|
||||
print "</form>";
|
||||
|
||||
// Releve rappro
|
||||
@ -554,10 +552,10 @@ if ($result)
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans("Conciliation")."</td>";
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Conciliation")."</td>";
|
||||
if ($user->rights->banque->consolidate)
|
||||
{
|
||||
print '<td colspan="3">';
|
||||
print '<td>';
|
||||
if ($objp->rappro)
|
||||
{
|
||||
print $langs->trans("AccountStatement").' <input name="num_rel_bis" class="flat" value="'.$objp->num_releve.'"'.($objp->rappro?' disabled':'').'>';
|
||||
@ -568,28 +566,31 @@ if ($result)
|
||||
print $langs->trans("AccountStatement").' <input name="num_rel" class="flat" value="'.$objp->num_releve.'"'.($objp->rappro?' disabled':'').'>';
|
||||
}
|
||||
if ($objp->num_releve) print ' (<a href="'.DOL_URL_ROOT.'/compta/bank/releve.php?num='.$objp->num_releve.'&account='.$acct->id.'">'.$langs->trans("AccountStatement").' '.$objp->num_releve.')</a>';
|
||||
print '</td><td align="center" rowspan="2" width="20%"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>';
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="4">'.$objp->num_releve.' </td>';
|
||||
print '<td>'.$objp->num_releve.' </td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
print "<tr><td>".$langs->trans("BankLineConciliated")."</td>";
|
||||
if ($user->rights->banque->consolidate)
|
||||
{
|
||||
print '<td colspan="3">';
|
||||
print '<td>';
|
||||
print '<input type="checkbox" name="reconciled" class="flat" '.(isset($_POST["reconciled"])?($_POST["reconciled"]?' checked="checked"':''):($objp->rappro?' checked="checked"':'')).'">';
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="4">'.yn($objp->rappro).'</td>';
|
||||
print '<td>'.yn($objp->rappro).'</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
print '</table></form>';
|
||||
print '<br><div class="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></div>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ if (empty($reshook))
|
||||
if (! empty($multicurrency_amounts[$cursorfacid])) $atleastonepaymentnotnull++;
|
||||
$result=$tmpinvoice->fetch($cursorfacid);
|
||||
if ($result <= 0) dol_print_error($db);
|
||||
$multicurrency_amountsresttopay[$cursorfacid]=price2num($tmpinvoice->total_ttc - $tmpinvoice->getSommePaiement(1));
|
||||
$multicurrency_amountsresttopay[$cursorfacid]=price2num($tmpinvoice->multicurrency_total_ttc - $tmpinvoice->getSommePaiement(1));
|
||||
if ($multicurrency_amounts[$cursorfacid])
|
||||
{
|
||||
// Check amount
|
||||
|
||||
@ -148,30 +148,27 @@ if ($action == 'valide')
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td valign="top" width="140">'.$langs->trans('Ref').'</td>';
|
||||
print '<td colspan="3">';
|
||||
print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td>';
|
||||
print '<td>';
|
||||
print $form->showrefnav($payment,'id','',1,'rowid','id');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date
|
||||
print '<tr><td valign="top" width="120">'.$langs->trans('Date').'</td><td colspan="3">'.dol_print_date($payment->datep,'day').'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Date').'</td><td>'.dol_print_date($payment->datep,'day').'</td></tr>';
|
||||
|
||||
// Mode
|
||||
print '<tr><td valign="top">'.$langs->trans('Mode').'</td><td colspan="3">'.$langs->trans("PaymentType".$payment->type_code).'</td></tr>';
|
||||
|
||||
// Number
|
||||
print '<tr><td valign="top">'.$langs->trans('Number').'</td><td colspan="3">'.$payment->num_payment.'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Mode').'</td><td>'.$langs->trans("PaymentType".$payment->type_code).'</td></tr>';
|
||||
|
||||
// Amount
|
||||
print '<tr><td valign="top">'.$langs->trans('LoanCapital').'</td><td colspan="3">'.price($payment->amount_capital, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
||||
print '<tr><td valign="top">'.$langs->trans('Insurance').'</td><td colspan="3">'.price($payment->amount_insurance, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
||||
print '<tr><td valign="top">'.$langs->trans('Interest').'</td><td colspan="3">'.price($payment->amount_interest, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('LoanCapital').'</td><td>'.price($payment->amount_capital, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Insurance').'</td><td>'.price($payment->amount_insurance, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Interest').'</td><td>'.price($payment->amount_interest, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
|
||||
|
||||
// Note Private
|
||||
print '<tr><td valign="top">'.$langs->trans('NotePrivate').'</td><td colspan="3">'.nl2br($payment->note_private).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('NotePrivate').'</td><td>'.nl2br($payment->note_private).'</td></tr>';
|
||||
|
||||
// Note Public
|
||||
print '<tr><td valign="top">'.$langs->trans('NotePublic').'</td><td colspan="3">'.nl2br($payment->note_public).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('NotePublic').'</td><td>'.nl2br($payment->note_public).'</td></tr>';
|
||||
|
||||
// Bank account
|
||||
if (! empty($conf->banque->enabled))
|
||||
@ -183,7 +180,7 @@ if (! empty($conf->banque->enabled))
|
||||
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans('BankTransactionLine').'</td>';
|
||||
print '<td colspan="3">';
|
||||
print '<td>';
|
||||
print $bankline->getNomUrl(1,0,'showall');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -288,7 +285,7 @@ if (empty($action) && ! empty($user->rights->loan->delete))
|
||||
{
|
||||
if (! $disable_delete)
|
||||
{
|
||||
print '<a class="butActionDelete" href="card.php?id='.$_GET['id'].'&action=delete">'.$langs->trans('Delete').'</a>';
|
||||
print '<a class="butActionDelete" href="card.php?id='.$id.'&action=delete">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user