Main Page | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

error.php

Go to the documentation of this file.
00001 <?
00002 /*
00003  *   This file is part of PhpCompta.
00004  *
00005  *   PhpCompta is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   PhpCompta is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with PhpCompta; if not, write to the Free Software
00017  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
00020 // $Revision: 1.3 $
00025 include_once("constant.php");
00033 function AnalyzeError( $p_result) {
00034 
00035     switch( $p_result) {
00036       case NOERROR:
00037         break;
00038     case BADPARM:
00039       break;
00040     case BADDATE:
00041       echo "<SCRIPT> alert('Invalid Date'); </SCRIPT>";
00042       break;
00043     case NOTPERIODE:
00044         echo "<SCRIPT> alert('Date n\'est pas dans la période par défaut, changez vos préférences'); </SCRIPT>";
00045         break;
00046     case PERIODCLOSED:
00047       echo "<SCRIPT> alert('La date est dans une période cloturé'); </SCRIPT>"; 
00048       break;
00049     case INVALID_ECH:
00050         echo "<SCRIPT> alert('Invalid Echeance Date'); </SCRIPT>";
00051         break;
00052     case RAPPT_ALREADY_USED:
00053       echo '<SCRIPT>alert("Ne peut enregister le rapprochement l\'opération '.$p_rapt. " est déjà utilisée\")</SCRIPT>";
00054       break;
00055     case RAPPT_NOT_EXIST:
00056         echo '<SCRIPT>alert("Ne peut enregister le rapprochement l\'opération '.$p_rapt. " n\'existe pas \")</SCRIPT>";
00057         break;
00058     case DIFF_AMOUNT:
00059       echo "<SCRIPT>alert(\"Le Montant au débit n'est pas égal au montant au crédit\"); </SCRIPT>";
00060       break;
00061     case RAPPT_NOMATCH_AMOUNT:
00062         echo '<SCRIPT>alert("Ne peut enregister le rapprochement l\'opération '.$p_rapt. " les montants ne correspondent pas \")</SCRIPT>";
00063         break;
00064     }
00065 }
00066 
00067 ?>