[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r4104 - phpcompta/trunk/include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r4104 - phpcompta/trunk/include |
Date: |
Mon, 16 May 2011 15:42:27 +0200 (CEST) |
Author: danydb
Date: 2011-05-16 15:42:27 +0200 (Mon, 16 May 2011)
New Revision: 4104
Modified:
phpcompta/trunk/include/class_anc_acc_link.php
phpcompta/trunk/include/class_anc_acc_list.php
phpcompta/trunk/include/class_anc_table.php
Log:
Analytique accountancy : check date + message
Modified: phpcompta/trunk/include/class_anc_acc_link.php
===================================================================
--- phpcompta/trunk/include/class_anc_acc_link.php 2011-05-16 13:39:48 UTC
(rev 4103)
+++ phpcompta/trunk/include/class_anc_acc_link.php 2011-05-16 13:42:27 UTC
(rev 4104)
@@ -31,7 +31,20 @@
{
$this->cn=$p_cn;
}
-
+
+ function check()
+ {
+
+ /*
+ * check date
+ */
+ if (($this->from != '' && isDate ($this->from) == 0)
+ ||
+ ($this->to != '' && isDate ($this->to) == 0))
+ return -1;
+
+ return 0;
+ }
/**
address@hidden get the parameters
*/
Modified: phpcompta/trunk/include/class_anc_acc_list.php
===================================================================
--- phpcompta/trunk/include/class_anc_acc_list.php 2011-05-16 13:39:48 UTC
(rev 4103)
+++ phpcompta/trunk/include/class_anc_acc_list.php 2011-05-16 13:42:27 UTC
(rev 4104)
@@ -149,6 +149,11 @@
function display_html()
{
bcscale(2);
+ if ( $this->check() != 0)
+ {
+ alert('Désolé mais une des dates données n\'est pas valide');
+ return;
+ }
//---------------------------------------------------------------------------
// Card - Acc
//---------------------------------------------------------------------------
@@ -365,7 +370,7 @@
function export_csv()
{
bcscale(2);
-
+ if ( $this->check () != 0 ) {echo "DATE INVALIDE";exit();}
//---------------------------------------------------------------------------
// Card - Acc
//---------------------------------------------------------------------------
Modified: phpcompta/trunk/include/class_anc_table.php
===================================================================
--- phpcompta/trunk/include/class_anc_table.php 2011-05-16 13:39:48 UTC (rev
4103)
+++ phpcompta/trunk/include/class_anc_table.php 2011-05-16 13:42:27 UTC (rev
4104)
@@ -115,6 +115,11 @@
function display_html()
{
bcscale(2);
+ if ( $this->check() != 0)
+ {
+ alert('Désolé mais une des dates données n\'est pas valide');
+ return;
+ }
if ( $this->card_poste=='1')
{
@@ -229,6 +234,7 @@
function export_csv()
{
bcscale(2);
+ if ( $this->check () != 0 ) {echo "DATE INVALIDE";exit();}
if ( $this->card_poste=='1')
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r4104 - phpcompta/trunk/include,
phpcompta-dev <=