From 234e7b227afdf27d6d913c8faea55cbf00c43a74 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 8 Apr 2006 11:57:52 +0000 Subject: [PATCH] Debut des pages recaps --- htdocs/comm/fiche.php | 2 +- htdocs/comm/recap-client.php | 156 ++++++++++++++++++ htdocs/compta/fiche.php | 2 +- .../{recap-client.php => recap-compta.php} | 56 +------ htdocs/fourn/recap-fourn.php | 156 ++++++++++++++++++ htdocs/langs/en_US/other.lang | 1 + htdocs/langs/fr_FR/other.lang | 1 + mysql/migration/2.0.0-2.1.0.sql | 1 + mysql/tables/llx_propal.sql | 5 +- 9 files changed, 326 insertions(+), 54 deletions(-) create mode 100644 htdocs/comm/recap-client.php rename htdocs/compta/{recap-client.php => recap-compta.php} (81%) create mode 100644 htdocs/fourn/recap-fourn.php diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index a5e976c820a..51bdf74557b 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -401,7 +401,7 @@ if ($socidp > 0) print ''; print ''; print ''; + print '
'; - print '
'.$langs->trans("Summary").''.$langs->trans("ShowCustomerPreview").'
'.$langs->trans("ShowCustomerPreview").'
'; print ''; print ''; print '
'; diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php new file mode 100644 index 00000000000..d1ed319fca0 --- /dev/null +++ b/htdocs/comm/recap-client.php @@ -0,0 +1,156 @@ + + * Copyright (C) 2004-2006 Laurent Destailleur + * + * 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 "\n"; + print '
'; + + print ''; + + // Nom + print ''; + + // Prefix + print ''; + + print "
'.$langs->trans("Name").''.$societe->nom.'
'.$langs->trans("Prefix").''; + print ($societe->prefix_comm?$societe->prefix_comm:' '); + print '
"; + + print "
\n"; + + print ''; + + + print $langs->trans("FeatureNotYetAvailable"); +} +else +{ + dolibarr_print_error($db); +} + + +$db->close(); + +llxFooter('$Date$ - $Revision$'); +?> diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index f2af6812b76..bf5e1e4c55a 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -275,7 +275,7 @@ if ($socid > 0) print ''; print ''; print ''; + print '
'; - print '
'.$langs->trans("Summary").''.$langs->trans("ShowAccountancyPreview").'
'.$langs->trans("ShowAccountancyPreview").'
'; print ''; print ''; print '
'; diff --git a/htdocs/compta/recap-client.php b/htdocs/compta/recap-compta.php similarity index 81% rename from htdocs/compta/recap-client.php rename to htdocs/compta/recap-compta.php index b53b325edcc..60749d02cbc 100644 --- a/htdocs/compta/recap-client.php +++ b/htdocs/compta/recap-compta.php @@ -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 ''; + // Nom print ''; - print ''; - - if ($societe->client) - { - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - } - - if ($societe->fournisseur) - { - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - } - - print '"; - - print ''; - print ''; - - print ''; - - print ''; - - print '"; - - // Assujeti à TVA ou pas - print ''; - print ''; - print ''; - - // TVA Intra - print ''; - + print "
'.$langs->trans("Name").''.$societe->nom.'
'.$langs->trans("Prefix").''; + // Prefix + print '
'.$langs->trans("Prefix").''; print ($societe->prefix_comm?$societe->prefix_comm:' '); - print '
'.$langs->trans("CustomerCode"). ''. $societe->code_client . '
'.$langs->trans("CustomerAccountancyCode").''.$societe->code_compta.'
'.$langs->trans("SupplierCode"). ''. $societe->code_fournisseur . '
'.$langs->trans("SupplierAccountancyCode").''.$societe->code_compta_fournisseur.'
'.$langs->trans("Address").''.nl2br($societe->adresse)."
'.$langs->trans('Zip').''.$societe->cp.''.$langs->trans('Town').''.$societe->ville.'
'.$langs->trans('Country').''.$soc->pays.'
'.$langs->trans("Phone").''.dolibarr_print_phone($societe->tel,$societe->pays_code).' '.$langs->trans("Fax").''.dolibarr_print_phone($societe->fax,$societe->pays_code).' 
'.$langs->trans("Web")."url\" target=\"_blank\">$societe->url 
'.$langs->trans('VATIsUsed').''; - print yn($objsoc->tva_assuj); - print '
'.$langs->trans('VATIntraVeryShort').''; - print $societe->tva_intra; print '
"; - /* - * - */ print "\n"; print ''; diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php new file mode 100644 index 00000000000..aef629e6a0f --- /dev/null +++ b/htdocs/fourn/recap-fourn.php @@ -0,0 +1,156 @@ + + * Copyright (C) 2004-2006 Laurent Destailleur + * + * 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 "\n"; + print '
'; + + print ''; + + // Nom + print ''; + + // Prefix + print ''; + + print "
'.$langs->trans("Name").''.$societe->nom.'
'.$langs->trans("Prefix").''; + print ($societe->prefix_comm?$societe->prefix_comm:' '); + print '
"; + + print "
\n"; + + print ''; + + + print $langs->trans("FeatureNotYetAvailable"); +} +else +{ + dolibarr_print_error($db); +} + + +$db->close(); + +llxFooter('$Date$ - $Revision$'); +?> diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 839187ac4c7..758377229fd 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -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 diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index 83df9e84d0d..e45494a8c8f 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -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 diff --git a/mysql/migration/2.0.0-2.1.0.sql b/mysql/migration/2.0.0-2.1.0.sql index 714d35bae82..9157cba89f8 100644 --- a/mysql/migration/2.0.0-2.1.0.sql +++ b/mysql/migration/2.0.0-2.1.0.sql @@ -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 ; diff --git a/mysql/tables/llx_propal.sql b/mysql/tables/llx_propal.sql index 3abae04ab43..bafe663df2d 100644 --- a/mysql/tables/llx_propal.sql +++ b/mysql/tables/llx_propal.sql @@ -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