22if (!defined(
'ALLOWED'))
23 die(
'Appel direct ne sont pas permis');
40 $jsson=json_encode(
$a_answer, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES|JSON_NUMERIC_CHECK);
41 header(
'Content-Type: application/json;charset=utf-8');
50if (
$g_user->check_module(
'CFGCURRENCY')==0)
60 case 'CurrencyRateDelete':
63 $currency_rate_id=
$http->get(
"currency_rate_id",
"number");
66 $currency_id=
$cn->get_value(
"select currency_id from currency_history where id=$1", [$currency_rate_id]);
71 throw new Exception(_(
"Taux inexistant"));
73 $cnt=
$cn->get_value(
"select count(*) from currency_history where currency_id=$1", [$currency_id]);
78 $cn->exec_sql(
"delete from currency_history where id=$1", [$currency_rate_id]);
84 $a_answer[
'content']=_(
"Non effacé : Il faut au moins un taux");
92 case 'CurrencyManage':
109 header(
'Content-type: text/xml; charset=UTF-8');
116 header(
'Content-type: text/xml; charset=UTF-8');
123 header(
'Content-type: text/xml; charset=UTF-8');
129$jsson=json_encode(
$a_answer, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES|JSON_NUMERIC_CHECK);
132 header(
'Content-Type: application/json;charset=utf-8');
global $g_user
if no group available , then stop
catch(Exception $ex) if( $g_user->check_module( 'CFGCURRENCY')==0) switch($act) $jsson
check if module CFGCURRENCY
Manage the configuration of currency , add currency, rate, remove and update Concerned tables are v_c...
class_currency_history_sql.php
if( $delta< 0) elseif( $delta==0)