From 7e562c6fa0da5c4f3911bfab28d722b53652a9b5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 30 Jun 2009 00:01:47 +0000 Subject: [PATCH] Qual: Uniformize tab contents --- htdocs/societe/document.php | 27 ++++++++++++++++++++-- htdocs/societe/socnote.php | 45 +++++++++++++++++++++---------------- 2 files changed, 51 insertions(+), 21 deletions(-) diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index 6a0a9f0d85a..0f1e3efc682 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -110,6 +110,8 @@ if ($_REQUEST['action'] == 'confirm_deletefile' && $_REQUEST['confirm'] == 'yes' * View */ +$form = new Form($db); + llxHeader(); if ($socid > 0) @@ -139,12 +141,33 @@ if ($socid > 0) print ''; // Ref - print ''; + print ''; + print ''; // Prefix print ''; - // Nbre fichiers + if ($societe->client) + { + print ''; + } + + if ($societe->fournisseur) + { + print ''; + } + + // Nbre fichiers print ''; //Total taille diff --git a/htdocs/societe/socnote.php b/htdocs/societe/socnote.php index 4b7261c2ba8..77c979ed79c 100644 --- a/htdocs/societe/socnote.php +++ b/htdocs/societe/socnote.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2005-2006 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -17,14 +17,14 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/** - \file htdocs/societe/socnote.php - \brief Tab for notes on third party - \ingroup societe - \version $Id$ -*/ - + +/** + * \file htdocs/societe/socnote.php + * \brief Tab for notes on third party + * \ingroup societe + * \version $Id$ + */ + require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); @@ -37,6 +37,10 @@ $socid = isset($_GET["socid"])?$_GET["socid"]:$_POST["socid"]; if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'societe', $socid); +/* + * Actions + */ + if ($_POST["action"] == 'add') { $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET note='".addslashes($_POST["note"])."' WHERE rowid=".$_POST["socid"]; @@ -48,28 +52,29 @@ if ($_POST["action"] == 'add') /* - * + * View */ -llxHeader(); $form = new Form($db); +llxHeader(); + if ($socid > 0) { $societe = new Societe($db, $socid); $societe->fetch($socid); - + /* * Affichage onglets */ $head = societe_prepare_head($societe); dol_fiche_head($head, 'note', $langs->trans("ThirdParty")); - - + + print "
"; print ''; - + print '
'.$langs->trans("Name").''.$societe->nom.'
'.$langs->trans("Name").''; + print $form->showrefnav($societe,'socid','',1,'rowid','nom'); + print '
'.$langs->trans('Prefix').''.$societe->prefix_comm.'
'; + print $langs->trans('CustomerCode').''; + print $societe->code_client; + if ($societe->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode"); + print '
'; + print $langs->trans('SupplierCode').''; + print $societe->code_fournisseur; + if ($societe->check_codefournisseur() <> 0) print ' '.$langs->trans("WrongSupplierCode"); + print '
'.$langs->trans("NbOfAttachedFiles").''.sizeof($filearray).'
'; print ''; @@ -79,7 +84,8 @@ if ($socid > 0) print ''; - if ($societe->client) { + if ($societe->client) + { print ''; } - if ($societe->fournisseur) { + if ($societe->fournisseur) + { print ''; } - + print "
'.$langs->trans('Name').'
'.$langs->trans('Prefix').''.$societe->prefix_comm.'
'; print $langs->trans('CustomerCode').''; print $societe->code_client; @@ -87,7 +93,8 @@ if ($socid > 0) print '
'; print $langs->trans('SupplierCode').''; print $societe->code_fournisseur; @@ -124,7 +131,7 @@ if ($socid > 0) { print '
"; print ''; @@ -144,7 +151,7 @@ if ($_GET["action"] == '') { print ''.$langs->trans("Modify").''; } - + print ''; }