noalyss Version-9
ajax_update_predef.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 */
29if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
30
31require_once NOALYSS_INCLUDE.'/constant.php';
32
33// Check if the needed field does exist
34extract ($_GET, EXTR_SKIP);
35foreach (array('l','t','d','gDossier') as $a)
36{
37 if ( ! isset (${$a}) )
38 {
39 echo "error $a is not set ";
40 exit();
41 }
42
43}
46$op->set_p_jrn($l);
47$op->set_jrn_type($t);
48$op->set_od_direct($d);
49$url=http_build_query(array('action'=>'use_opd','p_jrn_predef'=>$l,'ac'=>$_GET['ac'],'gDossier'=>dossier::id()));
51
52$html.=HtmlInput::title_box(_("Modèle d'opérations"), 'modele_op_div', 'hide',"","n");
53$html.=$op->display_list_operation('do.php?'.$url);
54$html.=' <p style="text-align: center">'.
55 HtmlInput::button_hide('modele_op_div').
56 '</p>';
58header('Content-type: text/xml; charset=UTF-8');
59echo <<<EOF
60<?xml version="1.0" encoding="UTF-8"?>
61<data>
62<code></code>
64</data>
65EOF;
66
67?>
68
foreach(array('l', 't', 'd', 'gDossier') as $a) $cn
$input_from id
Definition: balance.inc.php:63
$_GET['qcode']
static connect()
static button_hide($div_name)
Hide the HTML popup.
static title_box($p_name, $p_div, $p_mod="close", $p_js="", $p_draggable="n", $p_enlarge='n')
Title for boxes, you can customize the symbol thanks symbol with the mode "custom".
manage the predefined operation, link to the table op_def and op_def_detail
for($e=0; $e< count($afiche); $e++) exit
escape_xml($p_xml)
When data are transfered thanks ajax in a xml document, the xml can not contains some character,...