On peut modifier date de valeur lors du rapprochement.
This commit is contained in:
parent
8cfbdb9df7
commit
bc797e3157
@ -38,6 +38,7 @@ $langs->load("banks");
|
||||
|
||||
|
||||
$rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
|
||||
$orig_account=isset($_GET["orig_account"])?$_GET["orig_account"]:$_POST["orig_account"];
|
||||
|
||||
$html = new Form($db);
|
||||
|
||||
@ -184,7 +185,7 @@ if ($result)
|
||||
// Confirmations
|
||||
if ($_GET["action"] == 'delete_categ')
|
||||
{
|
||||
$html->form_confirm("ligne.php?rowid=".$_GET["rowid"]."&cat1=".$_GET["fk_categ"],"Supprimer dans la catégorie","Etes-vous sûr de vouloir supprimer le classement dans la catégorie ?","confirm_delete_categ");
|
||||
$html->form_confirm("ligne.php?rowid=".$_GET["rowid"]."&cat1=".$_GET["fk_categ"]."&orig_account=".$orig_account,"Supprimer dans la catégorie","Etes-vous sûr de vouloir supprimer le classement dans la catégorie ?","confirm_delete_categ");
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
@ -197,117 +198,182 @@ if ($result)
|
||||
$acct->fetch($objp->fk_account);
|
||||
$account = $acct->id;
|
||||
|
||||
// Tableau sur 4 colonne si déja rapproché, sinon sur 5 colonnes
|
||||
|
||||
// Author
|
||||
print "<tr><td>".$langs->trans("Author")."</td>";
|
||||
print '<tr><td width="20%">'.$langs->trans("Author")."</td>";
|
||||
if ($objp->fk_user_author)
|
||||
{
|
||||
$author=new User($db,$objp->fk_user_author);
|
||||
$author->fetch();
|
||||
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/user/fiche.php.id='.$author->id.'">';
|
||||
print '<td colspan="4"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$author->id.'">';
|
||||
print img_object($langs->trans("ShowUser"),'user').' '.$author->fullname.'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td colspan=\"3\"> </td>";
|
||||
print '<td colspan="3"> </td>';
|
||||
}
|
||||
print "</tr>";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||
|
||||
// Account
|
||||
print "<tr><td>".$langs->trans("Account")."</td><td colspan=\"3\">";
|
||||
if (! $objp->rappro)
|
||||
{
|
||||
$html->select_comptes($acct->id,'accountid',0);
|
||||
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<a href=\"account.php?account=".$acct->id."\">".$acct->label."</a>";
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
// Date ope
|
||||
if (! $objp->rappro)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Date")."</td><td colspan=\"3\">";
|
||||
$html->select_date($objp->do,'do');
|
||||
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Value date
|
||||
if (! $objp->rappro)
|
||||
{
|
||||
print "<tr><td>".$langs->trans("DateValue")."</td><td colspan=\"3\">";
|
||||
$html->select_date($objp->dv,'dv');
|
||||
print ' ';
|
||||
print '<a href="ligne.php?action=dvprev&account='.$_GET["account"].'&rowid='.$objp->rowid.'">';
|
||||
print img_edit_remove() . "</a> ";
|
||||
print '<a href="ligne.php?action=dvnext&account='.$_GET["account"].'&rowid='.$objp->rowid.'">';
|
||||
print img_edit_add() ."</a>";
|
||||
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Description
|
||||
print "<tr><td>".$langs->trans("Label")."</td><td colspan=\"3\">";
|
||||
print '<input name="label" class="flat" value="'.$objp->label.'" size="50">';
|
||||
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Amount
|
||||
if (! $objp->rappro)
|
||||
{
|
||||
print "<tr><td>".$langs->trans("Amount")."</td><td colspan=\"3\">";
|
||||
print '<input name="amount" class="flat" value="'.price($objp->amount).'">';
|
||||
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print "</form>";
|
||||
|
||||
// Type paiement
|
||||
print "<tr><td>".$langs->trans("Type")."</td><td colspan=\"3\">";
|
||||
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">";
|
||||
print '<input type="hidden" name="action" value="type">';
|
||||
print $html->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).'">';
|
||||
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'">';
|
||||
print "</form>";
|
||||
print "</td></tr>";
|
||||
|
||||
// Releve rappro
|
||||
if ($acct->rappro)
|
||||
{
|
||||
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">";
|
||||
print '<input type="hidden" name="action" value="num_releve">';
|
||||
print "<tr><td>".$langs->trans("Conciliation")."</td><td colspan=\"3\">";
|
||||
print $langs->trans("AccountStatement").' <input name="num_rel" class="flat" value="'.$objp->num_releve.'">';
|
||||
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"update\">";
|
||||
print "<input type=\"hidden\" name=\"orig_account\" value=\"".$orig_account."\">";
|
||||
|
||||
// Account
|
||||
print "<tr><td>".$langs->trans("Account")."</td>";
|
||||
/*
|
||||
if (! $objp->rappro)
|
||||
{
|
||||
if ($user->rights->banque->modifier && $acct->type != 2 && $acct->rappro) // Si non compte cash et si rapprochable
|
||||
{
|
||||
print '<td colspan="3">';
|
||||
$html->select_comptes($acct->id,'accountid',0);
|
||||
print '</td>';
|
||||
//print '<td align="center">';
|
||||
//print '<input type="submit" class="button" name="conciliate" value="'.$langs->trans("Conciliate").'">';
|
||||
//print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="3">';
|
||||
$html->select_comptes($acct->id,'accountid',0);
|
||||
print '</td>';
|
||||
}
|
||||
print '<td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
*/
|
||||
print '<td colspan="4"><a href="account.php?account='.$acct->id."\">".$acct->label."</a></td>";
|
||||
/*
|
||||
}
|
||||
*/
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
// Date ope
|
||||
print '<tr><td>'.$langs->trans("Date").'</td>';
|
||||
print '<td colspan="3">';
|
||||
if (! $objp->rappro)
|
||||
{
|
||||
$html->select_date($objp->do,'do');
|
||||
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print dolibarr_print_date($objp->do);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Value date
|
||||
print "<tr><td>".$langs->trans("DateValue")."</td>";
|
||||
print '<td colspan="3">';
|
||||
if (! $objp->rappro)
|
||||
{
|
||||
$html->select_date($objp->dv,'dv');
|
||||
print ' ';
|
||||
print '<a href="ligne.php?action=dvprev&account='.$_GET["account"].'&rowid='.$objp->rowid.'">';
|
||||
print img_edit_remove() . "</a> ";
|
||||
print '<a href="ligne.php?action=dvnext&account='.$_GET["account"].'&rowid='.$objp->rowid.'">';
|
||||
print img_edit_add() ."</a>";
|
||||
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print dolibarr_print_date($objp->dv);
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
// Description
|
||||
print "<tr><td>".$langs->trans("Label")."</td>";
|
||||
if (! $objp->rappro)
|
||||
{
|
||||
print '<td colspan="3">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="2">';
|
||||
}
|
||||
print '<input name="label" class="flat" value="'.$objp->label.'" size="50">';
|
||||
print '</td>';
|
||||
print '<td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Amount
|
||||
print "<tr><td>".$langs->trans("Amount")."</td>";
|
||||
print '<td colspan="3">';
|
||||
if (! $objp->rappro)
|
||||
{
|
||||
print '<input name="amount" class="flat" value="'.price($objp->amount).'">';
|
||||
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print price($objp->amount);
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
print "</form>";
|
||||
|
||||
// Type paiement
|
||||
print "<tr><td>".$langs->trans("Type")."</td><td colspan=\"3\">";
|
||||
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">";
|
||||
print '<input type="hidden" name="action" value="type">';
|
||||
print "<input type=\"hidden\" name=\"orig_account\" value=\"".$orig_account."\">";
|
||||
print $html->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).'">';
|
||||
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'">';
|
||||
print "</form>";
|
||||
print "</td></tr>";
|
||||
|
||||
// Releve rappro
|
||||
if ($acct->rappro) // Si compte rapprochable
|
||||
{
|
||||
print "<tr><td>".$langs->trans("Conciliation")."</td>";
|
||||
print "<form method=\"post\" action=\"ligne.php?rowid=$objp->rowid\">";
|
||||
print '<input type="hidden" name="action" value="num_releve">';
|
||||
print "<input type=\"hidden\" name=\"orig_account\" value=\"".$orig_account."\">";
|
||||
print '<td colspan="3">';
|
||||
print $langs->trans("AccountStatement").' <input name="num_rel" class="flat" value="'.$objp->num_releve.'">';
|
||||
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>';
|
||||
print '</form>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
/*
|
||||
* Boutons actions
|
||||
*/
|
||||
/*
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($orig_account)
|
||||
{
|
||||
$acct=new Account($db,$orig_account);
|
||||
$acct->fetch($orig_account);
|
||||
print '<a class="tabAction" href="rappro.php?account='.$orig_account.'">'.$langs->trans("BackToConciliate",$acct->label).'</a>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
*/
|
||||
|
||||
// Liste les categories
|
||||
|
||||
print '<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print "<form method=\"post\" action=\"ligne.php?rowid=$rowid&account=$account\">";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"class\">";
|
||||
print "<input type=\"hidden\" name=\"orig_account\" value=\"".$orig_account."\">";
|
||||
print "<tr class=\"liste_titre\"><td>".$langs->trans("Categories")."</td><td colspan=\"2\">";
|
||||
print "<select class=\"flat\" name=\"cat1\">$options";
|
||||
print "</select> ";
|
||||
|
||||
@ -216,28 +216,28 @@ if ($resql)
|
||||
}
|
||||
else
|
||||
{
|
||||
// Si pas encore rapproché
|
||||
if ($user->rights->banque->modifier)
|
||||
// Si pas encore rapproch
|
||||
if ($user->rights->banque->modifier)
|
||||
{
|
||||
print '<td align="center" width="30">';
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&account='.$acct->id.'">';
|
||||
print img_edit();
|
||||
print '</a> ';
|
||||
|
||||
if ($objp->do <= mktime() ) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/rappro.php?action=del&rowid='.$objp->rowid.'&account='.$acct->id.'">';
|
||||
print img_delete();
|
||||
print "</a>";
|
||||
}
|
||||
else {
|
||||
print " "; // On n'empeche la suppression car le raprochement ne pourra se faire qu'après la date passée et que l'écriture apparaissent bien sur le compte.
|
||||
}
|
||||
print "</td>";
|
||||
print '<td align="center" width="30">';
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/ligne.php?rowid='.$objp->rowid.'&account='.$acct->id.'&orig_account='.$acct->id.'">';
|
||||
print img_edit();
|
||||
print '</a> ';
|
||||
|
||||
if ($objp->do <= mktime() ) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/rappro.php?action=del&rowid='.$objp->rowid.'&account='.$acct->id.'">';
|
||||
print img_delete();
|
||||
print '</a>';
|
||||
}
|
||||
else {
|
||||
print " "; // On n'empeche la suppression car le raprochement ne pourra se faire qu'après la date passée et que l'écriture apparaissent bien sur le compte.
|
||||
}
|
||||
print "</td>";
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\"> </td>";
|
||||
print "<td align=\"center\"> </td>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1193,7 +1193,7 @@ else
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentConditions');
|
||||
print '</td>';
|
||||
if ($_GET['action'] != 'editconditions' && $fac->brouillon) print '<td align="right"><a href="facture.php?action=editconditions&facid='.$fac->id.'">'.img_edit($langs->trans('SetConditions')).'</a></td>';
|
||||
if ($_GET['action'] != 'editconditions' && $fac->brouillon) print '<td align="right"><a href="facture.php?action=editconditions&facid='.$fac->id.'">'.img_edit($langs->trans('SetConditions'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($_GET['action'] == 'editconditions')
|
||||
@ -1209,7 +1209,7 @@ else
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('PaymentMode');
|
||||
print '</td>';
|
||||
if ($_GET['action'] != 'editmode' && $fac->brouillon) print '<td align="right"><a href="facture.php?action=editmode&facid='.$fac->id.'">'.img_edit($langs->trans('SetMode')).'</a></td>';
|
||||
if ($_GET['action'] != 'editmode' && $fac->brouillon) print '<td align="right"><a href="facture.php?action=editmode&facid='.$fac->id.'">'.img_edit($langs->trans('SetMode'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td width="25%">';
|
||||
if ($_GET['action'] == 'editmode')
|
||||
@ -1235,7 +1235,7 @@ else
|
||||
if ($_GET['action'] != 'classer')
|
||||
{
|
||||
print '<td align="right"><a href="facture.php?action=classer&facid='.$fac->id.'">';
|
||||
print img_edit($langs->trans('SetProject'));
|
||||
print img_edit($langs->trans('SetProject'),1);
|
||||
print '</a></td>';
|
||||
}
|
||||
print '</tr></table>';
|
||||
|
||||
@ -620,14 +620,17 @@ function img_edit_remove($alt = "default")
|
||||
/**
|
||||
\brief Affiche logo editer/modifier fiche
|
||||
\param alt Texte sur le alt de l'image
|
||||
\param float Si il faut y mettre le style "float: right"
|
||||
\return string Retourne tag img
|
||||
*/
|
||||
function img_edit($alt = "default")
|
||||
function img_edit($alt = "default",$float=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Modify");
|
||||
// return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/edit.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/edit.png" border="0" style="float: right">';
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Modify");
|
||||
$img='<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/edit.png" border="0" alt="'.$alt.'" title="'.$alt.'"';
|
||||
if ($float) $img.=' style="float: right"';
|
||||
$img.='>';
|
||||
return $img;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -670,13 +673,18 @@ function img_info($alt = "default")
|
||||
/**
|
||||
\brief Affiche logo warning
|
||||
\param alt Texte sur le alt de l'image
|
||||
\param float Si il faut afficher le style "float: right"
|
||||
\return string Retourne tag img
|
||||
*/
|
||||
function img_warning($alt = "default")
|
||||
function img_warning($alt = "default",$float=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Warning");
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/warning.png" border="0" alt="'.$alt.'" title="'.$alt.'">';
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Warning");
|
||||
$img='<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/warning.png" border="0" alt="'.$alt.'" title="'.$alt.'"';
|
||||
if ($float) $img.=' style="float: right"';
|
||||
$img.='>';
|
||||
|
||||
return $img;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user