412 : code cleaning
Remove user_action_gl.php (replace by history_action.inc.php) Callable from menu
This commit is contained in:
parent
e585bb0d3a
commit
d30b171afe
5 changed files with 20 additions and 94 deletions
|
|
@ -40,12 +40,16 @@ if ( isset ($_GET['ledger_type']))
|
|||
{
|
||||
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 @@ $bar = jrn_navigation_bar($offset, $max_line, $step, $page);
|
|||
|
||||
|
||||
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 @@ if (isset($_GET['r_jrn']))
|
|||
}
|
||||
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>';
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -34,5 +34,8 @@ $f=new Fiche($cn,$_REQUEST['f_id']);
|
|||
$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');
|
||||
|
||||
|
|
|
|||
|
|
@ -34,5 +34,8 @@ $f=new Fiche($cn,$_REQUEST['f_id']);
|
|||
$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');
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -34,5 +34,7 @@ $f=new Fiche($cn,$_REQUEST['f_id']);
|
|||
$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');
|
||||
|
||||
|
|
|
|||
|
|
@ -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 ddebontridder@yahoo.fr
|
||||
/* $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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue