noalyss Version-9
category_detail.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
20// Copyright Author Dany De Bontridder danydb@aevalys.eu
21/*!\file
22 * \brief this file will handle all the actions for a specific customer (
23 * contact,operation,invoice and financial)
24 * include from supplier.inc.php and concerned only the customer card and
25 * the customer category
26 * parameter
27 * - p_action = supplier
28 * - sb = detail
29 * - sc = dc
30 */
31//----------------------------------------------------------------------------
32// Save modification
33//---------------------------------------------------------------------------
34if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
35global $http;
37 $f_id=$http->request('f_id','number');
38if ( isset ($_POST['mod']))
39{
40 // modification is asked
42 $supplier->Save();
43}
44
45echo '<div class="u_content">';
46echo '<div class="content" style="width:50%">';
47if ( isset($_POST['mod'])) echo hb(_('Information sauvée'));
48
50$p_readonly=($g_user->check_action(FICADD)==0)?true:false;
51if ( ! $p_readonly) echo '<form id="catergory_detail_frm" method="post">';
52echo dossier::hidden();
53echo HtmlInput::hidden('sb','detail');
54echo HtmlInput::hidden('dc','cc');
55$supplier->setDisplayMode("large");
56echo $supplier->Display($p_readonly);
57$w=new IHidden();
58$w->name="p_action";
59$w->value="supplier";
60echo $w->input();
61$w->name="f_id";
62$w->value=$f_id;
63
64echo $w->input();
65echo HtmlInput::hidden('action_fiche','');
66if ( ! $p_readonly)
67{
68 echo HtmlInput::submit('mod',_('Sauver les modifications'),' onclick="$(\'action_fiche\').value=\'mod\';"');
69 echo HtmlInput::reset(_("Annuler"));
70 echo HtmlInput::submit('delete_card',
71 _('Effacer cette fiche'),
72 'onclick="$(\'action_fiche\').value=\'delete_card\';return confirm_box(\'catergory_detail_frm\',\''.('Confirmer effacement ?').'\');"');
73 $button_pdf=HtmlInput::button_anchor(_("PDF"),
74 "export.php?".http_build_query([
75 "act"=>"PDF:card",
76 "card_id"=>$f_id,
77 "gDossier"=>Dossier::id()
78 ]));
79 echo $button_pdf;
80
81 echo '</form>';
82}
83echo '</div>';
84
85
hb($p_string)
Definition: ac_common.php:53
global $g_user
if no group available , then stop
foreach($array as $idx=> $m) $w
global $http
class Customer are a specific kind of card
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
Definition: fiche.class.php:38
static reset($p_value)
static hidden($p_name, $p_value, $p_id="")
static submit($p_name, $p_value, $p_javascript="", $p_class="smallbutton")
Html Input.
static echo_file($msg, $print=true)
display the file
Definition: dbg.php:88
API for creating PDF, unicode, based on tfpdf.
Definition: pdf.class.php:34
const FICADD
$_POST['ac']
Definition: do.php:310