Integration with 232

This commit is contained in:
sparkyx 2007-05-10 20:03:17 +00:00
parent 9a6ef60815
commit 82cf83be9d
54 changed files with 634 additions and 234 deletions

View file

@ -44,16 +44,14 @@ include_once ("user_menu.php");
echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php");
$cn=DbConnect($_SESSION['g_dossier']);
if ( $User->CheckAction($cn,CENTRALIZE)==0 ) {
/* Cannot Access */
NoAccess();
}
include_once("central_inc.php");
echo '<div class="u_subtmenu">';
echo ShowMenuAdvanced("central.php");
echo '</div>';
$User->AccessRequest($cn,CENTRALIZE);
echo '<DIV CLASS="u_redcontent">';

View file

@ -16,7 +16,9 @@
* 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
* \brief Base of the module "Gestion", the p_action indicates what
@ -85,9 +87,9 @@ $p_action=(isset ($_REQUEST['p_action']))?$_REQUEST['p_action']:"";
// TODO Menu with all the customer
echo ShowItem(array(
array('?p_action=client','Client'),
array('?p_action=facture','Facture'),
array('?p_action=facture','Vente/Facture'),
array('?p_action=fournisseur','Fournisseur'),
array('?p_action=depense','D&eacute;pense'),
array('?p_action=depense','Achat/D&eacute;pense'),
array('?p_action=impress','Impression'),
array('?p_action=stock','Stock'),
array('?p_action=bank','Banque'),

View file

@ -17,7 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
/*! \file
* \brief Main page for the printing
*/
@ -50,11 +52,8 @@ $action=$_REQUEST['p_action'];
// call impress sub-menu
if ( $action == 'impress' ) {
if ( $User->CheckAction($cn,IMP) == 0)
{
NoAccess();
exit;
}
$User->AccessRequest($cn,IMP) ;
require_once('impress.inc.php');
}

View file

@ -44,13 +44,13 @@ echo '<div class="u_tmenu">';
echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php");
echo '</div>';
// \todo add a check for permission
if ( $User->CheckAction($cn,EXP_IMP_ECR) == 0 ) {
/* Cannot Access */
NoAccess();
exit -1;
}
echo ShowMenuAdvanced("ecrit_ouv.php");
$User->AccessRequest($cn,EXP_IMP_ECR);
echo '<div class="lmenu">';
echo ShowItem ( array (

View file

@ -42,12 +42,9 @@ include_once ("check_priv.php");
include_once ("user_menu.php");
$cn=DbConnect($_SESSION['g_dossier']);
// TODO : add a check for permission
if ( $User->CheckAction($cn,EXP_IMP_ECR) == 0 ) {
/* Cannot Access */
NoAccess();
exit -1;
}
$User->AccessRequest($cn,EXP_IMP_ECR);
if ( !isset ($_GET['p_periode'])) {
echo 'Erreur : aucune periode demandée';
exit(0);

View file

@ -36,11 +36,8 @@ include ('class_user.php');
$User=new cl_user($rep);
$User->Check();
if ($User->CheckAction($cn,FICHE_READ) == 0 )
{
/* Cannot Access */
NoAccess();
}
$User->AccessRequest($cn,FICHE_READ);
if ( isset ($_POST['fd_id'])) {
$fiche_def=new fiche_def($cn,$_POST['fd_id']);
@ -75,9 +72,9 @@ if ( isset ($_POST['fd_id'])) {
//--
if ( $dattribut->ad_id == ATTR_DEF_ACCOUNT
&& isset ($_REQUEST['with_amount'])) {
$account=new poste ($cn,$dattribut->av_text);
$sql_periode=sql_filter_per($cn,$_REQUEST['from_periode'],$_REQUEST['to_periode'],'p_id','j_tech_per');
$solde= $account->GetSoldeDetail($sql_periode);
$solde= $detail->GetSoldeDetail($sql_periode);
printf(";% 10.2f;% 10.2f;% 10.2f",

View file

@ -136,7 +136,8 @@ if ( isset ( $_POST['search']) ) {
$Res=ExecSql($cn,$sql);
} else {
$e_fic_search=FormatString($e_fic_search);
$Res=ExecSql($cn,"$sql and upper(vw_name) like upper('%$e_fic_search%')");
$Res=ExecSql($cn,"$sql and ( upper(vw_name) like upper('%$e_fic_search%') or ".
"upper(quick_code) like upper('%$e_fic_search%'))" );
}
// Test whether rows are returned

View file

@ -47,11 +47,13 @@ echo '</div>';
include ("check_priv.php");
$cn=DbConnect($_SESSION['g_dossier']);
if ( $User->CheckAction($cn,FORM)==0){
/* Cannot Access */
NoAccess();
}
echo ShowMenuAdvanced("form.php");
// Get The priv on the selected folder
$User->AccessRequest($cn,FORM);
if ( isset ($_POST["record"] )) {
// echo '<DIV class="u_redcontent">';
AddForm($cn,$_POST);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before After
Before After

View file

@ -50,11 +50,11 @@ echo '<div class="u_tmenu">';
echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php");
echo '</div>';
$cn=DbConnect($_SESSION['g_dossier']);
if ( $User->CheckAction($cn,IMP_BQE)==0){
/* Cannot Access */
NoAccess();
}
echo ShowMenuAdvanced("import.php");
$User->AccessRequest($cn,IMP_BQE);
echo '<div class="lmenu">';
ShowMenuImport();

View file

@ -46,12 +46,8 @@ echo '</div>';
$cn=DbConnect($_SESSION['g_dossier']);
if ($User->CheckAction($cn,GJRN) == 0 ){
/* Cannot Access */
NoAccess();
exit -1;
}
$User->AccessRequest($cn,GJRN);
echo JS_SEARCH_POSTE;

View file

@ -46,11 +46,8 @@ echo '</div>';
include_once("check_priv.php");
$cn=DbConnect($_SESSION['g_dossier']);
if ( $User->CheckAction($cn,GJRN) == 0 ){
/* Cannot Access */
NoAccess();
exit -1;
}
$User->AccessRequest($cn,GJRN);
// Javascript
echo JS_SEARCH_POSTE;
if ( isset( $_GET['p_jrn'] )) {

View file

@ -44,15 +44,15 @@ echo '</div>';
$cn=DbConnect($_SESSION['g_dossier']);
if ( $User->CheckAction($cn,GJRN) == 0 ) {
/* Cannot Access */
NoAccess();
exit -1;
}
echo '<div class="u_subtmenu">';
echo ShowMenuAdvanced("jrn_update.php");
echo '</div>';
$User->AccessRequest($cn,GJRN);
echo '<div class="lmenu">';
MenuJrn($_SESSION['g_dossier']);
echo '</div>';

View file

@ -37,11 +37,8 @@ $User=new cl_user($rep);
$User->Check();
html_page_start($User->theme,"onLoad='window.focus();'");
if ( $User->CheckAction(DbConnect($_SESSION['g_dossier']),MPCMN) == 0 ) {
/* Cannot Access */
NoAccess();
exit -1;
}
$User->AccessRequest(DbConnect($_SESSION['g_dossier']),MPCMN);
include ("user_menu.php");

View file

@ -34,10 +34,7 @@ $User->Check();
// TODO a specific level of security for the "bilan" ???
// Change must be done here
if ($User->CheckAction($cn,IMP) == 0 ){
/* Cannot Access */
NoAccess();
}
$User->AccessRequest($cn,IMP);
header('Content-type: application/bin');
header('Content-Disposition: attachment;filename="declaration.bin"',FALSE);

View file

@ -61,12 +61,7 @@ include_once ("check_priv.php");
$cn=DbConnect($_SESSION['g_dossier']);
if ( $User->CheckAction($cn,PARM) == 0 ) {
/* Cannot Access */
NoAccess();
exit -1;
}
$User->AccessRequest($cn,PARM);
// First action
$p_action="";

View file

@ -43,11 +43,8 @@ include_once ("check_priv.php");
echo ShowMenuCompta($_SESSION['g_dossier'],"user_advanced.php");
$cn=DbConnect($_SESSION['g_dossier']);
if ( $User->CheckAction($cn,MPCMN) == 0 ) {
/* Cannot Access */
NoAccess();
exit -1;
}
echo JS_UPDATE_PCMN;
/* Store the p_start parameter */
if ( ! isset ( $_SESSION['g_start']) ) {
@ -63,6 +60,9 @@ if ( isset ($_GET['p_start'])) {
echo '<div class="u_subtmenu">';
echo ShowMenuAdvanced("pcmn_update.php?p_start=1");
echo '</div>';
$User->AccessRequest($cn,MPCMN);
echo '<div class="lmenu">';
ShowMenuPcmn($_SESSION['g_start']);
echo '</div>';

View file

@ -18,6 +18,7 @@
*/
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
/*! \file
* \brief Search a account in a popup window
*/

View file

@ -46,11 +46,8 @@ $User=new cl_user($rep);
$User->Check();
$bal=new Balance($cn);
if ( $User->CheckAction($cn,BALANCE) == 0)
{
NoAccess();
exit;
}
$User->AccessRequest($cn,BALANCE);
echo_debug('print_balance.php',__LINE__,"imp pdf journaux");
foreach ($_POST as $key=>$element) {
${"$key"}=$element;

78
html/quick_code_csv.php Normal file
View file

@ -0,0 +1,78 @@
<?php
/*
* 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
* \brief Send the poste list in csv
*/
include_once("ac_common.php");
include_once ("postgres.php");
include ('class_user.php');
include("class_fiche.php");
header('Content-type: application/csv');
header('Content-Disposition: attachment;filename="poste.csv"',FALSE);
/* Admin. Dossier */
$cn=DbConnect($_SESSION['g_dossier']);
$User=new cl_user($cn);
$User->Check();
$Fiche=new fiche($cn,$_REQUEST['f_id']);
$Fiche->getName();
list($array,$tot_deb,$tot_cred)=$Fiche->GetRow(
$_POST['from_periode'],
$_POST['to_periode']
);
if ( count($Fiche->row ) == 0 )
{
echo "Aucune donnée";
return;
}
echo '"Qcode;"'.
"\"Code interne\";".
"\"Date\";".
"\"Description\";".
"\"Débit\";".
"\"Crédit\"";
printf("\n");
foreach ( $Fiche->row as $op ) {
echo '"'.$op['j_qcode'].'";'.
'"'.$op['jr_internal'].'"'.";".
'"'.$op['j_date'].'"'.";".
'"'.$op['description'].'"'.";".
sprintf("%8.4f",$op['deb_montant']).";".
sprintf("%8.4f",$op['cred_montant']);
printf("\n");
}
$solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur";
$diff=abs($tot_deb-$tot_cred);
printf(
'"'."$solde_type".'"'.";".
sprintf("%8.4f",$diff).";".
sprintf("%8.4f",$tot_deb).";".
sprintf("%8.4f",$tot_cred)."\n");
exit;
?>

88
html/quick_code_pdf.php Normal file
View file

@ -0,0 +1,88 @@
<?php
/*
* 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
*/
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
// $Revision$
/*! \file
* \brief send the account list in PDF
*/
include_once("class_poste.php");
include_once("ac_common.php");
include_once("postgres.php");
include_once("class.ezpdf.php");
include_once("impress_inc.php");
require_once("class_fiche.php");
$cn=DbConnect($_SESSION['g_dossier']);
foreach ($_POST as $key=>$element) {
${"$key"}=$element;
}
$ret="";
$pdf=& new Cezpdf();
$pdf->selectFont('./addon/fonts/Helvetica.afm');
echo_debug("quick_code_pdf",__LINE__,$f_id);
$Fiche=new fiche($cn,$f_id);
list($array,$tot_deb,$tot_cred)=$Fiche->GetRow($from_periode,$to_periode);
// don't print empty account
if ( count($array) == 0 ) {
continue;
}
$Libelle=sprintf("(%s) %s ",$Fiche->id,$Fiche->getName());
// $pdf->ezText($Libelle,30);
$pdf->ezTable($array,
array ('jr_internal'=>'Opération',
'j_date' => 'Date',
'jrn_name'=>'Journal',
'description'=>'Description',
'deb_montant'=> 'Montant',
'cred_montant'=> 'Montant'
),$Libelle,
array('shaded'=>0,'showHeadings'=>1,'width'=>500,
'cols'=>array('montant'=> array('justification'=>'right'),
)));
$str_debit=sprintf("Débit % 12.2f",$tot_deb);
$str_cred=sprintf("Crédit % 12.2f",$tot_cred);
$diff_solde=$tot_deb-$tot_cred;
if ( $diff_solde < 0 ) {
$solde=" C ";
$diff_solde*=-1;
} else
{
$solde=" D ";
}
$str_solde=sprintf(" Solde %s %12.2f",$solde,$diff_solde);
$pdf->ezText($str_debit,10,array('justification'=>'right'));
$pdf->ezText($str_cred,10,array('justification'=>'right'));
$pdf->ezText($str_solde,14,array('justification'=>'right'));
//New page
$pdf->ezNewPage();
$pdf->ezStream();
?>

View file

@ -43,11 +43,8 @@ include_once ("class_user.php");
$User=new cl_user($rep);
$User->Check();
// Check Priv
if ( $User->CheckAction($cn,SECU) == 0 ) {
/* Cannot Access */
NoAccess();
exit -1;
}
$User->AccessRequest($cn,SECU);
//-----------------------------------------------------
// Get User's info
if ( ! isset($_GET['user_id']) )

View file

@ -18,6 +18,8 @@
*/
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
include_once ("ac_common.php");
require_once("check_priv.php");
/* $Revision$ */
/*! \file
* \brief Obsolete
@ -38,10 +40,7 @@ $User->Check();
include_once ("postgres.php");
echo_debug('user_advanced.php',__LINE__,"user is ".$_SESSION['g_user']);
$rep=DbConnect();
include_once ("class_user.php");
$User=new cl_user($rep);
$User->Check();
// We don't check permissions here in fact, permission are tested in the
// functions
@ -57,6 +56,9 @@ echo ShowMenuAdvanced();
if ( isset($_REQUEST['p_action']) && $_REQUEST['p_action'] == "periode" ) {
if ( $User->admin == 0 && CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],GESTION_PERIODE) == 0 )
NoAccess();
$p_action=$_REQUEST['p_action'];
include_once("periode.inc.php");
}

View file

@ -65,12 +65,8 @@ echo "</DIV>";
include_once("impress_inc.php");
if ( $User->admin == 0 ) {
if (CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],IMP) == 0 ){
/* Cannot Access */
NoAccess();
}
}
$User->AccessRequest(DbConnect($_SESSION['g_dossier']),IMP);
// something is choosen
$default=( isset ($_REQUEST['type']))?$_REQUEST['type']:"";

View file

@ -17,7 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
/*! \file
* \brief Main page for encoding in the ledger
*/
@ -54,12 +56,14 @@ echo '</div>';
if ( $User->admin == 0 ) {
// check if user can access
// Acces Grand livre
if ($p_jrn == -1 && CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],ENCJRN) == 0 ){
if ($jrn_type== 'NONE' && CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],ENCJRN) == 0 ){
/* Cannot Access */
NoAccess();
}
// if a jrn is asked
if ( $p_jrn != -1 && CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$p_jrn) == 0 ){
if ( $jrn_type != 'NONE' && CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],$p_jrn) == 0 ){
/* Cannot Access */
NoAccess();
exit -1;
@ -67,14 +71,6 @@ if ( $User->admin == 0 ) {
}
// Show the available jrn
// $result=ShowJrn("user_jrn.php?jrn_type=".$jrn_type);
// echo "<div class=\"u_subtmenu\">";
// echo $result;
// echo "</div>";
// if a journal is selected show the journal's menu
if ( $p_jrn != -1 )
{

View file

@ -17,7 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
/*! \file
* \brief Set the security for an user
*/

View file

@ -198,12 +198,21 @@ function html_button_logout() {
*/
function NoAccess()
function NoAccess($js=0)
{
echo "<script>";
echo "alert ('Cette action ne vous est pas autorisée Contactez votre responsable');";
echo "</script>";
exit -1;
if ( $js == 1 )
{
echo "<script>";
echo "alert ('Cette action ne vous est pas autorisée Contactez votre responsable');";
echo "</script>";
}
else
{
echo '<div class="u_redcontent">';
echo '<h2 class="error"> Cette action ne vous est pas autorisée Contactez votre responsable</h2>';
echo '</div>';
}
exit -1;
}
/*!
* \brief Fix the problem with the quote char for the database

View file

@ -16,7 +16,9 @@
* 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
require_once("class_admin.php");
$sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"";
@ -117,11 +119,22 @@ if ( $sub_action == "list" )
$w->name="fd_id";
$w->value= make_array($cn,"select fd_id,fd_label from fiche_def where ".
" frd_id=".FICHE_TYPE_ADM_TAX);
echo $w->IOValue();
if ( count($w->value) != 0 )
{
?>
<input type="hidden" name="sa" value="blank">
<input type="submit" name="submit_query" value="Ajout Sup">
<?
echo $w->IOValue();
}
else
{
echo '<p style="color:red">Aucune fiche de catégories Administration</p>';
echo 'allez dans fiche -> creation et choississez Administration comme cat&eacute;gorie';
}
?>
</form>
</span>
<?php

View file

@ -30,11 +30,9 @@ include_once ("ac_common.php");
include_once("preference.php");
include_once ("class_widget.php");
include_once("class_balance.php");
if ( $User->CheckAction($cn,BALANCE) == 0)
{
NoAccess();
exit;
}
$User->AccessRequest($cn,BALANCE);
echo '<div class="u_content">';
//-----------------------------------------------------

View file

@ -132,7 +132,10 @@ function CheckJrn($p_dossier,$p_user,$p_jrn,$p_detail=False)
}
/*!
* \brief Check if an user is allowed to do an action
* \brief Check if an user is allowed to do an action,
* this function is only used by the user_sec.php,
* otherwise you have to use cl_user->CheckAction
* or $cl_user->AccessRequest
*
* \param p_dossier dossier id
* \param p_login user's login
@ -153,6 +156,7 @@ function CheckAction ( $p_dossier,$p_login,$p_action_id)
if ( $Count == 1 ) return 1;
echo "<H2 class=\"error\"> Invalid action !!! $Count select * from user_sec_act where ua_login='$p_login' and ua_act_id=$p_action_id </H2>";
}
/*!
* \brief Check if an user is an administrator
*

View file

@ -17,6 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* $Revision$ */
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
include_once("class_attribut.php");
require_once('class_fiche_def.php');
@ -39,7 +40,7 @@ class fiche {
var $fiche_def; /*! \enum $fiche_def fd_id */
var $attribut; /*! \enum $attribut array of attribut object */
var $fiche_def_ref; /*!\enum $fiche_def_ref Type of the card here always FICHE_TYPE_CONTACT */
var $row; /*! \enum All the row from the ledgers */
function fiche($p_cn,$p_id=0) {
$this->cn=$p_cn;
$this->id=$p_id;
@ -455,7 +456,10 @@ class fiche {
{
echo_debug("insert ATTR_DEF_ACCOUNT");
$v=FormatString($value);
if ( isNumber($v) == 1 )
if (
isNumber($v) == 1 &&
CountSql($this->cn,"select * from tmp_pcmn where pcm_val=$v")
)
{
$sql=sprintf("select account_insert(%d,%f)",
$this->id,$v);
@ -465,8 +469,8 @@ class fiche {
$sql=sprintf("select account_insert(%d,null)",
$this->id);
}
$Ret=ExecSql($this->cn,$sql);
ExecSql($this->cn,$sql);
continue;
}
// TVA
@ -711,6 +715,190 @@ class fiche {
return $result[0]['frd_id'];
}
/*!
* \brief Get data for poste
*
* \param $p_from periode from
* \param $p_to end periode
* \param $p_qcode quick_code of the card
* \return double array (j_date,deb_montant,cred_montant,description,jrn_name,j_debit,jr_internal)
* (tot_deb,tot_credit
*
*/
function GetRow($p_from,$p_to)
{
if ( $this->id == 0 )
{
echo_error("class_fiche",__LINE__,"id is 0");
return;
}
$qcode=$this->strAttribut(ATTR_DEF_QUICKCODE);
$periode=sql_filter_per($this->cn,$p_from,$p_to,'p_id','jr_tech_per');
$Res=ExecSql($this->cn,"select to_char(j_date,'DD.MM.YYYY') as j_date,j_qcode,".
"case when j_debit='t' then j_montant else 0 end as deb_montant,".
"case when j_debit='f' then j_montant else 0 end as cred_montant,".
" jr_comment as description,jrn_def_name as jrn_name,".
"j_debit, jr_internal ".
" from jrnx left join jrn_def on jrn_def_id=j_jrn_def ".
" left join jrn on jr_grpt_id=j_grpt".
" where j_qcode='".$qcode."' and ".$periode.
" order by j_date::date");
$array=array();
$tot_cred=0.0;
$tot_deb=0.0;
$Max=pg_NumRows($Res);
if ( $Max == 0 ) return null;
for ($i=0;$i<$Max;$i++) {
$array[]=pg_fetch_array($Res,$i);
if ($array[$i]['j_debit']=='t') {
$tot_deb+=$array[$i]['deb_montant'] ;
} else {
$tot_cred+=$array[$i]['cred_montant'] ;
}
}
$this->row=$array;
return array($array,$tot_deb,$tot_cred);
}
/*!
* \brief HtmlTable, display a HTML of a card for the asked period
* \param none
*
* \return none
*/
function HtmlTable()
{
$name=$this->getName();
list($array,$tot_deb,$tot_cred)=$this->GetRow( $_POST['from_periode'],
$_POST['to_periode']
);
if ( count($this->row ) == 0 )
return;
$rep="";
echo '<h2 class="info">'.$this->id." ".$name.'</h2>';
echo "<TABLE class=\"result\" width=\"100%\">";
echo "<TR>".
"<TH> Code interne </TH>".
"<TH> Date</TH>".
"<TH> Description </TH>".
"<TH> Débit </TH>".
"<TH> Crédit </TH>".
"</TR>";
foreach ( $this->row as $op ) {
echo "<TR>".
"<TD>".$op['jr_internal']."</TD>".
"<TD>".$op['j_date']."</TD>".
"<TD>".$op['description']."</TD>".
"<TD>".$op['deb_montant']."</TD>".
"<TD>".$op['cred_montant']."</TD>".
"</TR>";
}
$solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur";
$diff=round(abs($tot_deb-$tot_cred),2);
echo "<TR>".
"<TD>$solde_type</TD>".
"<TD>$diff</TD>".
"<TD></TD>".
"<TD>$tot_deb</TD>".
"<TD>$tot_cred</TD>".
"</TR>";
echo "</table>";
return;
}
/*!
* \brief Display HTML Table Header (button)
*
* \return none
*/
function HtmlTableHeader()
{
$submit=new widget();
$hid=new widget("hidden");
echo '<div class="noprint">';
echo "<table >";
echo '<TR>';
echo '<TD><form method="GET" ACTION="">'.
$submit->Submit('bt_other',"Autre poste").
$hid->IOValue("type","poste").$hid->IOValue('p_action','impress')."</form></TD>";
echo '<TD><form method="POST" ACTION="quick_code_pdf.php">'.
$submit->Submit('bt_pdf',"Export PDF").
$hid->IOValue("type","poste").
$hid->IOValue('p_action','impress').
$hid->IOValue("f_id",$this->id).
$hid->IOValue("from_periode",$_POST['from_periode']).
$hid->IOValue("to_periode",$_POST['to_periode']);
echo "</form></TD>";
echo '<TD><form method="POST" ACTION="quick_code_csv.php">'.
$submit->Submit('bt_csv',"Export CSV").
$hid->IOValue("type","poste").
$hid->IOValue('p_action','impress').
$hid->IOValue("f_id",$this->id).
$hid->IOValue("from_periode",$_POST['from_periode']).
$hid->IOValue("to_periode",$_POST['to_periode']);
echo "</form></TD>";
echo "</table>";
echo '</div>';
}
/*!
* \brief give the balance of an card
* \return
* balance of the card
*
*/
function GetSoldeDetail($p_cond="") {
if ( $this->id == 0 ) exit('fiche->id est nul');
$qcode=$this->strAttribut(ATTR_DEF_QUICKCODE);
if ( $p_cond != "") $p_cond=" and ".$p_cond;
$Res=ExecSql($this->cn,"select sum(deb) as sum_deb, sum(cred) as sum_cred from
( select j_poste,
case when j_debit='t' then j_montant else 0 end as deb,
case when j_debit='f' then j_montant else 0 end as cred
from jrnx
where
j_qcode = ('$qcode'::text)
$p_cond
) as m ");
$Max=pg_NumRows($Res);
if ($Max==0) return 0;
$r=pg_fetch_array($Res,0);
return array('debit'=>$r['sum_deb'],
'credit'=>$r['sum_cred'],
'solde'=>abs($r['sum_deb']-$r['sum_cred']));
}
/*!
* \brief get the fd_id of the card : fd_id
* \param none
*
* \return none
*/
function get_categorie()
{
if ( $this->id == 0 ) exit('class_fiche : f_id = 0 ');
$sql='select fd_id from fiche where f_id='.$this->id;
$R=getDbValue($this->cn,$sql);
if ( $R == "" )
$this->fd_id=0;
else
$this->fd_id=$R;
}
}
?>

View file

@ -234,49 +234,49 @@ function GetSoldeDetail($p_cond="") {
return;
}
}
/*!
* \brief Display HTML Table Header (button)
* \param poste_id
*
* \return none
*/
function HtmlTableHeader($p_poste)
{
$submit=new widget();
$hid=new widget("hidden");
echo '<div class="noprint">';
echo "<table >";
echo '<TR>';
echo '<TD><form method="GET" ACTION="">'.
$submit->Submit('bt_other',"Autre poste").
$hid->IOValue("type","poste").$hid->IOValue('p_action','impress')."</form></TD>";
/*!
* \brief Display HTML Table Header (button)
*
* \return none
*/
function HtmlTableHeader()
{
$submit=new widget();
$hid=new widget("hidden");
echo '<div class="noprint">';
echo "<table >";
echo '<TR>';
echo '<TD><form method="POST" ACTION="poste_pdf.php">'.
$submit->Submit('bt_pdf',"Export PDF").
$hid->IOValue("type","poste").
$hid->IOValue('p_action','impress').
$hid->IOValue("poste_id",$p_poste).
$hid->IOValue("from_periode",$_POST['from_periode']).
$hid->IOValue("to_periode",$_POST['to_periode']);
if (isset($_POST['poste_fille']))
echo $hid->IOValue('poste_fille','on');
echo "</form></TD>";
echo '<TD><form method="POST" ACTION="poste_csv.php">'.
$submit->Submit('bt_csv',"Export CSV").
$hid->IOValue("type","poste").
$hid->IOValue('p_action','impress').
$hid->IOValue("poste_id",$p_poste).
$hid->IOValue("from_periode",$_POST['from_periode']).
$hid->IOValue("to_periode",$_POST['to_periode']);
if (isset($_POST['poste_fille']))
echo $hid->IOValue('poste_fille','on');
echo "</form></TD>";
echo "</table>";
echo '</div>';
}
echo '<TD><form method="GET" ACTION="">'.
$submit->Submit('bt_other',"Autre poste").
$hid->IOValue("type","poste").$hid->IOValue('p_action','impress')."</form></TD>";
echo '<TD><form method="POST" ACTION="poste_pdf.php">'.
$submit->Submit('bt_pdf',"Export PDF").
$hid->IOValue("type","poste").
$hid->IOValue('p_action','impress').
$hid->IOValue("poste_id",$_POST['poste_id']).
$hid->IOValue("from_periode",$_POST['from_periode']).
$hid->IOValue("to_periode",$_POST['to_periode']);
if (isset($_POST['poste_fille']))
echo $hid->IOValue('poste_fille','on');
echo "</form></TD>";
echo '<TD><form method="POST" ACTION="poste_csv.php">'.
$submit->Submit('bt_csv',"Export CSV").
$hid->IOValue("type","poste").
$hid->IOValue('p_action','impress').
$hid->IOValue("poste_id",$_POST['poste_id']).
$hid->IOValue("from_periode",$_POST['from_periode']).
$hid->IOValue("to_periode",$_POST['to_periode']);
if (isset($_POST['poste_fille']))
echo $hid->IOValue('poste_fille','on');
echo "</form></TD>";
echo "</table>";
echo '</div>';
}
}

View file

@ -247,6 +247,7 @@ function GetPreferences ()
if ( $Count == 0 ) return 0;
if ( $Count == 1 ) return 1;
echo "<H2 class=\"error\"> Invalid action !!! $Count select * from user_sec_act where ua_login='$p_login' and ua_act_id=$p_action_id </H2>";
exit();
}
/*!
**************************************************
@ -364,16 +365,29 @@ function getExercice()
* otherwise warn and exit
* \param $p_cn database connx
* \param $action_id
* \param $p_js = 1 javascript, or 0 just a text
* \return nothing the program exits automatically
*/
function AccessRequest($p_cn,$p_action)
function AccessRequest($p_cn,$p_action,$p_js=0)
{
if ( $this->CheckAction($p_cn,$p_action)==0 )
{
echo "<script>";
echo "alert ('Cette action ne vous est pas autorisée. Contactez votre responsable');";
echo "</script>";
exit(-1);
if ( $p_js == 1 )
{
echo "<script>";
echo "alert ('Cette action ne vous est pas autorisée. Contactez votre responsable');";
echo "</script>";
}
else
{
echo '<div class="u_redcontent">';
echo '<h2 class="error"> Cette action ne vous est pas autorisée Contactez votre responsable</h2>';
echo '</div>';
}
exit(-1);
}
}
}

View file

@ -16,7 +16,9 @@
* 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
@ -98,7 +100,6 @@ class widget {
$this->table=0;
$this->label="";
$this->disabled=false;
$this->tabindex=32767;
}
function SetReadOnly($p_read) {
$this->readonly=$p_read;
@ -123,7 +124,7 @@ class widget {
$disabled = $this->disabled ? "DISABLED" : "";
if (strtoupper($this->type)=="TEXT") {
if ( $this->readonly==false) {
$r="<INPUT style=\"border:solid 1px blue;\" TYPE=\"TEXT\" NAME=\"$this->name\" VALUE=\"$this->value\" TABINDEX=\"$this->tabindex\" SIZE=\"$this->size\" ".$disabled.">";} else {
$r="<INPUT style=\"border:solid 1px blue;\" TYPE=\"TEXT\" NAME=\"$this->name\" VALUE=\"$this->value\" SIZE=\"$this->size\" ".$disabled.">";} else {
$r=sprintf('<span>%s</span><input type="hidden" name="%s" value="%s">', $this->value,$this->name,$this->value);
}
@ -380,7 +381,9 @@ class widget {
<INPUT TYPE="button" onClick=NewCard(\'%s\',\'%s\',\'%s\',\'%s\') value="Nouveau">
</TD><TD>
<INPUT TYPE="button" onClick=SearchCard(\'%s\',\'%s\',\'%s\',\'%s\') value="Recherche">
%s <INPUT style="border:solid 1px blue;" TYPE="Text" NAME="%s" VALUE="%s" SIZE="8" TABINDEX="%s" onChange="alert(\'change\');">
%s <INPUT style="border:solid 1px blue;" TYPE="Text" NAME="%s" VALUE="%s" SIZE="8" >
',
$l_sessid,
$this->extra, // deb or cred
@ -392,8 +395,7 @@ class widget {
$this->extra2,
$this->label,
$this->name,
$this->value,
$this->tabindex
$this->value
);
} else {
// readonly == true
@ -422,7 +424,7 @@ class widget {
$r=sprintf('<TD>
<INPUT TYPE="button" onClick=SearchCard(\'%s\',\'%s\',\'%s\',\'%s\') value="QuickCode">
%s</TD><TD> <INPUT style="border:solid 1px blue;" TYPE="Text" style="border:solid 1px blue;" '.
' NAME="%s" VALUE="%s" SIZE="8" TABINDEX="%s">
' NAME="%s" VALUE="%s" SIZE="8" >
',
$l_sessid,
$this->extra,
@ -430,8 +432,7 @@ class widget {
$this->extra2,
$this->label,
$this->name,
$this->value,
$this->tabindex
$this->value
);
}
else
@ -439,15 +440,14 @@ class widget {
$r=sprintf('
<INPUT TYPE="button" onClick=SearchCard(\'%s\',\'%s\',\'%s\',\'%s\') value="QuickCode">
%s <INPUT TYPE="Text" style="border:solid 1px blue;" '.
' NAME="%s" VALUE="%s" SIZE="8" TABINDEX="%s"> ',
' NAME="%s" VALUE="%s" SIZE="8" > ',
$l_sessid,
$this->extra,
$this->name,
$this->extra2,
$this->label,
$this->name,
$this->value,
$this->tabindex
$this->value
);
}
} else {

View file

@ -18,6 +18,7 @@
*/
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
// $Revision$
/*! \file
* \brief Contains all the variable + the javascript
* and some parameter
@ -55,6 +56,8 @@ define ("CENTRALIZE",10);
define ("VEN",11);
define ("BQE",12);
define ("ODS",13);
// Access gestion periode comptable
define ("GESTION_PERIODE",31);
//!\enum Security
define("SEC_ACTION", 28); // Module Suivi Document

View file

@ -16,7 +16,9 @@
* 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
//!\brief File for adding contact, contact is a kind of fiche
require_once('class_contact.php');
@ -133,7 +135,7 @@ if ( $sub_action == "list" )
// if array is empty show an warning and stops
if ( sizeof ($w->value) == 0 ) {
echo '<p style="color:red">Aucune fiche de catégories contact</p>';
echo '<p>allez dans comptabilité -> fiche creation et choississez contact comme sorte</p>';
echo '<p>allez dans fiche creation et choississez contact comme sorte</p>';
exit();
}
echo $w->IOValue();

View file

@ -164,7 +164,7 @@ if ( isset ( $_GET["action"]) ) {
&& ! isset ($_POST['add_fiche'])
&& ! isset ($_POST['update_fiche'])
&& ! isset ($_POST['delete'])) {
ShowRecherche();
echo '<DIV class="u_redcontent">';
$fiche_def=new fiche_def($cn,$_GET['fiche']);
$fiche_def->myList();
@ -185,6 +185,11 @@ if ( isset ( $_GET["action"]) ) {
}
$str="";
$fiche=new fiche($cn,$_GET["fiche_id"]);
$fiche->get_categorie();
$fiche_def=new fiche_def($cn,$fiche->fd_id);
$fiche_def->Get();
echo '<h2 class="info">'.$fiche_def->label.'</h2>';
if ( $_SESSION['g_pagesize'] != -1 ){
// retrieve value
// with offet &offset=15&step=15&page=2&size=15
@ -281,6 +286,9 @@ if ( isset ($_POST["fiche"]) && isset ($_POST["add"] ) ) {
echo "<h2 class=\"error\"> Pas d'accès </h2>";
else
{
$fiche_def=new fiche_def($cn,$_POST['fiche']);
$fiche_def->Get();
echo '<h2 class="info">'.$fiche_def->label.'</h2>';
$url=$_SERVER['REQUEST_URI'];
$fiche=new fiche($cn,0);
@ -340,7 +348,7 @@ if ( isset ($_POST["add_fiche"]) ) {
//------------------------------------------------------------------------------
// Update a card
if ( isset ($_POST["update_fiche"]) ) {
ShowRecherche();
echo '<DIV class="u_redcontent">';
if ( $write ==0)
echo "<h2 class=\"error\"> Pas d'accès </h2>";

View file

@ -17,7 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
/*! \file
* \brief Main page for the printing
*/
@ -43,15 +45,10 @@ $result=ShowItem($p_array,'H',"cell","mtitle",$default);
echo $result;
echo "</DIV>";
$cn=DbConnect($_SESSION['g_dossier']);
$User->AccessRequest($cn,IMP);
if ( $User->admin == 0 ) {
if (CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],IMP) == 0 ){
/* Cannot Access */
NoAccess();
}
}
include_once("impress_inc.php");

View file

@ -75,7 +75,9 @@ if ( isset ($_REQUEST['fd_id'])) {
$hid->IOValue("type","fiche").
$fiche_id->IOValue("fd_id",$_REQUEST['fd_id']).
$hid->IOValue("with_amount");
echo '<p><i> Attention: les soldes ne tiennent pas compte des journaux OD qui '.
'n\'utilisent pas les quick codes, les soldes des postes sont dans impression->poste</i></p>';
echo "</form>";
}
@ -112,9 +114,9 @@ if ( isset ($_REQUEST['fd_id'])) {
if ( $dattribut->ad_id == ATTR_DEF_ACCOUNT &&
$with_amount) {
$account=new poste ($cn,$dattribut->av_text);
$sql_periode=sql_filter_per($cn,$_REQUEST['from_periode'],$_REQUEST['to_periode'],'p_id','j_tech_per');
$solde= $account->GetSoldeDetail($sql_periode);
$solde= $detail->GetSoldeDetail($sql_periode);
printf ("<td align=\"right\">% 10.2f</td>",$solde['debit']);
printf ("<td align=\"right\">% 10.2f</td>",$solde['credit']);

View file

@ -42,7 +42,7 @@ if ( isset( $_POST['bt_html'] ) ) {
{
$parent=$_POST['poste_id'];
$a_poste=getarray($cn,"select pcm_val from tmp_pcmn where pcm_val like '$parent%'");
$go=2;
$go=3;
}
// Check if the post is numeric and exists
elseif ( CountSql($cn,'select * from tmp_pcmn where pcm_val='.FormatString($_POST['poste_id'])) != 0 )
@ -54,35 +54,47 @@ if ( isset( $_POST['bt_html'] ) ) {
{
require_once("class_fiche.php");
// thanks the qcode we found the poste account
$fiche=new fiche($cn,$_POST['f_id']);
$fiche->GetByQCode($_POST['f_id']);
$fiche=new fiche($cn);
$qcode=$fiche->GetByQCode($_POST['f_id']);
$p=$fiche->strAttribut(ATTR_DEF_ACCOUNT);
if ( $p != "- ERROR -") {
$Poste=new poste($cn,$p);
$go=1;
$go=2;
}
}
// A account or a quick code is given
// A account is given
if ( $go == 1)
{
echo '<div class="u_content">';
HtmlTableHeader($_POST['poste_id']);
$Poste->HtmlTableHeader();
$Poste->HtmlTable();
HtmlTableHeader($_POST['poste_id']);
$Poste->HtmlTableHeader();
echo "</div>";
exit;
}
// A QuickCode is given
if ( $go == 2)
{
echo '<div class="u_content">';
$fiche->HtmlTableHeader();
$fiche->HtmlTable($qcode);
$fiche->HtmlTableHeader();
echo "</div>";
exit;
}
// All the children account
if ( $go == 2 )
if ( $go == 3 )
{
if ( sizeof($a_poste) == 0 )
exit;
echo '<div class="u_content">';
HtmlTableHeader($_POST['poste_id']);
$Poste=new poste($cn,$_POST['poste_id']);
$Poste->HtmlTableHeader($_POST['poste_id']);
$Poste->HtmlTable();
foreach ($a_poste as $poste_id )
@ -90,7 +102,7 @@ if ( isset( $_POST['bt_html'] ) ) {
$Poste=new poste ($cn,$poste_id['pcm_val']);
$Poste->HtmlTable();
}
HtmlTableHeader($_POST['poste_id']);
$Poste->HtmlTableHeader($_POST['poste_id']);
echo "</div>";
exit;

View file

@ -17,7 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
/*! \file
* \brief work with the ledger
*/

View file

@ -18,7 +18,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
/*!\file
* \brief Manage the stock by year
*/
@ -46,16 +48,6 @@ $User->Check();
// Synchronize rights
SyncRight($_SESSION['g_dossier'],$_SESSION['g_user']);
// Get The priv on the selected folder
if ( $User->admin == 0 ) {
$r=CheckAction($_SESSION['g_dossier'],$_SESSION['g_user'],STOCK_READ);
if ($r == 0 ){
/* Cannot Access */
NoAccess();
}
}
$href=basename($_SERVER['PHP_SELF']);
if ($href=='compta.php')
@ -70,6 +62,9 @@ if ($href=='compta.php')
//echo '<div class="lmenu">';
echo $left_menu;
}
// Get The priv on the selected folder
$User->AccessRequest($cn,STOCK_READ);
$action= ( isset ($_GET['action']))? $_GET['action']:"";
include_once("stock_inc.php");
@ -135,7 +130,7 @@ if ( isset ($_POST['sub_change']))
$action="detail";
}
}
echo JS_VIEW_JRN_MODIFY;
// View the summary
// if year is not set then use the year of the user's periode

View file

@ -28,7 +28,8 @@
* \brief show the listing of all goods
*
*
*\param - database connection
*\param $cn database connection
* \param $p_year exercice
* -
* \return string containing the table
*/
@ -187,7 +188,6 @@ $sql="select sg_code,
$r.="<TR>";
$r.="<th>Date </th>";
$r.="<th>Entrée / Sortie </th>";
$r.="<th></th>";
$r.="<th>Description</th>";
$r.="<th>Op&eacute;ration</th>";
$r.="<th>Montant</th>";
@ -211,6 +211,12 @@ $sql="select sg_code,
$r.=($l['sg_type']=='c')?'OUT':'IN';
$r.="</TD>";
// comment
$r.="<TD>";
$r.=$l['comment'];
$r.="</TD>";
// jr_internal
$r.="<TD>";
if ( $l['jr_id'] != "")
@ -221,27 +227,22 @@ $sql="select sg_code,
$r.="</TD>";
// comment
$r.="<TD>";
$r.=$l['comment'];
$r.="</TD>";
//amount
$r.="<TD>";
$r.='<TD align="right">';
$r.=$l['j_montant'];
$r.="</TD>";
//quantity
$r.="<TD>";
$r.='<TD align="right">';
$r.=$l['sg_quantity'];
$r.="</TD>";
// Unit Price
$r.="<TD>";
$r.='<TD align="right">';
$up="";
if ( $l['sg_quantity'] != 0 )
$up=round($l['j_montant']/$l['sg_quantity'],4);
$r.=$up;
$r.=sprintf("%.4f",$up);
$r.="</TD>";
$r.="</TR>";

View file

@ -16,7 +16,9 @@
* 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
require_once("class_supplier.php");
$sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"";

View file

@ -30,8 +30,6 @@ include_once("class_user.php");
require_once("jrn.php");
$cn=DbConnect($_SESSION['g_dossier']);
if (CheckJrn($_SESSION['g_dossier'],$_SESSION['g_user'],0) < 1 )
{NoAccess();exit -1;}
?>
<div class="u_redcontent">

View file

@ -17,7 +17,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
/*! \file
* \brief Manage the ledger of type VEN
*/

View file

@ -16,7 +16,9 @@
* 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
include_once("postgres.php");
@ -995,6 +997,10 @@ function jrn_navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1)
// if max page == 1 then return a empty string
if ( $nb_page == 1) return "";
// restore the sort
if ( isset($_GET['o']))
$url=$url.'&o='.$_GET['o'];
$r="";
// previous
if ($p_page !=1) {

View file

@ -16,7 +16,9 @@
* 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
require_once("constant.php");
require_once("class_widget.php");

View file

@ -25,6 +25,7 @@
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
/* $Revision$ */
/*!
* \brief Show all the available folder for the users
* at the login page
@ -256,6 +257,10 @@ function ShowMenuJrnUser($p_dossier,$p_type,$p_jrn,$p_extra="")
}
$Max=pg_NumRows($Ret);
// If you can't access any ledger, so you don't have access
if ( $Max == 0 )
NoAccess();
include_once("check_priv.php");
for ($i=0;$i<$Max;$i++) {
@ -424,15 +429,17 @@ function u_ShowMenuRecherche($p_cn,$p_jrn,$p_sessid,$p_array=null)
$r.= '<TD COLSPAN="3"> Date compris entre</TD> ';
$r.= "</TR> <TR>";
$r.= '<TD> <INPUT TYPE="TEXT" NAME="date_start" SIZE="10" VALUE="'.$p_date_start.'"></TD>';
$r.= '<TD> <INPUT TYPE="TEXT" NAME="date_end" size="10" Value="'.$p_date_end.'"></TD>';
$r.= '<TD>et <INPUT TYPE="TEXT" NAME="date_end" size="10" Value="'.$p_date_end.'"></TD>';
$r.= '</TD><TD>';
$r.= "</TR> <TR>";
$r.= "<TD> Montant ";
$r.= ' <SELECT NAME="mont_sel">'.$opt.' </SELECT></TD><TD>';
$r.= ' <INPUT TYPE="TEXT" NAME="s_montant" SIZE="10" VALUE="'.$p_s_montant.'"></TD>';
$r.= "</TR><TR>";
$r.="<TD> Internal code</td>";
$r.='<TD><input type="text" name="s_internal" value="'.$p_s_internal.'"></td>';
$r.= '</TR><TR valigne="top">';
$r.='<TD > Internal code </td>';
$r.='<TD ><input type="text" name="s_internal" value="'.$p_s_internal.'"></td>';
$r.='</TR><TR><TD colspan="2"><i>vous pouvez spécifier uniquement <br>une partie (VEN, num&eacute;ro d\'op&eacute;ration...)</i></td>';
$r.="</TD></TR></TABLE></td><TD><table>";