28 require 
'../main.inc.php';
 
   29 require_once DOL_DOCUMENT_ROOT.
'/salaries/class/salary.class.php';
 
   30 require_once DOL_DOCUMENT_ROOT.
'/salaries/class/paymentsalary.class.php';
 
   31 require_once DOL_DOCUMENT_ROOT.
'/compta/bank/class/account.class.php';
 
   33   require_once DOL_DOCUMENT_ROOT.
'/accountancy/class/accountingjournal.class.php';
 
   37 $langs->loadLangs(array(
"compta", 
"salaries", 
"bills", 
"hrm"));
 
   39 $action     = 
GETPOST(
'action', 
'aZ09') ?
GETPOST(
'action', 
'aZ09') : 
'view'; 
 
   40 $massaction = 
GETPOST(
'massaction', 
'alpha'); 
 
   41 $show_files = 
GETPOST(
'show_files', 
'int'); 
 
   42 $confirm    = 
GETPOST(
'confirm', 
'alpha'); 
 
   43 $cancel     = 
GETPOST(
'cancel', 
'alpha'); 
 
   44 $toselect   = 
GETPOST(
'toselect', 
'array'); 
 
   45 $contextpage = 
GETPOST(
'contextpage', 
'aZ') ?
GETPOST(
'contextpage', 
'aZ') : 
'bomlist'; 
 
   46 $backtopage = 
GETPOST(
'backtopage', 
'alpha'); 
 
   47 $optioncss  = 
GETPOST(
'optioncss', 
'aZ'); 
 
   50 $limit = 
GETPOST(
'limit', 
'int') ?
GETPOST(
'limit', 
'int') : $conf->liste_limit;
 
   51 $sortfield = 
GETPOST(
'sortfield', 
'aZ09comma');
 
   52 $sortorder = 
GETPOST(
'sortorder', 
'aZ09comma');
 
   54 if (empty($page) || $page == -1 || 
GETPOST(
'button_search', 
'alpha') || 
GETPOST(
'button_removefilter', 
'alpha') || (empty($toselect) && $massaction === 
'0')) { $page = 0; }     
 
   55 $offset = $limit * $page;
 
   56 $pageprev = $page - 1;
 
   57 $pagenext = $page + 1;
 
   59   $sortfield = 
"s.datep,s.rowid";
 
   62   $sortorder = 
"DESC,DESC";
 
   68 $diroutputmassaction = $conf->user->dir_output.
'/temp/massgeneration/'.$user->id;
 
   69 $hookmanager->initHooks(array(
'salarieslist')); 
 
   72 $extrafields->fetch_name_optionals_label($object->table_element);
 
   74 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, 
'', 
'search_');
 
   77   $sortfield = 
"s.datep,s.rowid";
 
   80   $sortorder = 
"DESC,DESC";
 
   83 $search_ref = 
GETPOST(
'search_ref', 
'int');
 
   84 $search_ref_salary = 
GETPOST(
'search_ref_salary', 
'int');
 
   85 $search_user = 
GETPOST(
'search_user', 
'alpha');
 
   86 $search_label = 
GETPOST(
'search_label', 
'alpha');
 
   87 $search_date_start = 
dol_mktime(0, 0, 0, 
GETPOST(
'search_date_startmonth', 
'int'), 
GETPOST(
'search_date_startday', 
'int'), 
GETPOST(
'search_date_startyear', 
'int'));
 
   88 $search_date_end = 
dol_mktime(23, 59, 59, 
GETPOST(
'search_date_endmonth', 
'int'), 
GETPOST(
'search_date_endday', 
'int'), 
GETPOST(
'search_date_endyear', 
'int'));
 
   89 $search_dateep_start = 
dol_mktime(0, 0, 0, 
GETPOST(
'search_dateep_startmonth', 
'int'), 
GETPOST(
'search_dateep_startday', 
'int'), 
GETPOST(
'search_dateep_startyear', 
'int'));
 
   90 $search_dateep_end = 
dol_mktime(23, 59, 59, 
GETPOST(
'search_dateep_endmonth', 
'int'), 
GETPOST(
'search_dateep_endday', 
'int'), 
GETPOST(
'search_dateep_endyear', 
'int'));
 
   91 $search_amount = 
GETPOST(
'search_amount', 
'alpha');
 
   92 $search_account = 
GETPOST(
'search_account', 
'int');
 
   93 $search_fk_bank = 
GETPOST(
'search_fk_bank', 
'int');
 
   94 $search_chq_number = 
GETPOST(
'search_chq_number', 
'int');
 
   96 $filtre = 
GETPOST(
"filtre", 
'restricthtml');
 
   98 if (!
GETPOST(
'search_type_id', 
'int')) {
 
   99   $newfiltre = str_replace(
'filtre=', 
'', $filtre);
 
  100   $filterarray = explode(
'-', $newfiltre);
 
  101   foreach ($filterarray as $val) {
 
  102     $part = explode(
':', $val);
 
  103     if ($part[0] == 
's.fk_typepayment') {
 
  104       $search_type_id = $part[1];
 
  108   $search_type_id = 
GETPOST(
'search_type_id', 
'int');
 
  111 $childids = $user->getAllChildIds(1);
 
  114 $search_all = 
GETPOST(
"search_all", 
'alpha');
 
  116 foreach ($object->fields as $key => $val) {
 
  117   if (
GETPOST(
'search_'.$key, 
'alpha') !== 
'') $search[$key] = 
GETPOST(
'search_'.$key, 
'alpha');
 
  121 $fieldstosearchall = array();
 
  122 foreach ($object->fields as $key => $val) {
 
  123   if (!empty($val[
'searchall'])) {
 
  124     $fieldstosearchall[
't.'.$key] = $val[
'label'];
 
  129 $arrayfields = array();
 
  130 foreach ($object->fields as $key => $val) {
 
  132   if (!empty($val[
'visible'])) {
 
  133     $visible = (int) 
dol_eval($val[
'visible'], 1, 1, 
'1');
 
  134     $arrayfields[
't.'.$key] = array(
 
  135       'label'=>$val[
'label'],
 
  136       'checked'=>(($visible < 0) ? 0 : 1),
 
  137       'enabled'=>($visible != 3 && 
dol_eval($val[
'enabled'], 1, 1, 
'1')),
 
  138       'position'=>$val[
'position'],
 
  139       'help'=> isset($val[
'help']) ? $val[
'help'] : 
'' 
  144 $permissiontoread = $user->rights->salaries->read;
 
  145 $permissiontoadd = $user->rights->salaries->write;
 
  146 $permissiontodelete = $user->rights->salaries->delete;
 
  149 $socid = 
GETPOST(
"socid", 
"int");
 
  150 if ($user->socid > 0) {
 
  151   $socid = $user->socid;
 
  160 if (
GETPOST(
'cancel', 
'alpha')) { $action = 
'list'; $massaction = 
''; }
 
  161 if (!
GETPOST(
'confirmmassaction', 
'alpha') && $massaction != 
'presend' && $massaction != 
'confirm_presend') { $massaction = 
''; }
 
  163 $parameters = array();
 
  164 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action); 
 
  169 if (empty($reshook)) {
 
  171   include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
 
  174   if (
GETPOST(
'button_removefilter_x', 
'alpha') || 
GETPOST(
'button_removefilter.x', 
'alpha') || 
GETPOST(
'button_removefilter', 
'alpha')) { 
 
  176     $search_ref_salary = 
"";
 
  179     $search_date_start = 
'';
 
  180     $search_date_end = 
'';
 
  181     $search_dateep_start = 
'';
 
  182     $search_dateep_end = 
'';
 
  184     $search_account = 
'';
 
  185     $search_fk_bank = 
'';
 
  186     $search_chq_number = 
'';
 
  187     $search_type_id = 
"";
 
  189   if (
GETPOST(
'button_removefilter_x', 
'alpha') || 
GETPOST(
'button_removefilter.x', 
'alpha') || 
GETPOST(
'button_removefilter', 
'alpha')
 
  190     || 
GETPOST(
'button_search_x', 
'alpha') || 
GETPOST(
'button_search.x', 
'alpha') || 
GETPOST(
'button_search', 
'alpha')) {
 
  195   $objectclass = 
'PaymentSalary';
 
  196   $objectlabel = 
'SalariesPayments';
 
  197   $uploaddir = $conf->salaries->dir_output;
 
  198   include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
 
  201   if (!$error && $massaction == 
'buildsepa' && $permissiontoadd) {
 
  202     $objecttmp = 
new $objectclass($db);
 
  213 $salstatic = 
new Salary($db);
 
  215 $userstatic = 
new User($db);
 
  216 $accountstatic = 
new Account($db);
 
  223 $title = $langs->trans(
'SalariesPayments');
 
  225 $sql = 
"SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.admin, u.salary as current_salary, u.fk_soc as fk_soc, u.statut as status,";
 
  226 $sql .= 
" s.rowid, s.fk_user, s.amount, s.salary, sal.rowid as id_salary, sal.label, s.datep as datep, sal.dateep, b.datev as datev, s.fk_typepayment as type, s.num_payment, s.fk_bank,";
 
  227 $sql .= 
" ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,";
 
  228 $sql .= 
" pst.code as payment_code";
 
  229 $sql .= 
" FROM ".MAIN_DB_PREFIX.
"payment_salary as s";
 
  230 $sql .= 
" INNER JOIN ".MAIN_DB_PREFIX.
"salary as sal ON (sal.rowid = s.fk_salary)";
 
  231 $sql .= 
" LEFT JOIN ".MAIN_DB_PREFIX.
"c_paiement as pst ON s.fk_typepayment = pst.id";
 
  232 $sql .= 
" LEFT JOIN ".MAIN_DB_PREFIX.
"bank as b ON s.fk_bank = b.rowid";
 
  233 $sql .= 
" LEFT JOIN ".MAIN_DB_PREFIX.
"bank_account as ba ON b.fk_account = ba.rowid,";
 
  234 $sql .= 
" ".MAIN_DB_PREFIX.
"user as u";
 
  235 $sql .= 
" WHERE u.rowid = sal.fk_user";
 
  236 $sql .= 
" AND s.entity IN (".getEntity(
'payment_salaries').
")";
 
  237 if (empty($user->rights->salaries->readall)) {
 
  238   $sql .= 
" AND sal.fk_user IN (".$db->sanitize(join(
',', $childids)).
")";
 
  243   $sql .= 
" AND s.rowid=".((int) $search_ref);
 
  245 if ($search_ref_salary) {
 
  246   $sql .= 
" AND sal.rowid=".((int) $search_ref_salary);
 
  249   $sql .= 
natural_search(array(
'u.login', 
'u.lastname', 
'u.firstname', 
'u.email'), $search_user);
 
  254 if ($search_date_start) {
 
  255   $sql .= 
" AND s.datep >= '".$db->idate($search_date_start).
"'";
 
  257 if ($search_date_end) {
 
  258   $sql .= 
" AND s.datep <= '".$db->idate($search_date_end).
"'";
 
  260 if ($search_dateep_start) {
 
  261   $sql .= 
" AND sal.dateep >= '".$db->idate($search_dateep_start).
"'";
 
  263 if ($search_dateep_end) {
 
  264   $sql .= 
" AND sal.dateep <= '".$db->idate($search_dateep_end).
"'";
 
  266 if ($search_amount) {
 
  269 if ($search_account > 0) {
 
  270   $sql .= 
" AND b.fk_account=".((int) $search_account);
 
  272 if ($search_fk_bank) {
 
  273   $sql .= 
" AND s.fk_bank=".((int) $search_fk_bank);
 
  275 if ($search_chq_number) {
 
  276   $sql .= 
natural_search(array(
's.num_payment'), $search_chq_number);
 
  279 if ($search_type_id > 0) {
 
  280   $sql .= 
" AND s.fk_typepayment=".((int) $search_type_id);
 
  282 $sql .= $db->order($sortfield, $sortorder);
 
  286 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
 
  287   $resql = $db->query($sql);
 
  299     $sql .= $db->plimit($limit + 1, $offset);
 
  302   $resql = $db->query($sql);
 
  308   $num = $db->num_rows(
$resql);
 
  316 $arrayofselected = is_array($toselect) ? $toselect : array();
 
  319 if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
 
  320   $param .= 
'&contextpage='.urlencode($contextpage);
 
  322 if ($limit > 0 && $limit != $conf->liste_limit) {
 
  323   $param .= 
'&limit='.urlencode($limit);
 
  325 if ($search_type_id) {
 
  326   $param .= 
'&search_type_id='.urlencode($search_type_id);
 
  328 if ($optioncss != 
'') {
 
  329   $param .= 
'&optioncss='.urlencode($optioncss);
 
  332   $param .= 
'&search_ref='.urlencode($search_ref);
 
  334 if ($search_ref_salary) {
 
  335   $param .= 
'&search_ref_salary='.urlencode($search_ref_salary);
 
  338   $param .= 
'&search_user='.urlencode($search_user);
 
  341   $param .= 
'&search_label='.urlencode($search_label);
 
  343 if ($search_fk_bank) {
 
  344   $param .= 
'&search_fk_bank='.urlencode($search_fk_bank);
 
  346 if ($search_chq_number) {
 
  347   $param .= 
'&search_chq_number='.urlencode($search_chq_number);
 
  349 if ($search_account) {
 
  350   $param .= 
'&search_account='.urlencode($search_account);
 
  352 if ($search_date_start) {
 
  353   $param .= 
'&search_date_startday='.urlencode(
GETPOST(
'search_date_startday', 
'int')).
'&search_date_startmonth='.urlencode(
GETPOST(
'search_date_startmonth', 
'int')).
'&search_date_startyear='.urlencode(
GETPOST(
'search_date_startyear', 
'int'));
 
  355 if ($search_dateep_start) {
 
  356   $param .= 
'&search_dateep_startday='.urlencode(
GETPOST(
'search_dateep_startday', 
'int')).
'&search_dateep_startmonth='.urlencode(
GETPOST(
'search_dateep_startmonth', 
'int')).
'&search_dateep_startyear='.urlencode(
GETPOST(
'search_dateep_startyear', 
'int'));
 
  358 if ($search_date_end) {
 
  359   $param .= 
'&search_date_endday='.urlencode(
GETPOST(
'search_date_endday', 
'int')).
'&search_date_endmonth='.urlencode(
GETPOST(
'search_date_endmonth', 
'int')).
'&search_date_endyear='.urlencode(
GETPOST(
'search_date_endyear', 
'int'));
 
  361 if ($search_dateep_end) {
 
  362   $param .= 
'&search_dateep_endday='.urlencode(
GETPOST(
'search_dateep_endday', 
'int')).
'&search_dateep_endmonth='.urlencode(
GETPOST(
'search_dateep_endmonth', 
'int')).
'&search_dateep_endyear='.urlencode(
GETPOST(
'search_dateep_endyear', 
'int'));
 
  365 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
 
  368 $arrayofmassactions = array(
 
  373 if (
GETPOST(
'nomassaction', 
'int') || in_array($massaction, array(
'presend', 
'predelete'))) {
 
  374   $arrayofmassactions = array();
 
  376 $massactionbutton = 
$form->selectMassAction(
'', $arrayofmassactions);
 
  378 print 
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">';
 
  379 if ($optioncss != 
'') {
 
  380   print 
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
 
  382 print 
'<input type="hidden" name="token" value="'.newToken().
'">';
 
  383 print 
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
 
  384 print 
'<input type="hidden" name="action" value="list">';
 
  385 print 
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
 
  386 print 
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
 
  387 print 
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
 
  389 $url = DOL_URL_ROOT.
'/salaries/card.php?action=create';
 
  390 if (!empty($socid)) {
 
  391   $url .= 
'&socid='.$socid;
 
  393 $newcardbutton = 
dolGetButtonTitle($langs->trans(
'NewSalaryPayment'), 
'', 
'fa fa-plus-circle', $url, 
'', $user->rights->salaries->write);
 
  395 print_barre_liste($title, $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, 
$nbtotalofrecords, 
'object_payment', 0, $newcardbutton, 
'', $limit, 0, 0, 1);
 
  399 $varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
 
  401 $selectedfields = 
'';
 
  402 $selectedfields .= (count($arrayofmassactions) ? 
$form->showCheckAddButtons(
'checkforselect', 1) : 
'');
 
  404 print 
'<div class="div-table-responsive">';
 
  405 print 
'<table class="tagtable nobottomiftotal liste'.($moreforfilter ? 
" listwithfilterbefore" : 
"").
'">'.
"\n";
 
  409 print 
'<tr class="liste_titre_filter">';
 
  411 print 
'<td class="liste_titre left">';
 
  412 print 
'<input class="flat" type="text" size="3" name="search_ref" value="'.$db->escape($search_ref).
'">';
 
  415 print 
'<td class="liste_titre center">';
 
  416 print 
'<input class="flat" type="text" size="3" name="search_ref_salary" value="'.$db->escape($search_ref_salary).
'">';
 
  419 print 
'<td class="liste_titre"><input type="text" class="flat width150" name="search_label" value="'.$db->escape($search_label).
'"></td>';
 
  421 print 
'<td class="liste_titre center">';
 
  422 print 
'<div class="nowrap">';
 
  423 print 
$form->selectDate($search_dateep_start ? $search_dateep_start : -1, 
'search_dateep_start', 0, 0, 1, 
'', 1, 0, 0, 
'', 
'', 
'', 
'', 1, 
'', $langs->trans(
'From'));
 
  425 print 
'<div class="nowrap">';
 
  426 print 
$form->selectDate($search_dateep_end ? $search_dateep_end : -1, 
'search_dateep_end', 0, 0, 1, 
'', 1, 0, 0, 
'', 
'', 
'', 
'', 1, 
'', $langs->trans(
'to'));
 
  430 print 
'<td class="liste_titre center">';
 
  431 print 
'<div class="nowrap">';
 
  432 print 
$form->selectDate($search_date_start ? $search_date_start : -1, 
'search_date_start', 0, 0, 1, 
'', 1, 0, 0, 
'', 
'', 
'', 
'', 1, 
'', $langs->trans(
'From'));
 
  434 print 
'<div class="nowrap">';
 
  435 print 
$form->selectDate($search_date_end ? $search_date_end : -1, 
'search_date_end', 0, 0, 1, 
'', 1, 0, 0, 
'', 
'', 
'', 
'', 1, 
'', $langs->trans(
'to'));
 
  442 print 
'<td class="liste_titre">';
 
  443 print 
'<input class="flat" type="text" size="6" name="search_user" value="'.$db->escape($search_user).
'">';
 
  446 print 
'<td class="liste_titre left">';
 
  447 print 
$form->select_types_paiements($search_type_id, 
'search_type_id', 
'', 0, 1, 1, 16, 1, 
'', 1);
 
  450 print 
'<td class="liste_titre right"><input name="search_chq_number" class="flat" type="text" size="8" value="'.$db->escape($search_chq_number).
'"></td>';
 
  454   print 
'<td class="liste_titre center">';
 
  455   print 
'<input class="flat" type="text" size="3" name="search_fk_bank" value="'.$db->escape($search_fk_bank).
'">';
 
  459   print 
'<td class="liste_titre">';
 
  460   $form->select_comptes($search_account, 
'search_account', 0, 
'', 1);
 
  464 print 
'<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$db->escape($search_amount).
'"></td>';
 
  467 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
 
  470 $parameters = array(
'arrayfields'=>$arrayfields);
 
  471 $reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object); 
 
  472 print $hookmanager->resPrint;
 
  474 print 
'<td class="liste_titre maxwidthsearch">';
 
  475 $searchpicto = 
$form->showFilterButtons();
 
  483 print 
'<tr class="liste_titre">';
 
  484 print_liste_field_titre(
"RefPayment", $_SERVER[
"PHP_SELF"], 
"s.rowid", 
"", $param, 
"", $sortfield, $sortorder);
 
  486 print_liste_field_titre(
"Label", $_SERVER[
"PHP_SELF"], 
"s.label", 
"", $param, 
'class="left"', $sortfield, $sortorder);
 
  487 print_liste_field_titre(
"PeriodEndDate", $_SERVER[
"PHP_SELF"], 
"sal.dateep", 
"", $param, 
'', $sortfield, $sortorder, 
'center ');
 
  488 print_liste_field_titre(
"DatePayment", $_SERVER[
"PHP_SELF"], 
"s.datep,s.rowid", 
"", $param, 
'', $sortfield, $sortorder, 
'center ');
 
  491 print_liste_field_titre(
"PaymentMode", $_SERVER[
"PHP_SELF"], 
"pst.code", 
"", $param, 
'class="left"', $sortfield, $sortorder);
 
  492 print_liste_field_titre(
"Numero", $_SERVER[
"PHP_SELF"], 
"s.num_payment", 
"", $param, 
'', $sortfield, $sortorder, 
'', 
'ChequeOrTransferNumber');
 
  494   print_liste_field_titre(
"BankTransactionLine", $_SERVER[
"PHP_SELF"], 
"s.fk_bank", 
"", $param, 
'', $sortfield, $sortorder);
 
  495   print_liste_field_titre(
"BankAccount", $_SERVER[
"PHP_SELF"], 
"ba.label", 
"", $param, 
"", $sortfield, $sortorder);
 
  497 print_liste_field_titre(
"PayedByThisPayment", $_SERVER[
"PHP_SELF"], 
"s.amount", 
"", $param, 
'class="right"', $sortfield, $sortorder);
 
  499 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
 
  501 $parameters = array(
'arrayfields'=>$arrayfields, 
'param'=>$param, 
'sortfield'=>$sortfield, 
'sortorder'=>$sortorder);
 
  502 $reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object); 
 
  503 print $hookmanager->resPrint;
 
  505 print 
getTitleFieldOfList($selectedfields, 0, $_SERVER[
"PHP_SELF"], 
'', 
'', 
'', 
'', $sortfield, $sortorder, 
'center maxwidthsearch ').
"\n";
 
  510 $needToFetchEachLine = 0;
 
  511 if (isset($extrafields->attributes[$object->table_element][
'computed']) && is_array($extrafields->attributes[$object->table_element][
'computed']) && count($extrafields->attributes[$object->table_element][
'computed']) > 0) {
 
  512   foreach ($extrafields->attributes[$object->table_element][
'computed'] as $key => $val) {
 
  513     if (preg_match(
'/\$object/', $val)) {
 
  514       $needToFetchEachLine++;
 
  524 $totalarray = array();
 
  525 while ($i < ($limit ? min($num, $limit) : $num)) {
 
  526   $obj = $db->fetch_object(
$resql);
 
  533   $object->setVarsFromFetchObj($obj);
 
  536   print 
'<tr class="oddeven">';
 
  538   $userstatic->id = $obj->uid;
 
  539   $userstatic->lastname = $obj->lastname;
 
  540   $userstatic->firstname = $obj->firstname;
 
  541   $userstatic->admin = $obj->admin;
 
  542   $userstatic->login = $obj->login;
 
  543   $userstatic->email = $obj->email;
 
  544   $userstatic->socid = $obj->fk_soc;
 
  545   $userstatic->statut = $obj->status;
 
  547   $salstatic->id = $obj->id_salary;
 
  548   $salstatic->ref = $obj->id_salary;
 
  550   $paymentsalstatic->id = $obj->rowid;
 
  551   $paymentsalstatic->ref = $obj->rowid;
 
  554   print 
"<td>".$paymentsalstatic->getNomUrl(1).
"</td>\n";
 
  556     $totalarray[
'nbfield']++;
 
  560   print 
"<td>".$salstatic->getNomUrl(1).
"</td>\n";
 
  562     $totalarray[
'nbfield']++;
 
  566   print 
"<td>".dol_trunc($obj->label, 40).
"</td>\n";
 
  568     $totalarray[
'nbfield']++;
 
  572   print 
'<td class="center">'.dol_print_date($db->jdate($obj->dateep), 
'day').
"</td>\n";
 
  574     $totalarray[
'nbfield']++;
 
  578   print 
'<td class="center">'.dol_print_date($db->jdate($obj->datep), 
'dayhour', 
'tzuserrel').
"</td>\n";
 
  580     $totalarray[
'nbfield']++;
 
  588   print 
"<td>".$userstatic->getNomUrl(1).
"</td>\n";
 
  590     $totalarray[
'nbfield']++;
 
  595   print $langs->trans(
"PaymentTypeShort".$obj->payment_code);
 
  598     $totalarray[
'nbfield']++;
 
  602   print 
'<td>'.$obj->num_payment.
'</td>';
 
  604     $totalarray[
'nbfield']++;
 
  611     $accountlinestatic->id = $obj->fk_bank;
 
  612     print $accountlinestatic->getNomUrl(1);
 
  615       $totalarray[
'nbfield']++;
 
  619     if ($obj->fk_bank > 0) {
 
  621       $accountstatic->id = $obj->bid;
 
  622       $accountstatic->ref = $obj->bref;
 
  623       $accountstatic->number = $obj->bnumber;
 
  624       $accountstatic->iban = $obj->iban;
 
  625       $accountstatic->bic = $obj->bic;
 
  626       $accountstatic->currency_code = $langs->trans(
"Currency".$obj->currency_code);
 
  627       $accountstatic->clos = $obj->clos;
 
  630         $accountstatic->account_number = $obj->account_number;
 
  633         $accountingjournal->fetch($obj->fk_accountancy_journal);
 
  635         $accountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, 
'', 1);
 
  637       $accountstatic->label = $obj->blabel;
 
  638       if ($accountstatic->id > 0) {
 
  639         print $accountstatic->getNomUrl(1);
 
  646       $totalarray[
'nbfield']++;
 
  651   print 
'<td class="nowrap right"><span class="amount">'.price($obj->amount).
'</span></td>';
 
  653     $totalarray[
'nbfield']++;
 
  656     $totalarray[
'pos'][$totalarray[
'nbfield']] = 
'totalttcfield';
 
  658   $totalarray[
'val'][
'totalttcfield'] += $obj->amount;
 
  661   include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
 
  663   $parameters = array(
'arrayfields'=>$arrayfields, 
'object'=>$object, 
'obj'=>$obj, 
'i'=>$i, 
'totalarray'=>&$totalarray);
 
  664   $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object); 
 
  665   print $hookmanager->resPrint;
 
  667   print 
'<td class="nowrap center">';
 
  668   if ($massactionbutton || $massaction) {   
 
  670     if (in_array($object->id, $arrayofselected)) {
 
  673     print 
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.
'"'.($selected ? 
' checked="checked"' : 
'').
'>';
 
  677     $totalarray[
'nbfield']++;
 
  686 include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
 
  698   print 
'<tr><td colspan="'.$colspan.
'" class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</td></tr>';
 
  704 $parameters = array(
'arrayfields'=>$arrayfields, 
'sql'=>$sql);
 
  705 $reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object); 
 
  706 print $hookmanager->resPrint;
 
  708 print 
'</table>'.
"\n";
 
  711 print 
'</form>'.
"\n";
 
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
 
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
 
Class to manage bank accounts.
 
Class to manage bank transaction lines.
 
Class to manage accounting accounts.
 
Class to manage payments of salaries.
 
Class to manage salary payments.
 
Class to manage Dolibarr users.
 
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
 
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
 
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
 
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
 
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
 
natural_search($fields, $value, $mode=0, $nofirstand=0)
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
 
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
 
dol_now($mode='auto')
Return date for now.
 
dol_eval($s, $returnvalue=0, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
 
print_liste_field_titre($name, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
 
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
 
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
 
print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
 
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
 
isModEnabled($module)
Is Dolibarr module enabled.
 
$nbtotalofrecords
Count total nb of records.
 
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.