From 5937cd7f70e110b6737fa46b63995240223a9adb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 May 2015 17:53:25 +0200 Subject: [PATCH] NEW Forms are using the tab look, even in creation mode. --- htdocs/commande/card.php | 8 +++- htdocs/compta/facture.php | 6 ++- htdocs/compta/facture/list.php | 2 +- htdocs/compta/facture/mergepdftool.php | 6 +-- htdocs/compta/resultat/bilan.php | 57 -------------------------- htdocs/compta/resultat/clientfourn.php | 3 ++ htdocs/compta/resultat/compteres.php | 52 ----------------------- htdocs/compta/resultat/index.php | 3 ++ htdocs/core/lib/report.lib.php | 2 + htdocs/don/card.php | 24 ++++++----- htdocs/don/index.php | 4 +- htdocs/fichinter/card.php | 12 +++++- htdocs/fourn/commande/card.php | 6 ++- htdocs/fourn/facture/card.php | 8 +++- 14 files changed, 59 insertions(+), 134 deletions(-) delete mode 100644 htdocs/compta/resultat/bilan.php delete mode 100644 htdocs/compta/resultat/compteres.php diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 1c0c72f07e5ba..6ff1243000039 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -11,7 +11,7 @@ * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Ferran Marcet - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -1315,6 +1315,8 @@ print ''; print ''; + dol_fiche_head(''); + print ''; // Reference @@ -1545,8 +1547,10 @@ print '
'; + dol_fiche_end(); + // Button "Create Draft" - print '
'; + print '
'; print ''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 556da5db0ce52..6621db1d2418d 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1969,6 +1969,8 @@ print ''; print ''; + dol_fiche_head(''); + print ''; // Ref @@ -2472,8 +2474,10 @@ print "
\n"; + dol_fiche_end(); + // Button "Create Draft" - print '
'; + print '
'; print ''; print '     '; print ''; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index e888941e95ed2..a396d9fdf1d1a 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -300,7 +300,7 @@ print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'f.ref_client','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Date'),$_SERVER['PHP_SELF'],'f.datef','',$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateDue"),$_SERVER['PHP_SELF'],"f.date_lim_reglement",'',$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Company'),$_SERVER['PHP_SELF'],'s.nom','',$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('ThirdParty'),$_SERVER['PHP_SELF'],'s.nom','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('AmountHT'),$_SERVER['PHP_SELF'],'f.total','',$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('AmountVAT'),$_SERVER['PHP_SELF'],'f.tva','',$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('AmountTTC'),$_SERVER['PHP_SELF'],'f.total_ttc','',$param,'align="right"',$sortfield,$sortorder); diff --git a/htdocs/compta/facture/mergepdftool.php b/htdocs/compta/facture/mergepdftool.php index 2a998c07a53b9..ff1bde2446625 100644 --- a/htdocs/compta/facture/mergepdftool.php +++ b/htdocs/compta/facture/mergepdftool.php @@ -646,7 +646,7 @@ print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'f.ref_client','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateDue"),$_SERVER["PHP_SELF"],"f.date_lim_reglement","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("PaymentMode"),$_SERVER["PHP_SELF"],"f.fk_reglement_mode","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Taxes"),$_SERVER["PHP_SELF"],"f.tva","",$param,'align="right"',$sortfield,$sortorder); @@ -683,7 +683,7 @@ print ''; print ''; print ''; - $form->select_types_paiements($search_paymentmode, 'search_paymentmode'); + $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 0, 1); print ''; print ''; print ' '; @@ -799,7 +799,7 @@ print ''; // Remain to receive - print ''.((! empty($objp->am) || ! empty($cn) || ! empty($dep))?price($objp->total_ttc-$objp->am-$cn-$dep):' ').''; + print ''.(((! empty($objp->total_ttc) || ! empty($objp->am) || ! empty($cn) || ! empty($dep)) && ($objp->total_ttc - $objp->am - $cn - $dep)) ? price($objp->total_ttc - $objp->am - $cn - $dep):' ').''; // Status of invoice print ''; diff --git a/htdocs/compta/resultat/bilan.php b/htdocs/compta/resultat/bilan.php deleted file mode 100644 index 2f31b9e11b768..0000000000000 --- a/htdocs/compta/resultat/bilan.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * 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 3 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, see . - */ - -/** - * \file htdocs/compta/resultat/bilan.php - * \ingroup compta - * \brief Fichier page bilan compta - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; - -// Security check -$socid = GETPOST('socid','int'); -if ($user->societe_id > 0) $socid = $user->societe_id; -if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta','','','resultat'); -if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport'); - - -/* - * Views - */ - -llxHeader(); - -$year=$_GET["year"]; -$month=$_GET["month"]; -if (! $year) { $year = strftime("%Y", time()); } - - -/* Le compte de r�sultat est un document officiel requis par l'administration selon le status ou activit� */ - -print_titre("Bilan".($year?" annee $year":"")); - -print '
'; - -print $langs->trans("FeatureNotYetAvailable"); - - -llxFooter(); - -$db->close(); diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 65e6866befe3c..d9ad2825c8866 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -144,6 +144,9 @@ $builddate=time(); //$exportlink=$langs->trans("NotYetAvailable"); } + +$hselected = 'report'; + report_header($name,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta),$calcmode); // Show report array diff --git a/htdocs/compta/resultat/compteres.php b/htdocs/compta/resultat/compteres.php deleted file mode 100644 index b3b6166589f33..0000000000000 --- a/htdocs/compta/resultat/compteres.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * 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 3 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, see . - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; - - -// Security check -$socid = GETPOST('socid','int'); -if ($user->societe_id > 0) $socid = $user->societe_id; -if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta','','','resultat'); -if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport'); - - - -/* - * Views - */ -llxHeader(); - -$year=$_GET["year"]; -$month=$_GET["month"]; -if (! $year) { $year = strftime("%Y", time()); } - - -/* Le compte de resultat est un document officiel requis par l'administration selon le status ou activite */ - -print_titre("Compte de resultat".($year?" annee $year":"")); - -print '
'; - -print $langs->trans("FeatureNotYetAvailable"); - - -llxFooter(); - -$db->close(); diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 544c4d8a9e232..94cac967a4043 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -88,6 +88,9 @@ $builddate=time(); //$exportlink=$langs->trans("NotYetAvailable"); } + +$hselected='report'; + report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta),$calcmode); diff --git a/htdocs/core/lib/report.lib.php b/htdocs/core/lib/report.lib.php index e6fbd7e59bcc7..4fcb087ba1845 100644 --- a/htdocs/core/lib/report.lib.php +++ b/htdocs/core/lib/report.lib.php @@ -41,6 +41,8 @@ function report_header($nom,$variante,$period,$periodlink,$description,$builddat { global $langs, $hselected; + if (empty($hselected)) $hselected='report'; + print "\n\n\n"; $h=0; diff --git a/htdocs/don/card.php b/htdocs/don/card.php index cfe28532637be..cf71080704366 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2015 Alexandre Spangaro @@ -64,6 +64,7 @@ /* * Actions */ + $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -227,6 +228,7 @@ /* * Build doc */ + if ($action == 'builddoc') { $object = new Don($db); @@ -265,21 +267,17 @@ $formcompany = new FormCompany($db); -/* ************************************************************************** */ -/* */ -/* Donation card in create mode */ -/* */ -/* ************************************************************************** */ - if ($action == 'create') { print_fiche_titre($langs->trans("AddDonation")); print '
'; print ''; - print ''; - print ''; + + dol_fiche_head(''); + + print '
'; $nbrows=11; if (! empty($conf->projet->enabled)) $nbrows++; @@ -343,7 +341,7 @@ $formproject=new FormProjets($db); print "\n"; } @@ -356,7 +354,11 @@ } print "
".$langs->trans("Project").""; - $formproject->select_projects(-1, GETPOST("fk_projet"),'fk_projet', 0, 1, 0, 1); + $formproject->select_projects(-1, GETPOST("fk_projet"),'fk_projet', 0, 0, 1, 1); print "
\n"; - print '
   
'; + + dol_fiche_end(); + + print '
   
'; + print "
\n"; } diff --git a/htdocs/don/index.php b/htdocs/don/index.php index b276e21dc5051..e157c465a9ba5 100644 --- a/htdocs/don/index.php +++ b/htdocs/don/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -98,7 +98,7 @@ if ($conf->use_javascript_ajax) { - print ''; + print ''; $data=array('series'=>$dataseries); dol_print_graph('stats',300,180,$data,1,'pie',1); print ''; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 437bb05f29f42..dac78d9ae3bf6 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1018,6 +1018,8 @@ print '
'; print ''; + dol_fiche_head(''); + print ''; print ''; @@ -1122,7 +1124,9 @@ print ''; } - print '
'; + dol_fiche_end(); + + print '
'; print ''; print '
'; @@ -1130,6 +1134,8 @@ } else { + dol_fiche_head(''); + print ''; print '
'; print ''; print '
'.$langs->trans("ThirdParty").''; @@ -1137,7 +1143,9 @@ print '
'; - print '
'; + dol_fiche_end(); + + print '
'; print ''; print ''; print '
'; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 4567076678822..6511bb569e041 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1478,6 +1478,8 @@ print ''; print ''; + dol_fiche_head(''); + print ''; // Ref @@ -1600,7 +1602,9 @@ // Bouton "Create Draft" print "
\n"; - print '
'; + dol_fiche_end(); + + print '
'; print "\n"; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 8092c1e0f9d28..73832e9f3b762 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2004 Christophe Combelles * Copyright (C) 2005 Marc Barilley * Copyright (C) 2005-2013 Regis Houssin @@ -1318,6 +1318,8 @@ $datedue=($datetmp==''?-1:$datetmp); } + dol_fiche_head(); + print '
'; print ''; print ''; @@ -1572,7 +1574,9 @@ // Bouton "Create Draft" print "\n"; - print '
'; + dol_fiche_end(); + + print '
'; print "
\n";