phpcompta-dev
[Top][All Lists]
Advanced

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

[Phpcompta-dev] r4301 - phpcompta/trunk/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4301 - phpcompta/trunk/include
Date: Thu, 3 Nov 2011 00:05:04 +0100 (CET)

Author: danydb
Date: 2011-11-03 00:05:03 +0100 (Thu, 03 Nov 2011)
New Revision: 4301

Removed:
   phpcompta/trunk/include/user_action_gl.php
Modified:
   phpcompta/trunk/include/history_operation.inc.php
   phpcompta/trunk/include/operation_adm.inc.php
   phpcompta/trunk/include/operation_client.inc.php
   phpcompta/trunk/include/operation_supplier.inc.php
Log:
412 : code cleaning
Remove user_action_gl.php (replace by history_action.inc.php)
Callable from menu

Modified: phpcompta/trunk/include/history_operation.inc.php
===================================================================
--- phpcompta/trunk/include/history_operation.inc.php   2011-11-02 23:03:49 UTC 
(rev 4300)
+++ phpcompta/trunk/include/history_operation.inc.php   2011-11-02 23:05:03 UTC 
(rev 4301)
@@ -40,12 +40,16 @@
        {
                case 'ACH':
                        $Ledger = new Acc_Ledger_Purchase($cn, 0);
+                       $ask_pay=1;
                        break;
                case 'ODS':
+               case 'ALL':
                        $Ledger=new Acc_Ledger($cn,0);
+                       $ask_pay=0;
                        break;
                case 'VEN':
                        $Ledger=new Acc_Ledger_Sold($cn,0);
+                       $ask_pay=1;
                        break;
 
        }
@@ -98,11 +102,12 @@
 
 
 echo '<form method="GET" id="fpaida" class="print">';
-echo HtmlInput::hidden("ledger_type", "ACH");
 echo HtmlInput::hidden("ac", $_REQUEST['ac']);
+echo HtmlInput::hidden('ledger_type',$_REQUEST['ledger_type']);
 echo dossier::hidden();
 echo $bar;
-list($count, $html) = $Ledger->list_operation($sql, $offset, 1);
+
+list($count, $html) = $Ledger->list_operation($sql, $offset, $ask_pay);
 echo $html;
 echo $bar;
 $r = HtmlInput::get_to_hidden(array('l', 'date_start', 'date_end', 'desc', 
'amount_min', 'amount_max', 'qcode', 'accounting', 'unpaid', 'gDossier', 
'ledger_type', 'p_action'));
@@ -113,7 +118,8 @@
 }
 echo $r;
 
-echo '<p>' . HtmlInput::submit('paid', _('Mise à jour paiement')) . 
IButton::select_checkbox('fpaida') . IButton::unselect_checkbox('fpaida') . 
'</p>';
+if ($ask_pay)
+       echo '<p>' . HtmlInput::submit('paid', _('Mise à jour paiement')) . 
IButton::select_checkbox('fpaida') . IButton::unselect_checkbox('fpaida') . 
'</p>';
 
 echo '</form>';
 /*

Modified: phpcompta/trunk/include/operation_adm.inc.php
===================================================================
--- phpcompta/trunk/include/operation_adm.inc.php       2011-11-02 23:03:49 UTC 
(rev 4300)
+++ phpcompta/trunk/include/operation_adm.inc.php       2011-11-02 23:05:03 UTC 
(rev 4301)
@@ -34,5 +34,8 @@
 $qcode=$f->get_quick_code();
 $_GET['qcode']=$qcode;
 $_REQUEST['qcode']=$qcode;
-require_once ('user_action_gl.php');
 
+$var_array=compute_variable('ledger_type=ALL');
+put_global($var_array);
+require_once ('history_operation.inc.php');
+

Modified: phpcompta/trunk/include/operation_client.inc.php
===================================================================
--- phpcompta/trunk/include/operation_client.inc.php    2011-11-02 23:03:49 UTC 
(rev 4300)
+++ phpcompta/trunk/include/operation_client.inc.php    2011-11-02 23:05:03 UTC 
(rev 4301)
@@ -34,5 +34,8 @@
 $qcode=$f->get_quick_code();
 $_GET['qcode']=$qcode;
 $_REQUEST['qcode']=$qcode;
-require_once ('user_action_gl.php');
+$var_array=compute_variable('ledger_type=ALL');
+put_global($var_array);
+require_once ('history_operation.inc.php');
 
+

Modified: phpcompta/trunk/include/operation_supplier.inc.php
===================================================================
--- phpcompta/trunk/include/operation_supplier.inc.php  2011-11-02 23:03:49 UTC 
(rev 4300)
+++ phpcompta/trunk/include/operation_supplier.inc.php  2011-11-02 23:05:03 UTC 
(rev 4301)
@@ -34,5 +34,7 @@
 $qcode=$f->get_quick_code();
 $_GET['qcode']=$qcode;
 $_REQUEST['qcode']=$qcode;
-require_once ('user_action_gl.php');
+$var_array=compute_variable('ledger_type=ALL');
+put_global($var_array);
+require_once ('history_operation.inc.php');
 

Deleted: phpcompta/trunk/include/user_action_gl.php
===================================================================
--- phpcompta/trunk/include/user_action_gl.php  2011-11-02 23:03:49 UTC (rev 
4300)
+++ phpcompta/trunk/include/user_action_gl.php  2011-11-02 23:05:03 UTC (rev 
4301)
@@ -1,88 +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
-*/
-// Copyright Author Dany De Bontridder address@hidden
-/* $Revision$ */
-
-/*! \file
- * \brief included file for the great ledger
- */
-
-include_once ("user_common.php");
-include_once("class_user.php");
-require_once("class_iselect.php");
-require_once('class_acc_ledger.php');
-$gDossier=Dossier::id();
-$cn=new Database($gDossier);
-
-require_once('class_iposte.php');
-require_once('class_ipopup.php');
-
-echo '<div class="content">';
-
-$Ledger=new Acc_Ledger($cn,0);
-if ( !isset($_REQUEST['p_jrn']))
-{
-    $Ledger->id=-1;
-}
-else
-    $Ledger->id=$_REQUEST['p_jrn'];
-/*
- * @todo usefull ?
- */
-$_GET['ledger_type']='ALL';
-echo $Ledger->display_search_form();
-echo '<hr>';
-/*  compute the sql stmt */
-list($sql,$where)=$Ledger->build_search_sql($_GET);
-
-$max_line=$cn->count_sql($sql);
-
-$step=$_SESSION['g_pagesize'];
-$page=(isset($_GET['offset']))?$_GET['page']:1;
-$offset=(isset($_GET['offset']))?$_GET['offset']:0;
-$bar=jrn_navigation_bar($offset,$max_line,$step,$page);
-
-
-echo HtmlInput::request_to_hidden(array('sa','sb','sc','f_id','ac'));
-
-echo dossier::hidden();
-echo $bar;
-list($count,$html)= $Ledger->list_operation($sql,$offset);
-echo $html;
-echo $bar;
-
-/*
- * Export to csv
- */
-$r=HtmlInput::get_to_hidden(array('l','date_start','date_end','desc','amount_min','amount_max','qcode','accounting','unpaid','gDossier','ledger_type'));
-if (isset($_GET['r_jrn'])) {
-  foreach ($_GET['r_jrn'] as $k=>$v)
-    $r.=HtmlInput::hidden('r_jrn['.$k.']',$v);
-}
-echo '<form action="export.php" method="get">';
-echo $r;
-echo HtmlInput::hidden('act','CSV/histo');
-echo HtmlInput::submit('viewsearch','Export vers CSV');
-echo HtmlInput::hidden('p_action','ALL');
-echo '</form>';
-
-
-?>
-
-</div>




reply via email to

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