noalyss Version-9
ajax_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')) die('Appel direct ne sont pas permis');
23
24/**
25 * @file
26 * @brief Manange Accounting
27 * @see Acc_Plan_SQL
28 */
30try {
31 $table=$http->request('table');
32 $action=$http->request('action');
33 $p_id=$http->request('p_id', "number");
34 $ctl_id=$http->request('ctl');
35
36} catch(Exception $e) {
37 echo $e->getMessage();
38 return;
39}
40if ( $g_user->check_module("CFGPCMN") == 0) die();
41
42
44$obj->set_limit_fiche_qcode(5);
45$obj->set_pk_value($p_id);
46$obj->load();
48$manage_table->add_json_param("op","accounting");
49$manage_table->set_object_name($ctl_id);
50$manage_table->set_callback("ajax_misc.php");
51if ($action=="input")
52{
53 header('Content-type: text/xml; charset=UTF-8');
54 echo $manage_table->ajax_input()->saveXML();
55 return;
56}
57elseif ($action == "save")
58{
59 $xml=$manage_table->ajax_save();
60 header('Content-type: text/xml; charset=UTF-8');
61 echo $xml->saveXML();
62}
63elseif ($action == "delete")
64{
65 $xml=$manage_table->ajax_delete();
66 header('Content-type: text/xml; charset=UTF-8');
67 echo $xml->saveXML();
68}
global $g_user
if no group available , then stop
$manage_table
switch($op2) $xml
Definition: ajax_card.php:806
this instance extends Manage_Table_SQL and aims to manage the Table tmp_pcmn thanks a web interface (...
this class is above tmp_pcmn_sql and is a view of tmp_pcmn
manage the http input (get , post, request) and extract from an array
if( $delta< 0) elseif( $delta==0)
$table
Definition: menu.inc.php:103