mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fixing style errors.
This commit is contained in:
parent
24b26b8980
commit
9bfb7a5cbd
|
|
@ -70,8 +70,7 @@ if ($fielvalue)
|
|||
if ($user->socid) $socid = $user->socid;
|
||||
$result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account&bank_account', '', '', $fieldtype);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
if ($user->socid) $socid = $user->socid;
|
||||
$result = restrictedArea($user, 'banque');
|
||||
}
|
||||
|
|
@ -243,15 +242,13 @@ if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', '
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("NoRecordSelected"), null, 'errors');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorPleaseTypeBankTransactionReportName"), null, 'errors');
|
||||
|
|
@ -288,8 +285,7 @@ if (GETPOST('save') && !$cancel && $user->rights->banque->modifier)
|
|||
{
|
||||
$amount = price2num($_POST["addcredit"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$amount = - price2num($_POST["adddebit"]);
|
||||
}
|
||||
|
||||
|
|
@ -339,13 +335,11 @@ if (GETPOST('save') && !$cancel && $user->rights->banque->modifier)
|
|||
header("Location: ".$_SERVER['PHP_SELF'].($id ? "?id=".$id : ''));
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$action = 'addline';
|
||||
}
|
||||
}
|
||||
|
|
@ -470,8 +464,7 @@ if ($id > 0 || !empty($ref))
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
llxHeader('', $langs->trans("BankTransactions"), '', '', 0, 0, array(), array(), $param);
|
||||
}
|
||||
|
||||
|
|
@ -676,8 +669,7 @@ if ($resql)
|
|||
print $liste;
|
||||
if ($numr <= 0) print '<b>'.$langs->trans("None").'</b>';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
|
@ -794,13 +786,12 @@ if ($resql)
|
|||
{
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.$search_account.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.urlencode($search_account)), '', $user->rights->banque->modifier);
|
||||
}
|
||||
else // If direct entries is not done using miscellaneous payments
|
||||
else // If direct entries is not done using miscellaneous payments
|
||||
{
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param, '', $user->rights->banque->modifier);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param, '', -1);
|
||||
}
|
||||
}
|
||||
|
|
@ -1042,8 +1033,7 @@ if ($resql)
|
|||
$balancebefore = $objforbalance->previoustotal + ($sign * $objp->amount);
|
||||
}
|
||||
// If sort is asc,asc,asc then total of previous date is balance of line before the next line to show
|
||||
else
|
||||
{
|
||||
else {
|
||||
$balance = $objforbalance->previoustotal;
|
||||
}
|
||||
}
|
||||
|
|
@ -1130,8 +1120,7 @@ if ($resql)
|
|||
$balance = price2num($balancebefore, 'MT'); // balance = balancebefore of previous line (sort is desc)
|
||||
$balancebefore = price2num($balancebefore - ($sign * $objp->amount), 'MT');
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$balancebefore = price2num($balance, 'MT'); // balancebefore = balance of previous line (sort is asc)
|
||||
$balance = price2num($balance + ($sign * $objp->amount), 'MT');
|
||||
}
|
||||
|
|
@ -1143,8 +1132,7 @@ if ($resql)
|
|||
$cachebankaccount[$objp->bankid] = $bankaccounttmp;
|
||||
$bankaccount = $bankaccounttmp;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$bankaccount = $cachebankaccount[$objp->bankid];
|
||||
}
|
||||
|
||||
|
|
@ -1280,8 +1268,7 @@ if ($resql)
|
|||
print $bankstatic->getNomUrl(1, '');
|
||||
print ')';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$bankstatic->id = $objp->bankid;
|
||||
$bankstatic->label = $objp->bankref;
|
||||
print ' ('.$langs->trans("TransferFrom").' ';
|
||||
|
|
@ -1307,11 +1294,10 @@ if ($resql)
|
|||
elseif ($links[$key]['type'] == 'sc')
|
||||
{
|
||||
}
|
||||
elseif ($links[$key]['type'] == 'salary')
|
||||
elseif ($links[$key]['type'] == 'salary')
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else {
|
||||
// Show link with label $links[$key]['label']
|
||||
if (!empty($objp->label) && !empty($links[$key]['label'])) print ' - ';
|
||||
print '<a href="'.$links[$key]['url'].$links[$key]['url_id'].'">';
|
||||
|
|
@ -1321,8 +1307,7 @@ if ($resql)
|
|||
if ($reg[1] == 'paiement') $reg[1] = 'Payment';
|
||||
print ' '.$langs->trans($reg[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
print ' '.$links[$key]['label'];
|
||||
}
|
||||
print '</a>';
|
||||
|
|
@ -1400,8 +1385,7 @@ if ($resql)
|
|||
$companystatic->code_compta_fournisseur = $objp->code_compta_fournisseur;
|
||||
print $companystatic->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
print ' ';
|
||||
}
|
||||
print '</td>';
|
||||
|
|
@ -1454,13 +1438,11 @@ if ($resql)
|
|||
{
|
||||
print '<td class="nowrap right"> '.price($balancebefore).'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
print '<td class="error nowrap right"> '.price($balancebefore).'</td>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
print '<td class="right">-</td>';
|
||||
}
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
|
|
@ -1474,13 +1456,11 @@ if ($resql)
|
|||
{
|
||||
print '<td class="nowrap right"> '.price($balance).'</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
print '<td class="error nowrap right"> '.price($balance).'</td>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
print '<td class="right">-</td>';
|
||||
}
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
|
|
@ -1527,16 +1507,14 @@ if ($resql)
|
|||
print img_edit();
|
||||
print '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
|
||||
{
|
||||
print '<a class="editfielda" href="'.DOL_URL_ROOT.'/compta/bank/line.php?save_lastsearch_values=1&rowid='.$objp->rowid.'&account='.$objp->bankid.'&page='.$page.'">';
|
||||
print img_edit();
|
||||
print '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
print '<a class="editfielda" href="'.DOL_URL_ROOT.'/compta/bank/line.php?save_lastsearch_values=1&rowid='.$objp->rowid.'&account='.$objp->bankid.'&page='.$page.'">';
|
||||
print img_view();
|
||||
print '</a>';
|
||||
|
|
@ -1614,8 +1592,7 @@ if ($resql)
|
|||
print '</form>';
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ if ($action == 'add' && empty($cancel))
|
|||
}
|
||||
}
|
||||
|
||||
if(empty($error)) {
|
||||
if (empty($error)) {
|
||||
if (GETPOST('saveandnew', 'alpha')) {
|
||||
setEventMessages($langs->trans("RecordSaved"), '', 'mesgs');
|
||||
header("Location: card.php?action=create&fk_project=" . urlencode($projectid) . "&accountid=" . urlencode($accountid) . '&paymenttype=' . urlencode(GETPOST('paymenttype', 'az09')) . '&datepday=' . GETPOST("datepday", 'int') . '&datepmonth=' . GETPOST("datepmonth", 'int') . '&datepyear=' . GETPOST("datepyear", 'int'));
|
||||
|
|
@ -253,7 +253,6 @@ if ($action == 'add' && empty($cancel))
|
|||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$action = 'create';
|
||||
|
|
@ -493,14 +492,14 @@ if ($action == 'create')
|
|||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if (!empty($conf->projet->enabled))
|
||||
if (!empty($conf->projet->enabled))
|
||||
{
|
||||
$formproject = new FormProjets($db);
|
||||
$formproject = new FormProjets($db);
|
||||
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||
$formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||
$formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Bank
|
||||
if (!empty($conf->banque->enabled))
|
||||
|
|
@ -712,7 +711,6 @@ if ($id)
|
|||
print '<tr><td>'.$langs->trans("DateEndPeriod")."</td><td>";
|
||||
print $form->selectDate($object->dateep, 'dateep', 0, 0, 0, 'dateep', 1);
|
||||
print "</td></tr>";
|
||||
|
||||
} else {
|
||||
print "<tr>";
|
||||
print '<td>' . $langs->trans("DateEndPeriod") . '</td><td>';
|
||||
|
|
|
|||
|
|
@ -202,8 +202,7 @@ class PaymentSalary extends CommonObject
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
|
@ -218,8 +217,7 @@ class PaymentSalary extends CommonObject
|
|||
$this->db->commit();
|
||||
return $this->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$this->error = $this->db->error();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
|
|
@ -289,8 +287,7 @@ class PaymentSalary extends CommonObject
|
|||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$this->error = "Error ".$this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -361,8 +358,7 @@ class PaymentSalary extends CommonObject
|
|||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -417,8 +413,7 @@ class PaymentSalary extends CommonObject
|
|||
$this->db->rollback();
|
||||
return -1 * $error;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -468,8 +463,7 @@ class PaymentSalary extends CommonObject
|
|||
$this->db->commit();
|
||||
return $object->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -584,8 +578,7 @@ class PaymentSalary extends CommonObject
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$this->error = $acc->error;
|
||||
$error++;
|
||||
}
|
||||
|
|
@ -595,8 +588,7 @@ class PaymentSalary extends CommonObject
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
@ -620,8 +612,7 @@ class PaymentSalary extends CommonObject
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$this->error = $this->db->error();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -187,8 +187,7 @@ class Salary extends CommonObject
|
|||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -270,8 +269,7 @@ class Salary extends CommonObject
|
|||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$this->error = "Error ".$this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -388,7 +386,7 @@ class Salary extends CommonObject
|
|||
$this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount"));
|
||||
return -5;
|
||||
}
|
||||
/* if (!empty($conf->banque->enabled) && (empty($this->accountid) || $this->accountid <= 0))
|
||||
/* if (!empty($conf->banque->enabled) && (empty($this->accountid) || $this->accountid <= 0))
|
||||
{
|
||||
$this->error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Account"));
|
||||
return -6;
|
||||
|
|
@ -472,14 +470,12 @@ class Salary extends CommonObject
|
|||
$this->db->commit();
|
||||
return $this->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$this->error = $this->db->error();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
|
|
@ -503,8 +499,7 @@ class Salary extends CommonObject
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
dol_print_error($this->db);
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -611,8 +606,7 @@ class Salary extends CommonObject
|
|||
$this->db->free($resql);
|
||||
return $amount;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
@ -648,8 +642,7 @@ class Salary extends CommonObject
|
|||
}
|
||||
$this->db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -577,7 +577,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||
}
|
||||
}
|
||||
|
||||
// if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield';
|
||||
// if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalttcfield';
|
||||
|
||||
// Amount
|
||||
print '<td class="nowrap right">'.price($obj->amount).'</td>';
|
||||
|
|
|
|||
|
|
@ -143,8 +143,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y
|
|||
header('Location: '.$loc);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
|
|
@ -285,8 +284,7 @@ if ($action == 'create')
|
|||
{
|
||||
print '<td class="left">'.dol_print_date($objp->dateep, 'day').'</td>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
print "<td align=\"center\"><b>!!!</b></td>\n";
|
||||
}
|
||||
|
||||
|
|
@ -307,8 +305,7 @@ if ($action == 'create')
|
|||
print '<input type=hidden class="sum_remain" name="'.$nameRemain.'" value="'.$remaintopay.'">';
|
||||
print '<input type="text" size="8" name="'.$namef.'" id="'.$namef.'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
print '-';
|
||||
}
|
||||
print "</td>";
|
||||
|
|
|
|||
|
|
@ -68,8 +68,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->salaries-
|
|||
header("Location: ".DOL_URL_ROOT."/salaries/payments.php");
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$db->rollback();
|
||||
}
|
||||
|
|
@ -244,8 +243,7 @@ if ($resql)
|
|||
print "</table>\n";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
|
@ -277,8 +275,7 @@ if ($action == '')
|
|||
{
|
||||
print '<a class="butActionDelete" href="card.php?id='.$_GET['id'].'&action=delete">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("CantRemovePaymentSalaryPaid")).'">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,8 +105,7 @@ elseif ($mysoc->localtax2_assuj == "1")
|
|||
$j = 2;
|
||||
$numlt = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$j = 0;
|
||||
$numlt = 0;
|
||||
}
|
||||
|
|
@ -124,7 +123,7 @@ if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read))
|
|||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON (u.rowid = s.fk_user)";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pct ON ps.fk_typepaiement = pct.id";
|
||||
$sql .= " WHERE s.entity IN (".getEntity('user').")";
|
||||
/* if ($year > 0)
|
||||
/* if ($year > 0)
|
||||
{
|
||||
$sql .= " AND (s.datesp between '".$db->idate(dol_get_first_day($year, 1, false))."' AND '".$db->idate(dol_get_last_day($year, 12, false))."'";
|
||||
$sql .= " OR s.dateep between '".$db->idate(dol_get_first_day($year, 1, false))."' AND '".$db->idate(dol_get_last_day($year, 12, false))."')";
|
||||
|
|
@ -208,8 +207,7 @@ if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read))
|
|||
|
||||
print "<br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user