38if ( ! defined(
'ALLOWED')) define (
'ALLOWED',1);
40require_once
'../include/constant.php';
42require_once NOALYSS_INCLUDE.
"/lib/ac_common.php";
48if (
$http->request(
'op',
"string",
"") ==
'disconnect') {
56if ( ! isset($_SESSION[SESSION_KEY.
"g_user"])) {
61mb_internal_encoding(
"UTF-8");
70 echo
"$v is not set ";
95 die(_(
'Non autorisé'));
109if (
$op ==
"progressBar") {
119if (
$op==
'password_chk') {
120 $cnt =
$http->request(
"pass");
126 foreach (
$result as $item) {
$str.=sprintf(
"<li>%s</li>",$item);}
136 $file_loginput=fopen($_ENV[
'TMP'].
'/scenario-'.$_SERVER[
'REQUEST_TIME'].
'.php',
'a+');
137 fwrite ($file_loginput,
"<?php \n");
138 fwrite ($file_loginput,
'//@description:'.
$op.
"\n");
139 fwrite($file_loginput,
'$_GET='.var_export(
$_GET,
true));
140 fwrite($file_loginput,
";\n");
141 fwrite($file_loginput,
'$_POST='.var_export(
$_POST,
true));
142 fwrite($file_loginput,
";\n");
143 fwrite($file_loginput,
'$_POST[\'gDossier\']=$gDossierLogInput;');
144 fwrite($file_loginput,
"\n");
145 fwrite($file_loginput,
'$_GET[\'gDossier\']=$gDossierLogInput;');
146 fwrite($file_loginput,
"\n");
147 fwrite($file_loginput,
' $_REQUEST=array_merge($_GET,$_POST);');
148 fwrite($file_loginput,
"\n");
149 fwrite($file_loginput,
"include '".basename(__FILE__).
"';\n");
150 fclose($file_loginput);
154 "account"=>
"ajax_poste",
157 "ledger"=>
"ajax_ledger",
159 "ledger_access"=>
"ajax_user_security",
161 "profile"=>
"ajax_user_security",
163 "user_sec_ledger"=>
"ajax_user_security",
165 "user_sec_action"=>
"ajax_user_security",
167 "ledger_access_all"=>
"ajax_user_security",
169 "action_access"=>
"ajax_user_security",
171 "action_access_all"=>
"ajax_user_security",
172 "todo_list"=>
"ajax_todo_list",
174 "history"=>
"ajax_history",
175 "mod_doc"=>
"ajax_mod_document",
177 'periode'=>
"ajax_periode",
178 "mod_predf"=>
"ajax_mod_predf_op",
179 "save_predf"=>
"ajax_save_predf_op",
180 "search_action"=>
"ajax_search_action",
181 "display_profile"=>
"ajax_get_profile",
182 "det_menu"=>
"ajax_get_menu_detail",
183 "add_menu"=>
"ajax_add_menu",
184 "display_submenu"=>
"ajax_display_submenu",
185 "remove_submenu"=>
"ajax_remove_submenu",
186 "cardsearch"=>
"ajax_boxcard_search",
187 "saldo"=>
"ajax_bank_saldo",
188 "upd_receipt"=>
"ajax_get_receipt",
189 "up_pay_method"=>
"ajax_update_payment",
190 "openancsearch"=>
"ajax_anc_search",
191 "resultancsearch"=>
"ajax_anc_search",
192 "autoanc"=>
"ajax_auto_anc_card",
193 "create_menu"=>
"ajax_create_menu",
194 "modify_menu"=>
"ajax_mod_menu",
195 "mod_stock_repo"=>
"ajax_mod_stock_repo",
196 "view_mod_stock"=>
"ajax_view_mod_stock",
197 "fddetail"=>
"ajax_fiche_def_detail",
198 "vw_action"=>
"ajax_view_action",
199 "minrow"=>
"ajax_min_row",
200 "navigator"=>
"ajax_navigator",
201 "preference"=>
"ajax_preference",
202 "bookmark"=>
"ajax_bookmark",
204 "tag_detail"=>
"ajax_tag_detail",
205 "tag_save"=>
"ajax_tag_save",
206 "tag_list"=>
"ajax_tag_list",
207 "tag_add"=>
"ajax_tag_add_action",
208 "tag_remove"=>
"ajax_tag_remove_action",
209 "tag_choose"=>
"ajax_tag_choose",
210 "tag_activate"=>
"ajax_tag_save",
212 "search_display_tag"=>
"ajax_search_display_tag",
213 "search_add_tag"=>
"ajax_search_add_tag",
214 "search_clear_tag"=>
"ajax_search_clear_tag",
215 "calendar_zoom"=>
"ajax_calendar_zoom",
216 "ledger_show"=>
"ajax_ledger_show",
218 "anc_key_choice"=>
"ajax_anc_key_choice" ,
220 "anc_key_clean"=>
"ajax_anc_key_clean" ,
222 "anc_key_compute"=>
"ajax_anc_key_compute" ,
224 "folder_remove"=>
"ajax_admin",
226 "folder_display"=>
"ajax_admin",
229 "folder_add"=>
"ajax_admin",
231 "folder_drop"=>
"ajax_admin",
234 "folder_modify"=>
"ajax_admin",
236 "modele_drop"=>
"ajax_admin",
238 "modele_modify"=>
"ajax_admin",
240 "upgradeCore"=>
"ajax_admin",
242 "upgradePlugin"=>
"ajax_admin",
244 "installTemplate"=>
"ajax_admin",
246 "action_show"=>
"ajax_gestion",
248 "action_add"=>
"ajax_gestion",
250 "action_save"=>
"ajax_gestion",
252 "dl"=>
"ajax_display_letter",
254 "anc_accounting"=>
"ajax_anc_accounting",
256 "anc_updatedescription"=>
"ajax_anc_plan",
258 "accounting"=>
"ajax_accounting",
260 "anc_detail_op"=>
"ajax_anc_detail_operation",
262 "history_anc_account"=>
"ajax_history_anc_account",
264 "display_search_filter"=>
"ajax_search_filter",
266 "save_filter"=>
"ajax_search_filter",
268 "load_filter"=>
"ajax_search_filter",
270 "display_list_filter"=>
"ajax_search_filter",
272 'display_filter_tag'=>
'ajax_search_filter',
274 'search_op'=>
'ajax_search_operation',
276 'delete_search_operation'=>
'ajax_search_filter',
278 'template_cat_card'=>
'ajax_template_cat_card',
280 'template_cat_category'=>
'ajax_template_cat_category',
282 'update_comment_followUp'=>
'ajax_follow_up',
284 'followup_comment_oneedit'=>
'ajax_follow_up',
286 "tva_parameter"=>
"ajax_tva_parameter",
288 "CurrencyManage"=>
"ajax_currency",
290 "CurrencyRateDelete"=>
"ajax_currency",
292 "payment_method"=>
"ajax_payment_method",
294 "display_all_card"=>
"ajax_display_all_card",
296 "up_predef"=>
"ajax_update_predef",
298 "cfgaction"=>
'ajax_cfgaction',
300 "contact_option_list"=>
'ajax_contact_option_list',
302 'tag_group'=>
'ajax_tag_group',
304 'tag_set_group'=>
"ajax_tag_set_group",
306 "document_state"=>
"ajax_document_state",
308 'operation_tag_add'=>
"ajax_operation_tag",
310 'operation_tag_remove'=>
"ajax_operation_tag",
312 'operation_tag_select'=>
"ajax_operation_tag",
314 "forecast_item"=>
"ajax_forecast_item",
316 "forecast_category"=>
"ajax_forecast_category",
318 "forecast"=>
"ajax_forecast",
320 "company"=>
"ajax_company",
322 "report_definition"=>
"ajax_report_definition",
324 "search_account_card"=>
"ajax_search_account_card",
326 "mobile_device_menu"=>
"ajax_mobile_device_menu",
328 "other_tax"=>
"ajax_other_tax",
330 "update_visibility_quantity"=>
"ajax_update_visibility_quantity",
332 "event_display_detail"=>
"ajax_event_display_detail",
334 "operation_exercice+update_periode"=>
"ajax_operation_exercice",
336 "operation_exercice+modify_row"=>
"ajax_operation_exercice",
338 "operation_exercice+save_row"=>
"ajax_operation_exercice",
340 "operation_exercice+display_total"=>
"ajax_operation_exercice",
342 "operation_exercice+delete_row"=>
"ajax_operation_exercice",
344 "operation_exercice+date"=>
"ajax_operation_exercice",
346 "operation_exercice+text"=>
"ajax_operation_exercice",
348 'operation_exercice+transfer'=>
"ajax_operation_exercice",
350 "view_followup_card"=>
"ajax_follow_up",
352 'list_filter_followup'=>
"ajax_follow_up",
354 'delete_filter_followup'=>
"ajax_follow_up",
358 require NOALYSS_INCLUDE.
'/ajax/'.
$path[
$op].
".php";
376 $a_answer[
'content']=
$cn->get_value(
"select ch_value from v_currency_last_value where currency_id=$1",
381 catch (Exception
$ex)
385 $jsson=json_encode(
$a_answer, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES|JSON_NUMERIC_CHECK);
386 header(
'Content-Type: application/json;charset=utf-8');
402 $a_answer[
'content']=
$cn->get_value(
"select cr_code_iso||' ('||cr_name||')' from v_currency_last_value where currency_id=$1",
406 catch (Exception
$ex)
410 $jsson=json_encode(
$a_answer, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES|JSON_NUMERIC_CHECK);
411 header(
'Content-Type: application/json;charset=utf-8');
417 case "periode_change":
419 $field=
$http->get(
"field");
435 $iperiod =
new IPeriod($field);
439 $iperiod->filter_year =
true;
444 $iperiod->filter_year =
false;
448 $iperiod->show_end_date=FALSE;
451 $iperiod->show_start_date=FALSE;
455 throw new Exception(_(
"Invalide type"));
458 $iperiod->type =
ALL;
459 echo $iperiod->input();
464 case "pref_exercice":
465 $iperiod =
new IPeriod(
"period");
466 $iperiod->id=
"setting_period";
469 $iperiod->filter_year =
true;
470 $iperiod->exercice=
$http->get(
"exercice");
472 $iperiod->type =
ALL;
473 echo $iperiod->input();
478 if (
$g_user->check_module(
'ANCODS') == 0)
481 $cn->exec_sql(
"delete from operation_analytique where oa_group=$1", array(
$oa_group));
484 if (
$g_user->check_module(
'STOCK') == 0)
486 require_once NOALYSS_INCLUDE.
'/constant.security.php';
487 $cn->exec_sql(
'delete from stock_goods where sg_id=$1', array($s_id));
489 header(
'Content-type: text/xml; charset=UTF-8');
490 printf(
'{"d_id":"%s"}', $s_id);
496 require_once NOALYSS_INCLUDE.
'/class/acc_ledger_fin.class.php';
501 header(
'Content-type: text/xml; charset=UTF-8');
503<?xml version=
"1.0" encoding=
"UTF-8"?>
512 require_once NOALYSS_INCLUDE.
'/class/acc_ledger_fin.class.php';
517 header(
'Content-type: text/xml; charset=UTF-8');
519<?xml version=
"1.0" encoding=
"UTF-8"?>
528 require_once NOALYSS_INCLUDE.
'/class/calendar.class.php';
537 header(
'Content-type: text/xml; charset=UTF-8');
539<?xml version=
"1.0" encoding=
"UTF-8"?>
556 order by tva_rate desc");
565 order by tva_rate desc");
568 $Res =
$cn->exec_sql(
"select * from v_tva_rate
569 order by tva_rate desc");
576 $r.=
'<TABLE class="sortable" style="width:100%" id="tva_select_table">';
578 $r.=
th(_(
'Taux'),
'class="sorttable_sorted_reverse"');
579 $r.=
th(_(
'Symbole'));
580 $r.=
th(_(
'Explication'));
585 if (!isset($compute))
589 $script =
"onclick=\"$('$ctl').value='" .
$row[
'tva_id'] .
"';removeDiv('tva_select');\"";
593 $script =
"onclick=\"$('$ctl').value='" .
$row[
'tva_id'] .
"';set_value('$code','" .
$row[
'tva_label'] .
"');removeDiv('tva_select');\"";
600 $script =
"onclick=\"$('$ctl').value='" .
$row[
'tva_id'] .
"';removeDiv('tva_select');clean_tva('$compute');compute_ledger('$compute');\"";
604 $script =
"onclick=\"$('$ctl').value='" .
$row[
'tva_id'] .
"';set_value('$code','" .
$row[
'tva_label'] .
"');removeDiv('tva_select');clean_tva('$compute');compute_ledger('$compute');\"";
607 $set =
'<INPUT TYPE="BUTTON" class="button" Value="select" ' .
$script .
'>';
608 $class=(
$i%2 == 0)?
' class="odd" ':
' class="even" ';
609 $r.=
'<tr'.$class.
$script.
' style="cursor : pointer">';
621 header(
'Content-type: text/xml; charset=UTF-8');
623<?xml version=
"1.0" encoding=
"UTF-8"?>
633 $value = _(
'tva inconnue');
636 $Res =
$cn->get_array(
"select * from tva_rate where tva_id = $1", array(
$id));
637 if (count(
$Res) == 0)
638 $value = _(
'tva inconnue');
642 header(
'Content-type: text/xml; charset=UTF-8');
644<?xml version=
"1.0" encoding=
"UTF-8"?>
655 $me_file =
new IText(
'me_file');
656 $me_menu =
new IText(
'me_menu');
657 $me_description =
new IText(
"me_description");
658 $me_parameter =
new IText(
"me_parameter");
660 require_once NOALYSS_INCLUDE.
'/ajax/ajax_plugin_detail.php';
663 $m =
$cn->get_array(
"select me_code,me_file,me_menu,me_description,me_parameter
664 from menu_ref where me_code=$1", array(
$me_code));
668 echo
"<p>"._(
"Il y a une erreur, ce plugin n'existe pas").
673 $me_file =
new IText(
'me_file',
$m[0] [
'me_file']);
674 $me_menu =
new IText(
'me_menu',
$m[0] [
'me_menu']);
675 $me_description =
new IText(
"me_description",
$m[0] [
'me_description']);
676 $me_parameter =
new IText(
"me_parameter",
$m[0] [
'me_parameter']);
678 require_once NOALYSS_INCLUDE.
'/ajax/ajax_plugin_detail.php';
680 case 'ledger_description':
681 $ajrn=
$cn->get_array(
'select jrn_def_name,jrn_def_description from jrn_def where jrn_def_id=$1',array(
$l));
682 if ( count($ajrn)==1)
685 echo
'<h1 >'.$ajrn[0][
'jrn_def_name'].
'</h1>';
686 if (
noalyss_trim($ajrn[0][
'jrn_def_description']) !=
"") {
687 echo
'<p style="border:1px solid;margin-top:0px;padding:1rem">'.$ajrn[0][
'jrn_def_description'].
'</p>';
695 $code=
$cn->get_value(
"select cr_code_iso from public.currency join jrn_def on (currency.id=jrn_def.currency_id) where jrn_def.jrn_def_id=$1",
703 echo $acc_ledger->input_additional_tax();
th($p_string, $p_extra='', $raw='')
ajax_disconnected($p_div)
Should a dialog box when you are disconnected from an ajax call propose to reload or to connect in an...
check_password_strength($password)
returns an double array with the error found and code , if the count is 0 then the password is very s...
set_language()
set the lang thanks the _SESSION['g_lang'] var.
td($p_string='', $p_extra='')
surround the string with td
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
catch(Exception $ex) if( $g_user->check_module( 'CFGCURRENCY')==0) switch($act) $jsson
check if module CFGCURRENCY
catch(Exception $e) $exercice
if( $op=="progressBar") if($op=='password_chk') $html
if(! empty( $error)) for($i=0;$i< count($error);$i++)( $last !=$error[$i]) $last
the class Acc_Ledger_Fin inherits from Acc_Ledger, this object permit to manage the financial ledger
static fetch_array($ret, $p_indice=0, $p_mode=PGSQL_ASSOC)
wrapper for the function pg_fetch_array
static num_row($ret)
wrapper for the function pg_num_rows
contains the class for connecting to Noalyss
static set_firstDate($firstDate)
Generate the form for the periode Data Members.
Class to manage the company parameter (address, name...)
For the periode tables parm_periode and jrn_periode.
Use one db for tracking progress bar value, the task id must be unique and let you follow the progres...
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,...
json_response($p_answer)
Send header and json object.
if( $delta< 0) elseif( $delta==0)