Merge with the branches/rel400
* New module budget * Detail for impress of account * Code rewrited * Group in analytic accountancy * Fix Bug
This commit is contained in:
parent
4e4529c51a
commit
cd96d07c1e
113 changed files with 1193 additions and 1104 deletions
82
include/anc_group.inc.php
Normal file
82
include/anc_group.inc.php
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
<?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 manage the group
|
||||
*
|
||||
*/
|
||||
require_once ('class_anc_group.php');
|
||||
require_once ('class_widget.php');
|
||||
$r=new Anc_Group($cn);
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// REMOVE
|
||||
if ( isset ($_POST['remove'])) {
|
||||
if (isset($_POST['ck'] )) {
|
||||
foreach ($_POST['ck'] as $m ) {
|
||||
$obj=new Anc_Group($cn);
|
||||
$obj->ga_id=$m;
|
||||
$obj->remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// INSERT
|
||||
if ( isset($_POST['add'])) {
|
||||
$obj=new Anc_Group($cn);
|
||||
$obj->get_from_array($_POST);
|
||||
echo $obj->insert();
|
||||
}
|
||||
$array=$r->myList();
|
||||
|
||||
echo '<div class="u_content">';
|
||||
echo '<form method="post">';
|
||||
echo dossier::hidden();
|
||||
echo '<table style="border: 2px outset blue; width: 100%;" >';
|
||||
echo '<tr> <th> Code </th><th>Plan </td><th>Description</th></tr>';
|
||||
foreach ($array as $idx=>$m) {
|
||||
echo '<tr>';
|
||||
echo '<td>'.$m->ga_id.'</td>';
|
||||
echo '<td>'.$m->pa_name.'</td>';
|
||||
echo '<td>'.$m->ga_description.'</td>';
|
||||
echo '<td> Effacer <input type="Checkbox" name="ck[]" value="'.$m->ga_id.'">'.'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
$w=new widget("text");
|
||||
$val_pa_id=make_array($cn,"select pa_id,pa_name from plan_analytique");
|
||||
$wPa_id=new widget ("select");
|
||||
$wPa_id->value=$val_pa_id;
|
||||
|
||||
echo "<td>".$w->IOValue("ga_id")."</td>";
|
||||
echo "<td>".$wPa_id->IOValue("pa_id")."</td>";
|
||||
echo "<td>".$w->IOValue("ga_description").
|
||||
widget::submit('add','Ajouter').
|
||||
"</td>";;
|
||||
|
||||
echo '</table>';
|
||||
|
||||
echo "<hr>";
|
||||
echo widget::submit('remove','Effacer');
|
||||
|
||||
echo '</div>';
|
||||
Loading…
Add table
Add a link
Reference in a new issue