18$cn=Dossier::connect();
41$a_tab[
'writing_div']=array(
'id'=>
'writing_div'.
$div,
'label'=>
_(
'Ecriture Comptable'),
'display'=>
'none');
42$a_tab[
'info_operation_div']=array(
'id'=>
'info_operation_div'.
$div,
'label'=>
_(
'Information'),
'display'=>
'none');
43$a_tab[
'linked_operation_div']=array(
'id'=>
'linked_operation_div'.
$div,
'label'=>
_(
'Opérations liées').
'('.
$nb_aRap.
')',
'display'=>
'none');
44$a_tab[
'document_operation_div']=array(
'id'=>
'document_operation_div'.
$div,
'label'=>
_(
'Document').
'('.
$nb_document.
')',
'display'=>
'block');
45$a_tab[
'linked_action_div']=array(
'id'=>
'linked_action_div'.
$div,
'label'=>
_(
'Actions Gestion').
'('.count(
$a_followup).
')',
'display'=>
'none');
46$a_tab[
'analytic_div']=array(
'id'=>
'analytic_div'.
$div,
'label'=>
_(
'Comptabilité Analytique'),
'display'=>
'none');
51if (
$div !=
"popup") :
52 $a_tab[
'document_operation_div'][
'display']=
'block';
59 <li class=
"<?php echo $class?>">
61 <a href=
"javascript:void(0)" onclick=
"unselect_other_tab(this.parentNode.parentNode);var tab=Array('writing_div<?php echo $div?>','info_operation_div<?php echo $div?>','linked_operation_div<?php echo $div?>','document_operation_div<?php echo $div?>','linked_action_div<?php echo $div?>','analytic_div<?php echo $div?>');this.parentNode.className='tabs_selected' ;show_tabs(tab,'<?php echo $div_tab_id; ?>');"><?php echo
_(
$a_value[
'label'])?></a>
65<div
style=
"clear:both"></div>
79 <div
id=
"writing_div<?php echo $div;?>" class=
"myfieldset" style=
"display:<?php echo $a_tab['writing_div']['display']?>">
82 if (
$div ==
'popup') :
84 <
h1 class=
"legend"><?php echo
$a_tab[
'writing_div'][
'label']?></
h1>
91 <
table class=
"result">
94 echo
th(
_(
'Poste Comptable'));
95 echo
th(
_(
'Quick Code'));
96 echo
th(
_(
'Libellé'));
97 echo
th(
_(
'Débit'),
' style="text-align:right"');
98 echo
th(
_(
'Crédit'),
' style="text-align:right"');
104 $view_history = HtmlInput::history_account(
$q[
$e][
'j_poste'],
$q[
$e][
'j_poste'],
"",
$exercice);
107 if (
$q[
$e][
'j_qcode'] !=
'')
116 if (
$q[
$e][
'j_text']==
"")
118 if (
$q[
$e][
'j_qcode'] !=
'')
122 $ff->get_by_qcode(
$q[
$e][
'j_qcode']);
127 $name =
$cn->get_value(
'select pcm_lib from tmp_pcmn where pcm_val=$1', array(
$q[
$e][
'j_poste']));
134 $montant =
td(
nbm(
$q[
$e][
'j_montant']),
'class="num"');
135 $row.=(
$q[
$e][
'j_debit'] ==
't') ? $montant :
td(
'');
136 $row.=(
$q[
$e][
'j_debit'] ==
'f') ? $montant :
td(
'');
137 $class=(
$e%2==0)?
' class="even"':
'class="odd"';
145<div
id=
"info_operation_div<?php echo $div;?>" class=
"myfieldset" style=
"display:<?php echo $a_tab['info_operation_div']['display']?>">
148 if (
$div ==
'popup') :
150 <
h1 class=
"legend"><?php echo
$a_tab[
'info_operation_div'][
'label']?></
h1>
161 <?=
_(
"Type opération")?>
173<div
id=
"linked_operation_div<?php echo $div;?>" style=
"display:<?php echo $a_tab['linked_operation_div']['display']?>" class=
"myfieldset">
176 if (
$div ==
'popup') :
178 <
h1 class=
"legend"><?php echo
$a_tab[
'linked_operation_div'][
'label']?></
h1>
188 echo
'<table id="'.$tableid.
'">';
192 $internal=$opRap->get_internal();
193 $array_jr=
$cn->get_array(
'select jr_date,jr_pj_number,jr_montant,jr_comment , jr_internal ,jr_optype
194 from jrn where jr_id=$1',
196 $amount=$array_jr[0][
'jr_montant'];
197 switch (substr($array_jr[0][
'jr_internal'],0,1)) {
199 $amount =
$cn->get_value(
"select sum(qp_price+qp_vat+qp_nd_tva+qp_nd_tva_recup-qp_vat_sided) from quant_purchase qp
200 where qp_internal=$1",
207 $amount=
$cn->get_value(
"select sum(qs_price+qs_vat-qs_vat_sided) from quant_sold qs
208 where qs_internal=$1",
215 $total_rec=bcadd($total_rec,
$amount??0);
220 $js=
"return confirm_box(null,'"._(
"vous confirmez?").
"',";
221 $js.=sprintf(
'function () { dropLink(\'%s\',\'%s\',\'%s\',\'%s\');deleteRowRec(\'%s\',$(\'row%d\'));})',
234 $comment=strip_tags($array_jr[0][
'jr_comment']??
"");
235 $pj_nb=
h($array_jr[0][
'jr_pj_number']);
237 td(
'<a class="line" href="javascript:void(0)" onclick="'.
$str.
'" >'.$internal.
'</A>').
241 td(
_(
'delta').
'='.
nbm(bcsub(abs($amount_tva_include),abs($total_rec)))).
242 td($remove),
' id = "row'.
$e.
'"');
250 $wConcerned->amount_id=
$obj->det->jr_montant;
251 $wConcerned->div=
"search_reconcile";
252 $wConcerned->set_hideOperation(
$obj->jr_id);
253 echo $wConcerned->input();
258<div
id=
"linked_action_div<?php echo $div;?>" style=
"display:<?php echo $a_tab['linked_action_div']['display']?>" class=
"myfieldset">
261 if (
$div ==
'popup') :
263 <
h1 class=
"legend"><?php echo
$a_tab[
'linked_action_div'][
'label']?></
h1>
269echo
'<ul style="list-style-type:square;">';
274 if (
$div ==
'popup')
285$related->id=
'related'.$div;
286 if (
$access==
'W') echo $related->input();
292require_once NOALYSS_TEMPLATE.
'/ledger_detail_file.php';
296<div
id=
"analytic_div<?php echo $div;?>" style=
"overflow:auto;display:<?php echo $a_tab['analytic_div']['display']?>">
298 if (
$div ==
'popup') :
300 <
h1 class=
"legend"><?php echo
$a_tab[
'analytic_div'][
'label']?></
h1>
302 <?php
if (
$owner->MY_ANALYTIC !=
"nu") :
303 if ( strpos(
$str_anc,
'<td>') ==
true ):
306 <
table class=
"result">
310 <
span class=
"notice">
311 <?php echo
_(
'Aucune donnée'); ?>
315 <
span class=
"notice">
316 <?php echo
_(
'Non utilisée'); ?>
323 echo
'<p style="text-align:center">';
325if (
$div !=
'popup' ) {
327 $a->label=
_(
"Fermer");
328 $a->javascript=
"removeDiv('".$div.
"')";
344 if (
$owner->MY_ANALYTIC !=
'nu' ){
346 $select_box->add_javascript(
_(
"Vérification CA"), sprintf(
"verify_ca('%s')",
$div));
352 $javascript=
"return confirm_box(null,content[50],function () {removeOperation('".$obj->det->jr_id.
"',".dossier::id().
",'".
$div.
"')})";
353 $select_box->add_javascript(
_(
"Supprimer"), $javascript);
358 $select_box->add_javascript(
_(
"Extourne"), sprintf(
"g('ext%s').style.display='block'",
$div));
363 $select_box->add_javascript(
_(
"Dupliquer"),sprintf(
"duplicate_operation('%s','%s')",Dossier::id(),
$obj->jr_id));
369 http_build_query(array(
"act"=>
"PDF:operation_detail",
"gDossier"=>Dossier::id(),
"operation_id"=>
$obj->jr_id)));
376 echo
'<div id="ext'.$div.
'" class="inner_box" style="position:absolute;top:40px;display:none">';
378 $extourne_label=
new IText(
"ext_label");
379 $extourne_label->size=40;
380 $r=
"<form id=\"form_".$div.
"\" onsubmit=\"return false;\">";
385 $r.=
_(
"Extourner une opération vous permet de l'annuler par son écriture inverse");
389 $r.=
_(
"entrez une date").
" :".
$date->input();
393 $r.=
_(
"Libellé").
" :".$extourne_label->input();
397 $r.=
'<p style="text-align:center">';
399 'onclick="confirm_box($(\'form_'.
$div.
'\'),
content[50],
function () {$(\
'form_'.
$div.
'\').divname=\
''.$div.
'\';reverseOperation($(\
'form_'.
$div.
'\'))});
return false"');
400 $r.=HtmlInput::button_hide( "ext
".$div);
format_date($p_date, $p_from_format='YYYY-MM-DD', $p_to_format='DD.MM.YYYY')
format the date, when taken from the database the format is MM-DD-YYYY
noalyss_bcadd($p_first, $p_second, $p_decimal=4)
th($p_string, $p_extra='', $raw='')
span($p_string, $p_extra='')
h1($p_string, $p_class="")
tr($p_string, $p_extra='')
td($p_string='', $p_extra='')
surround the string with td
nbm($p_number, $p_dec=2)
format the number with a sep.
if(isset($tot['tva'][$a]))($tot['tva'][$a])?></td ><?php else endforeach
global $g_user
if no group available , then stop
if(headers_sent() &&DEBUGNOALYSS > 0) else
catch(Exception $exc) if(! $g_user->can_write_action($ag_id)) $r
h( $row[ 'oa_description'])
catch(Exception $e) $exercice
_("actif, passif,charge,...")
else $card content[$j]['j_montant']
this class manage data from the JRNX and JRN table
this file match the tables jrn & jrnx the purpose is to remove or save accountant writing to these ta...
static select_operation_type($p_status)
Return a select object to choose the type of operation.
new class for managing the reconciliation it must be used instead of the function InsertRapt,...
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
static get_all_operation($p_jr_id)
Html Input : Input a date format dd.mm.yyyy The property title should be set to indicate what it is e...
static infobulle($p_comment)
Display a info in a bubble, text is in message_javascript.
static trash($p_id, $p_javascript)
Display the icon of a trashbin.
static echo_file($msg, $print=true)
display the file
Class to manage the company parameter (address, name...)