Can change value date in conciliation page
This commit is contained in:
parent
996bc94a4d
commit
009c73e2c0
@ -24,12 +24,12 @@
|
|||||||
\ingroup compta
|
\ingroup compta
|
||||||
\brief Page edition d'une ecriture bancaire
|
\brief Page edition d'une ecriture bancaire
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
if (! $user->rights->banque->lire && ! $user->rights->banque->consolidate)
|
if (! $user->rights->banque->lire && ! $user->rights->banque->consolidate)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
@ -45,13 +45,13 @@ $html = new Form($db);
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($_GET["action"] == 'dvnext')
|
if ($user->rights->banque->consolidate && $_GET["action"] == 'dvnext')
|
||||||
{
|
{
|
||||||
$ac = new Account($db);
|
$ac = new Account($db);
|
||||||
$ac->datev_next($_GET["rowid"]);
|
$ac->datev_next($_GET["rowid"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["action"] == 'dvprev')
|
if ($user->rights->banque->consolidate && $_GET["action"] == 'dvprev')
|
||||||
{
|
{
|
||||||
$ac = new Account($db);
|
$ac = new Account($db);
|
||||||
$ac->datev_previous($_GET["rowid"]);
|
$ac->datev_previous($_GET["rowid"]);
|
||||||
@ -285,18 +285,20 @@ if ($result)
|
|||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
$html->select_date($objp->dv,'datev','','','','update');
|
$html->select_date($objp->dv,'datev','','','','update');
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<a href="ligne.php?action=dvprev&account='.$_GET["account"].'&rowid='.$objp->rowid.'">';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=dvprev&account='.$_GET["account"].'&rowid='.$objp->rowid.'">';
|
||||||
print img_edit_remove() . "</a> ";
|
print img_edit_remove() . "</a> ";
|
||||||
print '<a href="ligne.php?action=dvnext&account='.$_GET["account"].'&rowid='.$objp->rowid.'">';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=dvnext&account='.$_GET["account"].'&rowid='.$objp->rowid.'">';
|
||||||
print img_edit_add() ."</a>";
|
print img_edit_add() ."</a>";
|
||||||
print '</td><td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'">';
|
print '</td>';
|
||||||
|
print '<td align="center"><input type="submit" class="button" value="'.$langs->trans("Update").'"></td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td colspan="4">';
|
print '<td colspan="4">';
|
||||||
print dolibarr_print_date($objp->dv);
|
print dolibarr_print_date($objp->dv,"day");
|
||||||
|
print '</td>';
|
||||||
}
|
}
|
||||||
print "</td></tr>";
|
print "</tr>";
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print "<tr><td>".$langs->trans("Label")."</td>";
|
print "<tr><td>".$langs->trans("Label")."</td>";
|
||||||
@ -495,17 +497,17 @@ print '</div>';
|
|||||||
* Boutons actions
|
* Boutons actions
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($orig_account)
|
if ($orig_account)
|
||||||
{
|
{
|
||||||
$acct=new Account($db,$orig_account);
|
$acct=new Account($db,$orig_account);
|
||||||
$acct->fetch($orig_account);
|
$acct->fetch($orig_account);
|
||||||
print '<a class="butAction" href="rappro.php?account='.$orig_account.'">'.$langs->trans("BackToConciliate",$acct->label).'</a>';
|
print '<a class="butAction" href="rappro.php?account='.$orig_account.'">'.$langs->trans("BackToConciliate",$acct->label).'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Liste les categories
|
// Liste les categories
|
||||||
|
|
||||||
|
|||||||
@ -15,15 +15,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/compta/bank/rappro.php
|
\file htdocs/compta/bank/rappro.php
|
||||||
\ingroup banque
|
\ingroup banque
|
||||||
\brief Page de rapprochement bancaire
|
\brief Page de rapprochement bancaire
|
||||||
\version $Revision$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
@ -36,8 +34,22 @@ if (! $user->rights->banque->consolidate) accessforbidden();
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Action rapprochement
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (($user->rights->banque->modifier || $user->rights->banque->consolidate) && $_GET["action"] == 'dvnext')
|
||||||
|
{
|
||||||
|
$ac = new Account($db);
|
||||||
|
$ac->datev_next($_GET["rowid"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($user->rights->banque->modifier || $user->rights->banque->consolidate) && $_GET["action"] == 'dvprev')
|
||||||
|
{
|
||||||
|
$ac = new Account($db);
|
||||||
|
$ac->datev_previous($_GET["rowid"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Conciliation
|
||||||
if ($user->rights->banque->consolidate && $_POST["action"] == 'rappro')
|
if ($user->rights->banque->consolidate && $_POST["action"] == 'rappro')
|
||||||
{
|
{
|
||||||
// Definition, nettoyage parametres
|
// Definition, nettoyage parametres
|
||||||
@ -120,12 +132,13 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
$form=new Form($db);
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
/*
|
|
||||||
* Affichage liste des transactions à rapprocher
|
|
||||||
*/
|
|
||||||
$acct = new Account($db);
|
$acct = new Account($db);
|
||||||
$acct->fetch($_GET["account"]);
|
$acct->fetch($_GET["account"]);
|
||||||
|
|
||||||
@ -133,7 +146,7 @@ $sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do, ".$db->pdate("b.datev").
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||||
$sql.= " WHERE rappro=0 AND fk_account=".$_GET["account"];
|
$sql.= " WHERE rappro=0 AND fk_account=".$_GET["account"];
|
||||||
$sql.= " ORDER BY dateo ASC";
|
$sql.= " ORDER BY dateo ASC";
|
||||||
$sql.= " LIMIT 1000"; // Limite juste pour eviter saturation page.
|
$sql.= " LIMIT 1000"; // Limit to avoid page overload
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -204,8 +217,29 @@ if ($resql)
|
|||||||
print "<input type=\"hidden\" name=\"account\" value=\"".$_GET["account"]."\">";
|
print "<input type=\"hidden\" name=\"account\" value=\"".$_GET["account"]."\">";
|
||||||
print "<input type=\"hidden\" name=\"rowid\" value=\"".$objp->rowid."\">";
|
print "<input type=\"hidden\" name=\"rowid\" value=\"".$objp->rowid."\">";
|
||||||
|
|
||||||
|
// Date op
|
||||||
print '<td align="center" nowrap="nowrap">'.dolibarr_print_date($objp->do,"day").'</td>';
|
print '<td align="center" nowrap="nowrap">'.dolibarr_print_date($objp->do,"day").'</td>';
|
||||||
print '<td align="center" nowrap="nowrap">'.dolibarr_print_date($objp->dv,"day").'</td>';
|
|
||||||
|
// Date value
|
||||||
|
if (! $objp->rappro && ($user->rights->banque->modifier || $user->rights->banque->consolidate))
|
||||||
|
{
|
||||||
|
print '<td align="center">';
|
||||||
|
print dolibarr_print_date($objp->dv,"day");
|
||||||
|
print ' ';
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=dvprev&account='.$_GET["account"].'&rowid='.$objp->rowid.'">';
|
||||||
|
print img_edit_remove() . "</a> ";
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?action=dvnext&account='.$_GET["account"].'&rowid='.$objp->rowid.'">';
|
||||||
|
print img_edit_add() ."</a>";
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<td align="center">';
|
||||||
|
print dolibarr_print_date($objp->dv,"day");
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Number
|
||||||
print '<td nowrap="nowrap">'.$objp->type.($objp->num_chq?' '.$objp->num_chq:'').'</td>';
|
print '<td nowrap="nowrap">'.$objp->type.($objp->num_chq?' '.$objp->num_chq:'').'</td>';
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user