noalyss
Version-9
include
ajax
ajax_anc_accounting.php
Go to the documentation of this file.
1
<?php
2
3
/*
4
* This file is part of NOALYSS.
5
*
6
* PhpCompta is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* NOALYSS is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with PhpCompta; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
*/
20
// Copyright (2016) Author Dany De Bontridder <dany@alchimerys.be>
21
22
if
(!defined(
'ALLOWED'
))
23
die(
'Appel direct ne sont pas permis'
);
24
25
/**
26
* @file
27
* @brief Insert , update delete anc accounting
28
*/
29
$http
=
new
HttpInput
();
30
$cn
=
Dossier::connect
();
31
32
$action
=
$http
->request(
"action"
);
33
$p_id
=
$http
->request(
"p_id"
,
"number"
);
34
$ctl_id
=
$http
->request(
"ctl"
);
35
$pa_id
=
$http
->request(
"pa_id"
);
36
37
$anc
=
new
Poste_analytique_SQL
(
$cn
,
$p_id
);
38
$anc
->pa_id=
$pa_id
;
39
$anc
->ga_id=
$http
->request(
"ga_id"
,
"string"
,
null
);
40
41
$accounting
=
new
Anc_Account_Table
(
$anc
);
42
$accounting
->set_object_name(
$ctl_id
);
43
$accounting
->set_callback(
"ajax_misc.php"
);
44
$accounting
->add_json_param(
"op"
,
"anc_accounting"
);
45
46
if
(
$action
==
"input"
)
47
{
48
49
$accounting
->send_header();
50
echo
$accounting
->ajax_input()->saveXML();
51
}
52
elseif
(
$action
==
"save"
)
53
{
54
$accounting
->send_header();
55
echo
$accounting
->ajax_save()->saveXML();
56
}
57
elseif
(
$action
==
"delete"
)
58
{
59
$accounting
->send_header();
60
echo
$accounting
->ajax_delete()->saveXML();
61
}
$p_id
$p_id
Definition:
ajax_anc_accounting.php:33
$pa_id
$pa_id
Definition:
ajax_anc_accounting.php:35
$cn
$cn
Definition:
ajax_anc_accounting.php:30
$http
$http
Definition:
ajax_anc_accounting.php:29
$action
$action
Definition:
ajax_anc_accounting.php:32
$accounting
$accounting
Definition:
ajax_anc_accounting.php:41
$anc
$anc
Definition:
ajax_anc_accounting.php:37
$ctl_id
$ctl_id
Definition:
ajax_anc_accounting.php:34
Anc_Account_Table
derived from Manage_Table_SQL ,
Definition:
anc_account_table.class.php:37
Dossier\connect
static connect()
Definition:
dossier.class.php:295
HttpInput
manage the http input (get , post, request) and extract from an array
Definition:
http_input.class.php:38
Poste_analytique_SQL
abstract of the table public.poste_analytique
Definition:
poste_analytique_sql.class.php:34
elseif
if( $delta< 0) elseif( $delta==0)
Definition:
letter_prop.php:166