noalyss Version-9
ajax_get_receipt.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19
20// Copyright Author Dany De Bontridder danydb@aevalys.eu
21
22/*!\file
23 * \brief respond ajax request, the get contains
24 * the value :
25 * - l for ledger
26 * - gDossier
27 * Must return at least tva, htva and tvac
28
29 */
30if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
31
32require_once NOALYSS_INCLUDE.'/constant.php';
33
34// Check if the needed field does exist
35extract ($_GET, EXTR_SKIP);
36foreach (array('l','gDossier') as $a)
37{
38 if ( ! isset (${$a}) )
39 {
40 echo "error $a is not set ";
41 exit();
42 }
43
44}
45if ( is_numeric($l) == false )
46{
47 exit();
48}
49
50
52$prop=$Ledger->get_propertie();
53$pj_seq=$Ledger->guess_pj();
54$string='{"pj":"'.$pj_seq.'"}';
55
56header("Content-type: text/json; charset: utf8",true);
57echo $string;
58
59
60?>
61
foreach(array( 'l', 'gDossier') as $a) if(is_numeric($l)==false) $Ledger
$_GET['qcode']
for($e=0; $e< count($afiche); $e++) exit