altocompta/html/commercial.php
Dany De Bontridder 38972238f8 Merged revisions 2872-2896 via svnmerge from
svn+ssh://danydb@svn/svn/phpcompta/branches/rel500

........
  r2874 | danydb | 2010-01-15 15:52:38 +0100 (Fri, 15 Jan 2010) | 3 lines
  
  The extra info are now available for ledger purchase, opportunity to clean
  code
........
  r2875 | danydb | 2010-01-15 19:51:33 +0100 (Fri, 15 Jan 2010) | 2 lines
  
  Fix bug : in rapport, the from doesn't work, the result is always 0
........
  r2876 | danydb | 2010-01-16 17:17:50 +0100 (Sat, 16 Jan 2010) | 1 line
  
  For Comptabilité->ACH and Comptabilité->VEN add shortcut to printing and customer/supplier
........
  r2877 | danydb | 2010-01-16 17:30:56 +0100 (Sat, 16 Jan 2010) | 2 lines
  
  Action : add search by type of documents
........
  r2878 | danydb | 2010-01-17 00:31:03 +0100 (Sun, 17 Jan 2010) | 1 line
  
  Fix bug : cannot choose a tva rate
........
  r2879 | danydb | 2010-01-20 22:37:11 +0100 (Wed, 20 Jan 2010) | 6 lines
  
  Action
  ======
  add a button for adding a card there is no filter on the category
  You can add whatever you want
........
  r2880 | danydb | 2010-01-21 16:10:57 +0100 (Thu, 21 Jan 2010) | 1 line
  
  Correct stylesheet : todo list 
........
  r2882 | danydb | 2010-01-21 16:15:54 +0100 (Thu, 21 Jan 2010) | 1 line
  
  Change Suivi Courrier by Suivi
........
  r2883 | danydb | 2010-01-21 16:38:42 +0100 (Thu, 21 Jan 2010) | 1 line
  
  Style color is now a copy of style light
........
  r2884 | danydb | 2010-01-22 12:54:57 +0100 (Fri, 22 Jan 2010) | 3 lines
  
  Bug: cannot see all the follow up in the list
  Improve : border orange for today
........
  r2885 | danydb | 2010-01-22 13:03:36 +0100 (Fri, 22 Jan 2010) | 2 lines
  
  Remove debug info
........
  r2886 | danydb | 2010-01-22 13:12:54 +0100 (Fri, 22 Jan 2010) | 2 lines
  
  Fix bug : date order in todo list
........
  r2887 | danydb | 2010-01-22 13:14:02 +0100 (Fri, 22 Jan 2010) | 2 lines
  
  Improve fix order for todo list
........
  r2888 | danydb | 2010-01-22 15:30:39 +0100 (Fri, 22 Jan 2010) | 8 lines
  
  Fix bug : 
  * show all actions (no filter anymore)
  * Show interne if in an action there is no card
  Improve : 
  * todo list highlight today
  * calendar highlight today
            
........
  r2889 | danydb | 2010-01-22 23:21:39 +0100 (Fri, 22 Jan 2010) | 1 line
  
  Improve action : description can be enlarged for big note
........
  r2890 | danydb | 2010-01-22 23:39:28 +0100 (Fri, 22 Jan 2010) | 2 lines
  
  Improve : enlarge if description > 300 char
........
  r2891 | danydb | 2010-01-22 23:40:20 +0100 (Fri, 22 Jan 2010) | 2 lines
  
  improve : big desc if > 300 char
........
  r2892 | danydb | 2010-01-22 23:40:49 +0100 (Fri, 22 Jan 2010) | 1 line
  
  Improve Item forecast = 50
........
  r2893 | danydb | 2010-01-23 17:12:33 +0100 (Sat, 23 Jan 2010) | 1 line
  
  Update Documentation
........
  r2894 | danydb | 2010-01-23 19:36:53 +0100 (Sat, 23 Jan 2010) | 1 line
  
  Fix Bug : unknow tag for document : vent_art_tva_code
........
  r2895 | danydb | 2010-01-23 22:19:29 +0100 (Sat, 23 Jan 2010) | 1 line
  
  Add Example of invoice
........
  r2896 | danydb | 2010-01-23 22:20:22 +0100 (Sat, 23 Jan 2010) | 1 line
  
  Update logo
........
2010-01-23 21:49:50 +00:00

230 lines
6 KiB
PHP

<?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 Base of the module "Gestion", the p_action indicates what
* file must included and this file will manage the request
* (customer, supplier, contact,...)
*/
include_once ("ac_common.php");
require_once("constant.php");
require_once('class_database.php');
echo JS_AJAX_FICHE;
require_once('class_dossier.php');
$gDossier=dossier::id();
$g_name=dossier::name();
require_once('class_database.php');
/* Admin. Dossier */
$rep=new Database($gDossier);
require_once ("class_user.php");
$User=new User($rep);
$User->Check();
$User->check_dossier($gDossier);
//-----------------------------------------------------
// update preference
//-----------------------------------------------------
if ( isset ( $_POST['style_user']) ) {
$User->update_global_pref('THEME',$_POST['style_user']);
$_SESSION['g_theme']=$_POST['style_user'];
}
// Met a jour le pagesize
if ( isset ( $_POST['p_size']) ) {
$User->update_global_pref('PAGESIZE',$_POST['p_size']);
$_SESSION['g_pagesize']=$_POST['p_size'];
}
///
html_page_start($_SESSION['g_theme'],"","");
if ( ! isset ( $gDossier ) ) {
echo _("Vous devez choisir un dossier ");
exit -2;
}
include_once("user_menu.php");
$str_dossier=dossier::get();
$p_action=(isset ($_REQUEST['p_action']))?$_REQUEST['p_action']:"";
echo '<div class="u_tmenu">';
echo menu_tool('commercial.php');
echo '<div style="float:left;background-color:#879ED4;width:100%;">';
$def=0;
if ( isset($_REQUEST['p_action'])) {
switch($_REQUEST['p_action']) {
case'tdb':
$def=1;
break;
case'client':
$def=2;
break;
case'tdb':
$def=1;
break;
case'supplier':
$def=3;
break;
case'adm':
$def=4;
break;
case'stock':
$def=5;
break;
case'fiche':
$def=6;
break;
case'prev':
$def=7;
break;
case'suivi_courrier':
$def=8;
break;
case'impress':
$def=9;
break;
}
}
echo ShowItem(array(
array('?p_action=client&'.$str_dossier,_('Client'),'',2),
array('?p_action=supplier&'.$str_dossier,_('Fournisseur'),'',3),
array('?p_action=adm&'.$str_dossier,_('Administration'),'',4),
array('?p_action=impress&'.$str_dossier,_('Impression'),'',9),
array('?p_action=stock&'.$str_dossier,_('Stock'),'',5),
array('?p_action=fiche&'.$str_dossier,_('Fiche'),'',6),
array('?p_action=prev&'.$str_dossier,_('Prevision'),'',7),
array('?p_action=suivi_courrier&my_action&'.$str_dossier,_('Suivi'),'',8),
),
'H',"mtitle","mtitle",$def,' width="100%"');
echo '</div>';
echo '</div>';
$cn=new Database($gDossier);
echo JS_LEDGER;
echo JS_AJAX_FICHE;
//-----------------------------------------------------
// p_action == pref
//-----------------------------------------------------
if ( $p_action == "pref" )
{
require_once("pref.inc.php");
}
//-----------------------------------------------------
// p_action == impression
//-----------------------------------------------------
if ( $p_action == "impress" )
{
require_once("impress.inc.php");
}
//-----------------------------------------------------
// p_action == adm
//-----------------------------------------------------
if ( $p_action == "adm" )
{
$User->can_request(GEADM,1);
require_once("adm.inc.php");
}
//-----------------------------------------------------
// p_action == client
//-----------------------------------------------------
if ( $p_action == "client" )
{
$User->can_request(GECUST,1);
require_once("client.inc.php");
}
// $p_action == fournisseur
//-----------------------------------------------------
// Fournisseur
if ( $p_action == 'supplier')
{
$User->can_request(GESUPPL,1);
require_once("supplier.inc.php");
}
//-----------------------------------------------------
// action
if ( $p_action == 'suivi_courrier')
{
$User->can_request(GECOUR,1);
require_once("action.inc.php");
}
//-----------------------------------------------------
// Contact
if ( $p_action == 'fiche')
{
require_once("fiche.inc.php");
}
//-----------------------------------------------------
// Impression
if ( $p_action == 'impress')
{
if ( $User->check_action(IMPRAP)==1 ||
$User->check_action(IMPJRN)==1 ||
$User->check_action(IMPFIC)==1 ||
$User->check_action(IMPPOSTE)==1 ||
$User->check_action(IMPBIL)==1 )
require_once("impress.inc.php");
else
$User->can_request(9999,1);
}
if ( $p_action == 'fiche') {
require_once('fiche.inc.php');
}
if ( $p_action == 'stock') {
require_once('stock.inc.php');
}
if ( $p_action=='periode') {
if ( $User->check_action(PARPER)==1 ||
$User->check_action(PARCLO)==1)
require_once ('periode.inc.php');
else
$User->can_request(9999,1);
}
if ( $p_action=='central') {
$User->can_request(PARCENT,1);
require_once ('central.inc.php');
}
//-----------------------------------------------------
// Expense
if ( $p_action == 'defreport')
{
$User->can_request(PARPREDE,1);
require_once("report.inc.php");
}
/*----------------------------------------------------------------------
* Prevision
*
*----------------------------------------------------------------------*/
if ( $p_action=='prev') {
$User->can_request(PREVCON,1);
require_once ('forecast.inc.php');
}