#16: Ajout balance for supplier, customer and adminstration
This commit is contained in:
parent
a57a93c470
commit
622f5aaf82
5 changed files with 131 additions and 11 deletions
|
|
@ -29,8 +29,6 @@
|
|||
require_once('class_contact.php');
|
||||
require_once('class_ipopup.php');
|
||||
|
||||
echo ICard::ipopup('ipopcard');
|
||||
|
||||
/* $sub_action = sb = detail */
|
||||
/* $cn database conx */
|
||||
$return=new IAction();
|
||||
|
|
@ -53,6 +51,12 @@ case 'cn':
|
|||
case 'op':
|
||||
$def=4;
|
||||
break;
|
||||
case 'bal':
|
||||
$def=7;
|
||||
break;
|
||||
case 'let':
|
||||
$def=6;
|
||||
break;
|
||||
default:
|
||||
$def=1;
|
||||
$ss_action='dc';
|
||||
|
|
@ -64,6 +68,8 @@ echo ShowItem(array(
|
|||
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('?p_action=adm&'.dossier::get(),_('Retour liste'),_('Retour à la liste des administration'),5)
|
||||
),
|
||||
'H',"mtitle","mtitle",$def,' ');
|
||||
|
|
@ -128,3 +134,17 @@ if ( $ss_action == 'cn')
|
|||
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');
|
||||
}
|
||||
|
|
|
|||
74
include/balance_card.inc.php
Normal file
74
include/balance_card.inc.php
Normal file
|
|
@ -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$ */
|
||||
|
||||
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
||||
|
||||
/*!\file
|
||||
* \brief show the status of a card
|
||||
*/
|
||||
require_once('class_exercice.php');
|
||||
echo '<div class="content" style="width:80%;margin-left:10%">';
|
||||
$exercice=new Exercice($cn);
|
||||
$old='';
|
||||
$fiche=new Fiche($cn,$_GET['f_id']);
|
||||
$year=$User->get_exercice();
|
||||
if ( $year == 0 )
|
||||
{
|
||||
$html="erreur aucune période par défaut, allez dans préférence pour en choisir une";
|
||||
}
|
||||
else
|
||||
{
|
||||
$per=new Periode($cn);
|
||||
$limit_periode=$per->get_limit($year);
|
||||
$array['from_periode']=$limit_periode[0]->first_day();
|
||||
$array['to_periode']=$limit_periode[1]->last_day();
|
||||
if (isset($_GET['ex']))
|
||||
{
|
||||
$limit_periode=$per->get_limit($_GET['ex']);
|
||||
$array['from_periode']=$limit_periode[0]->first_day();
|
||||
}
|
||||
|
||||
/*
|
||||
* Add button to select another year
|
||||
*/
|
||||
if ($exercice->count() > 1 )
|
||||
{
|
||||
$default=(isset($_GET['ex']))?$_GET['ex']:$year;
|
||||
$dossier=dossier::id();
|
||||
|
||||
$old='<form method="get" action="commercial.php">';
|
||||
$is=$exercice->select('ex',$default,'onchange = "submit(this)"');
|
||||
$old.="Autre exercice ".$is->input();
|
||||
$old.=HtmlInput::hidden('f_id',$_GET['f_id']);
|
||||
$old.=HtmlInput::hidden('p_action',$_GET['p_action']);
|
||||
$old.=HtmlInput::hidden('sb',$_GET['sb']);
|
||||
$old.=HtmlInput::hidden('sc',$_GET['sc']);
|
||||
$old.=dossier::hidden();
|
||||
$old.='</form>';
|
||||
}
|
||||
|
||||
if ( $fiche->HtmlTable($array,0,0)==-1){
|
||||
echo h2("Aucun opération pour l'exercice courant",'class="error"');
|
||||
}
|
||||
echo $old;
|
||||
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
|
|
@ -1190,10 +1190,11 @@ class Fiche
|
|||
/*!
|
||||
* \brief HtmlTable, display a HTML of a card for the asked period
|
||||
* \param $p_array default = null keys = from_periode, to_periode
|
||||
* \param $op_let lettering of operation 0
|
||||
* \return -1 if nothing is found otherwise 0
|
||||
*\param $op_let 0 all operation, 1 only lettered one, 2 only unlettered one
|
||||
*\return -1 if nothing is found otherwise 0
|
||||
*\see get_row_date
|
||||
*/
|
||||
function HtmlTable($p_array=null,$op_let=0)
|
||||
function HtmlTable($p_array=null,$op_let=0,$from_div=1)
|
||||
{
|
||||
if ( $p_array == null)
|
||||
$p_array=$_REQUEST;
|
||||
|
|
@ -1209,9 +1210,15 @@ class Fiche
|
|||
return -1;
|
||||
|
||||
$rep="";
|
||||
|
||||
echo '<h2 class="info">'." ".$name.'</h2>';
|
||||
echo "<TABLE class=\"resultfooter\" style=\"width:100%;border-collapse:separate;border-spacing:5px\">";
|
||||
if ( $from_div==1)
|
||||
{
|
||||
echo '<h2 class="info">'." ".$name.'</h2>';
|
||||
echo "<TABLE class=\"resultfooter\" style=\"width:100%;border-collapse:separate;border-spacing:5px\">";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<TABLE class=\"result\" style=\"width:100%;border-collapse:separate;border-spacing:5px\">";
|
||||
}
|
||||
echo '<tbody>';
|
||||
echo "<TR>".
|
||||
"<TH>"._('Date')."</TH>".
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
require_once('class_contact.php');
|
||||
require_once('class_ipopup.php');
|
||||
|
||||
echo ICard::ipopup('ipopcard');
|
||||
|
||||
/* $sub_action = sb = detail */
|
||||
/* $cn database conx */
|
||||
|
|
@ -53,6 +52,9 @@ case 'op':
|
|||
case 'let':
|
||||
$def=6;
|
||||
break;
|
||||
case 'bal':
|
||||
$def=7;
|
||||
break;
|
||||
default:
|
||||
$def=1;
|
||||
$ss_action='dc';
|
||||
|
|
@ -64,6 +66,7 @@ echo ShowItem(array(
|
|||
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('?p_action=client&'.dossier::get(),_('Retour liste'),_('Retour à la liste des clients'),5)
|
||||
),
|
||||
|
|
@ -137,3 +140,10 @@ if ( $def==6 )
|
|||
{
|
||||
require_once('lettering.gestion.inc.php');
|
||||
}
|
||||
/*-------------------------------------------------------------------------
|
||||
* Balance of the card
|
||||
*-------------------------------------------------------------------------*/
|
||||
if ( $ss_action=='bal')
|
||||
{
|
||||
require_once('balance_card.inc.php');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,9 +27,7 @@
|
|||
* the customer category
|
||||
*/
|
||||
require_once('class_contact.php');
|
||||
require_once('class_ipopup.php');
|
||||
|
||||
echo ICard::ipopup('ipopcard');
|
||||
|
||||
/* $sub_action = sb = detail */
|
||||
/* $cn database conx */
|
||||
|
|
@ -56,6 +54,9 @@ case 'op':
|
|||
case 'let':
|
||||
$def=6;
|
||||
break;
|
||||
case 'bal':
|
||||
$def=7;
|
||||
break;
|
||||
default:
|
||||
$def=1;
|
||||
$ss_action='dc';
|
||||
|
|
@ -68,6 +69,7 @@ echo ShowItem(array(
|
|||
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('?p_action=supplier&'.dossier::get(),_('Retour liste'),_('Retour à la liste des fournisseurs'),5)
|
||||
),
|
||||
|
|
@ -101,6 +103,13 @@ 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
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue