From 506274687d9727244cd719242486fb5d11b48275 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 Jul 2011 14:41:02 +0000 Subject: [PATCH] Fix: No check box if no PDF --- ChangeLog | 3 ++- htdocs/admin/system/dolibarr.php | 8 ++++---- htdocs/compta/facture/impayees.php | 12 ++++++------ htdocs/compta/paiement_charge.php | 17 ++++++++--------- htdocs/core/class/html.form.class.php | 10 ++++++---- htdocs/core/class/html.formfile.class.php | 9 +++++---- htdocs/fourn/facture/index.php | 7 ++++--- .../modules/fichinter/pdf_soleil.modules.php | 4 ++-- 8 files changed, 37 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index 81aa3c6c02d..2808c594086 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,10 @@ -------------------------------------------------------------- English Dolibarr ChangeLog -$Id: ChangeLog,v 1.423 2011/07/07 16:03:53 simnandez Exp $ +$Id: ChangeLog,v 1.424 2011/07/13 14:16:39 eldy Exp $ -------------------------------------------------------------- ***** ChangeLog for 3.1 compared to 3.0 ***** +WARNING: IE6 browser is no more supported in this version. For users: - New: War against number of clicks: - When adding a free bank transaction, form to add next one is still diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 54c28b04389..29544b85be1 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -20,7 +20,7 @@ /** * \file htdocs/admin/system/dolibarr.php * \brief Page to show Dolibarr informations - * \version $Id$ + * \version $Id: dolibarr.php,v 1.58 2011/07/13 13:15:17 eldy Exp $ */ require("../../main.inc.php"); @@ -163,7 +163,7 @@ if (function_exists('date_default_timezone_get')) print ''.$langs->trans("CurrentTimeZone").''; // Timezone server PHP $a=date_default_timezone_get(); $a.=' ('.(-dol_mktime(0,0,0,1,1,1970)>0?'+':'').(-dol_mktime(0,0,0,1,1,1970)).')'; - print $form->textwithtooltip($a,$txt,2,1,img_info()); + print $form->textwithtooltip($a,$txt,2,1,img_info('')); print ''."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php } else @@ -171,7 +171,7 @@ else $var=!$var; print ''.$langs->trans("PHPServerOffsetWithGreenwich").''; $a=(-dol_mktime(0,0,0,1,1,1970)>0?'+':'').(-dol_mktime(0,0,0,1,1,1970)); - print $form->textwithtooltip($a,$txt,2,1,img_info()); + print $form->textwithtooltip($a,$txt,2,1,img_info('')); print ''."\n"; } $var=!$var; @@ -213,5 +213,5 @@ print '=> '.$langs->trans("File encoding").''; print '
'; -llxFooter('$Date$ - $Revision$'); +llxFooter('$Date: 2011/07/13 13:15:17 $ - $Revision: 1.58 $'); ?> diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index c508e65182f..9a36e5a2e8a 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -1,7 +1,7 @@ * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -23,7 +23,7 @@ * \file htdocs/compta/facture/impayees.php * \ingroup facture * \brief Page to list and build liste of unpaid invoices - * \version $Revision$ + * \version $Revision: 1.83 $ */ require("../../main.inc.php"); @@ -268,7 +268,7 @@ if ($result) print_fiche_titre($titre,$link); //print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',0); // We don't want pagination on this page - if ($mesg) print $mesg; + dol_htmloutput_mesg($mesg); $i = 0; print ''; @@ -351,10 +351,10 @@ if ($result) // PDF Picto print ''; + print ''; print '
'; - $filename=dol_sanitizeFileName($objp->facnumber); + $filename=dol_sanitizeFileName($objp->facnumber); $filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($objp->facnumber); $foundpdf=$formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','',1,'',1,$param); - print '
'; @@ -425,5 +425,5 @@ if ($result) $db->close(); -llxFooter('$Date$ - $Revision$'); +llxFooter('$Date: 2011/07/13 14:41:02 $ - $Revision: 1.83 $'); ?> diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index f265d751e83..4020909186d 100755 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2011 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 @@ -20,7 +20,7 @@ * \file htdocs/compta/paiement_charge.php * \ingroup tax * \brief Page to add payment of a tax - * \version $Id$ + * \version $Id: paiement_charge.php,v 1.52 2011/07/13 14:25:49 eldy Exp $ */ require('../main.inc.php'); @@ -42,8 +42,9 @@ if ($user->societe_id > 0) /* - * Actions add payment + * Actions */ + if ($_POST["action"] == 'add_payment') { $error=0; @@ -145,7 +146,7 @@ if ($_POST["action"] == 'add_payment') /* - * Affichage + * View */ llxHeader(); @@ -153,9 +154,7 @@ llxHeader(); $html=new Form($db); -/* - * Formulaire de creation d'un paiement de charge - */ +// Formulaire de creation d'un paiement de charge if ($_GET["action"] == 'create') { @@ -223,7 +222,7 @@ if ($_GET["action"] == 'create') print ''; print ''.$langs->trans('AccountToDebit').''; print ''; - $html->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$charge->accountid, "accountid", 0, "courant=1",1); // Affiche liste des comptes courant + $html->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$charge->accountid, "accountid", 0, '',1); // Show opend bank account list print ''; print ''.$langs->trans('Numero'); @@ -335,5 +334,5 @@ if ($_GET["action"] == 'create') $db->close(); -llxFooter('$Date$ - $Revision$'); +llxFooter('$Date: 2011/07/13 14:25:49 $ - $Revision: 1.52 $'); ?> diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7e97abed808..5c7dbb3a456 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -31,7 +31,7 @@ * \file htdocs/core/class/html.form.class.php * \ingroup core * \brief File of class with all html predefined components - * \version $Id: html.form.class.php,v 1.188 2011/07/10 17:28:09 hregis Exp $ + * \version $Id: html.form.class.php,v 1.189 2011/07/13 14:03:15 eldy Exp $ */ @@ -1771,12 +1771,14 @@ class Form } /** - * \brief Retourne la liste deroulante des differents etats d'une propal. - * Les valeurs de la liste sont les id de la table c_propalst - * \param selected etat pre-selectionne + * Return combo list of differents status of a proposal + * Values are id of table c_propalst + * @param selected etat pre-selectionne */ function select_propal_statut($selected='') { + global $langs; + $sql = "SELECT id, code, label, active FROM ".MAIN_DB_PREFIX."c_propalst"; $sql .= " WHERE active = 1"; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index cfd46212a10..ab274743513 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -22,7 +22,7 @@ * \file htdocs/core/class/html.formfile.class.php * \ingroup core * \brief File of class to offer components to list and upload files - * \version $Id: html.formfile.class.php,v 1.48 2011/07/13 07:38:11 hregis Exp $ + * \version $Id: html.formfile.class.php,v 1.49 2011/07/13 14:41:03 eldy Exp $ */ @@ -152,6 +152,7 @@ class FormFile */ function show_documents($modulepart,$filename,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$maxfilenamelength=28,$noform=0,$param='',$title='',$buttonlabel='',$codelang='',$hooks='') { + $this->numoffiles=0; print $this->showdocuments($modulepart,$filename,$filedir,$urlsource,$genallowed,$delallowed,$modelselected,$allowgenifempty,$forcenomultilang,$iconPDF,$maxfilenamelength,$noform,$param,$title,$buttonlabel,$codelang,$hooks); return $this->numoffiles; } @@ -845,12 +846,12 @@ class FormFile print ''; print ''; print ''; - + print ''; - + print '
'; print '
'; - + print ''; /*print ''; print ''; diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index 61f8131f847..5d753e8e01d 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -22,7 +22,7 @@ * \file htdocs/fourn/facture/index.php * \ingroup fournisseur,facture * \brief List of suppliers invoices - * \version $Id$ + * \version $Id: index.php,v 1.84 2011/07/13 13:10:51 eldy Exp $ */ require("../../main.inc.php"); @@ -35,6 +35,7 @@ if (!$user->rights->fournisseur->facture->lire) accessforbidden(); $langs->load("companies"); +$langs->load("bills"); $socid = $_GET["socid"]; @@ -292,5 +293,5 @@ else $db->close(); -llxFooter('$Date$ - $Revision$'); +llxFooter('$Date: 2011/07/13 13:10:51 $ - $Revision: 1.84 $'); ?> diff --git a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php index ad281e7f23a..f58d2118dcc 100644 --- a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php +++ b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php @@ -23,7 +23,7 @@ * \file htdocs/includes/modules/fichinter/pdf_soleil.modules.php * \ingroup ficheinter * \brief Fichier de la classe permettant de generer les fiches d'intervention au modele Soleil - * \version $Id$ + * \version $Id: pdf_soleil.modules.php,v 1.101 2011/07/13 14:09:35 eldy Exp $ */ require_once(DOL_DOCUMENT_ROOT."/includes/modules/fichinter/modules_fichinter.php"); require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php"); @@ -105,7 +105,7 @@ class pdf_soleil extends ModelePDFFicheinter $result=$fichinter->fetch($id); if ($result < 0) { - dol_print_error($db,$fichinter->error); + dol_print_error($this->db,$fichinter->error); } }
'.$langs->trans("Documents2").'