From 0467a5480d9c4f2bb3ffe72ad1248ad31f6ac685 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Tue, 30 Aug 2016 07:02:44 +0200 Subject: [PATCH] Presentation of Expense Report --- htdocs/expensereport/card.php | 56 ++++++++++++++++--------------- htdocs/expensereport/document.php | 7 ++-- htdocs/expensereport/info.php | 7 ++-- 3 files changed, 37 insertions(+), 33 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 23943fd5282..d568776fca9 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1079,8 +1079,9 @@ else if ($action == 'remove_file') /* * View */ - -llxHeader('', $langs->trans("ExpenseReport")); +$title=$langs->trans("ExpenseReport") . " - " . $langs->trans("Card"); +$helpurl="EN:Module_Expense_Reports"; +llxHeader("",$title,$helpurl); $form = new Form($db); $formfile = new FormFile($db); @@ -1137,7 +1138,7 @@ if ($action == 'create') // Public note print ''; print '' . $langs->trans('NotePublic') . ''; - print ''; + print ''; $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); @@ -1147,7 +1148,7 @@ if ($action == 'create') if (empty($user->societe_id)) { print ''; print '' . $langs->trans('NotePrivate') . ''; - print ''; + print ''; $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); @@ -1159,7 +1160,7 @@ if ($action == 'create') dol_fiche_end(); - print '
'; + print '
'; print ''; print '     '; print '
'; @@ -1200,7 +1201,7 @@ else print ''; print ''; - dol_fiche_head($head, 'card', $langs->trans("TripCard"), 0, 'trip'); + dol_fiche_head($head, 'card', $langs->trans("ExpenseReport"), 0, 'trip'); if($object->fk_statut==99) { @@ -1216,7 +1217,7 @@ else $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print ''; @@ -1287,7 +1288,7 @@ else // Public note print ''; print '' . $langs->trans('NotePublic') . ''; - print ''; + print ''; $doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); @@ -1297,7 +1298,7 @@ else if (empty($user->societe_id)) { print ''; print '' . $langs->trans('NotePrivate') . ''; - print ''; + print ''; $doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); @@ -1317,7 +1318,7 @@ else } else { - dol_fiche_head($head, 'card', $langs->trans("TripCard"), 0, 'trip'); + dol_fiche_head($head, 'card', $langs->trans("ExpenseReport"), 0, 'trip'); if ($action == 'save') { @@ -1435,7 +1436,6 @@ else $sql.= " AND p.fk_typepayment = c.id"; $sql.= " ORDER BY dp"; - //print $sql; $resql = $db->query($sql); if ($resql) { @@ -1702,17 +1702,19 @@ else } // Ajout des boutons de modification/suppression - print ''; if (($object->fk_statut < 2 || $object->fk_statut == 99) && $user->rights->expensereport->creer) { + print ''; + print 'rowid.'#'.$objp->rowid.'">'; print img_edit(); print '   '; print 'rowid.'">'; print img_delete(); print ''; + + print ''; } - print ''; print ''; } @@ -1904,12 +1906,12 @@ if ($action != 'create' && $action != 'edit') if ($object->fk_user_author == $user->id) { // Modify - print 'id.'">'.$langs->trans('Modify').''; + print ''; // Validate if (count($object->lines) > 0 || count($object->lignes) > 0) { - print 'id.'">'.$langs->trans('ValidateAndSubmit').''; + print ''; } } } @@ -1924,12 +1926,12 @@ if ($action != 'create' && $action != 'edit') if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) { // Modify - print 'id.'">'.$langs->trans('Modify').''; + print ''; // Brouillonner (le statut refusée est identique à brouillon) //print ''.$langs->trans('BROUILLONNER').''; // Enregistrer depuis le statut "Refusée" - print 'id.'">'.$langs->trans('ValidateAndSubmit').''; + print ''; } } @@ -1938,7 +1940,7 @@ if ($action != 'create' && $action != 'edit') if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) { // Brouillonner - print 'id.'">'.$langs->trans('SetToDraft').''; + print ''; } } @@ -1952,7 +1954,7 @@ if ($action != 'create' && $action != 'edit') if ($object->fk_user_author == $user->id) { // Brouillonner - print 'id.'">'.$langs->trans('SetToDraft').''; + print ''; } } @@ -1961,15 +1963,15 @@ if ($action != 'create' && $action != 'edit') //if($object->fk_user_validator==$user->id) //{ // Validate - print 'id.'">'.$langs->trans('Approve').''; + print ''; // Deny - print 'id.'">'.$langs->trans('Deny').''; + print ''; //} if ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) { // Cancel - print 'id.'">'.$langs->trans('Cancel').''; + print ''; } } @@ -1979,7 +1981,7 @@ if ($action != 'create' && $action != 'edit') if ($user->rights->expensereport->approve && $object->fk_statut == 5) { - print 'id.'">'.$langs->trans('Deny').''; + print ''; } // If bank module is used @@ -2008,14 +2010,14 @@ if ($action != 'create' && $action != 'edit') if ($user->rights->expensereport->creer && ($user->id == $object->fk_user_author || $user->id == $object->fk_user_valid) && $object->fk_statut == 5) { // Cancel - print 'id.'">'.$langs->trans('Cancel').''; + print ''; } // TODO Replace this. It should be SetUnpaid and should go back to status unpaid not canceled. if (($user->rights->expensereport->approve || $user->rights->expensereport->to_paid) && $object->fk_statut == 6) { // Cancel - print 'id.'">'.$langs->trans('Cancel').''; + print ''; } @@ -2023,12 +2025,12 @@ if ($action != 'create' && $action != 'edit') if ($user->rights->expensereport->creer && $user->id == $object->fk_user_author && $object->fk_statut <= 4) { // Delete - print 'id.'">'.$langs->trans('Delete').''; + print ''; } else if($user->rights->expensereport->supprimer && $object->fk_statut != 6) { // Delete - print 'id.'">'.$langs->trans('Delete').''; + print ''; } } diff --git a/htdocs/expensereport/document.php b/htdocs/expensereport/document.php index dd9a28a130c..00e8cfe583d 100644 --- a/htdocs/expensereport/document.php +++ b/htdocs/expensereport/document.php @@ -81,8 +81,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; $form = new Form($db); -llxHeader("",$langs->trans("ExpenseReport")); - +$title=$langs->trans("ExpenseReport") . " - " . $langs->trans("Documents"); +$helpurl="EN:Module_Expense_Reports"; +llxHeader("",$title,$helpurl); if ($object->id) { @@ -90,7 +91,7 @@ if ($object->id) $head=expensereport_prepare_head($object); - dol_fiche_head($head, 'documents', $langs->trans("TripCard"), 0, 'trip'); + dol_fiche_head($head, 'documents', $langs->trans("ExpenseReport"), 0, 'trip'); // Construit liste des fichiers diff --git a/htdocs/expensereport/info.php b/htdocs/expensereport/info.php index a5a3c830975..b3ebbc153ef 100644 --- a/htdocs/expensereport/info.php +++ b/htdocs/expensereport/info.php @@ -39,8 +39,9 @@ $result = restrictedArea($user, 'expensereport', $id, ''); /* * View */ - -llxHeader('', $langs->trans("ExpenseReport")); +$title=$langs->trans("ExpenseReport") . " - " . $langs->trans("Info"); +$helpurl="EN:Module_Expense_Reports"; +llxHeader("",$title,$helpurl); if ($id) { @@ -50,7 +51,7 @@ if ($id) $head = expensereport_prepare_head($object); - dol_fiche_head($head, 'info', $langs->trans("TripCard"), 0, 'trip'); + dol_fiche_head($head, 'info', $langs->trans("ExpenseReport"), 0, 'trip'); print '
'; dol_print_object_info($object);