diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index 63b5139ce29..68f59d03cfa 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -391,9 +391,9 @@ if ($id) $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook print ''; - + print ''; - + dol_fiche_end(); diff --git a/htdocs/compta/salaries/document.php b/htdocs/compta/salaries/document.php index 7b24a0762f3..03a69a764cf 100644 --- a/htdocs/compta/salaries/document.php +++ b/htdocs/compta/salaries/document.php @@ -6,7 +6,7 @@ * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2015-2016 Alexandre Spangaro + * Copyright (C) 2015-2017 Alexandre Spangaro * * 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 @@ -36,7 +36,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; $langs->load("other"); +$langs->load("users"); $langs->load("salaries"); +$langs->load('hrm'); $langs->load("companies"); $id = GETPOST('id','int'); @@ -83,7 +85,6 @@ $form = new Form($db); llxHeader("",$langs->trans("SalaryPayment")); - if ($object->id) { $object->fetch_thirdparty(); @@ -92,7 +93,6 @@ if ($object->id) dol_fiche_head($head, 'documents', $langs->trans("SalaryPayment"), 0, 'payment'); - // Construit liste des fichiers $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; @@ -101,29 +101,34 @@ if ($object->id) $totalsize+=$file['size']; } + $linkback = ''.$langs->trans("BackToList").''; - print ''; + $morehtmlref='
'; - $linkback = ''.$langs->trans("BackToList").''; + $userstatic=new User($db); + $userstatic->fetch($object->fk_user); - // Ref - print '
'; + $morehtmlref.=$langs->trans('Employee') . ' : ' . $userstatic->getNomUrl(1); + $morehtmlref.=''; - // Societe - //print ""; + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', ''); - print ''; - print ''; - print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); - print '
".$langs->trans("Company")."".$object->client->getNomUrl(1)."
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'; + print '
'; + print '
'; - print '
'; + print ''; + print ''; + print ''; + print '
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'; - $modulepart = 'salaries'; - $permission = $user->rights->salaries->write; - $param = '&id=' . $object->id; - include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; + print ''; + + dol_fiche_end(); + + $modulepart = 'salaries'; + $permission = $user->rights->salaries->write; + $param = '&id=' . $object->id; + include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; } else diff --git a/htdocs/compta/salaries/info.php b/htdocs/compta/salaries/info.php index f15aac021ec..05dc7835b68 100644 --- a/htdocs/compta/salaries/info.php +++ b/htdocs/compta/salaries/info.php @@ -1,6 +1,7 @@ - * Copyright (C) 2015 Charlie BENKE + * Copyright (C) 2015 Charlie BENKE + * Copyright (C) 2017 Alexandre Spangaro * * 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 @@ -29,7 +30,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $langs->load("compta"); $langs->load("bills"); +$langs->load("users"); $langs->load("salaries"); +$langs->load('hrm'); $id=GETPOST('id','int'); $action=GETPOST('action','aZ09'); @@ -46,21 +49,37 @@ $result = restrictedArea($user, 'salaries', '', '', ''); llxHeader("",$langs->trans("SalaryPayment")); -$salpayment = new PaymentSalary($db); -$result = $salpayment->fetch($id); -$salpayment->info($id); +$object = new PaymentSalary($db); +$object->fetch($id); +$object->info($id); -$head = salaries_prepare_head($salpayment); +$head = salaries_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans("SalaryPayment"), 0, 'payment'); +$linkback = ''.$langs->trans("BackToList").''; + +$morehtmlref='
'; + +$userstatic=new User($db); +$userstatic->fetch($object->fk_user); + +$morehtmlref.=$langs->trans('Employee') . ' : ' . $userstatic->getNomUrl(1); +$morehtmlref.='
'; + +dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', ''); + +print '
'; +print '
'; print '
'; -dol_print_object_info($salpayment); +dol_print_object_info($object); print '
'; print '
'; +dol_fiche_end(); + llxFooter(); $db->close();