27 require_once NOALYSS_INCLUDE.
'/lib/class_idate.php';
28 require_once NOALYSS_INCLUDE.
'/lib/class_icard.php';
29 require_once NOALYSS_INCLUDE.
'/lib/class_ispan.php';
30 require_once NOALYSS_INCLUDE.
'/lib/class_itext.php';
31 require_once NOALYSS_INCLUDE.
'/lib/class_iconcerned.php';
32 require_once NOALYSS_INCLUDE.
'/lib/class_ifile.php';
33 require_once NOALYSS_INCLUDE.
'/lib/class_ihidden.php';
34 require_once NOALYSS_INCLUDE.
'/lib/class_iselect.php';
35 require_once NOALYSS_INCLUDE.
'/class/class_acc_ledger.php';
36 require_once NOALYSS_INCLUDE.
'/lib/ac_common.php';
37 require_once NOALYSS_INCLUDE.
'/class/class_acc_reconciliation.php';
44 parent::__construct($p_cn, $p_init);
60 throw new Exception (
"Array empty");
69 if (isset($mt) && $this->
db->count_sql(
'select jr_mt from jrn where jr_mt=$1', array($mt)) != 0)
70 throw new Exception(_(
'Double Encodage'), 5);
73 if ($g_user->check_jrn(
$p_jrn) !=
'W')
74 throw new Exception(_(
'Accès interdit'), 20);
79 if ($this->
db->count() == 0)
80 throw new Exception(
"Ce journal n'a pas de compte en banque, allez dans paramètre->journal pour régler cela");
82 $fBank =
new Fiche($this->
db, $bank_id);
84 if (
trim($bank_accounting) ==
'')
85 throw new Exception(
'Le poste comptable du compte en banque de ce journal est invalide');
89 if (
$poste->load() ==
false)
90 throw new Exception(
'Le poste comptable du compte en banque de ce journal est invalide');
91 if ($chdate != 1 && $chdate != 2)
throw new Exception (
'Le choix de date est invalide');
95 if (
isDate($e_date) == null)
97 throw new Exception(
'Date invalide', 2);
110 throw new Exception(_(
'Date et periode ne correspondent pas'), 6);
116 throw new Exception(_(
'Periode fermee'), 6);
125 if ($last_date != null &&
cmpDate($e_date, $last_date) < 0)
126 throw new Exception(_(
'Vous utilisez le mode strict la dernière operation est à la date du ')
127 . $last_date . _(
' vous ne pouvez pas encoder à une date antérieure'), 15);
138 for ($i = 0; $i < $nb_item; $i++)
140 if (strlen(
trim(${
'e_other' . $i})) == 0)
143 if (
isNumber(${
'e_other' . $i .
'_amount'}) == 0)
144 throw new Exception(
'La fiche ' . ${
'e_other' . $i} .
'a un montant invalide [' . ${
'e_other' . $i .
'_amount'} .
']', 6);
147 $tot_amount+=round(${
'e_other' . $i .
'_amount'}, 2);
150 $fiche->get_by_qcode(${
'e_other' . $i});
152 throw new Exception(
'La fiche ' . ${
'e_other' . $i} .
'n\'a pas de poste comptable', 8);
156 if (strpos($sposte,
',') != 0)
158 $array = explode(
',', $sposte);
163 $poste_val = $sposte;
167 if (
$poste->load() ==
false)
169 throw new Exception(
'Pour la fiche ' . ${
'e_other' . $i} .
' le poste comptable [' .
$poste->id .
'n\'existe pas', 9);
173 $fiche->get_by_qcode(${
'e_other' . $i});
174 if ($fiche->belong_ledger(
$p_jrn,
'deb') != 1)
175 throw new Exception(
'La fiche ' . ${
'e_other' . $i} .
'n\'est pas accessible à ce journal', 10);
179 if (
isDate(${
'dateop' . $i}) == null)
181 throw new Exception(
'Date invalide', 2);
194 throw new Exception(_(
'Date et periode ne correspondent pas'), 6);
200 throw new Exception(_(
'Periode fermee'), 6);
209 if ($last_date != null &&
cmpDate(${
'dateop' . $i}, $last_date) < 0)
210 throw new Exception(_(
'Vous utilisez le mode strict la dernière operation est à la date du ')
211 . $last_date . _(
' vous ne pouvez pas encoder à une date antérieure'), 15);
218 throw new Exception(
'Il n\'y a aucune opération', 12);
221 if (strlen(
trim($last_sold)) != 0 &&
isNumber($last_sold) &&
222 strlen(
trim($first_sold)) != 0 &&
isNumber($first_sold))
224 $diff = $last_sold - $first_sold;
225 $diff = round(
$diff, 2) - round($tot_amount, 2);
226 if ($first_sold != 0 && $last_sold != 0)
229 throw new Exception(
'Le montant de l\'extrait est incorrect' .
230 $tot_amount .
' extrait ' .
$diff, 13);
251 $f_add_button =
new IButton(
'add_card');
252 $f_add_button->label = _(
'Créer une nouvelle fiche');
253 $f_add_button->set_attribute(
'ipopup',
'ipop_newcard');
254 $f_add_button->set_attribute(
'jrn', $this->
id);
255 $f_add_button->javascript =
" this.jrn=\$('p_jrn').value;select_card_type(this);";
256 $str_add_button = ($g_user->check_action(
FICADD) == 1) ? $f_add_button->input() :
"";
260 list ($l_date_start, $l_date_end) =
$pPeriode->get_date_limit($g_user->get_periode());
261 if ($g_parameter->MY_DATE_SUGGEST ==
'Y')
262 $op_date = (!isset($e_date) ) ? $l_date_start : $e_date;
264 $op_date = (!isset($e_date) ) ?
'' : $e_date;
268 $r.=dossier::hidden();
269 $f_legend =
'Banque, caisse';
272 $Date =
new IDate(
"e_date", $op_date);
273 $Date->setReadOnly($pview_only);
274 $f_date = $Date->input();
283 $period->type =
OPEN;
284 $period->value = $l_user_per;
286 $period->name =
'periode';
289 $l_form_per = $period->input();
293 if ($e->getCode() == 1)
295 throw new Exception(_(
"Aucune période ouverte"));
300 $f_period =
"Période comptable $label" . $l_form_per;
305 $onchange=
"update_bank();ajax_saldo('first_sold');update_name();update_row('fin_item');";
307 if ($g_parameter->MY_DATE_SUGGEST ==
'Y')
308 $onchange .=
'get_last_date();';
309 if ($g_parameter->MY_PJ_SUGGEST==
'Y')
310 $onchange .=
'update_pj();';
312 $add_js =
'onchange="'.$onchange.
'"';
315 throw new Exception(_(
'Pas de journal disponible'));
325 $f_bank =
'<span id="bkname">' . $this->
get_bank_name() .
'</span>';
326 if ($this->bank_id ==
"")
328 echo
h2(
"Journal de banque non configuré " . $this->
get_name(),
' class="error"');
329 echo
'<span class="error"> vous devez donner à ce journal un compte en banque (fiche), modifiez dans CFGLED</span>';
330 alert(
"Journal de banque non configuré " . $this->
get_name());
333 $f_legend_detail =
'Opérations financières';
339 if ($g_parameter->MY_PJ_SUGGEST ==
'Y')
343 $wPJ =
new IText(
'e_pj');
344 $wPJ->readonly =
false;
346 $wPJ->value = (isset($e_pj)) ? $e_pj : $default_pj;
351 $first_sold = (isset($first_sold)) ? $first_sold :
"";
352 $wFirst =
new INum(
'first_sold', $first_sold);
354 $last_sold = isset($last_sold) ? $last_sold :
"";
355 $wLast =
new INum(
'last_sold', $last_sold);
358 $max = (isset($nb_item)) ? $nb_item : $min_article;
367 for ($i = 0; $i <
$max; $i++)
369 $tiers = (isset(${
"e_other" . $i})) ? ${
"e_other" . $i} :
"";
371 $tiers_amount = (isset(${
"e_other$i" .
"_amount"})) ? round(${
"e_other$i" .
"_amount"}, 2) : 0;
373 $tiers_comment = (isset(${
"e_other$i" .
"_comment"})) ? ${
"e_other$i" .
"_comment"} :
"";
375 $operation_date=
new IDate(
"dateop".$i);
376 $operation_date->value=(isset(${
'dateop'.$i}))?${
'dateop'.$i}:
"";
377 $array[$i][
'dateop']=$operation_date->input();
378 ${
"e_other$i" .
"_amount"} = (isset(${
"e_other$i" .
"_amount"})) ? ${
"e_other$i" .
"_amount"} : 0;
382 $W1->name =
"e_other" . $i;
383 $W1->id =
"e_other" . $i;
386 $W1->typecard =
'deb';
387 $W1->style=
' style = "vertical-align:65%"';
388 $W1->set_dblclick(
"fill_ipopcard(this);");
389 $W1->set_attribute(
'ipopup',
'ipopcard');
392 $W1->set_attribute(
'label',
'e_other_name' . $i);
394 $W1->set_attribute(
'typecard',
'filter');
396 $W1->set_callback(
'filter_card');
397 $W1->set_function(
'fill_data');
398 $W1->javascript = sprintf(
' onchange="fill_data_onchange(\'%s\');" ', $W1->name);
399 $W1->readonly = $pview_only;
400 $array[$i][
'qcode'] = $W1->input();
401 $array[$i][
'search'] = $W1->search();
409 $fiche->get_by_qcode($tiers);
410 $card_name = $this->
db->get_value(
"Select ad_value from fiche_detail where ad_id=$1 and f_id=$2", array(
ATTR_DEF_NAME,
$fiche->id));
413 $wcard_name =
new IText(
"e_other_name" . $i, $card_name);
414 $wcard_name->id=$wcard_name->name;
415 $wcard_name->readOnly =
true;
416 $array[$i][
'cname'] = $wcard_name->input();
419 $wComment =
new IText(
"e_other$i" .
"_comment", $tiers_comment);
421 $wComment->size = 35;
422 $wComment->setReadOnly($pview_only);
423 $array[$i][
'comment'] = $wComment->input();
425 $wAmount =
new INum(
"e_other$i" .
"_amount", $tiers_amount);
428 $wAmount->setReadOnly($pview_only);
429 $array[$i][
'amount'] = $wAmount->input();
431 ${
"e_concerned" . $i} = (isset(${
"e_concerned" . $i})) ? ${
"e_concerned" . $i} :
""
433 $wConcerned =
new IConcerned(
"e_concerned" . $i, ${
"e_concerned" . $i});
434 $wConcerned->tiers=
"e_other" . $i;
436 $wConcerned->amount_id =
"e_other" . $i .
"_amount";
438 $wConcerned->paid =
'paid';
439 $array[$i][
'concerned'] = $wConcerned->input();
443 require_once NOALYSS_TEMPLATE.
'/form_ledger_fin.php';
444 $r.=ob_get_contents();
471 if (
isDate($e_date) != null) {
478 list ($l_date_start, $l_date_end) =
$pPeriode->get_date_limit();
481 $r.=
'<fieldset><legend>Banque, caisse </legend>';
482 $r.=
'<div id="jrn_name_div">';
483 $r.=
'<h2 id="jrn_name" style="display:inline">' . $this->
get_name() .
'</h2>';
485 $r.=
'<TABLE width="100%">';
489 if ( $chdate == 1 )
$r.=
'<td> Date : </td><td>' . $e_date;
493 $r.=
"Période comptable </td><td>";
494 $r.=$l_date_start .
' - ' . $l_date_end;
500 $r.=
'<td> Journal </td>';
510 $fBank =
new Fiche($this->
db, $bk_id);
513 $filter_year =
" j_tech_per in (select p_id from parm_periode where p_exercice='" .
$exercice .
"')";
517 $deb=$asolde[
'debit'];
518 $cred=$asolde[
'credit'];
522 $r.=
"<TR><td colspan=\"4\"> Banque ";
523 $r.=$e_bank_account_label;
529 $r.=
'<div class="myfieldset"><h1 class="legend">Extrait de compte</h1>';
537 $r.=
tr(
'<td> Numéro d\'extrait</td>' .
td(
h($e_pj)));
538 $r.=
'<tr><td >Solde début extrait </td>';
539 $r.=
'<td style="num">' .
nbm($first_sold) .
'</td></tr>';
540 $r.=
'<tr><td>Solde fin extrait </td>';
541 $r.=
'<td style="num">' .
nbm($last_sold) .
'</td></tr>';
544 $r.=
'<h1 class="legend">Opérations financières</h1>';
548 $r.=
'<TABLE style="width:100%" id="fin_item">';
550 if ($chdate==2)
$r.=
'<th>Date</th>';
551 $r.=
"<th style=\"width:auto;text-align:left\" colspan=\"2\">Nom</TH>";
552 $r.=
"<th style=\"text-align:left\" >Commentaire</TH>";
553 $r.=
"<th style=\"text-align:right\">Montant</TH>";
554 $r.=
'<th colspan="2"> Op. Concernée(s)</th>';
557 if ($g_parameter->MY_ANALYTIC !=
'nu')
560 $a_anc =
$anc->get_list();
563 $r.=
'<th colspan="' . $x .
'">' . _(
'Compt. Analytique') .
'</th>';
574 for ($i = 0; $i < $nb_item; $i++)
577 $tiers = (isset(${
"e_other" . $i})) ? ${
"e_other" . $i} :
""
580 if (strlen(
trim($tiers)) == 0)
583 $tiers_amount = round(${
"e_other$i" .
"_amount"}, 2);
584 $tot_amount = bcadd($tot_amount, $tiers_amount);
585 $tiers_comment =
h(${
"e_other$i" .
"_comment"});
587 $fTiers =
new Fiche($this->
db);
588 $fTiers->get_by_qcode($tiers);
593 if ($chdate==2)
$r.=
td(${
"dateop".$i});
594 $r.=
"<td>" . ${
'e_other' . $i} .
"</TD>";
596 $r.=
'<TD style="width:25%;border-bottom:1px dotted grey;">';
600 $r.=
'<td style="width:40%">' . $tiers_comment .
'</td>';
602 $r.=
'<td class="num">' .
nbm($tiers_amount) .
'</td>';
604 $r.=
'<td style="text-align:center">';
605 if (${
"e_concerned" . $i} !=
'')
607 $jr_internal = $this->
db->get_array(
"select jr_internal from jrn where jr_id in (" . ${
"e_concerned" . $i} .
")");
609 for ($x = 0; $x < count($jr_internal); $x++)
611 $r.=$comma.HtmlInput::detail_op(${
"e_concerned" . $i}, $jr_internal[$x][
'jr_internal']);
617 if ($g_parameter->MY_ANALYTIC !=
'nu' && preg_match(
"/^[6,7]/", $fTiers->strAttribut(
ATTR_DEF_ACCOUNT)) == 1)
621 $null = ($g_parameter->MY_ANALYTIC ==
'op') ? 1 : 0;
627 $r.=$anc_op->display_form_plan(
$p_array, $null, $p_mode, $i, $tiers_amount);
637 $new_solde+=$tot_amount;
638 $r.=
'<br>Nouveau solde = ' . $new_solde;
639 $r.=
'<br>Difference =' . $tot_amount;
643 $r.=
"<br>Ajoutez une pièce justificative ";
650 $r.=dossier::hidden();
658 $mt = microtime(
true);
663 $r.=dossier::hidden();
665 for ($i = 0; $i < $nb_item; $i++)
667 $tiers = (isset(${
"e_other" . $i})) ? ${
"e_other" . $i} :
"" ;
696 $fBank =
new Fiche($this->
db, $bank_id);
702 if (strpos($sposte,
',') != 0)
704 $array = explode(
',', $sposte);
709 $poste_val = $sposte;
726 $filter_year =
" j_tech_per in (select p_id from parm_periode where p_exercice='" .
$exercice .
"')";
728 $deb=$asolde[
'debit'];
729 $cred=$asolde[
'credit'];
743 $ret =
'<table class="result" >';
744 $ret.=
tr(
th(
'Date').
th(
'n° interne') .
th(
'Quick Code') .
th(
'Nom') .
th(
'Libellé') .
th(
'Montant',
' style="text-align:right"'));
747 for ($i = 0; $i < $nb_item; $i++)
751 if (strlen(
trim(${
"e_other$i"})) == 0)
754 if ( $chdate == 2 ) $e_date=${
'dateop'.$i};
756 if ($chdate == 2 && $get_solde )
768 $filter_year =
" j_tech_per in (select p_id from parm_periode where p_exercice='" .
773 $fPoste =
new Fiche($this->
db);
774 $fPoste->get_by_qcode(${
"e_other$i"});
777 ${
"e_other$i" .
"_amount"} = round(${
"e_other$i" .
"_amount"}, 2);
781 $amount+=${
"e_other$i" .
"_amount"};
784 $seq = $this->
db->get_next_seq(
's_grpt');
787 $acc_operation->date = $e_date;
790 if (strpos($sposte,
',') != 0)
792 $array = explode(
',', $sposte);
793 if (${
"e_other$i" .
"_amount"} < 0)
800 $poste_val = $sposte;
804 $acc_operation->poste = $poste_val;
805 $acc_operation->amount = ${
"e_other$i" .
"_amount"} * (-1);
806 $acc_operation->grpt =
$seq;
807 $acc_operation->jrn =
$p_jrn;
808 $acc_operation->type =
'd';
815 $tperiode =
$per->find_periode($e_date);
817 $acc_operation->periode = $tperiode;
818 $acc_operation->qcode = ${
"e_other" . $i};
819 $j_id = $acc_operation->insert_jrnx();
822 $acc_operation->date = $e_date;
826 if (strpos($sposte,
',') != 0)
828 $array = explode(
',', $sposte);
829 if (${
"e_other$i" .
"_amount"} < 0)
836 $poste_val = $sposte;
839 $acc_operation->poste = $poste_val;
840 $acc_operation->amount = ${
"e_other$i" .
"_amount"};
841 $acc_operation->grpt =
$seq;
842 $acc_operation->jrn =
$p_jrn;
843 $acc_operation->type =
'd';
844 $acc_operation->periode = $tperiode;
845 $acc_operation->qcode = $e_bank_account;
846 $acc_operation->insert_jrnx();
849 if (
sql_string(${
"e_other$i" .
"_comment"}) == null)
857 $comment = ${
'e_other' . $i .
'_comment'};
862 $acc_operation->jrn =
$p_jrn;
863 $acc_operation->amount = abs(${
"e_other$i" .
"_amount"});
864 $acc_operation->date = $e_date;
866 $acc_operation->grpt =
$seq;
867 $acc_operation->periode = $tperiode;
868 $acc_operation->mt = $mt;
870 $acc_operation->pj =
'';
873 $acc_operation->pj = $e_pj . str_pad($idx_operation, 3, 0, STR_PAD_LEFT);
876 $acc_operation->pj = $e_pj;
878 $jr_id = $acc_operation->insert_jrn();
880 $this->
db->exec_sql(
'update jrn set jr_pj_number=$1 where jr_id=$2', array($acc_operation->pj,
$jr_id));
884 if (
trim(${
"e_concerned" . $i}) !=
"")
886 if (strpos(${
"e_concerned" . $i},
',') != 0)
888 $aRapt = explode(
',', ${
"e_concerned" . $i});
889 foreach ($aRapt as $rRapt)
898 $rec->insert($rRapt);
901 $oppaid->set_id($rRapt);
903 }
catch (Exception
$ex) {
904 echo _(
'Attention , erreur Acc_Ledger_Fin::insert , coche paiement');
910 if (
isNumber(${
"e_concerned" . $i}) == 1)
914 $rec->insert(${
"e_concerned$i"});
917 $oppaid->set_id(${
"e_concerned" . $i});
918 $conc_amount=$oppaid->get_amount();
919 if ($conc_amount == $acc_operation->amount)
923 }
catch (Exception
$ex) {
924 echo _(
'Attention , erreur Acc_Ledger_Fin::insert , coche paiement');
930 $this->grpt_id =
$seq;
936 if ($g_parameter->MY_ANALYTIC !=
"nu")
940 $op->oa_group = $this->
db->get_next_seq(
"s_oa_group");
942 $op->oa_date = $e_date;
953 $row =
td($e_date).td($js_detail) .
td(${
"e_other$i"}) .
td($fPoste->strAttribut(
ATTR_DEF_NAME)) .
td(${
"e_other" . $i .
"_comment"}) .
td(
nbm(${
"e_other$i" .
"_amount"}),
'class="num"');
954 $class=($i%2==0)?
' class="even" ':
' class="odd" ';
963 $oid = $this->
db->save_receipt(
$seq);
969 $this->
db->exec_sql(
"update jrn set jr_pj=$1 , jr_pj_name=$2,
970 jr_pj_type=$3 where jr_grpt_id=$4",
971 array($oid,$_FILES[
'pj'][
'name'] ,$_FILES[
'pj'][
'type'],
$seq));
976 if (strlen(
trim($e_pj)) != 0)
984 $r =
'<span class="error">' .
985 'Erreur dans l\'enregistrement ' .
986 __FILE__ .
':' . __LINE__ .
' ' .
988 $this->
db->rollback();
989 throw new Exception(
$r);
994 $new_solde = bcadd($new_solde,
$amount);
995 $r.=
"<br>Nouveau solde " .
nbm($new_solde);
1007 echo dossier::hidden();
1010 $hid->name =
"p_action";
1011 $hid->value =
"bank";
1022 $filter_year =
" where p_exercice='" . $g_user->get_exercice() .
"'";
1024 $periode_start = $this->
db->make_array(
"select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end", 1);
1026 $current = (isset(
$_GET[
'p_periode'])) ?
$_GET[
'p_periode'] : -1;
1027 $w->selected = $current;
1031 $wLedger = $this->select_ledger(
'fin', 3);
1034 throw new Exception(_(
'Pas de journal disponible'));
1039 $wLedger->value[0] = array(
'value' => -1,
'label' => _(
'Tous les journaux financiers'));
1041 foreach ($aValue as
$a)
1050 echo
'Journal ' .
$wLedger->input();
1055 echo dossier::hidden();
1061 $this->
type =
'FIN';
1062 $all = $this->get_all_fiche_def();
1064 $w->extra2 =
'QuickCode';
1066 echo
$sp->input(
"qcode_label",
"",
$qcode);
1076 $filter_per =
" and jr_tech_per=" . $current;
1080 $filter_per =
" and jr_tech_per in (select p_id from parm_periode where p_exercice::integer=" .
1081 $g_user->get_exercice() .
")";
1084 if ($this->
id != -1)
1085 $available_ledger =
" and jr_def_id= " . $this->
id .
" and " . $g_user->get_ledger_sql();
1087 $available_ledger =
" and " . $g_user->get_ledger_sql();
1091 " $available_ledger";
1092 $step = $_SESSION[
'g_pagesize'];
1102 $l =
" and jr_grpt_id in (select j_grpt from jrnx where j_qcode=upper('$qcode')) ";
1105 list(
$max_line,
$list) = ListJrn($this->
db,
"where jrn_def_type='FIN' $filter_per $l $available_ledger "
1119 $this->bank_id = $this->
db->get_value(
'select jrn_def_bank from jrn_def where jrn_def_id=$1', array($this->
id));
1120 $fBank =
new Fiche($this->
db, $this->bank_id);
1124 return $e_bank_qcode . $e_bank_name . $e_bank_account;
1132 $bank_id = $this->
db->get_value(
'select jrn_def_bank from jrn_def where jrn_def_id=$1', array($this->
id));
1141 $a = $this->
db->get_value(
'select jrn_def_num_op from jrn_def where jrn_def_id=$1', array($this->
id));
1156 $sql =
"INSERT INTO quant_fin(qf_bank, jr_id, qf_other, qf_amount)
1157 VALUES ($1, $2, $3, $4);";
1159 $this->
db->exec_sql(
$sql, array($p_bankid, $p_jrid, $p_otherid, round($p_amount, 2)));
get_name()
Return the name of a ledger.
alert($p_msg, $buffer=false)
alert in javascript
get_last_date()
get the date of the last operation
Generate the form for the periode Data Members.
if($g_user->check_dossier(dossier::id(), true)=='X') $op
this class is used to show the form for entering an operation only FOR analytic operation to save it...
numb_operation()
return true is we numbere each operation
sql_string($p_string)
Fix the problem with the quote char for the database.
td($p_string='', $p_extra='')
surround the string with td
show_ledger()
display operation of a FIN ledger
h2($p_string, $p_class="", $raw="")
th($p_string, $p_extra='', $raw='')
nbm($p_number, $p_dec=2)
format the number with a sep.
static hidden($p_array)
return an HTML string containing hidden input type to hold the differant PA_ID
Concerns the Analytic plan (table plan_analytique)
Manage the account from the table jrn, jrnx or tmp_pcmn.
__construct($p_cn, $p_init)
foreach($array as $idx=> $m) $w
update_internal_code($p_internal)
compute_internal_code($p_grpt)
compute the internal code of the saved operation and set the $this->jr_internal to the computed value...
guess_pj()
guess what the next pj should be
get_solde_detail($p_cond="")
give the balance of an account
insert_quant_fin($p_bankid, $p_jrid, $p_otherid, $p_amount)
insert into the quant_fin table
select_ledger($p_type="ALL", $p_access=3)
Show a select list of the ledgers you can access in writing, reading or simply accessing.
if(!isset($_REQUEST['act'])||!isset($_REQUEST['jr_id'])||!isset($_REQUEST['div'])) global $g_parameter
get_bank_name()
return a string with the bank account, name and quick_code
navigation_bar($p_offset, $p_line, $p_size=0, $p_page=1, $p_javascript="")
Create a navigation_bar (pagesize)
check_strict()
Check if a Dossier is using the strict mode or not.
For the periode tables parm_periode and jrn_periode.
is_closed($p_periode)
check if the current ledger is closed
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
for($i=0;$i<$nb_jrn;$i++) $deb
global $g_user
Find the default module or the first one.
Class for jrn, class acc_ledger for manipulating the ledger.
function trim(s)
remove trailing and heading space
const SQL_LIST_ALL_INVOICE
new class for managing the reconciliation it must be used instead of the function InsertRapt...
cmpDate($p_date, $p_date_oth)
Compare 2 dates.
if(sizeof($array)==0) $pPeriode
h($p_string)
to protect again bad characters which can lead to a cross scripting attack the string to be diplayed ...
this file match the tables jrn & jrnx the purpose is to remove or save accountant writing to these ta...
Input HTML for the card show buttons, in the file, you have to add card.js How to use : ...
$nb
default number of rows by default 10
tr($p_string, $p_extra='')
insert($p_array=null)
save the data into the database, included the attachment, and the reconciliations ...
check_periode()
Check if a Dossier is using the check on the periode, if true than the user has to enter the date and...
inc_seq_pj()
increment the sequence for the pj
verify($p_array)
Verify that the data are correct before inserting or confirming.
input($p_array=null, $notused=0)
get_bank()
return the fiche_id of the bank
create_script($p_string)
create the HTML for adding the script tags around of the script
check_parameter($p_array, $p_needed)
Check that all the index are in the array, used by function to check if the array contains the needed...
confirm($p_array, $p_nothing=0)
show the summary before inserting into the database, it calls the function for adding a attachment...
Html Input : Input a date format dd.mm.yyyy The property title should be set to indicate what it is e...
This class handles only the numeric input, the input will call a javascript to change comma to period...