FIX : uniformization
This commit is contained in:
parent
895c6efc14
commit
c8e40727c2
@ -37,6 +37,7 @@ if ($user->socid) {
|
||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formsocialcontrib.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
@ -63,6 +64,8 @@ $search_year_lim = GETPOST('search_year_lim', 'int');
|
||||
$search_project_ref = GETPOST('search_project_ref', 'alpha');
|
||||
$search_project = GETPOST('search_project', 'alpha');
|
||||
$search_users = GETPOST('search_users');
|
||||
$search_type = GETPOST('search_type', 'int');
|
||||
$search_account = GETPOST('search_account', 'int');
|
||||
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
@ -107,8 +110,10 @@ $arrayfields = array(
|
||||
'cs.periode' =>array('label'=>"PeriodEndDate", 'checked'=>1, 'position'=>50),
|
||||
'p.ref' =>array('label'=>"ProjectRef", 'checked'=>1, 'position'=>60, 'enable'=>(!empty($conf->projet->enabled))),
|
||||
'cs.fk_user' =>array('label'=>"Employee", 'checked'=>1, 'position'=>70),
|
||||
'cs.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>80),
|
||||
'cs.paye' =>array('label'=>"Status", 'checked'=>1, 'position'=>90),
|
||||
'cs.fk_mode_reglement' =>array('checked'=>1, 'position'=>80, 'label'=>"DefaultPaymentMode"),
|
||||
'cs.fk_account' =>array('checked'=>1, 'position'=>90, 'label'=>"DefaultBankAccount"),
|
||||
'cs.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>100),
|
||||
'cs.paye' =>array('label'=>"Status", 'checked'=>1, 'position'=>110),
|
||||
);
|
||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
|
||||
@ -144,6 +149,8 @@ if (empty($reshook)) {
|
||||
$search_project_ref = '';
|
||||
$search_project = '';
|
||||
$search_users = '';
|
||||
$search_type = '';
|
||||
$search_account = '';
|
||||
$search_array_options = array();
|
||||
}
|
||||
}
|
||||
@ -154,6 +161,7 @@ if (empty($reshook)) {
|
||||
|
||||
$form = new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
$bankstatic = new Account($db);
|
||||
$formsocialcontrib = new FormSocialContrib($db);
|
||||
$chargesociale_static = new ChargeSociales($db);
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
@ -167,10 +175,13 @@ $sql .= " cs.amount, cs.date_ech, cs.libelle as label, cs.paye, cs.periode,";
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
$sql .= " p.rowid as project_id, p.ref as project_ref, p.title as project_label,";
|
||||
}
|
||||
$sql .= " c.libelle as type_label,";
|
||||
$sql .= " SUM(pc.amount) as alreadypayed";
|
||||
$sql .= " c.libelle as type_label, cs.fk_account,";
|
||||
$sql .= " ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,";
|
||||
$sql .= " SUM(pc.amount) as alreadypayed, pay.code as payment_code";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,";
|
||||
$sql .= " ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON (cs.fk_account = ba.rowid)";
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as pay ON (cs.fk_mode_reglement = pay.id)';
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = cs.fk_projet";
|
||||
}
|
||||
@ -193,6 +204,12 @@ if (!empty($conf->projet->enabled)) {
|
||||
if (!empty($search_users)) {
|
||||
$sql .= ' AND cs.fk_user IN('.implode(', ', $search_users).')';
|
||||
}
|
||||
if (!empty($search_type) && $search_type > 0) {
|
||||
$sql .= ' AND cs.fk_mode_reglement='.$search_type;
|
||||
}
|
||||
if (!empty($search_account) && $search_account > 0) {
|
||||
$sql .= ' AND cs.fk_account='.$search_account;
|
||||
}
|
||||
if ($search_amount) {
|
||||
$sql .= natural_search("cs.amount", $search_amount, 1);
|
||||
}
|
||||
@ -212,7 +229,7 @@ if ($year > 0) {
|
||||
if ($search_typeid) {
|
||||
$sql .= " AND cs.fk_type=".$db->escape($search_typeid);
|
||||
}
|
||||
$sql .= " GROUP BY cs.rowid, cs.fk_type, cs.fk_user, cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode, c.libelle";
|
||||
$sql .= " GROUP BY cs.rowid, cs.fk_type, cs.fk_user, cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode, c.libelle, cs.fk_account, ba.label, ba.ref, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.clos";
|
||||
if (!empty($conf->projet->enabled)) {
|
||||
$sql .= ", p.rowid, p.ref, p.title";
|
||||
}
|
||||
@ -263,6 +280,12 @@ if ($search_users) {
|
||||
$param .= '&search_users[]='.urlencode($id_user);
|
||||
}
|
||||
}
|
||||
if ($search_type) {
|
||||
$param .= '&search_type='.urlencode($search_type);
|
||||
}
|
||||
if ($search_account) {
|
||||
$param .= '&search_account='.$search_account;
|
||||
}
|
||||
if ($search_status != '' && $search_status != '-1') {
|
||||
$param .= '&search_status='.urlencode($search_status);
|
||||
}
|
||||
@ -376,6 +399,20 @@ if (!empty($arrayfields['cs.fk_user']['checked'])) {
|
||||
print $form->select_dolusers($search_users, 'search_users', 1, null, 0, '', '', '0', '0', 0, '', 0, '', '', 0, 0, true);
|
||||
}
|
||||
|
||||
// Filter: Type
|
||||
if (!empty($arrayfields['cs.fk_mode_reglement']['checked'])) {
|
||||
print '<td class="liste_titre left">';
|
||||
$form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 16);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Filter: Bank Account
|
||||
if (!empty($arrayfields['cs.fk_account']['checked'])) {
|
||||
print '<td class="liste_titre left">';
|
||||
$form->select_comptes($search_account, 'search_account', 0, '', 1);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Filter: Amount
|
||||
if (!empty($arrayfields['cs.amount']['checked'])) {
|
||||
print '<td class="liste_titre right">';
|
||||
@ -428,6 +465,12 @@ if (!empty($arrayfields['p.ref']['checked'])) {
|
||||
if (!empty($arrayfields['cs.fk_user']['checked'])) {
|
||||
print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.lastname", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($arrayfields['cs.fk_mode_reglement']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['cs.fk_mode_reglement']['label'], $_SERVER["PHP_SELF"], "cs.fk_mode_reglement", '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($arrayfields['cs.fk_account']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['cs.fk_account']['label'], $_SERVER["PHP_SELF"], "cs.fk_account", '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($arrayfields['cs.amount']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['cs.amount']['label'], $_SERVER["PHP_SELF"], "cs.amount", '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
}
|
||||
@ -545,6 +588,39 @@ while ($i < min($num, $limit)) {
|
||||
}
|
||||
}
|
||||
|
||||
// Type
|
||||
if (!empty($arrayfields['cs.fk_mode_reglement']['checked'])) {
|
||||
print '<td>';
|
||||
if(!empty($obj->payment_code)) print $langs->trans("PaymentTypeShort".$obj->payment_code);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
|
||||
// Account
|
||||
if (!empty($arrayfields['cs.fk_account']['checked'])) {
|
||||
print '<td>';
|
||||
if ($obj->fk_account > 0) {
|
||||
$bankstatic->id = $obj->fk_account;
|
||||
$bankstatic->ref = $obj->bref;
|
||||
$bankstatic->number = $obj->bnumber;
|
||||
$bankstatic->iban = $obj->iban;
|
||||
$bankstatic->bic = $obj->bic;
|
||||
$bankstatic->currency_code = $langs->trans("Currency".$obj->currency_code);
|
||||
$bankstatic->account_number = $obj->account_number;
|
||||
$bankstatic->clos = $obj->clos;
|
||||
|
||||
//$accountingjournal->fetch($obj->fk_accountancy_journal);
|
||||
//$bankstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
|
||||
|
||||
$bankstatic->label = $obj->blabel;
|
||||
print $bankstatic->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Amount
|
||||
if (!empty($arrayfields['cs.amount']['checked'])) {
|
||||
print '<td class="nowrap right">'.price($obj->amount).'</td>';
|
||||
|
||||
@ -144,7 +144,7 @@ $sql .= " cs.rowid, cs.libelle, cs.fk_type as type, cs.periode, cs.date_ech, cs.
|
||||
$sql .= " pc.rowid as pid, pc.datep, pc.amount as totalpaye, pc.num_paiement as num_payment, pc.fk_bank,";
|
||||
$sql .= " pct.code as payment_code,";
|
||||
$sql .= " u.rowid uid, u.lastname, u.firstname, u.email, u.login, u.admin,";
|
||||
$sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel";
|
||||
$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";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c,";
|
||||
$sql .= " ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."paiementcharge as pc ON pc.fk_charge = cs.rowid";
|
||||
@ -323,6 +323,10 @@ while ($i < min($num, $limit)) {
|
||||
$accountstatic->accountancy_number = $obj->account_number;
|
||||
$accountstatic->accountancy_journal = $obj->accountancy_journal;
|
||||
$accountstatic->label = $obj->blabel;
|
||||
$accountstatic->iban = $obj->iban;
|
||||
$accountstatic->bic = $obj->bic;
|
||||
$accountstatic->currency_code = $langs->trans("Currency".$obj->currency_code);
|
||||
$accountstatic->clos = $obj->clos;
|
||||
print $accountstatic->getNomUrl(1);
|
||||
} else {
|
||||
print ' ';
|
||||
|
||||
@ -85,8 +85,8 @@ $arrayfields = array(
|
||||
't.rowid' =>array('checked'=>1, 'position'=>10, 'label'=>"Ref",),
|
||||
't.label' =>array('checked'=>1, 'position'=>20, 'label'=>"Label"),
|
||||
't.datev' =>array('checked'=>1, 'position'=>30, 'label'=>"PeriodEndDate"),
|
||||
/*'t.fk_typepayment' =>array('checked'=>1, 'position'=>50, 'label'=>"DefaultPaymentMode"),
|
||||
't.fk_account' =>array('checked'=>1, 'position'=>60, 'label'=>"DefaultBankAccount"),*/
|
||||
't.fk_typepayment' =>array('checked'=>1, 'position'=>50, 'label'=>"DefaultPaymentMode"),
|
||||
't.fk_account' =>array('checked'=>1, 'position'=>60, 'label'=>"DefaultBankAccount"),
|
||||
't.amount' =>array('checked'=>1, 'position'=>90, 'label'=>"Amount"),
|
||||
't.status' =>array('checked'=>1, 'position'=>90, 'label'=>"Status"),
|
||||
);
|
||||
@ -141,7 +141,7 @@ $bankline = new AccountLine($db);
|
||||
llxHeader('', $langs->trans("VATDeclarations"));
|
||||
|
||||
$sql = 'SELECT t.rowid, t.amount, t.label, t.datev, t.datep, t.paye, t.fk_typepayment as type, t.fk_account,';
|
||||
$sql.= ' ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code,';
|
||||
$sql.= ' ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,';
|
||||
$sql.= ' t.num_payment, pst.code as payment_code,';
|
||||
$sql .= ' SUM(ptva.amount) as alreadypayed';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'tva as t';
|
||||
@ -181,7 +181,7 @@ if ($search_status != '' && $search_status >= 0) {
|
||||
$sql .= " AND t.paye = ".$db->escape($search_status);
|
||||
}
|
||||
|
||||
$sql .= " GROUP BY t.rowid, t.amount, t.label, t.datev, t.datep, t.paye, t.fk_typepayment, t.fk_account, ba.label, ba.ref, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, t.num_payment, pst.code";
|
||||
$sql .= " GROUP BY t.rowid, t.amount, t.label, t.datev, t.datep, t.paye, t.fk_typepayment, t.fk_account, ba.label, ba.ref, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.clos, t.num_payment, pst.code";
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
$nbtotalofrecords = '';
|
||||
@ -351,18 +351,18 @@ if (!empty($arrayfields['t.datev']['checked'])) {
|
||||
}*/
|
||||
|
||||
// Filter: Type
|
||||
/*if (!empty($arrayfields['t.fk_typepayment']['checked'])) {
|
||||
if (!empty($arrayfields['t.fk_typepayment']['checked'])) {
|
||||
print '<td class="liste_titre left">';
|
||||
$form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 16);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Filter: Type
|
||||
// Filter: Bank Account
|
||||
if (!empty($arrayfields['t.fk_account']['checked'])) {
|
||||
print '<td class="liste_titre left">';
|
||||
$form->select_comptes($search_account, 'search_account', 0, '', 1);
|
||||
print '</td>';
|
||||
}*/
|
||||
}
|
||||
|
||||
// Filter: Amount
|
||||
if (!empty($arrayfields['t.amount']['checked'])) {
|
||||
@ -404,12 +404,12 @@ if (!empty($arrayfields['t.label']['checked'])) {
|
||||
if (!empty($arrayfields['t.datev']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['t.datev']['label'], $_SERVER['PHP_SELF'], 't.datev', '', $param, 'align="center"', $sortfield, $sortorder);
|
||||
}
|
||||
/*if (!empty($arrayfields['t.fk_typepayment']['checked'])) {
|
||||
if (!empty($arrayfields['t.fk_typepayment']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['t.fk_typepayment']['label'], $_SERVER['PHP_SELF'], 't.fk_typepayment', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||
}
|
||||
if (!empty($arrayfields['t.fk_account']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['t.fk_account']['label'], $_SERVER['PHP_SELF'], 't.fk_account', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||
}*/
|
||||
}
|
||||
if (!empty($arrayfields['t.amount']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['t.amount']['label'], $_SERVER['PHP_SELF'], 't.amount', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
}
|
||||
@ -475,15 +475,17 @@ while ($i < min($num, $limit)) {
|
||||
}*/
|
||||
|
||||
// Type
|
||||
/*if (!empty($arrayfields['t.fk_typepayment']['checked'])) {
|
||||
print '<td>'.$langs->trans("PaymentTypeShort".$obj->payment_code).'</td>';
|
||||
if (!empty($arrayfields['t.fk_typepayment']['checked'])) {
|
||||
print '<td>';
|
||||
if(!empty($obj->payment_code)) print $langs->trans("PaymentTypeShort".$obj->payment_code);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
// Account
|
||||
/*if (!empty($arrayfields['t.fk_account']['checked'])) {
|
||||
if (!empty($arrayfields['t.fk_account']['checked'])) {
|
||||
print '<td>';
|
||||
if ($obj->fk_account > 0) {
|
||||
$bankstatic->id = $obj->fk_account;
|
||||
@ -493,6 +495,7 @@ while ($i < min($num, $limit)) {
|
||||
$bankstatic->bic = $obj->bic;
|
||||
$bankstatic->currency_code = $langs->trans("Currency".$obj->currency_code);
|
||||
$bankstatic->account_number = $obj->account_number;
|
||||
$bankstatic->clos = $obj->clos;
|
||||
|
||||
//$accountingjournal->fetch($obj->fk_accountancy_journal);
|
||||
//$bankstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
|
||||
@ -502,7 +505,7 @@ while ($i < min($num, $limit)) {
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}*/
|
||||
}
|
||||
|
||||
// Amount
|
||||
if (!empty($arrayfields['t.amount']['checked'])) {
|
||||
|
||||
@ -235,7 +235,7 @@ $title = $langs->trans('Salaries');
|
||||
|
||||
$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,";
|
||||
$sql .= " s.rowid, s.fk_account, s.paye, s.fk_user, s.amount, s.salary, s.label, s.datesp, s.dateep, s.fk_typepayment as paymenttype, ";
|
||||
$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,";
|
||||
$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,";
|
||||
$sql .= " pst.code as payment_code,";
|
||||
$sql .= " SUM(ps.amount) as alreadypayed";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."salary as s";
|
||||
@ -270,7 +270,7 @@ if ($search_amount) {
|
||||
$sql .= natural_search("s.amount", $search_amount, 1);
|
||||
}
|
||||
if ($search_account > 0) {
|
||||
$sql .= " AND b.fk_account=".((int) $search_account);
|
||||
$sql .= " AND s.fk_account=".((int) $search_account);
|
||||
}
|
||||
if ($search_status != '' && $search_status >= 0) {
|
||||
$sql .= " AND s.paye = ".$db->escape($search_status);
|
||||
@ -280,7 +280,7 @@ if ($search_type_id) {
|
||||
}
|
||||
$sql .= " GROUP BY u.rowid, u.lastname, u.firstname, u.login, u.email, u.admin, u.salary, u.fk_soc, u.statut,";
|
||||
$sql .= " s.rowid, s.fk_account, s.paye, s.fk_user, s.amount, s.salary, s.label, s.datesp, s.dateep, s.fk_typepayment, s.fk_bank,";
|
||||
$sql .= " ba.rowid, ba.ref, ba.number, ba.account_number, ba.fk_accountancy_journal, ba.label, ba.iban_prefix, ba.bic, ba.currency_code,";
|
||||
$sql .= " ba.rowid, ba.ref, ba.number, ba.account_number, ba.fk_accountancy_journal, ba.label, ba.iban_prefix, ba.bic, ba.currency_code, ba.clos,";
|
||||
$sql .= " pst.code";
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
@ -438,7 +438,7 @@ print '<input class="flat" type="text" size="6" name="search_user" value="'.$db-
|
||||
print '</td>';
|
||||
|
||||
// Type
|
||||
/*print '<td class="liste_titre left">';
|
||||
print '<td class="liste_titre left">';
|
||||
$form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16);
|
||||
print '</td>';
|
||||
|
||||
@ -447,7 +447,7 @@ if (!empty($conf->banque->enabled)) {
|
||||
print '<td class="liste_titre">';
|
||||
$form->select_comptes($search_account, 'search_account', 0, '', 1);
|
||||
print '</td>';
|
||||
}*/
|
||||
}
|
||||
|
||||
// Amount
|
||||
print '<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$db->escape($search_amount).'"></td>';
|
||||
@ -480,10 +480,10 @@ print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "s.label", "", $param, 'c
|
||||
print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "s.datesp,s.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "s.dateep,s.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.lastname", "", $param, "", $sortfield, $sortorder);
|
||||
/*print_liste_field_titre("DefaultPaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DefaultPaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, 'class="left"', $sortfield, $sortorder);
|
||||
if (!empty($conf->banque->enabled)) {
|
||||
print_liste_field_titre("DefaultBankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
|
||||
}*/
|
||||
}
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "s.amount", "", $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('Status', $_SERVER["PHP_SELF"], "s.paye", '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
// Extra fields
|
||||
@ -567,7 +567,9 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
}
|
||||
|
||||
// Type
|
||||
/*print '<td>'.$langs->trans("PaymentTypeShort".$obj->payment_code).'</td>';
|
||||
print '<td>';
|
||||
if(!empty($obj->payment_code)) print $langs->trans("PaymentTypeShort".$obj->payment_code);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
@ -585,6 +587,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
$accountstatic->bic = $obj->bic;
|
||||
$accountstatic->currency_code = $langs->trans("Currency".$obj->currency_code);
|
||||
$accountstatic->account_number = $obj->account_number;
|
||||
$accountstatic->clos = $obj->clos;
|
||||
|
||||
if (!empty($conf->accounting->enabled)) {
|
||||
$accountstatic->account_number = $obj->account_number;
|
||||
@ -603,7 +606,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
// if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield';
|
||||
|
||||
|
||||
@ -185,7 +185,7 @@ $title = $langs->trans('SalariesPayments');
|
||||
|
||||
$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,";
|
||||
$sql .= " s.rowid, s.fk_user, s.amount, s.salary, sal.rowid as id_salary, sal.label, s.datep as datep, b.datev as datev, s.fk_typepayment as type, s.num_payment, s.fk_bank,";
|
||||
$sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.fk_accountancy_journal, ba.label as blabel,";
|
||||
$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,";
|
||||
$sql .= " pst.code as payment_code";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as s";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."salary as sal ON (sal.rowid = s.fk_salary)";
|
||||
@ -466,6 +466,10 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
||||
$accountstatic->id = $obj->bid;
|
||||
$accountstatic->ref = $obj->bref;
|
||||
$accountstatic->number = $obj->bnumber;
|
||||
$accountstatic->iban = $obj->iban;
|
||||
$accountstatic->bic = $obj->bic;
|
||||
$accountstatic->currency_code = $langs->trans("Currency".$obj->currency_code);
|
||||
$accountstatic->clos = $obj->clos;
|
||||
|
||||
if (!empty($conf->accounting->enabled)) {
|
||||
$accountstatic->account_number = $obj->account_number;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user