phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r4817 - phpcompta/tags/rel601/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4817 - phpcompta/tags/rel601/include
Date: Tue, 1 May 2012 16:49:40 +0200 (CEST)

Author: danydb
Date: 2012-05-01 16:49:39 +0200 (Tue, 01 May 2012)
New Revision: 4817

Added:
   phpcompta/tags/rel601/include/category_card.inc.php
   phpcompta/tags/rel601/include/category_detail.inc.php
   phpcompta/tags/rel601/include/category_followup.inc.php
   phpcompta/tags/rel601/include/category_operation.inc.php
Removed:
   phpcompta/tags/rel601/include/adm_card.inc.php
   phpcompta/tags/rel601/include/client_card.inc.php
   phpcompta/tags/rel601/include/detail_adm.inc.php
   phpcompta/tags/rel601/include/detail_client.inc.php
   phpcompta/tags/rel601/include/detail_supplier.inc.php
   phpcompta/tags/rel601/include/operation_adm.inc.php
   phpcompta/tags/rel601/include/operation_client.inc.php
   phpcompta/tags/rel601/include/operation_supplier.inc.php
   phpcompta/tags/rel601/include/suivi_adm.inc.php
   phpcompta/tags/rel601/include/suivi_client.inc.php
   phpcompta/tags/rel601/include/suivi_supplier.inc.php
   phpcompta/tags/rel601/include/supplier_card.inc.php
Modified:
   phpcompta/tags/rel601/include/adm.inc.php
   phpcompta/tags/rel601/include/class_fiche.php
   phpcompta/tags/rel601/include/client.inc.php
   phpcompta/tags/rel601/include/supplier.inc.php
Log:
#569 r?\195?\169?\195?\169criture des menus fournisseur, client et adm


Modified: phpcompta/tags/rel601/include/adm.inc.php
===================================================================
--- phpcompta/tags/rel601/include/adm.inc.php   2012-04-24 19:51:04 UTC (rev 
4816)
+++ phpcompta/tags/rel601/include/adm.inc.php   2012-05-01 14:49:39 UTC (rev 
4817)
@@ -58,7 +58,7 @@
 
     $f_id=$_REQUEST['f_id'];
 
-    $fiche=new Customer($cn,$f_id);
+    $fiche=new Admin($cn,$f_id);
     $fiche->remove();
     $low_action="list";
 
@@ -82,7 +82,7 @@
        echo HtmlInput::request_to_hidden(array('ac'));
     $sel_card=new ISelect('cat');
     $sel_card->value=$cn->make_array('select fd_id, fd_label from fiche_def '.
-                                     ' where  frd_id='.FICHE_TYPE_ADM_TAX.' or 
frd_id ='.FICHE_TYPE_FIN.
+                                     ' where  frd_id='.FICHE_TYPE_ADM_TAX.
                                      ' order by fd_label ',1);
     $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1;
     $sel_card->javascript=' onchange="submit(this);"';
@@ -140,32 +140,11 @@
 if ( $low_action == 'detail')
 {
     /* Menu */
-    require_once('adm_card.inc.php');
+    require_once('category_card.inc.php');
     exit();
 }
 
-if ( $low_action=="insert" )
-{
-    /* security : check if user can add card */
-    if ( $g_user->check_action(FICADD) == 0 )
-    {
-        alert('Vous  ne pouvez pas ajouter de fiche');
-        return;
-    }
 
-    $customer=new Customer($cn);
-    $customer->Save($_REQUEST['fd_id']);
-    echo '<div class="content">';
-    echo "<table>";
-    echo $customer->Display(true);
-    echo "</table>";
-    $retour=new IAction();
-    $retour->label="Retour";
-    $retour->value="?p_action=adm&".dossier::get();
-    echo $retour->input();
-    echo '</div>';
 
-}
-
 html_page_stop();
 ?>

Deleted: phpcompta/tags/rel601/include/adm_card.inc.php
===================================================================
--- phpcompta/tags/rel601/include/adm_card.inc.php      2012-04-24 19:51:04 UTC 
(rev 4816)
+++ phpcompta/tags/rel601/include/adm_card.inc.php      2012-05-01 14:49:39 UTC 
(rev 4817)
@@ -1,151 +0,0 @@
-<?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 address@hidden
-
-/*!\file
- * \brief this file will handle all the actions for a specific customer (
- * contact,operation,invoice and financial)
- * include from client.inc.php and concerned only the customer card and
- * the customer category
- */
-require_once('class_contact.php');
-require_once('class_ipopup.php');
-$str_dossier=Dossier::get();
-
-/* $sub_action = sb = detail */
-/* $cn database conx */
-$return=new IAction();
-$return->name='retour';
-$return->label='Retour';
-$return->value='?ac='.$_REQUEST['ac'].'&'.$str_dossier;
-$root='?ac='.$_REQUEST['ac']."&sb=detail&f_id=".$_REQUEST["f_id"].'&'.$str_dossier;
-$ss_action=( isset ($_REQUEST['sc'] ))? $_REQUEST['sc']: '';
-switch ($ss_action)
-{
-case 'dc':
-    $def=1;
-    break;
-case 'sv':                     /* all the actions (mail,meeting...) */
-    $def=2;
-    break;
-case 'cn':
-    $def=3;
-    break;
-case 'op':
-    $def=4;
-    break;
-case 'bal':
-  $def=7;
-  break;
-case 'let':
-  $def=6;
-  break;
-default:
-    $def=1;
-    $ss_action='dc';
-}
-$f=new Fiche($cn,$_REQUEST['f_id']);
-echo '<div class="content">';
-echo ShowItem(array(
-                  array($root."&sc=dc",_('Fiche'),_('Détail de la fiche'),1),
-                  array($root.'&sc=sv',_('Suivi'),_('Suivi adm, devis, bon de 
commande, courrier'),2),
-                  array($root.'&sc=cn',_('Contact'),_('Liste de contacts de 
cette administration'),3),
-                  array($root.'&sc=op',_('Opérations'),_('Toutes les 
opérations'),4),
-                  array($root.'&sc=bal',_('Balance'),_('Balance du 
fournisseur'),7),
-                  array($root.'&sc=let',_('Lettrage'),_('Opérations & 
Lettrages'),6),
-                  array('?ac='.$_REQUEST['ac']."&".dossier::get(),_('Retour 
liste'),_('Retour à la liste des administration'),5)
-                  ),
-                  'H',"mtitle","mtitle",$def,' ');
-echo '</div>';
-echo '<div class="gest_name">';
-echo '<h2 class="gest_name">'.$f->get_quick_code()." 
".$f->strAttribut(ATTR_DEF_NAME).'</h2>';
-echo '</div>';
-echo '</div>';
-
-//---------------------------------------------------------------------------
-// Show Detail of a card and category
-//---------------------------------------------------------------------------
-if ( $ss_action == 'dc' )
-{
-    require_once('detail_adm.inc.php');
-}
-//---------------------------------------------------------------------------
-// Follow up : mail, bons de commande, livraison, rendez-vous...
-//---------------------------------------------------------------------------
-if ( $ss_action == 'sv' )
-{
-    require_once('suivi_adm.inc.php');
-}
-/*----------------------------------------------------------------------
- * Operation all the operation of this customer
- *
- * ----------------------------------------------------------------------*/
-if ( $ss_action == 'op')
-{
-    require_once('operation_adm.inc.php');
-}
-/*----------------------------------------------------------------------
- * All the contact
- *
- *----------------------------------------------------------------------*/
-if ( $ss_action == 'cn')
-{
-    echo '<div class="content">';
-    echo dossier::hidden();
-    $f=new Fiche($cn,$_REQUEST['f_id']);
-    $contact=new Contact($cn);
-    $contact->company=$f->get_quick_code();
-    echo $contact->summary("");
-
-    $sql=' select fd_id from fiche_def where frd_id='.FICHE_TYPE_CONTACT;
-    $filter=$cn->make_list($sql);
-    if ( empty ($filter))
-    {
-        echo '<span class="notice">';
-        echo _("Vous devez aller dans fiche et créer une catégorie pour les 
contacts");
-        echo '</span>';
-        exit();
-    }
-    /* Add button */
-    $f_add_button=new IButton('add_card');
-    $f_add_button->label=_('Créer une nouvelle fiche');
-    $f_add_button->set_attribute('ipopup','ipopcard');
-
-    $f_add_button->set_attribute('filter',$filter);
-    $f_add_button->javascript=" select_card_type(this);";
-
-    echo $f_add_button->input();
-    echo '</div>';
-}
-/*-------------------------------------------------------------------------
- * Balance of the card
- *-------------------------------------------------------------------------*/
-if ( $ss_action=='bal')
-  {
-    require_once('balance_card.inc.php');
-  }
-/*----------------------------------------------------------------------------
- * Lettering
- 
*----------------------------------------------------------------------------*/
-if ( $def==6 )
-{
-    require_once('lettering.gestion.inc.php');
-}

Added: phpcompta/tags/rel601/include/category_card.inc.php
===================================================================
--- phpcompta/tags/rel601/include/category_card.inc.php                         
(rev 0)
+++ phpcompta/tags/rel601/include/category_card.inc.php 2012-05-01 14:49:39 UTC 
(rev 4817)
@@ -0,0 +1,146 @@
+<?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: 4565 $ */
+
+// Copyright Author Dany De Bontridder address@hidden
+
+/*!\file
+ * \brief this file will handle all the actions for a specific customer (
+ * contact,operation,invoice and financial)
+ * include from client.inc.php and concerned only the customer card and
+ * the customer category
+ */
+require_once('class_contact.php');
+
+$str_dossier=Dossier::get();
+/* $sub_action = sb = detail */
+/* $cn database conx */
+$root='?ac='.$_REQUEST['ac']."&sb=detail&f_id=".$_REQUEST["f_id"].'&'.$str_dossier;
+$ss_action=( isset ($_REQUEST['sc'] ))? $_REQUEST['sc']: '';
+switch ($ss_action)
+{
+case 'dc':
+    $def=1;
+    break;
+case 'sv':                     /* all the actions (mail,meeting...) */
+    $def=2;
+    break;
+case 'cn':
+    $def=3;
+    break;
+case 'op':
+    $def=4;
+    break;
+case 'let':
+    $def=6;
+    break;
+case 'bal':
+  $def=7;
+  break;
+default:
+    $def=1;
+    $ss_action='dc';
+}
+$f=new Fiche($cn,$_REQUEST['f_id']);
+
+echo '<div class="content">';
+echo ShowItem(array(
+                  array($root."&sc=dc",_('Fiche'),_('Détail de la fiche'),1),
+                  array($root.'&sc=sv',_('Suivi'),_('Suivi Fournisseur, devis, 
bon de commande, courrier'),2),
+                  array($root.'&sc=cn',_('Contact'),_('Liste de contacts de ce 
fournisseur'),3),
+                  array($root.'&sc=op',_('Opérations'),_('Toutes les 
opérations'),4),
+                  array($root.'&sc=bal',_('Balance'),_('Balance du 
fournisseur'),7),
+                  array($root.'&sc=let',_('Lettrage'),_('Opérations & 
Lettrages'),6)
+                  ),
+                  'H',"mtitle","mtitle",$def,' ');
+echo '</div>';
+echo '<div>';
+echo '<div class="gest_name">';
+echo '<h2 class="gest_name">'.$f->get_quick_code()." 
".$f->strAttribut(ATTR_DEF_NAME).'</h2>';
+echo '</div>';
+echo '</div>';
+
+//---------------------------------------------------------------------------
+// Show Detail of a card and category
+//---------------------------------------------------------------------------
+if ( $ss_action == 'dc' )
+{
+    require_once('category_detail.inc.php');
+}
+//---------------------------------------------------------------------------
+// Follow up : mail, bons de commande, livraison, rendez-vous...
+//---------------------------------------------------------------------------
+if ( $ss_action == 'sv' )
+{
+    require_once('category_followup.inc.php');
+}
+/*----------------------------------------------------------------------
+ * Operation all the operation of this customer
+ *
+ * ----------------------------------------------------------------------*/
+if ( $ss_action == 'op')
+{
+    require_once('category_operation.inc.php');
+}
+/*-------------------------------------------------------------------------
+ * Balance of the card
+ *-------------------------------------------------------------------------*/
+if ( $ss_action=='bal')
+  {
+    require_once('balance_card.inc.php');
+  }
+/*----------------------------------------------------------------------
+ * All the contact
+ *
+ *----------------------------------------------------------------------*/
+if ( $ss_action == 'cn')
+{
+    echo '<div class="content">';
+    echo dossier::hidden();
+    $f=new Fiche($cn,$_REQUEST['f_id']);
+    $contact=new Contact($cn);
+    $contact->company=$f->get_quick_code();
+    echo $contact->summary("");
+
+    $sql=' select fd_id from fiche_def where frd_id='.FICHE_TYPE_CONTACT;
+    $filter=$cn->make_list($sql);
+    if ( empty ($filter))
+    {
+        echo '<span class="notice">';
+        echo _("Vous devez aller dans fiche et créer une catégorie pour les 
contacts");
+        echo '</span>';
+        exit();
+    }
+    /* Add button */
+    $f_add_button=new IButton('add_card');
+    $f_add_button->label=_('Créer une nouvelle fiche');
+
+    $f_add_button->set_attribute('filter',$filter);
+    $f_add_button->javascript=" select_card_type(this);";
+
+    echo $f_add_button->input();
+    echo '</div>';
+}
+/*----------------------------------------------------------------------------
+ * Lettering
+ 
*----------------------------------------------------------------------------*/
+if ( $def==6 )
+{
+    require_once('lettering.gestion.inc.php');
+}

Added: phpcompta/tags/rel601/include/category_detail.inc.php
===================================================================
--- phpcompta/tags/rel601/include/category_detail.inc.php                       
        (rev 0)
+++ phpcompta/tags/rel601/include/category_detail.inc.php       2012-05-01 
14:49:39 UTC (rev 4817)
@@ -0,0 +1,74 @@
+<?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: 4701 $ */
+
+// Copyright Author Dany De Bontridder address@hidden
+/*!\file
+ * \brief this file will handle all the actions for a specific customer (
+ * contact,operation,invoice and financial)
+ * include from supplier.inc.php and concerned only the customer card and
+ * the customer category
+ * parameter
+ *  - p_action = supplier
+ *  - sb = detail
+ *  - sc = dc
+ */
+//----------------------------------------------------------------------------
+// Save modification
+//---------------------------------------------------------------------------
+if ( isset ($_POST['mod']))
+{
+
+    // modification is asked
+    $f_id=$_REQUEST['f_id'];
+
+    $supplier=new Customer($cn,$f_id);
+    $supplier->Save();
+
+}
+
+echo '<div class="u_content">';
+$f_id=$_REQUEST['f_id'];
+echo '<div class="content" style="width:50%">';
+if ( isset($_POST['mod'])) echo hb(_('Information sauvée'));
+
+$supplier=new Fiche($cn,$f_id);
+$p_readonly=($g_user->check_action(FICADD)==0)?true:false;
+if ( ! $p_readonly) echo '<form method="post">';
+echo dossier::hidden();
+echo HtmlInput::hidden('sb','detail');
+echo HtmlInput::hidden('dc','cc');
+echo $supplier->Display($p_readonly);
+$w=new IHidden();
+$w->name="p_action";
+$w->value="supplier";
+echo $w->input();
+$w->name="f_id";
+$w->value=$f_id;
+echo $w->input();
+if ( ! $p_readonly)
+{
+       echo HtmlInput::submit('mod',_('Sauver les modifications'));
+       echo HtmlInput::reset(_("Annuler"));
+       echo HtmlInput::submit('delete_card',_('Effacer cette 
fiche'),'onclick="return confirm(\'Confirmer effacement ?\');"');
+       echo '</form>';
+}
+echo '</div>';
+
+

Added: phpcompta/tags/rel601/include/category_followup.inc.php
===================================================================
--- phpcompta/tags/rel601/include/category_followup.inc.php                     
        (rev 0)
+++ phpcompta/tags/rel601/include/category_followup.inc.php     2012-05-01 
14:49:39 UTC (rev 4817)
@@ -0,0 +1,48 @@
+<?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: 4320 $ */
+
+// Copyright Author Dany De Bontridder address@hidden
+
+/*!\file
+ * \brief this file is used for the follow up of the customer (mail, 
meeting...)
+ *  - sb = detail
+ *  - sc = sv
+ *  - sd = this parameter is used here
+ *  - $cn = database connection
+ */
+require_once('class_follow_up.php');
+
+/**
+ *\note problem with ShowActionList, this function is local
+ * to the file action.inc.php. And this function must different for each
+ *  suivi
+ */
+$sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"list";
+$ag_id=(isset($_REQUEST['ag_id']))?$_REQUEST['ag_id']:0;
+$p_action=$_REQUEST['ac'];
+$base="ac=$p_action&sc=sv&sb=detail&f_id=".$_REQUEST['f_id'];
+$retour=HtmlInput::button_anchor('Retour','?'.dossier::get().'&'.$base);
+$fiche=new Fiche($cn,$_REQUEST['f_id']);
+
+$_GET['qcode']=$fiche->get_quick_code();
+$_REQUEST['qcode']=$fiche->get_quick_code();
+echo '<div class="content">';
+require_once('action.common.inc.php');
+echo '</div>';

Added: phpcompta/tags/rel601/include/category_operation.inc.php
===================================================================
--- phpcompta/tags/rel601/include/category_operation.inc.php                    
        (rev 0)
+++ phpcompta/tags/rel601/include/category_operation.inc.php    2012-05-01 
14:49:39 UTC (rev 4817)
@@ -0,0 +1,40 @@
+<?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: 4301 $ */
+
+// Copyright Author Dany De Bontridder address@hidden
+
+/*!\file
+ * \brief show all the operation for a customer
+ * the variable inherited are
+ * - $cn database connexion
+ * - $_REQUEST['f_id'] the f_id of the card
+ * - $p_action
+ * - $sub_action
+ * - $ss_action
+ */
+require_once('class_acc_ledger.php');
+$f=new Fiche($cn,$_REQUEST['f_id']);
+$qcode=$f->get_quick_code();
+$_GET['qcode']=$qcode;
+$_REQUEST['qcode']=$qcode;
+$var_array=compute_variable('ledger_type=ALL');
+put_global($var_array);
+require_once ('history_operation.inc.php');
+

Modified: phpcompta/tags/rel601/include/class_fiche.php
===================================================================
--- phpcompta/tags/rel601/include/class_fiche.php       2012-04-24 19:51:04 UTC 
(rev 4816)
+++ phpcompta/tags/rel601/include/class_fiche.php       2012-05-01 14:49:39 UTC 
(rev 4817)
@@ -468,7 +468,7 @@
             {
                 $w=new ICard("av_text".$attr->ad_id);
                 // filter on frd_id
-                $sql=' select fd_id from fiche_def where frd_id in 
('.FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX.')';
+                $sql=' select fd_id from fiche_def where frd_id in 
('.FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX.','.FICHE_TYPE_FIN.')';
                 $filter=$this->cn->make_list($sql);
                 $w->set_attribute('ipopup','ipopcard');
                 $w->set_attribute('typecard',$filter);
@@ -612,7 +612,8 @@
                                {
                                        $w = new ICard("av_text" . $r->ad_id);
                                        // filter on frd_id
-                                       $sql = ' select fd_id from fiche_def 
where frd_id in (' . FICHE_TYPE_CLIENT . ',' . FICHE_TYPE_FOURNISSEUR . ',' . 
FICHE_TYPE_ADM_TAX . ')';
+                                       $sql = ' select fd_id from fiche_def 
where frd_id in (' . FICHE_TYPE_CLIENT . ',' . FICHE_TYPE_FOURNISSEUR . ',' . 
FICHE_TYPE_ADM_TAX . '
+                                               ,'.FICHE_TYPE_FIN.')';
                                        $filter = $this->cn->make_list($sql);
                                        $w->extra = $filter;
                                        $w->extra2 = 0;
@@ -829,7 +830,7 @@
                 {
                     $exist=$this->cn->count_sql("select f_id from fiche join 
fiche_def using (fd_id) ".
                                                 " join fiche_detail 
using(f_id) ".
-                                                " where frd_id in (8,9,14) and 
ad_id=".ATTR_DEF_QUICKCODE.
+                                                " where frd_id in (4,8,9,14) 
and ad_id=".ATTR_DEF_QUICKCODE.
                                                 " and 
ad_value='".sql_string($value)."'");
                     if ( $exist == 0 && sql_string($value) != null )
                     {
@@ -1000,7 +1001,7 @@
                 {
                     $exist=$this->cn->exec_sql("select f_id from fiche join 
fiche_def using (fd_id) ".
                                                 " join fiche_detail using 
(f_id)  ".
-                                                " where frd_id in (8,9,14) and 
ad_id=$1 ".
+                                                " where frd_id in (4,8,9,14) 
and ad_id=$1 ".
                                                 " and ad_value=upper($2)",
                                               
array(ATTR_DEF_QUICKCODE,$value));
 

Modified: phpcompta/tags/rel601/include/client.inc.php
===================================================================
--- phpcompta/tags/rel601/include/client.inc.php        2012-04-24 19:51:04 UTC 
(rev 4816)
+++ phpcompta/tags/rel601/include/client.inc.php        2012-05-01 14:49:39 UTC 
(rev 4817)
@@ -25,11 +25,7 @@
 require_once("class_ihidden.php");
 require_once("class_customer.php");
 require_once("class_ibutton.php");
-require_once('class_iaction.php');
 require_once('class_fiche_def.php');
-require_once('class_iaction.php');
-require_once('class_fiche_def.php');
-require_once('class_ipopup.php');
 
 
 
@@ -137,30 +133,9 @@
 if ( $low_action == 'detail')
 {
     /* Menu */
-    require_once('client_card.inc.php');
+    require_once('category_card.inc.php');
     exit();
 }
-    if ($low_action == "insert")
-    {
-       /* security : check if user can add card */
-       if ($g_user->check_action(FICADD) == 0)
-       {
-           alert('Vous  ne pouvez pas ajouter de fiche');
-           return;
-       }
 
-       $customer = new Customer($cn);
-       $customer->Save($_REQUEST['fd_id']);
-       echo '<div class="content">';
-       echo "<table>";
-       echo $customer->Display(true);
-       echo "</table>";
-       $retour = new IAction();
-       $retour->label = "Retour";
-       $retour->value = "?ac=" . $_REQUEST["ac"] . "&" . dossier::get();
-       echo $retour->input();
-       echo '</div>';
-    }
-
     html_page_stop();
 ?>

Deleted: phpcompta/tags/rel601/include/client_card.inc.php
===================================================================
--- phpcompta/tags/rel601/include/client_card.inc.php   2012-04-24 19:51:04 UTC 
(rev 4816)
+++ phpcompta/tags/rel601/include/client_card.inc.php   2012-05-01 14:49:39 UTC 
(rev 4817)
@@ -1,150 +0,0 @@
-<?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 address@hidden
-
-/*!\file
- * \brief this file will handle all the actions for a specific customer (
- * contact,operation,invoice and financial)
- * include from client.inc.php and concerned only the customer card and
- * the customer category
- */
-require_once('class_contact.php');
-require_once('class_ipopup.php');
-
-
-/* $sub_action = sb = detail */
-/* $cn database conx */
-$str_dossier=Dossier::get();
-$return= HtmlInput::button_anchor('Retour','?p_action=client&'.$str_dossier);
-$root="?p_action=client&sb=detail&f_id=".$_REQUEST["f_id"].'&'.$str_dossier."&ac=".$_REQUEST["ac"];
-$ss_action=( isset ($_REQUEST['sc'] ))? $_REQUEST['sc']: '';
-switch ($ss_action)
-{
-case 'dc':
-    $def=1;
-    break;
-case 'sv':                     /* all the actions (mail,meeting...) */
-    $def=2;
-    break;
-case 'cn':
-    $def=3;
-    break;
-case 'op':
-    $def=4;
-    break;
-case 'let':
-    $def=6;
-    break;
-case 'bal':
-  $def=7;
-  break;
-default:
-    $def=1;
-    $ss_action='dc';
-}
-$f=new Fiche($cn,$_REQUEST['f_id']);
-echo '<div class="content">';
-echo ShowItem(array(
-                  array($root."&sc=dc",_('Fiche'),_('Détail de la fiche'),1),
-                  array($root.'&sc=sv',_('Suivi'),_('Suivi client, devis, bon 
de commande, courrier'),2),
-                  array($root.'&sc=cn',_('Contact'),_('Liste de contacts de ce 
client'),3),
-                  array($root.'&sc=op',_('Opérations'),_('Toutes les 
opérations'),4),
-                 array($root.'&sc=bal',_('Balance'),_('Balance du client'),7),
-                  array($root.'&sc=let',_('Lettrage'),_('Opérations & 
Lettrages'),6),
-                  array('?ac='.$_REQUEST['ac'].'&'.dossier::get(),_('Retour 
liste'),_('Retour à la liste des clients'),5)
-                  ),
-                  'H',"mtitle","mtitle",$def,'');
-echo '</div>';
-echo '<div>';
-echo '<div class="gest_name"">';
-echo '<h2 class="gest_name">'.$f->get_quick_code()." 
".$f->strAttribut(ATTR_DEF_NAME).'</h2>';
-echo '</div>';
-echo '</div>';
-
-//---------------------------------------------------------------------------
-// Show Detail of a card and category
-//---------------------------------------------------------------------------
-if ( $ss_action == 'dc' )
-{
-    require_once('detail_client.inc.php');
-}
-//---------------------------------------------------------------------------
-// Follow up : mail, bons de commande, livraison, rendez-vous...
-//---------------------------------------------------------------------------
-if ( $ss_action == 'sv' )
-{
-    require_once('suivi_client.inc.php');
-}
-/*----------------------------------------------------------------------
- * Operation all the operation of this customer
- *
- * ----------------------------------------------------------------------*/
-if ( $ss_action == 'op')
-{
-    require_once('operation_client.inc.php');
-}
-/*----------------------------------------------------------------------
- * All the contact
- *
- *----------------------------------------------------------------------*/
-if ( $ss_action == 'cn')
-{
-    echo '<div class="content">';
-    echo dossier::hidden();
-    $f=new Fiche($cn,$_REQUEST['f_id']);
-    $contact=new Contact($cn);
-    $contact->company=$f->get_quick_code();
-    echo $contact->summary();
-
-    $sql=' select fd_id from fiche_def where frd_id='.FICHE_TYPE_CONTACT;
-    $filter=$cn->make_list($sql);
-    if ( empty ($filter))
-    {
-        echo '<span class="notice">';
-        echo _("Vous devez aller dans fiche et créer une catégorie pour les 
contacts");
-        echo '</span>';
-        exit();
-    }
-    /* Add button */
-    $f_add_button=new IButton('add_card');
-    $f_add_button->label=_('Créer une nouvelle fiche');
-    $f_add_button->set_attribute('ipopup','ipopcard');
-
-    $f_add_button->set_attribute('filter',$filter);
-    $f_add_button->javascript=" select_card_type(this);";
-
-    echo $f_add_button->input();
-    echo '</div>';
-}
-/*----------------------------------------------------------------------------
- * Lettering
- 
*----------------------------------------------------------------------------*/
-if ( $def==6 )
-{
-    require_once('lettering.gestion.inc.php');
-}
-/*-------------------------------------------------------------------------
- * Balance of the card
- *-------------------------------------------------------------------------*/
-if ( $ss_action=='bal')
-  {
-    require_once('balance_card.inc.php');
-  }

Deleted: phpcompta/tags/rel601/include/detail_adm.inc.php
===================================================================
--- phpcompta/tags/rel601/include/detail_adm.inc.php    2012-04-24 19:51:04 UTC 
(rev 4816)
+++ phpcompta/tags/rel601/include/detail_adm.inc.php    2012-05-01 14:49:39 UTC 
(rev 4817)
@@ -1,76 +0,0 @@
-<?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 address@hidden
-
-/*!\file
- * \brief this file will handle all the actions for a specific customer (
- * contact,operation,invoice and financial)
- * include from adm.inc.php and concerned only the customer card and
- * the customer category
- * parameter
- *  - p_action = adm
- *  - sb = detail
- *  - sc = dc
- */
-//----------------------------------------------------------------------------
-// Save modification
-//---------------------------------------------------------------------------
-if ( isset ($_POST['mod']))
-{
-
-    // modification is asked
-    $f_id=$_REQUEST['f_id'];
-
-    $adm=new Fiche($cn,$f_id);
-    $adm->Save();
-
-}
-
-echo '<div class="u_content" style="width:50%">';
-$f_id=$_REQUEST['f_id'];
-echo '<div class="content">';
-if ( isset($_POST['mod'])) echo hb('Information sauvée');
-
-$adm=new Fiche($cn,$f_id);
-$p_readonly=($g_user->check_action(FICADD)==0)?true:false;
-if ( ! $p_readonly) echo '<form method="post">';
-echo dossier::hidden();
-echo HtmlInput::hidden('sb','detail');
-echo HtmlInput::hidden('dc','cc');
-echo $adm->Display($p_readonly);
-$w=new IHidden();
-$w->name="p_action";
-$w->value="adm";
-echo $w->input();
-$w->name="f_id";
-$w->value=$f_id;
-echo $w->input();
-if ( ! $p_readonly)
-{
-       echo HtmlInput::submit('mod',_('Sauver les modifications'));
-       echo HtmlInput::reset(_("Annuler"));
-       echo HtmlInput::submit('delete_card','Effacer cette 
fiche','onclick="return confirm(\'Confirmer effacement ?\');"');
-       echo '</form>';
-}
-echo $return->input();
-echo '</div>';
-
-

Deleted: phpcompta/tags/rel601/include/detail_client.inc.php
===================================================================
--- phpcompta/tags/rel601/include/detail_client.inc.php 2012-04-24 19:51:04 UTC 
(rev 4816)
+++ phpcompta/tags/rel601/include/detail_client.inc.php 2012-05-01 14:49:39 UTC 
(rev 4817)
@@ -1,76 +0,0 @@
-<?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 address@hidden
-
-/*!\file
- * \brief this file will handle all the actions for a specific customer (
- * contact,operation,invoice and financial)
- * include from client.inc.php and concerned only the customer card and
- * the customer category
- * parameter
- *  - p_action = client
- *  - sb = detail
- *  - sc = dc
- */
-//----------------------------------------------------------------------------
-// Save modification
-//---------------------------------------------------------------------------
-if ( isset ($_POST['mod']))
-{
-
-    // modification is asked
-    $f_id=$_REQUEST['f_id'];
-
-    $client=new Customer($cn,$f_id);
-    $client->Save();
-
-}
-
-echo '<div class="u_content">';
-$f_id=$_REQUEST['f_id'];
-echo '<div class="content" style="width:50%">';
-if ( isset($_POST['mod'])) echo hb(_('Information sauvée'));
-
-$client=new Customer($cn,$f_id);
-$p_readonly=($g_user->check_action(FICADD)==0)?true:false;
-if ( ! $p_readonly) echo '<form method="post">';
-echo dossier::hidden();
-echo HtmlInput::hidden('sb','detail');
-echo HtmlInput::hidden('dc','cc');
-echo $client->Display($p_readonly);
-$w=new IHidden();
-$w->name="p_action";
-$w->value="client";
-echo $w->input();
-$w->name="f_id";
-$w->value=$f_id;
-echo $w->input();
-if ( ! $p_readonly)
-{
-       echo HtmlInput::submit('mod',_('Sauver les modifications'));
-       echo HtmlInput::reset(_("Annuler"));
-       echo HtmlInput::submit('delete_card',_('Effacer cette 
fiche'),'onclick="return confirm(\'Confirmer effacement ?\');"');
-       echo '</form>';
-}
-echo $return;
-echo '</div>';
-
-

Deleted: phpcompta/tags/rel601/include/detail_supplier.inc.php
===================================================================
--- phpcompta/tags/rel601/include/detail_supplier.inc.php       2012-04-24 
19:51:04 UTC (rev 4816)
+++ phpcompta/tags/rel601/include/detail_supplier.inc.php       2012-05-01 
14:49:39 UTC (rev 4817)
@@ -1,76 +0,0 @@
-<?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 address@hidden
-require_once('class_customer.php');
-/*!\file
- * \brief this file will handle all the actions for a specific customer (
- * contact,operation,invoice and financial)
- * include from supplier.inc.php and concerned only the customer card and
- * the customer category
- * parameter
- *  - p_action = supplier
- *  - sb = detail
- *  - sc = dc
- */
-//----------------------------------------------------------------------------
-// Save modification
-//---------------------------------------------------------------------------
-if ( isset ($_POST['mod']))
-{
-
-    // modification is asked
-    $f_id=$_REQUEST['f_id'];
-
-    $supplier=new Customer($cn,$f_id);
-    $supplier->Save();
-
-}
-
-echo '<div class="u_content">';
-$f_id=$_REQUEST['f_id'];
-echo '<div class="content" style="width:50%">';
-if ( isset($_POST['mod'])) echo hb(_('Information sauvée'));
-
-$supplier=new Supplier($cn,$f_id);
-$p_readonly=($g_user->check_action(FICADD)==0)?true:false;
-if ( ! $p_readonly) echo '<form method="post">';
-echo dossier::hidden();
-echo HtmlInput::hidden('sb','detail');
-echo HtmlInput::hidden('dc','cc');
-echo $supplier->Display($p_readonly);
-$w=new IHidden();
-$w->name="p_action";
-$w->value="supplier";
-echo $w->input();
-$w->name="f_id";
-$w->value=$f_id;
-echo $w->input();
-if ( ! $p_readonly)
-{
-       echo HtmlInput::submit('mod',_('Sauver les modifications'));
-       echo HtmlInput::reset(_("Annuler"));
-       echo HtmlInput::submit('delete_card',_('Effacer cette 
fiche'),'onclick="return confirm(\'Confirmer effacement ?\');"');
-       echo '</form>';
-}
-echo $return->input();
-echo '</div>';
-
-

Deleted: phpcompta/tags/rel601/include/operation_adm.inc.php
===================================================================
--- phpcompta/tags/rel601/include/operation_adm.inc.php 2012-04-24 19:51:04 UTC 
(rev 4816)
+++ phpcompta/tags/rel601/include/operation_adm.inc.php 2012-05-01 14:49:39 UTC 
(rev 4817)
@@ -1,41 +0,0 @@
-<?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 address@hidden
-
-/*!\file
- * \brief show all the operation for a customer
- * the variable inherited are
- * - $cn database connexion
- * - $_REQUEST['f_id'] the f_id of the card
- * - $p_action
- * - $sub_action
- * - $ss_action
- */
-require_once('class_acc_ledger.php');
-$f=new Fiche($cn,$_REQUEST['f_id']);
-$qcode=$f->get_quick_code();
-$_GET['qcode']=$qcode;
-$_REQUEST['qcode']=$qcode;
-
-$var_array=compute_variable('ledger_type=ALL');
-put_global($var_array);
-require_once ('history_operation.inc.php');
-

Deleted: phpcompta/tags/rel601/include/operation_client.inc.php
===================================================================
--- phpcompta/tags/rel601/include/operation_client.inc.php      2012-04-24 
19:51:04 UTC (rev 4816)
+++ phpcompta/tags/rel601/include/operation_client.inc.php      2012-05-01 
14:49:39 UTC (rev 4817)
@@ -1,41 +0,0 @@
-<?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 address@hidden
-
-/*!\file
- * \brief show all the operation for a customer
- * the variable inherited are
- * - $cn database connexion
- * - $_REQUEST['f_id'] the f_id of the card
- * - $p_action
- * - $sub_action
- * - $ss_action
- */
-require_once('class_acc_ledger.php');
-$f=new Fiche($cn,$_REQUEST['f_id']);
-$qcode=$f->get_quick_code();
-$_GET['qcode']=$qcode;
-$_REQUEST['qcode']=$qcode;
-$var_array=compute_variable('ledger_type=ALL');
-put_global($var_array);
-require_once ('history_operation.inc.php');
-
-

Deleted: phpcompta/tags/rel601/include/operation_supplier.inc.php
===================================================================
--- phpcompta/tags/rel601/include/operation_supplier.inc.php    2012-04-24 
19:51:04 UTC (rev 4816)
+++ phpcompta/tags/rel601/include/operation_supplier.inc.php    2012-05-01 
14:49:39 UTC (rev 4817)
@@ -1,40 +0,0 @@
-<?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 address@hidden
-
-/*!\file
- * \brief show all the operation for a customer
- * the variable inherited are
- * - $cn database connexion
- * - $_REQUEST['f_id'] the f_id of the card
- * - $p_action
- * - $sub_action
- * - $ss_action
- */
-require_once('class_acc_ledger.php');
-$f=new Fiche($cn,$_REQUEST['f_id']);
-$qcode=$f->get_quick_code();
-$_GET['qcode']=$qcode;
-$_REQUEST['qcode']=$qcode;
-$var_array=compute_variable('ledger_type=ALL');
-put_global($var_array);
-require_once ('history_operation.inc.php');
-

Deleted: phpcompta/tags/rel601/include/suivi_adm.inc.php
===================================================================
--- phpcompta/tags/rel601/include/suivi_adm.inc.php     2012-04-24 19:51:04 UTC 
(rev 4816)
+++ phpcompta/tags/rel601/include/suivi_adm.inc.php     2012-05-01 14:49:39 UTC 
(rev 4817)
@@ -1,48 +0,0 @@
-<?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 address@hidden
-
-/*!\file
- * \brief this file is used for the follow up of the customer (mail, 
meeting...)
- *  - sb = detail
- *  - sc = sv
- *  - sd = this parameter is used here
- *  - $cn = database connection
- */
-require_once('class_follow_up.php');
-
-/**
- *\note fix problem with ShowActionList, this function is local
- * to the file action.inc.php. And this function must different for each
- *  follow-up (suivi)
- */
-$sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"list";
-$ag_id=(isset($_REQUEST['ag_id']))?$_REQUEST['ag_id']:0;
-$ac=$_REQUEST['ac'];
-$base="ac=ac&sc=sv&sb=detail&f_id=".$_REQUEST['f_id'];
-$retour=HtmlInput::button_anchor('Retour','?'.dossier::get().'&'.$base);
-$fiche=new Fiche($cn,$_REQUEST['f_id']);
-
-$_GET['qcode']=$fiche->get_quick_code();
-$_REQUEST['qcode']=$fiche->get_quick_code();
-echo '<div class="content">';
-require_once('action.common.inc.php');
-echo '</div>';

Deleted: phpcompta/tags/rel601/include/suivi_client.inc.php
===================================================================
--- phpcompta/tags/rel601/include/suivi_client.inc.php  2012-04-24 19:51:04 UTC 
(rev 4816)
+++ phpcompta/tags/rel601/include/suivi_client.inc.php  2012-05-01 14:49:39 UTC 
(rev 4817)
@@ -1,50 +0,0 @@
-<?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 address@hidden
-
-/*!\file
- * \brief this file is used for the follow up of the customer (mail, 
meeting...)
- *  - p_action = client
- *  - sb = detail
- *  - sc = sv
- *  - sd = this parameter is used here
- *  - $cn = database connection
- */
-require_once('class_follow_up.php');
-load_all_script();
-
-/**
- *\note problem with ShowActionList, this function is local
- * to the file action.inc.php. And this function must different for each
- *  suivi
- */
-$sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"list";
-$ag_id=(isset($_REQUEST['ag_id']))?$_REQUEST['ag_id']:0;
-//$p_action=$_REQUEST['p_action'];
-$base="ac=".$_REQUEST['ac']."&sc=sv&sb=detail&f_id=".$_REQUEST['f_id'];
-$retour=HtmlInput::button_anchor('Retour','?'.dossier::get().'&'.$base);
-$fiche=new Fiche($cn,$_REQUEST['f_id']);
-
-$_GET['qcode']=$fiche->get_quick_code();
-$_REQUEST['qcode']=$fiche->get_quick_code();
-echo '<div class="content">';
-require_once('action.common.inc.php');
-echo '</div>';

Deleted: phpcompta/tags/rel601/include/suivi_supplier.inc.php
===================================================================
--- phpcompta/tags/rel601/include/suivi_supplier.inc.php        2012-04-24 
19:51:04 UTC (rev 4816)
+++ phpcompta/tags/rel601/include/suivi_supplier.inc.php        2012-05-01 
14:49:39 UTC (rev 4817)
@@ -1,48 +0,0 @@
-<?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 address@hidden
-
-/*!\file
- * \brief this file is used for the follow up of the customer (mail, 
meeting...)
- *  - sb = detail
- *  - sc = sv
- *  - sd = this parameter is used here
- *  - $cn = database connection
- */
-require_once('class_follow_up.php');
-
-/**
- *\note problem with ShowActionList, this function is local
- * to the file action.inc.php. And this function must different for each
- *  suivi
- */
-$sub_action=(isset($_REQUEST['sa']))?$_REQUEST['sa']:"list";
-$ag_id=(isset($_REQUEST['ag_id']))?$_REQUEST['ag_id']:0;
-$p_action=$_REQUEST['ac'];
-$base="ac=$p_action&sc=sv&sb=detail&f_id=".$_REQUEST['f_id'];
-$retour=HtmlInput::button_anchor('Retour','?'.dossier::get().'&'.$base);
-$fiche=new Fiche($cn,$_REQUEST['f_id']);
-
-$_GET['qcode']=$fiche->get_quick_code();
-$_REQUEST['qcode']=$fiche->get_quick_code();
-echo '<div class="content">';
-require_once('action.common.inc.php');
-echo '</div>';

Modified: phpcompta/tags/rel601/include/supplier.inc.php
===================================================================
--- phpcompta/tags/rel601/include/supplier.inc.php      2012-04-24 19:51:04 UTC 
(rev 4816)
+++ phpcompta/tags/rel601/include/supplier.inc.php      2012-05-01 14:49:39 UTC 
(rev 4817)
@@ -115,7 +115,6 @@
                /* Add button */
                $f_add_button=new IButton('add_card');
                $f_add_button->label=_('Créer une nouvelle fiche');
-               $f_add_button->set_attribute('ipopup','ipop_newcard');
                $f_add_button->set_attribute('win_refresh','yes');
 
                $f_add_button->set_attribute('type_cat',FICHE_TYPE_FOURNISSEUR);
@@ -123,7 +122,6 @@
                echo $f_add_button->input();
 
                $f_cat_button=new IButton('add_cat');
-               $f_cat_button->set_attribute('ipopup','ipop_cat');
                $f_cat_button->set_attribute('type_cat',FICHE_TYPE_FOURNISSEUR);
                $f_cat_button->label=_('Ajout d\'une catégorie');
                $f_cat_button->javascript='add_category(this)';
@@ -142,32 +140,11 @@
 if ( $low_action == 'detail')
 {
     /* Menu */
-    require_once('supplier_card.inc.php');
+    require_once('category_card.inc.php');
     exit();
 }
 
-if ( $low_action=="insert" )
-{
-    /* security : check if user can add card */
-    if ( $g_user->check_action(FICADD) == 0 )
-    {
-        alert('Vous  ne pouvez pas ajouter de fiche');
-        return;
-    }
 
-    $supplier=new Supplier($cn);
-    $supplier->Save($_REQUEST['fd_id']);
-    echo '<div class="content">';
-    echo "<table>";
-    echo $supplier->Display(true);
-    echo "</table>";
-    $retour=new IAction();
-    $retour->label="Retour";
-    $retour->value="?p_action=supplier&".dossier::get();
-    echo $retour->input();
-    echo '</div>';
 
-}
-
 html_page_stop();
 ?>

Deleted: phpcompta/tags/rel601/include/supplier_card.inc.php
===================================================================
--- phpcompta/tags/rel601/include/supplier_card.inc.php 2012-04-24 19:51:04 UTC 
(rev 4816)
+++ phpcompta/tags/rel601/include/supplier_card.inc.php 2012-05-01 14:49:39 UTC 
(rev 4817)
@@ -1,152 +0,0 @@
-<?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 address@hidden
-
-/*!\file
- * \brief this file will handle all the actions for a specific customer (
- * contact,operation,invoice and financial)
- * include from client.inc.php and concerned only the customer card and
- * the customer category
- */
-require_once('class_contact.php');
-
-$str_dossier=Dossier::get();
-/* $sub_action = sb = detail */
-/* $cn database conx */
-$return=new IAction();
-$return->name='retour';
-$return->label='Retour';
-$return->value='?ac='.$_REQUEST['ac'].'&'.$str_dossier;
-$root='?ac='.$_REQUEST['ac']."&sb=detail&f_id=".$_REQUEST["f_id"].'&'.$str_dossier;
-$ss_action=( isset ($_REQUEST['sc'] ))? $_REQUEST['sc']: '';
-switch ($ss_action)
-{
-case 'dc':
-    $def=1;
-    break;
-case 'sv':                     /* all the actions (mail,meeting...) */
-    $def=2;
-    break;
-case 'cn':
-    $def=3;
-    break;
-case 'op':
-    $def=4;
-    break;
-case 'let':
-    $def=6;
-    break;
-case 'bal':
-  $def=7;
-  break;
-default:
-    $def=1;
-    $ss_action='dc';
-}
-$f=new Fiche($cn,$_REQUEST['f_id']);
-
-echo '<div class="content">';
-echo ShowItem(array(
-                  array($root."&sc=dc",_('Fiche'),_('Détail de la fiche'),1),
-                  array($root.'&sc=sv',_('Suivi'),_('Suivi Fournisseur, devis, 
bon de commande, courrier'),2),
-                  array($root.'&sc=cn',_('Contact'),_('Liste de contacts de ce 
fournisseur'),3),
-                  array($root.'&sc=op',_('Opérations'),_('Toutes les 
opérations'),4),
-                  array($root.'&sc=bal',_('Balance'),_('Balance du 
fournisseur'),7),
-                  array($root.'&sc=let',_('Lettrage'),_('Opérations & 
Lettrages'),6),
-                  array('?ac='.$_REQUEST['ac'].'&'.dossier::get(),_('Retour 
liste'),_('Retour à la liste des fournisseurs'),5)
-                  ),
-                  'H',"mtitle","mtitle",$def,' ');
-echo '</div>';
-echo '<div>';
-echo '<div class="gest_name">';
-echo '<h2 class="gest_name">'.$f->get_quick_code()." 
".$f->strAttribut(ATTR_DEF_NAME).'</h2>';
-echo '</div>';
-echo '</div>';
-
-//---------------------------------------------------------------------------
-// Show Detail of a card and category
-//---------------------------------------------------------------------------
-if ( $ss_action == 'dc' )
-{
-    require_once('detail_supplier.inc.php');
-}
-//---------------------------------------------------------------------------
-// Follow up : mail, bons de commande, livraison, rendez-vous...
-//---------------------------------------------------------------------------
-if ( $ss_action == 'sv' )
-{
-    require_once('suivi_supplier.inc.php');
-}
-/*----------------------------------------------------------------------
- * Operation all the operation of this customer
- *
- * ----------------------------------------------------------------------*/
-if ( $ss_action == 'op')
-{
-    require_once('operation_supplier.inc.php');
-}
-/*-------------------------------------------------------------------------
- * Balance of the card
- *-------------------------------------------------------------------------*/
-if ( $ss_action=='bal')
-  {
-    require_once('balance_card.inc.php');
-  }
-/*----------------------------------------------------------------------
- * All the contact
- *
- *----------------------------------------------------------------------*/
-if ( $ss_action == 'cn')
-{
-    echo '<div class="content">';
-    echo dossier::hidden();
-    $f=new Fiche($cn,$_REQUEST['f_id']);
-    $contact=new Contact($cn);
-    $contact->company=$f->get_quick_code();
-    echo $contact->summary("");
-
-    $sql=' select fd_id from fiche_def where frd_id='.FICHE_TYPE_CONTACT;
-    $filter=$cn->make_list($sql);
-    if ( empty ($filter))
-    {
-        echo '<span class="notice">';
-        echo _("Vous devez aller dans fiche et créer une catégorie pour les 
contacts");
-        echo '</span>';
-        exit();
-    }
-    /* Add button */
-    $f_add_button=new IButton('add_card');
-    $f_add_button->label=_('Créer une nouvelle fiche');
-    $f_add_button->set_attribute('ipopup','ipopcard');
-
-    $f_add_button->set_attribute('filter',$filter);
-    $f_add_button->javascript=" select_card_type(this);";
-
-    echo $f_add_button->input();
-    echo '</div>';
-}
-/*----------------------------------------------------------------------------
- * Lettering
- 
*----------------------------------------------------------------------------*/
-if ( $def==6 )
-{
-    require_once('lettering.gestion.inc.php');
-}



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]