noalyss Version-9
filter_data_currency_card_category.class.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of NOALYSS.
5 *
6 * PhpCompta is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * PhpCompta 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 PhpCompta; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20// Copyright (2002-2020) Author Dany De Bontridder <danydb@noalyss.eu>
21
22/**
23 * \file
24 * \brief filter data in currency from datase , inherit from Data_Currency_Operation, filter on
25 * card category
26 */
27
28/**
29 * \class Filter_Data_Currency_Card_Category
30 * \brief filter data in currency from datase , inherit from Data_Currency_Operation, filter on
31 * card category
32 */
34{
35
37
39 {
40 parent::__construct($cn, $from_date, $to_date, $currency_id);
41 $this->card_category=$card_category;
42 }
43
44 public function getCard_category()
45 {
47 }
48
50 {
51 $this->card_category=$card_category;
52 }
53
54 /**
55 *
56 * @brief build the SQL condition
57 * @return SQL condition
58 */
59 public function SQL_Condition()
60 {
61 $sql=parent::SQL_Condition();
62 $sql.=" and jrnx.f_id in ( select f_id from fiche where fd_id=$4)";
63 return $sql;
64 }
65
66 /**
67 * @brief returns data
68 * @return array
69 */
70 public function get_data()
71 {
72 $sql=$this->build_SQL();
73 $aArray=$this->getDbconx()->get_array($sql,
74 [$this->getCurrency_id(),
75 $this->getFrom_date(),
76 $this->getTo_date(),
77 $this->card_category]);
78
79 return $aArray;
80 }
81
82}
83
84?>
build the SQL and fetch data of data currency operation from database ,
build_SQL()
build the SQL to execute
filter data in currency from datase , inherit from Data_Currency_Operation, filter on card category
__construct($cn, $from_date, $to_date, $currency_id, $card_category)