32if (!defined(
'ALLOWED')) die(_(
'Non authorisé'));
40mb_internal_encoding(
"UTF-8");
48}
catch (Exception $exc) {
49 error_log($exc->getTraceAsString());
63 require_once NOALYSS_TEMPLATE .
'/ledger_detail_forbidden.php';
65 $html = ob_get_contents();
68 header(
'Content-type: text/xml; charset=UTF-8');
70<?xml version=
"1.0" encoding=
"UTF-8"?>
89 require_once NOALYSS_TEMPLATE .
'/ledger_detail_forbidden.php';
91 $html = ob_get_contents();
95 if (!headers_sent()) {
96 header(
'Content-type: text/xml; charset=UTF-8');
101<?xml version=
"1.0" encoding=
"UTF-8"?>
114 require_once NOALYSS_TEMPLATE .
'/ledger_detail_forbidden.php';
116 $html = ob_get_contents();
119 header(
'Content-type: text/xml; charset=UTF-8');
121<?xml version=
"1.0" encoding=
"UTF-8"?>
141 $oLedger->jr_id =
$jr_id =
$http->request(
'jr_id',
"number");
144 echo _(
"Opération Effacée");
145 }
catch (Exception
$e) {
150 $html = ob_get_contents();
153 $html = _(
"Effacement refusé");
169 if (
$obj ==
null ||
$obj->signature ==
'ODS') {
171 require_once NOALYSS_TEMPLATE .
'/ledger_detail_misc.php';
173 require_once NOALYSS_TEMPLATE .
'/ledger_detail_ach.php';
175 require_once NOALYSS_TEMPLATE .
'/ledger_detail_fin.php';
177 require_once NOALYSS_TEMPLATE .
'/ledger_detail_ven.php';
179 }
catch (Exception
$e) {
182 echo
'<h2 class="error">' . _(
"Désolé il y a une erreur") .
'</h2>';
184 $html = ob_get_contents();
199 if (
$obj->det->jr_pj_name ==
'') {
201 echo
'<div class="op_detail_frame">';
207 $check_receipt = sprintf(
"check_receipt_size('%s','file%s')",
208 MAX_FILE_SIZE,
$div);
209 echo
'<FORM METHOD="POST" ENCTYPE="multipart/form-data" id="form_file" >';
212 $sp->style =
"display:none;background-color:red;color:white;font-size:12px";
213 $sp->value = _(
"Chargement");
216 echo dossier::hidden();
219 echo
'<INPUT TYPE="FILE" id="receipt_id" name="pj" onchange="' . $check_receipt .
'">';
221 echo
'<p id="receipt_info_id" class="error"></p>';
226 echo
'<div class="op_detail_frame">';
232 echo _(
'Aucun fichier');
240 echo
'<div class="op_detail_frame">';
245 echo
'<div class="op_detail_frame">';
252 sprintf(
"if (confirm(content[47])) {document.location.href='ajax_misc.php?op=ledger&gDossier=%d&div=%s&jr_id=%s&act=rmf'}",
256 $filename =
$obj->det->jr_pj_name;
257 if (strlen(
$obj->det->jr_pj_name) > 60) {
258 $filename = mb_substr(
$obj->det->jr_pj_name, 0, 60);
262 echo
'<p id="receipt_info_id" class="error"></p>';
264 echo
'</body></html>';
271 if (
$access ==
'W' && isset ($_FILES)) {
274 $grpt =
$cn->get_value(
'select jr_grpt_id from jrn where jr_id=$1', array(
$jr_id));
275 $cn->save_receipt($grpt);
281 if (!isset(
$_REQUEST[
'ajax'])) echo
"<body class=\"op_detail_frame\">";
else echo
"<body>";
282 echo
'<div class="op_detail_frame">';
289 sprintf(
"if (confirm(content[47])) {document.location.href='ajax_misc.php?op=ledger&gDossier=%d&div=%s&jr_id=%s&act=rmf'}",
292 $filename =
$obj->det->jr_pj_name;
297 echo
'</body></html>';
307 echo
'<div class="op_detail_frame">';
308 $check_receipt = sprintf(
"check_receipt_size('%s','file%s')",
309 MAX_FILE_SIZE,
$div);
310 echo
'<FORM METHOD="POST" ENCTYPE="multipart/form-data" id="form_file">';
312 $sp->style =
"display:none;width:155px;height:15px;background-color:red;color:white;font-size:10px";
313 $sp->value = _(
"Chargement");
317 echo dossier::hidden();
321 echo
'<INPUT TYPE="FILE" id="receipt_id" name="pj" onchange="' . $check_receipt .
'">';
322 echo
'<p id="receipt_info_id" class="error"></p>';
324 $ret =
$cn->exec_sql(
"select jr_pj from jrn where jr_id=$1", array(
$jr_id));
327 $old_oid =
$r[
'jr_pj'];
328 if (strlen($old_oid) != 0) {
330 $c =
$cn->count_sql(
"select * from jrn where jr_pj=" . $old_oid);
332 $cn->lo_unlink($old_oid);
334 $cn->exec_sql(
"update jrn set jr_pj=null, jr_pj_name=null, " .
335 "jr_pj_type=null where jr_id=$1", array(
$jr_id));
349 if (isset(
$_POST[
'p_ech'])) {
350 $ech =
$http->post(
'p_ech');
351 if (trim($ech) !=
'' &&
isDate($ech) !=
null) {
352 $cn->exec_sql(
"update jrn set jr_ech=to_date($1,'DD.MM.YYYY') where jr_id=$2",
356 $cn->exec_sql(
"update jrn set jr_ech=null where jr_id=$1",
362 if (isset(
$_POST[
'p_date_paid'])) {
363 $ech =
$http->post(
'p_date_paid');
364 if (trim($ech) !=
'' &&
isDate($ech) !=
null) {
365 $cn->exec_sql(
"update jrn set jr_date_paid=to_date($1,'DD.MM.YYYY') where jr_id=$2",
369 $cn->exec_sql(
"update jrn set jr_date_paid=null where jr_id=$1",
375 $npj=
$http->post(
'npj');
378 $npj=
$cn->get_value(
"select jr_pj_number from jrn where jr_id=$1",[
$jr_id]);
383 $date=
$cn->get_value(
"select to_char(jr_date,'DD.MM.YYYY') from jrn where jr_id=$1",[
$jr_id]);
385 $cn->exec_sql(
"update jrn set jr_comment=$1,jr_pj_number=$2,jr_date=to_date($4,'DD.MM.YYYY'),jr_optype=$5 where jr_id=$3",
387 $cn->exec_sql(
"update jrnx set j_date=to_date($1,'DD.MM.YYYY') where j_grpt in (select jr_grpt_id from jrn where jr_id=$2)",
389 $cn->exec_sql(
'update operation_analytique set oa_date=j_date from jrnx
391 operation_analytique.j_id=jrnx.j_id and
392 operation_analytique.j_id in (select j_id
393 from jrnx join jrn on (j_grpt=jr_grpt_id)
396 $cn->exec_sql(
"select comptaproc.jrn_add_note($1,$2)",
401 $a_rowid =
$http->post(
"j_id");
402 for (
$e = 0;
$e < count($a_rowid);
$e++) {
403 $id =
"e_march" . $a_rowid[
$e] .
"_label";
404 $cn->exec_sql(
'update jrnx set j_text=$1 where j_id=$2', array(
$http->post(
$id), $a_rowid[
$e]));
407 if (trim($rapt) !=
'') {
411 if (strpos($rapt,
",") != 0) {
412 $aRapt = explode(
',', $rapt);
414 foreach ($aRapt as $rRapt) {
417 $rec->insert($rRapt);
425 if (isset(
$_POST[
'ipaid'])) {
426 $cn->exec_sql(
"update jrn set jr_rapt='paid' where jr_id=$1", array(
$jr_id));
428 $cn->exec_sql(
"update jrn set jr_rapt=null where jr_id=$1", array(
$jr_id));
434 if (
$owner->MY_ANALYTIC !=
"nu" && isset (
$_POST[
'op'])) {
437 $opanc->save_update_form(
$_POST);
442 $op->save_info(
$http->post(
'OTHER'),
'OTHER');
443 $op->save_info(
$http->post(
'BON_COMMANDE'),
'BON_COMMANDE');
448 $related =
$http->post(
"related",
"string");
449 if ($related ==
"0") {
450 throw new Exception(
'Parameter not send -> related' . __FILE__ . __LINE__, 10);
452 $op->insert_related_action($related);
457 }
catch (Exception
$e) {
458 $html = ob_get_contents();
463 if (DEBUGNOALYSS > 0) echo
$e->getMessage();
464 echo _(
"Changement impossible: on ne peut pas changer la date dans une période fermée");
467 $html = ob_get_contents();
478 $rec->remove(
$_GET[
'jr_id2']);
486 $html .=
"<form id=\"form_" .
$div .
"\" onsubmit=\"return reverseOperation(this);\">";
492 $html .=
'<h2 class="info">' . _(
'entrez une date') .
' </H2>' .
$date->input();
504 $ext_date =
$http->request(
"ext_date",
"date");
505 $ext_label =
$http->request(
"ext_label");
509 if (trim($ext_label) ==
"") {
510 $ext_label = _(
"Extourne") .
$cn->get_value(
"select jr_comment from jrn where jr_id=$1", [
$jr_id]);
512 $oLedger->reverse($ext_date, $ext_label);
514 echo _(
"Opération extournée");
515 }
catch (Exception
$e) {
517 echo
$e->getMessage();
521 $html = ob_get_contents();
533 echo
$operation->form_clone_operation(
"cloneit");
535 $html = ob_get_contents();
542if (!headers_sent()) {
543 header(
'Content-type: text/xml; charset=UTF-8');
549<?xml version=
"1.0" encoding=
"UTF-8"?>
html_min_page_start($p_theme="", $p_script="", $p_script2="")
Minimal page header for each page, used for small popup window.
record_log($p_message)
Record an error message into the log file of the server.
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
h( $row[ 'oa_description'])
if($g_user->check_dossier(dossier::id(), true)=='X') $op
global $g_user
Check if we receive the needed data (jr_id...)
global $cn
if $_SESSION[SESSION_KEY.
if(isset($_REQUEST['gDossier']) && $http->request("gDossier","number", 0) !=0) $repo
this file match the tables jrn & jrnx the purpose is to remove or save accountant writing to these ta...
new class for managing the reconciliation it must be used instead of the function InsertRapt,...
this class is used to show the form for entering an operation only FOR analytic operation to save it,...
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
Html Input : Input a date format dd.mm.yyyy The property title should be set to indicate what it is e...
static close($p_div)
Return a html string with an anchor which close the inside popup.
static trash($p_id, $p_javascript)
Display the icon of a trashbin.
Class to manage the company parameter (address, name...)
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,...
unescape_xml($p_xml)
replace special char
if( $delta< 0) elseif( $delta==0)