noalyss
Version-9
include
ajax
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
*/
30
if
( ! defined (
'ALLOWED'
) ) die(
'Appel direct ne sont pas permis'
);
31
32
require_once NOALYSS_INCLUDE.
'/constant.php'
;
33
34
// Check if the needed field does exist
35
extract (
$_GET
, EXTR_SKIP);
36
foreach
(array(
'l'
,
'gDossier'
) as
$a
)
37
{
38
if
( ! isset (${
$a
}) )
39
{
40
echo
"error $a is not set "
;
41
exit
();
42
}
43
44
}
45
if
( is_numeric(
$l
) ==
false
)
46
{
47
exit
();
48
}
49
50
51
$Ledger
=
new
Acc_Ledger
(
$cn
,
$l
);
52
$prop
=
$Ledger
->get_propertie();
53
$pj_seq
=
$Ledger
->guess_pj();
54
$string
=
'{"pj":"'
.$pj_seq.
'"}'
;
55
56
header(
"Content-type: text/json; charset: utf8"
,
true
);
57
echo
$string
;
58
59
60
?>
61
$a
$a
Definition:
ajax_add_concerned_card.php:108
$cn
$cn
Definition:
ajax_anc_accounting.php:30
$string
$string
Definition:
ajax_get_receipt.php:54
$pj_seq
$pj_seq
Definition:
ajax_get_receipt.php:53
$Ledger
foreach(array( 'l', 'gDossier') as $a) if(is_numeric($l)==false) $Ledger
Definition:
ajax_get_receipt.php:51
$prop
$prop
Definition:
ajax_get_receipt.php:52
$_GET
$_GET['qcode']
Definition:
category_followup.inc.php:53
Acc_Ledger
Definition:
acc_ledger.class.php:35
exit
for($e=0; $e< count($afiche); $e++) exit
Definition:
export_fiche_balance_csv.php:109
$l
$l
Definition:
export_fiche_detail_pdf.php:69