noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
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}
40
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 ( $g_user->check_module("C0PCMN") == 0)
52{
53 header('Content-type: text/xml; charset=UTF-8');
54 echo Manage_Table_SQL::ajax_error(_('Accès non autorisé'))->saveXML();
55 record_log("C0PCMN security ");
56 return;
57}
58if ($action=="input")
59{
60 header('Content-type: text/xml; charset=UTF-8');
61 echo $manage_table->ajax_input()->saveXML();
62 return;
63}
64elseif ($action == "save")
65{
66 $xml=$manage_table->ajax_save();
67 header('Content-type: text/xml; charset=UTF-8');
68 echo $xml->saveXML();
69}
70elseif ($action == "delete")
71{
72 $xml=$manage_table->ajax_delete();
73 header('Content-type: text/xml; charset=UTF-8');
74 echo $xml->saveXML();
75}
record_log($p_message)
Record an error message into the log file of the server or in the log folder of NOALYSS Record also t...
global $g_user
if no group available , then stop
switch($op2) $xml
$manage_table
catch(Exception $e) $obj
_("actif, passif,charge,...")
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
static ajax_error($p_message)
returns an XML object for error message as unauthorized access.
if( $delta< 0) elseif( $delta==0)
$table
Definition menu.inc.php:104