noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
bank.inc.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19// Copyright Author Dany De Bontridder danydb@aevalys.eu
20/* !\brief include from supplier.inc.php and concerned only the supplier card and
21 * the supplier category
22 */
23if (!defined('ALLOWED'))
24 die('Appel direct ne sont pas permis');
25global $g_user, $http;
26
27$low_action = $http->request('sb', "string", 'list');
28/* ! \file
29 * \brief Called from the module 'Gestion' to manage the supplier
30 */
31$href=NOALYSS_URL."/do.php";
32
33// by default open liste
34if ($low_action == '')
35 $low_action = 'list';
36
37
38//----------------------------------------new-------------
39// Remove a card
40//-----------------------------------------------------
41if (isset($_POST['delete_card'])) {
42 if ($g_user->check_action(FICADD) == 0) {
43 alert(_('Vous ne pouvez pas enlever de fiche'));
44 return;
45 }
46
47 $f_id = $http->request('f_id', 'number');
48
49 $fiche = new Bank($cn, $f_id);
50 $fiche->remove();
51 $low_action = "list";
52}
53
54//-----------------------------------------------------
55// list of supplier
56//-----------------------------------------------------
57if ($low_action == "list") {
58 ?>
59 <div class="content">
60 <div>
61<?php
62 Bank::form_search($href, FICHE_TYPE_FIN);
63?>
64 </div>
65 <?php
66 $supplier = new Bank($cn);
67 $search = $http->get("query", "string", "");
68 $sql = "";
69 if (isset($_GET['cat'])) {
70 $cat = $http->get("cat", "number");
71 if ($cat != -1)
72 $sql = sprintf(" and fd_id = %s", $cat);
73 }
74 $noop = (isset($_GET['noop'])) ? false : true;
75
76 echo '<div class="content">';
77 echo $supplier->Summary($search, 'bank', $sql, $noop);
78
79 echo '<br>';
80 echo '<br>';
81 echo '<br>';
82 if ($g_user->check_action(FICADD) == 1) {
83 /* Add button */
84 $f_add_button = new IButton('add_card');
85 $f_add_button->label = _('Créer une nouvelle fiche');
86 $f_add_button->set_attribute('win_refresh', 'yes');
87
88 $f_add_button->set_attribute('type_cat', FICHE_TYPE_FIN);
89 $f_add_button->javascript = " select_card_type(this);";
90 echo $f_add_button->input();
91
92 $f_cat_button = new IButton('add_cat');
93 $f_cat_button->set_attribute('type_cat', FICHE_TYPE_FIN);
94 $f_cat_button->set_attribute('ipopup', 'ipop_cat');
95 $f_cat_button->label = _("Ajout d'une catégorie");
96 $f_cat_button->javascript = 'add_category(this)';
97 echo $f_cat_button->input();
98 }
99
100 echo '</div>';
101 echo '</div>';
102}
103/* ----------------------------------------------------------------------
104 * Detail for a card, Suivi, Contact, Operation,... *
105 * cc stands for supplier card
106 * ---------------------------------------------------------------------- */
107if ($low_action == 'detail') {
108 /* Menu */
109 require_once('category_card.inc.php');
110 return;
111}
112
113
114
116?>
html_page_stop()
end tag
alert($p_msg, $buffer=false)
alert in javascript
global $g_user
if no group available , then stop
$low_action
Definition adm.inc.php:27
$href
Definition adm.inc.php:31
if(trim($query)==''|| $filter=='') $search
_("actif, passif,charge,...")
$_GET['qcode']
class admin are a specific kind of card
Html Input.
const FICHE_TYPE_FIN
Definition constant.php:262
const FICADD
$_POST['ac']
Definition do.php:323