From 0d5c0350340a73f1089e9a3056cc1444d443d2ab Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 8 Dec 2016 22:12:16 +0100 Subject: [PATCH 1/5] Expense report - Remove filed note_private and note_public in card. Already in tab Notes --- htdocs/expensereport/card.php | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 6ad1e4ff0e8..315347bd63e 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1427,26 +1427,6 @@ else // Other attributes //$cols = 3; //include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php'; - - // Public note - print ''; - print '' . $langs->trans('NotePublic') . ''; - print ''; - - $doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); - print $doleditor->Create(1); - print ''; - - // Private note - if (empty($user->societe_id)) { - print ''; - print '' . $langs->trans('NotePrivate') . ''; - print ''; - - $doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); - print $doleditor->Create(1); - print ''; - } print ''; @@ -1624,14 +1604,6 @@ else print ''; */ - print ''; - print ''.$langs->trans("NotePublic").''; - print ''.$object->note_public.''; - print ''; - print ''; - print ''.$langs->trans("NotePrivate").''; - print ''.$object->note_private.''; - print ''; // Amount print ''; print ''.$langs->trans("AmountHT").''; From eef245d23b64139181690e496068627773fe5d77 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 8 Dec 2016 22:17:03 +0100 Subject: [PATCH 2/5] Expense report - Hidden button to generate files in create mode --- htdocs/expensereport/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 315347bd63e..7206dc532a5 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2252,7 +2252,7 @@ print '
'; * Generate documents */ -if($user->rights->expensereport->export && $action != 'edit') +if($user->rights->expensereport->export && $action != 'create' && $action != 'edit') { $filename = dol_sanitizeFileName($object->ref); $filedir = $conf->expensereport->dir_output . "/" . dol_sanitizeFileName($object->ref); From cd4286b3025c1d515e8b08edbc7546df58637aea Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 8 Dec 2016 22:27:48 +0100 Subject: [PATCH 3/5] Loan - Remove field note_private and note_public into view/edit mode. Already present in tab Notes --- htdocs/loan/card.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 2b31ca856bc..be04b806b1f 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -399,12 +399,6 @@ if ($id > 0) // Rate print ''.$langs->trans("Rate").''.$object->rate.' %'; - // Note Private - print ''.$langs->trans('NotePrivate').''.nl2br($object->note_private).''; - - // Note Public - print ''.$langs->trans('NotePublic').''.nl2br($object->note_public).''; - // Accountancy account capital print ''; print $langs->trans("LoanAccountancyCapitalCode"); From 302109b3fea6744f9967ea19eabdc79766f84bb8 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 8 Dec 2016 22:32:10 +0100 Subject: [PATCH 4/5] Loan - Move tab Notes after Files tab --- htdocs/core/lib/loan.lib.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/core/lib/loan.lib.php b/htdocs/core/lib/loan.lib.php index fa80fe31a2b..f1748a0dfb9 100644 --- a/htdocs/core/lib/loan.lib.php +++ b/htdocs/core/lib/loan.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2015 Frederic France +/* Copyright (C) 2014-2016 Alexandre Spangaro + * Copyright (C) 2015 Frederic France * * 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 @@ -41,16 +41,6 @@ function loan_prepare_head($object) $head[$tab][2] = 'card'; $tab++; - if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { - $nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1); - $head[$tab][0] = DOL_URL_ROOT."/loan/note.php?id=".$object->id; - $head[$tab][1] = $langs->trans("Notes"); - if($nbNote > 0) $head[$tab][1].= ' '.$nbNote.''; - $head[$tab][2] = 'note'; - $tab++; - } - // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab @@ -68,6 +58,16 @@ function loan_prepare_head($object) $head[$tab][2] = 'documents'; $tab++; + if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) + { + $nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1); + $head[$tab][0] = DOL_URL_ROOT."/loan/note.php?id=".$object->id; + $head[$tab][1] = $langs->trans("Notes"); + if($nbNote > 0) $head[$tab][1].= ' '.$nbNote.''; + $head[$tab][2] = 'note'; + $tab++; + } + $head[$tab][0] = DOL_URL_ROOT.'/loan/info.php?id='.$object->id; $head[$tab][1] = $langs->trans("Info"); $head[$tab][2] = 'info'; From b31d5d7f7525b266174f56a2e2dbfe2461430c37 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 8 Dec 2016 22:50:03 +0100 Subject: [PATCH 5/5] VAT - Correct presentation on card --- htdocs/compta/tva/card.php | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 17bcd80757c..8646489db0b 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -236,13 +236,13 @@ if ($action == 'create') print ''; print '
'; print "
\n"; - + dol_fiche_head(); print ''; print ""; - print ''; @@ -263,7 +263,7 @@ if ($action == 'create') if (! empty($conf->banque->enabled)) { - print ''; } @@ -273,12 +273,12 @@ if ($action == 'create') $form->select_types_paiements(GETPOST("type_payment"), "type_payment"); print "\n"; print ""; - + // Number print ''."\n"; - + // Other attributes $parameters=array('colspan' => ' colspan="1"'); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook @@ -296,13 +296,7 @@ if ($action == 'create') print ''; } - -/* ************************************************************************** */ -/* */ -/* Barre d'action */ -/* */ -/* ************************************************************************** */ - +// View mode if ($id) { $h = 0; @@ -317,7 +311,7 @@ if ($id) print '
'.$langs->trans("DatePayment").''; + print ''.$langs->trans("DatePayment").''; print $form->select_date($datep,"datep",'','','','add',1,1); print '
'.$langs->trans("Account").''; + print '
'.$langs->trans("BankAccount").''; $form->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant print '
'.$langs->trans('Numero'); print ' ('.$langs->trans("ChequeOrTransferNumber").')'; print '
'; print ""; - print ''; @@ -325,19 +319,19 @@ if ($id) print ''; print ""; - print ''; print ''; - print ''; + print ''; if (! empty($conf->banque->enabled)) { @@ -348,7 +342,7 @@ if ($id) print ''; print ''; - print ''; print ''; @@ -356,14 +350,12 @@ if ($id) } // Other attributes - $parameters=array('colspan' => ' colspan="3"'); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + $reshook=$hookmanager->executeHooks('formObjectOptions','',$object,$action); // Note that $action and $object may have been modified by hook print '
'.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; print $object->ref; print '
'.$langs->trans("Label").''.$object->label.'
'.$langs->trans("DatePayment").''; + print ''.$langs->trans("DatePayment").''; print dol_print_date($object->datep,'day'); print '
'; print $form->editfieldkey("DateValue", 'datev', $object->datev, $object, $user->rights->tax->charges->creer, 'day'); - print ''; + print ''; print $form->editfieldval("DateValue", 'datev', $object->datev, $object, $user->rights->tax->charges->creer, 'day'); //print dol_print_date($object->datev,'day'); print '
'.$langs->trans("Amount").''.price($object->amount).'
'.$langs->trans("Amount").''.price($object->amount).'
'.$langs->trans('BankTransactionLine').''; + print ''; print $bankline->getNomUrl(1,0,'showall'); print '
'; dol_fiche_end(); - /* * Action buttons */