noalyss Version-9
acc_reconciliation_lettering.class.php
Go to the documentation of this file.
1<?php
2
3/*
4 * Copyright (C) 2022 Dany De Bontridder <dany@alchimerys.be>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program 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 this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21
22/***
23 * @file
24 * @brief this class let you insert reconcilied operation from Lettering::save without calling auto_letter
25 *
26 */
27
28/***
29 * @class
30 * @brief this class let you insert reconcilied operation from Lettering::save without calling auto_letter
31 *
32 */
34{
35 const sql_find_operation="select jr_id from jrn join jrnx on (jr_grpt_id=j_grpt) where j_id=$1";
36 /**
37 * @brief do nothing , it let you skip Acc_Reconcililation
38 * @param type $p_jr_id
39 * @return type
40 */
41 public function auto_letter($p_jr_id)
42 {
43 return ;
44 }
45 /**
46 * @brief find the jrn.jr_id and call the Acc_Reconciliation::insert_rapt , the auto_letter will be skipped
47 * @param int $p_jrnx_id jrnx.j_id row id to reconcield
48 * @param int $p_jrnx_id_rec jrnx.j_id row id to reconcield
49 */
50 public function insert_reconcilied(int $p_jrnx_id,int $p_jrnx_id_rec)
51 {
52 // find jr_id from both
53 $jrn_id = $this->db->get_value(self::sql_find_operation,
54 [$p_jrnx_id]);
55 $jrn_id2 = $this->db->get_value(self::sql_find_operation,[$p_jrnx_id_rec]);
56 $this->set_jr_id($jrn_id);
57 return $this->insert_rapt($jrn_id2);
58 }
59}
insert_reconcilied(int $p_jrnx_id, int $p_jrnx_id_rec)
find the jrn.jr_id and call the Acc_Reconciliation::insert_rapt , the auto_letter will be skipped
auto_letter($p_jr_id)
do nothing , it let you skip Acc_Reconcililation
new class for managing the reconciliation it must be used instead of the function InsertRapt,...
insert_rapt($jr_id2)
Insert into jrn_rapt the concerned operations should not be called directly, use insert instead.
$SecUser db