Analytique accountancy : check date + message
This commit is contained in:
parent
17552157cc
commit
c8879ebbb7
3 changed files with 26 additions and 2 deletions
|
|
@ -31,7 +31,20 @@ class Anc_Acc_Link extends Anc_Print
|
|||
{
|
||||
$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;
|
||||
}
|
||||
/**
|
||||
*@brief get the parameters
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -149,6 +149,11 @@ class Anc_Acc_List extends Anc_Acc_Link
|
|||
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 @@ class Anc_Acc_List extends Anc_Acc_Link
|
|||
function export_csv()
|
||||
{
|
||||
bcscale(2);
|
||||
|
||||
if ( $this->check () != 0 ) {echo "DATE INVALIDE";exit();}
|
||||
//---------------------------------------------------------------------------
|
||||
// Card - Acc
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -115,6 +115,11 @@ class Anc_Table extends Anc_Acc_Link
|
|||
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 @@ class Anc_Table extends Anc_Acc_Link
|
|||
function export_csv()
|
||||
{
|
||||
bcscale(2);
|
||||
if ( $this->check () != 0 ) {echo "DATE INVALIDE";exit();}
|
||||
|
||||
if ( $this->card_poste=='1')
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue