diff --git a/html/admin/setup.php b/html/admin/setup.php index 47f32683c..f0f84ab14 100644 --- a/html/admin/setup.php +++ b/html/admin/setup.php @@ -134,7 +134,8 @@ function ExecuteScript($p_cn,$script) { continue; } if ( $flag_function ) { - if ( strpos(strtolower($buffer), "language plpgsql") === false ) { + if ( strpos(strtolower($buffer), "language plpgsql") === false && + strpos(strtolower($buffer), "language 'plpgsql'") === false ) { $sql.=$buffer; continue; } diff --git a/html/admin/sql/patch/upgrade13.sql b/html/admin/sql/patch/upgrade13.sql index 5bb82f57b..5dc3122df 100644 --- a/html/admin/sql/patch/upgrade13.sql +++ b/html/admin/sql/patch/upgrade13.sql @@ -537,6 +537,12 @@ insert into parameter (pr_id) values ('MY_TEL'); insert into parameter (pr_id) values ('MY_PAYS'); insert into parameter (pr_id) values ('MY_FAX'); +insert into parameter (pr_id) values ('MY_TEL'); +insert into parameter (pr_id) values ('MY_PAYS'); +insert into parameter (pr_id) values ('MY_FAX'); +alter table document add d_state int; +alter table action_gestion add ag_ref text; + update version set val=14; commit; diff --git a/html/fiche_search.php b/html/fiche_search.php index cbb92458a..5ebefeed6 100644 --- a/html/fiche_search.php +++ b/html/fiche_search.php @@ -113,15 +113,19 @@ if ( isset ( $_POST['search']) ) { $list_fiche=get_list_fiche($cn,$get,$_GET['p_jrn']); $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )"; } - if ( $e_type == 'cred' ) { + elseif ( $e_type == 'cred' ) { $get='jrn_def_fiche_cred'; $list_fiche=get_list_fiche($cn,$get,$_GET['p_jrn']); $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )"; } - - - // if e_type contains a list of value - if ( $e_type != 'cred' and $e_type != 'deb') { + /*!\brief if $e_type (from widget::extra) equal all, all the card are shown + * without restriction + */ + elseif ( $e_type == 'all' ) { + $sql="select * from vw_fiche_attr where true"; + } + // if e_type contains a list of value for filtering on fiche_def_ref.frd_id + else{ $list_fiche=$e_type; $sql="select * from vw_fiche_attr where frd_id in ( $list_fiche )"; // $sql="select * from vw_fiche_attr "; @@ -145,6 +149,11 @@ if ( isset ( $_POST['search']) ) { //set focus on first "Select" button. $row=pg_fetch_array($Res,$i); + // if quick code is empty pass ( it not used for the contact) + if (trim($row['quick_code']) == "") + continue; + + if ( $i %2 == 0 ) $class="even"; else diff --git a/html/show_document.php b/html/show_document.php index 2d7fc87e6..e77ed7681 100644 --- a/html/show_document.php +++ b/html/show_document.php @@ -37,4 +37,4 @@ $User=new cl_user(DbConnect()); $User->Check(); // retrieve the document $doc=new Document($cn,$_REQUEST['d_id']); -$doc->Get(); +$doc->Send(); diff --git a/html/show_fiche.php b/html/show_fiche.php new file mode 100644 index 000000000..3527adf0a --- /dev/null +++ b/html/show_fiche.php @@ -0,0 +1,60 @@ + +/* + * This file is part of PhpCompta. + * + * PhpCompta is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpCompta is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with PhpCompta; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* $Revision$ */ + +// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr + +/* !\file + * This file show in a popup window the detail a of card in read only mode + * the parameter are q (for qcode) & PHPSESSID + */ + +/* \brief + * + */ +require_once ('class_user.php'); +require_once ('class_fiche.php'); +require_once ('postgres.php'); +require_once ('debug.php'); +require_once ('ac_common.php'); +require_once('class_widget.php'); + +$User=new cl_user(DbConnect()); +$User->Check(); +html_page_start($_SESSION['g_theme'],"onLoad='window.focus();'"); + + +if ( ! isset ($_REQUEST['q'])) { + echo 'appel invalide'; + exit(); +} +// connect to the database +$cn=DbConnect($_SESSION['g_dossier']); +if ( $User->CheckAction($cn,FICHE_READ) == 0 ){ + /* Cannot Access */ + echo '