info.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net>
  3. * Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com>
  4. * Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. /**
  20. * \file htdocs/compta/salaries/info.php
  21. * \ingroup salaries
  22. * \brief Page with info about salaries contribution
  23. */
  24. require '../../main.inc.php';
  25. require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php';
  26. require_once DOL_DOCUMENT_ROOT.'/core/lib/salaries.lib.php';
  27. require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
  28. // Load translation files required by the page
  29. $langs->loadLangs(array("compta","bills","users","salaries","hrm"));
  30. $id=GETPOST('id','int');
  31. $action=GETPOST('action','aZ09');
  32. // Security check
  33. $socid = GETPOST('socid','int');
  34. if ($user->societe_id) $socid=$user->societe_id;
  35. $result = restrictedArea($user, 'salaries', '', '', '');
  36. /*
  37. * View
  38. */
  39. llxHeader("",$langs->trans("SalaryPayment"));
  40. $object = new PaymentSalary($db);
  41. $object->fetch($id);
  42. $object->info($id);
  43. $head = salaries_prepare_head($object);
  44. dol_fiche_head($head, 'info', $langs->trans("SalaryPayment"), -1, 'payment');
  45. $linkback = '<a href="'.DOL_URL_ROOT.'/compta/salaries/list.php?restore_lastsearch_values=1'.(! empty($socid)?'&socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
  46. $morehtmlref='<div class="refidno">';
  47. $userstatic=new User($db);
  48. $userstatic->fetch($object->fk_user);
  49. $morehtmlref.=$langs->trans('Employee') . ' : ' . $userstatic->getNomUrl(1);
  50. $morehtmlref.='</div>';
  51. dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', '');
  52. print '<div class="fichecenter">';
  53. print '<div class="underbanner clearboth"></div>';
  54. print '<br>';
  55. print '<table width="100%"><tr><td>';
  56. dol_print_object_info($object);
  57. print '</td></tr></table>';
  58. print '</div>';
  59. dol_fiche_end();
  60. // End of page
  61. llxFooter();
  62. $db->close();