Debut des pages recaps

This commit is contained in:
Laurent Destailleur 2006-04-08 11:57:52 +00:00
parent fc0508f8d6
commit 234e7b227a
9 changed files with 326 additions and 54 deletions

View File

@ -401,7 +401,7 @@ if ($socidp > 0)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="noborder"><tr><td>'.$langs->trans("Summary").'</td>';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/comm/recap-client.php?socid='.$societe->id.'">'.$langs->trans("ShowCustomerPreview").'</a></td></tr></table></td>';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/comm/recap-client.php?socid='.$objsoc->id.'">'.$langs->trans("ShowCustomerPreview").'</a></td></tr></table></td>';
print '</tr>';
print '</table>';
print '<br>';

View File

@ -0,0 +1,156 @@
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program 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.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/
/**
\file htdocs/comm/recap-client.php
\ingroup societe
\brief Page de fiche recap client
\version $Revision$
*/
require("./pre.inc.php");
include_once(DOL_DOCUMENT_ROOT."/facture.class.php");
$langs->load("companies");
if ($conf->facture->enabled) $langs->load("bills");
// Sécurité accés client
$socid = $_GET["socid"];
if ($user->societe_id > 0)
{
$action = '';
$socid = $user->societe_id;
}
$user->getrights('facture');
/*
*
* Mode fiche
*
*/
llxHeader();
if ($socid > 0)
{
$societe = new Societe($db);
$societe->fetch($socid, $to); // si $to='next' ajouter " AND s.idp > $socid ORDER BY idp ASC LIMIT 1";
/*
* Affichage onglets
*/
$h = 0;
$head[$h][0] = DOL_URL_ROOT.'/soc.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Company");
$h++;
if ($societe->client==1)
{
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Customer");
$hselected=$h;
$h++;
}
if ($societe->client==2)
{
$head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$societe->id;
$head[$h][1] = $langs->trans("Prospect");
$h++;
}
if ($societe->fournisseur)
{
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Supplier");
$h++;
}
if ($conf->compta->enabled || $conf->comptaexpert->enabled)
{
$langs->load("compta");
$head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Accountancy");
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Note");
$h++;
if ($user->societe_id == 0)
{
$head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Documents");
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Notifications");
$h++;
if ($user->societe_id == 0)
{
$head[$h][0] = DOL_URL_ROOT."/index.php?socidp=$societe->id&action=add_bookmark";
$head[$h][1] = img_object($langs->trans("BookmarkThisPage"),'bookmark');
$head[$h][2] = 'image';
}
dolibarr_fiche_head($head, $hselected, $societe->nom);
/*
*
*/
print "<table width=\"100%\">\n";
print '<tr><td valign="top" width="50%">';
print '<table class="border" width="100%">';
// Nom
print '<tr><td width="20%">'.$langs->trans("Name").'</td><td width="80%" colspan="3">'.$societe->nom.'</td></tr>';
// Prefix
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
print ($societe->prefix_comm?$societe->prefix_comm:'&nbsp;');
print '</td></tr>';
print "</table>";
print "</td></tr></table>\n";
print '</div>';
print $langs->trans("FeatureNotYetAvailable");
}
else
{
dolibarr_print_error($db);
}
$db->close();
llxFooter('$Date$ - $Revision$');
?>

View File

@ -275,7 +275,7 @@ if ($socid > 0)
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="4"><table width="100%" class="noborder"><tr><td>'.$langs->trans("Summary").'</td>';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/compta/recap-client.php?socid='.$societe->id.'">'.$langs->trans("ShowAccountancyPreview").'</a></td></tr></table></td>';
print '<td align="right"><a href="'.DOL_URL_ROOT.'/compta/recap-compta.php?socid='.$societe->id.'">'.$langs->trans("ShowAccountancyPreview").'</a></td></tr></table></td>';
print '</tr>';
print '</table>';
print '<br>';

View File

@ -21,9 +21,9 @@
*/
/**
\file htdocs/compta/recap-client.php
\file htdocs/compta/recap-compta.php
\ingroup compta
\brief Page de fiche compta
\brief Page de fiche recap compta
\version $Revision$
*/
@ -127,60 +127,16 @@ if ($socid > 0)
print '<table class="border" width="100%">';
// Nom
print '<tr><td width="20%">'.$langs->trans("Name").'</td><td width="80%" colspan="3">'.$societe->nom.'</td></tr>';
print '<td>'.$langs->trans("Prefix").'</td><td colspan="3">';
// Prefix
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
print ($societe->prefix_comm?$societe->prefix_comm:'&nbsp;');
print '</td>';
if ($societe->client)
{
print '<tr>';
print '<td nowrap width="100">'.$langs->trans("CustomerCode"). '</td><td colspan="3">'. $societe->code_client . '</td>';
print '</tr>';
print '<tr>';
print '<td nowrap>'.$langs->trans("CustomerAccountancyCode").'</td><td colspan="3">'.$societe->code_compta.'</td>';
print '</tr>';
}
if ($societe->fournisseur)
{
print '<tr>';
print '<td nowrap>'.$langs->trans("SupplierCode"). '</td><td colspan="3">'. $societe->code_fournisseur . '</td>';
print '</tr>';
print '<tr>';
print '<td nowrap>'.$langs->trans("SupplierAccountancyCode").'</td><td colspan="3">'.$societe->code_compta_fournisseur.'</td>';
print '</tr>';
}
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td colspan="3">'.nl2br($societe->adresse)."</td></tr>";
print '<tr><td>'.$langs->trans('Zip').'</td><td>'.$societe->cp.'</td>';
print '<td>'.$langs->trans('Town').'</td><td>'.$societe->ville.'</td></tr>';
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$soc->pays.'</td>';
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dolibarr_print_phone($societe->tel,$societe->pays_code).'&nbsp;</td><td>'.$langs->trans("Fax").'</td><td>'.dolibarr_print_phone($societe->fax,$societe->pays_code).'&nbsp;</td></tr>';
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$societe->url\" target=\"_blank\">$societe->url</a>&nbsp;</td></tr>";
// Assujeti à TVA ou pas
print '<tr>';
print '<td nowrap="nowrap">'.$langs->trans('VATIsUsed').'</td><td colspan="3">';
print yn($objsoc->tva_assuj);
print '</td>';
print '</tr>';
// TVA Intra
print '<tr><td nowrap>'.$langs->trans('VATIntraVeryShort').'</td><td colspan="3">';
print $societe->tva_intra;
print '</td></tr>';
print "</table>";
/*
*
*/
print "</td></tr></table>\n";
print '</div>';

View File

@ -0,0 +1,156 @@
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program 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.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/
/**
\file htdocs/fourn/recap-fourn.php
\ingroup fournisseur
\brief Page de fiche recap fournisseur
\version $Revision$
*/
require("./pre.inc.php");
include_once(DOL_DOCUMENT_ROOT."/facture.class.php");
$langs->load("companies");
if ($conf->facture->enabled) $langs->load("bills");
// Sécurité accés client
$socid = $_GET["socid"];
if ($user->societe_id > 0)
{
$action = '';
$socid = $user->societe_id;
}
$user->getrights('facture');
/*
*
* Mode fiche
*
*/
llxHeader();
if ($socid > 0)
{
$societe = new Societe($db);
$societe->fetch($socid, $to); // si $to='next' ajouter " AND s.idp > $socid ORDER BY idp ASC LIMIT 1";
/*
* Affichage onglets
*/
$h = 0;
$head[$h][0] = DOL_URL_ROOT.'/soc.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Company");
$h++;
if ($societe->client==1)
{
$head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Customer");
$h++;
}
if ($societe->client==2)
{
$head[$h][0] = DOL_URL_ROOT.'/comm/prospect/fiche.php?id='.$societe->id;
$head[$h][1] = $langs->trans("Prospect");
$h++;
}
if ($societe->fournisseur)
{
$head[$h][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Supplier");
$hselected=$h;
$h++;
}
if ($conf->compta->enabled || $conf->comptaexpert->enabled)
{
$langs->load("compta");
$head[$h][0] = DOL_URL_ROOT.'/compta/fiche.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Accountancy");
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/socnote.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Note");
$h++;
if ($user->societe_id == 0)
{
$head[$h][0] = DOL_URL_ROOT.'/docsoc.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Documents");
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$societe->id;
$head[$h][1] = $langs->trans("Notifications");
$h++;
if ($user->societe_id == 0)
{
$head[$h][0] = DOL_URL_ROOT."/index.php?socidp=$societe->id&action=add_bookmark";
$head[$h][1] = img_object($langs->trans("BookmarkThisPage"),'bookmark');
$head[$h][2] = 'image';
}
dolibarr_fiche_head($head, $hselected, $societe->nom);
/*
*
*/
print "<table width=\"100%\">\n";
print '<tr><td valign="top" width="50%">';
print '<table class="border" width="100%">';
// Nom
print '<tr><td width="20%">'.$langs->trans("Name").'</td><td width="80%" colspan="3">'.$societe->nom.'</td></tr>';
// Prefix
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
print ($societe->prefix_comm?$societe->prefix_comm:'&nbsp;');
print '</td></tr>';
print "</table>";
print "</td></tr></table>\n";
print '</div>';
print $langs->trans("FeatureNotYetAvailable");
}
else
{
dolibarr_print_error($db);
}
$db->close();
llxFooter('$Date$ - $Revision$');
?>

View File

@ -46,6 +46,7 @@ ValidatedBy=Validated by %s
CanceledBy=Canceled by %s
ClosedBy=Closed by %s
FileWasRemoved=File was deleted
FeatureNotYetAvailable=Feature not yet available in this version
##### Webcal #####
LoginWebcal=Login for Webcalendar
AddCalendarEntry=Add entry in calendar

View File

@ -46,6 +46,7 @@ ValidatedBy=Valid
CanceledBy=Annulé par %s
ClosedBy=Cloturé par %s
FileWasRemoved=Le fichier a été supprimé
FeatureNotYetAvailable=Fonctionnalité pas encore disponible dans cette version
##### Webcal #####
LoginWebcal=Login Webcalendar
AddCalendarEntry=Ajouter entrée dans le calendrier

View File

@ -25,6 +25,7 @@ alter table llx_facture add column note_public text after note;
alter table llx_facture add column remise_absolue real DEFAULT 0 after remise_percent;
alter table llx_propal add column note_public text after note;
alter table llx_propal add column remise_absolue real DEFAULT 0 after remise_percent;
ALTER TABLE llx_societe ADD mode_reglement INT( 11 ) DEFAULT NULL ;
ALTER TABLE llx_societe ADD cond_reglement INT( 11 ) DEFAULT '1' NOT NULL ;

View File

@ -37,8 +37,9 @@ create table llx_propal
fk_user_cloture integer, -- cloture de la propale signee ou non signee
fk_statut smallint DEFAULT 0 NOT NULL,
price real DEFAULT 0,
remise_percent real DEFAULT 0, -- remise globale en pourcent
remise real DEFAULT 0,
remise_percent real DEFAULT 0, -- remise globale relative en pourcent
remise_absolue real DEFAULT 0, -- remise globale absolue
remise real DEFAULT 0, -- remise calculee
tva real DEFAULT 0, -- montant tva apres remise globale
total_ht real DEFAULT 0, -- montant total ht apres remise globale
total real DEFAULT 0, -- montant total ttc apres remise globale