noalyss Version-9
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
22if (!defined('ALLOWED'))
23 die('Appel direct ne sont pas permis');
24
25/**
26 * @file
27 * @brief Insert , update delete anc accounting
28 */
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
38$anc->pa_id=$pa_id;
39$anc->ga_id=$http->request("ga_id","string",null);
40
42$accounting->set_object_name($ctl_id);
43$accounting->set_callback("ajax_misc.php");
44$accounting->add_json_param("op", "anc_accounting");
45
46if ($action=="input")
47{
48
49 $accounting->send_header();
50 echo $accounting->ajax_input()->saveXML();
51}
52elseif ($action=="save")
53{
54 $accounting->send_header();
55 echo $accounting->ajax_save()->saveXML();
56}
57elseif ($action=="delete")
58{
59 $accounting->send_header();
60 echo $accounting->ajax_delete()->saveXML();
61}
derived from Manage_Table_SQL ,
static connect()
manage the http input (get , post, request) and extract from an array
abstract of the table public.poste_analytique
if( $delta< 0) elseif( $delta==0)