noalyss
Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
include
ajax
ajax_save_card_option.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
* PhpCompta 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 (2002-2020) Author Dany De Bontridder <danydb@noalyss.eu>
21
22
if
(!defined(
'ALLOWED'
))
23
die(
'Appel direct ne sont pas permis'
);
24
/**
25
* @file
26
* @brief save option of card into action_person_option
27
*/
28
29
try
{
30
$ap_value=
$http
->post(
"ap_value"
,
"array"
,[]);
31
$ap_id
=
$http
->post(
"ap_id"
,
"array"
,[]);
32
$cor_id
=
$http
->post(
"cor_id"
,
"array"
,[]);
33
$fiche_id
=
$http
->post(
"f_id"
);
34
$ag_id
=
$http
->post(
"ag_id"
);
35
$action_person_id
=
$http
->post(
"action_person_id"
);
36
}
catch
(Exception
$ex
) {
37
record_log
(
"ASCO01"
.
$ex
->getMessage().$ex->getTraceAsString());
38
return
;
39
}
40
41
/// If cannot write we stop it
42
if
( !
$g_user
->can_write_action(
$ag_id
)) {
43
record_log
(
"ASCO02 Security "
);
44
}
45
46
$nb
=count($ap_value);
47
// nothing to save
48
if
(
$nb
== 0)
return
;
49
50
for
(
$i
=0;
$i
<
$nb
;
$i
++) {
51
52
$cn
->exec_sql(
"UPDATE public.action_person_option SET ap_value=$1 WHERE ap_id=$2"
,
53
[$ap_value[
$i
],
$ap_id
[
$i
]]);
54
}
55
$follow
=
new
Follow_Up_Other_Concerned
(
$cn
,
$ag_id
);
56
$aColumn
=
$follow
->get_option();
57
echo
$follow
->display_row(
$fiche_id
, 0,
$aColumn
);
record_log
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...
Definition
ac_common.php:1344
$http
$http
Definition
action.common.inc.php:33
$g_user
global $g_user
if no group available , then stop
Definition
action.common.inc.php:46
$ag_id
$ag_id
Definition
action.inc.php:54
$i
$i
Definition
action_document_type_mtable_input.php:83
$follow
$follow
Definition
ajax_action_concerned_list.php:44
$action_person_id
$action_person_id
Definition
ajax_action_remove_concerned.php:50
$cn
$cn
Definition
ajax_anc_accounting.php:30
$nb
$nb
Definition
ajax_auto_anc_card.php:32
$ap_id
$ap_id
Definition
ajax_save_card_option.php:31
$aColumn
$aColumn
Definition
ajax_save_card_option.php:56
$cor_id
$cor_id
Definition
ajax_save_card_option.php:32
$fiche_id
$fiche_id
Definition
ajax_save_card_option.php:33
$ex
$ex
Definition
balance.inc.php:45
Follow_Up_Other_Concerned
Others concerned card in an action.
Definition
follow_up_other_concerned.class.php:35
Generated on Wed Jun 25 2025 09:57:47 for noalyss by
1.13.2