dolibarr  7.0.0-beta
bankconciliate.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
23 if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Disables token renewal
24 if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
25 if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');
26 if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
27 if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1');
28 //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Required to know date format for dol_print_date
29 
30 require '../../main.inc.php';
31 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
32 require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
33 
34 $action=GETPOST('action','aZ09');
35 
36 
37 /*
38  * View
39  */
40 
41 // Ajout directives pour resoudre bug IE
42 //header('Cache-Control: Public, must-revalidate');
43 //header('Pragma: public');
44 
45 //top_htmlhead("", "", 1); // Replaced with top_httphead. An ajax page does not need html header.
46 top_httphead();
47 
48 //print '<!-- Ajax page called with url '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
49 
50 if (($user->rights->banque->modifier || $user->rights->banque->consolidate) && $action == 'dvnext')
51 {
52  // Increase date
53  $al = new AccountLine($db);
54  $al->datev_next(GETPOST('rowid','int'));
55  $al->fetch(GETPOST('rowid','int'));
56 
57  print '<span>'.dol_print_date($db->jdate($al->datev),"day").'</span>';
58 
59  exit;
60 }
61 
62 if (($user->rights->banque->modifier || $user->rights->banque->consolidate) && $action == 'dvprev')
63 {
64  // Decrease date
65  $al =new AccountLine($db);
66  $al->datev_previous(GETPOST('rowid','int'));
67  $al->fetch(GETPOST('rowid','int'));
68 
69  print '<span>'.dol_print_date($db->jdate($al->datev),"day").'</span>';
70 
71  exit;
72 }
73 
74 if (($user->rights->banque->modifier || $user->rights->banque->consolidate) && $action == 'donext')
75 {
76  // Increase date
77  $al = new AccountLine($db);
78  $al->dateo_next(GETPOST('rowid','int'));
79  $al->fetch(GETPOST('rowid','int'));
80 
81  print '<span>'.dol_print_date($db->jdate($al->dateo),"day").'</span>';
82 
83  exit;
84 }
85 
86 if (($user->rights->banque->modifier || $user->rights->banque->consolidate) && $action == 'doprev')
87 {
88  // Decrease date
89  $al =new AccountLine($db);
90  $al->dateo_previous(GETPOST('rowid','int'));
91  $al->fetch(GETPOST('rowid','int'));
92 
93  print '<span>'.dol_print_date($db->jdate($al->dateo),"day").'</span>';
94 
95  exit;
96 }
97 
Class to manage bank transaction lines.
GETPOST($paramname, $check='none', $method=0, $filter=NULL, $options=NULL, $noreplace=0)
Return value of a param into GET or POST supervariable.
print
Draft customers invoices.
Definition: index.php:91
if(!defined('NOREQUIREMENU')) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html')
Show HTTP header.
Definition: main.inc.php:1052