diff --git a/htdocs/compta/paiement_vat.php b/htdocs/compta/paiement_vat.php
index cc5f6b858c8..7feb8fb6477 100644
--- a/htdocs/compta/paiement_vat.php
+++ b/htdocs/compta/paiement_vat.php
@@ -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 '
'.dol_print_date($objp->datev, 'day').' | '."\n";
}
- else
- {
+ else {
print "!!! | \n";
}
@@ -308,8 +306,7 @@ if ($action == 'create')
print '';
print '';
}
- else
- {
+ else {
print '-';
}
print "";
diff --git a/htdocs/compta/payment_vat/card.php b/htdocs/compta/payment_vat/card.php
index 30bd6844b71..976d2d761a1 100644
--- a/htdocs/compta/payment_vat/card.php
+++ b/htdocs/compta/payment_vat/card.php
@@ -68,8 +68,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->tax->char
header("Location: ".DOL_URL_ROOT."/compta/tva/payments.php?mode=tvaonly");
exit;
}
- else
- {
+ else {
setEventMessages($object->error, $object->errors, 'errors');
$db->rollback();
}
@@ -262,7 +261,7 @@ if ($resql)
print $tva->getNomUrl(1);
print "\n";
// Type
- /* print '';
+ /* print ' | ';
print $tva->type_label;4
print " | \n";*/
// Label
@@ -287,8 +286,7 @@ if ($resql)
print "\n";
$db->free($resql);
}
-else
-{
+else {
dol_print_error($db);
}
@@ -320,8 +318,7 @@ if ($action == '')
{
print ''.$langs->trans('Delete').'';
}
- else
- {
+ else {
print ''.$langs->trans('Delete').'';
}
}
diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php
index 9e7b8862c82..7f6cc454af1 100644
--- a/htdocs/compta/tva/card.php
+++ b/htdocs/compta/tva/card.php
@@ -177,7 +177,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
if (!$error)
{
$ret = $object->create($user);
- if($ret < 0) $error++;
+ if ($ret < 0) $error++;
// Auto create payment
if (!empty($auto_create_payment) && !$error)
@@ -195,7 +195,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
if (!$error)
{
- $paymentid = $paiement->create($user, (int)GETPOST('closepaidtva'));
+ $paymentid = $paiement->create($user, (int) GETPOST('closepaidtva'));
if ($paymentid < 0)
{
$error++;
@@ -218,12 +218,11 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
{
$db->commit();
}
- else
- {
+ else {
$db->rollback();
}
}
- if(empty($error)) {
+ if (empty($error)) {
header("Location: card.php?id=" . $object->id);
exit;
}
@@ -257,21 +256,18 @@ if ($action == 'confirm_delete' && $confirm == 'yes')
header("Location: ".DOL_URL_ROOT.'/compta/tva/list.php');
exit;
}
- else
- {
+ else {
$object->error = $accountline->error;
$db->rollback();
setEventMessages($object->error, $object->errors, 'errors');
}
}
- else
- {
+ else {
$db->rollback();
setEventMessages($object->error, $object->errors, 'errors');
}
}
- else
- {
+ else {
setEventMessages($langs->trans('DisabledBecausePayments'), null, 'errors');
}
}
@@ -290,8 +286,7 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->tax->charges->cre
setEventMessages($langs->trans("ErrorFieldMustBeANumeric", $langs->transnoentities("Amount")), null, 'errors');
$action = 'create';
}
- else
- {
+ else {
$result = $object->fetch($id);
$object->amount = price2num($amount);
@@ -340,8 +335,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
exit;
}
- else
- {
+ else {
$id = $originalId;
$db->rollback();
@@ -349,8 +343,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char
}
//}
}
- else
- {
+ else {
$db->rollback();
dol_print_error($db, $object->error);
}
@@ -405,8 +398,8 @@ if ($action == 'create')
}
});';
- if($_REQUEST['action'] === 'add') { // form has been send but there is at least one error
- if(empty($auto_create_payment)) {
+ if ($_REQUEST['action'] === 'add') { // form has been send but there is at least one error
+ if (empty($auto_create_payment)) {
print '$("#label_fk_account").removeClass("fieldrequired");
$("#label_type_payment").removeClass("fieldrequired");
$(".hide_if_no_auto_create_payment").hide();';
@@ -727,8 +720,7 @@ if ($id)
$i++;
}
}
- else
- {
+ else {
print '| '.$langs->trans("None").' | ';
print ' | | | | ';
print '
';
@@ -748,8 +740,7 @@ if ($id)
$db->free($resql);
}
- else
- {
+ else {
dol_print_error($db);
}
@@ -816,8 +807,7 @@ if ($id)
{
print '';
}
- else
- {
+ else {
print '';
}
}
diff --git a/htdocs/compta/tva/class/paymentvat.class.php b/htdocs/compta/tva/class/paymentvat.class.php
index f5a34decebc..4e13a890b80 100644
--- a/htdocs/compta/tva/class/paymentvat.class.php
+++ b/htdocs/compta/tva/class/paymentvat.class.php
@@ -201,8 +201,7 @@ class PaymentVAT extends CommonObject
}
}
}
- else
- {
+ else {
$error++;
}
}
@@ -217,8 +216,7 @@ class PaymentVAT extends CommonObject
$this->db->commit();
return $this->id;
}
- else
- {
+ else {
$this->error = $this->db->error();
$this->db->rollback();
return -1;
@@ -288,8 +286,7 @@ class PaymentVAT extends CommonObject
return 1;
}
- else
- {
+ else {
$this->error = "Error ".$this->db->lasterror();
return -1;
}
@@ -360,8 +357,7 @@ class PaymentVAT extends CommonObject
$this->db->rollback();
return -1 * $error;
}
- else
- {
+ else {
$this->db->commit();
return 1;
}
@@ -416,8 +412,7 @@ class PaymentVAT extends CommonObject
$this->db->rollback();
return -1 * $error;
}
- else
- {
+ else {
$this->db->commit();
return 1;
}
@@ -467,8 +462,7 @@ class PaymentVAT extends CommonObject
$this->db->commit();
return $object->id;
}
- else
- {
+ else {
$this->db->rollback();
return -1;
}
@@ -582,8 +576,7 @@ class PaymentVAT extends CommonObject
}
}
}
- else
- {
+ else {
$this->error = $acc->error;
$error++;
}
@@ -593,8 +586,7 @@ class PaymentVAT extends CommonObject
{
return 1;
}
- else
- {
+ else {
return -1;
}
}
@@ -618,8 +610,7 @@ class PaymentVAT extends CommonObject
{
return 1;
}
- else
- {
+ else {
$this->error = $this->db->error();
return 0;
}
diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php
index 3dfdc8be38c..8609b2a39e2 100644
--- a/htdocs/compta/tva/class/tva.class.php
+++ b/htdocs/compta/tva/class/tva.class.php
@@ -164,14 +164,12 @@ class Tva extends CommonObject
$this->db->commit();
return $this->id;
}
- else
- {
+ else {
$this->db->rollback();
return -1;
}
}
- else
- {
+ else {
$this->error = "Error ".$this->db->lasterror();
$this->db->rollback();
return -1;
@@ -236,8 +234,7 @@ class Tva extends CommonObject
$this->db->commit();
return 1;
}
- else
- {
+ else {
$this->db->rollback();
return -1;
}
@@ -337,8 +334,7 @@ class Tva extends CommonObject
return 1;
}
- else
- {
+ else {
$this->error = "Error ".$this->db->lasterror();
return -1;
}
@@ -448,14 +444,12 @@ class Tva extends CommonObject
$this->db->free($result);
return $ret;
}
- else
- {
+ else {
$this->db->free($result);
return 0;
}
}
- else
- {
+ else {
print $this->db->lasterror();
return -1;
}
@@ -489,14 +483,12 @@ class Tva extends CommonObject
$this->db->free($result);
return $ret;
}
- else
- {
+ else {
$this->db->free($result);
return 0;
}
}
- else
- {
+ else {
print $this->db->lasterror();
return -1;
}
@@ -532,14 +524,12 @@ class Tva extends CommonObject
$this->db->free($result);
return $ret;
}
- else
- {
+ else {
$this->db->free($result);
return 0;
}
}
- else
- {
+ else {
print $this->db->lasterror();
return -1;
}
@@ -657,8 +647,7 @@ class Tva extends CommonObject
{
$this->update_fk_bank($bank_line_id);
}
- else
- {
+ else {
$this->error = $acc->error;
$ok = 0;
}
@@ -677,20 +666,17 @@ class Tva extends CommonObject
$this->db->commit();
return $this->id;
}
- else
- {
+ else {
$this->db->rollback();
return -3;
}
}
- else
- {
+ else {
$this->db->rollback();
return -2;
}
}
- else
- {
+ else {
$this->error = $this->db->error();
$this->db->rollback();
return -1;
@@ -714,8 +700,7 @@ class Tva extends CommonObject
{
return 1;
}
- else
- {
+ else {
dol_print_error($this->db);
return -1;
}
@@ -797,8 +782,7 @@ class Tva extends CommonObject
$this->db->free($resql);
return $amount;
}
- else
- {
+ else {
return -1;
}
}
@@ -844,8 +828,7 @@ class Tva extends CommonObject
$this->db->free($result);
}
- else
- {
+ else {
dol_print_error($this->db);
}
}
diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php
index e5ea2fd6471..fd03b678711 100644
--- a/htdocs/compta/tva/index.php
+++ b/htdocs/compta/tva/index.php
@@ -60,8 +60,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
if (empty($q))
{
if (GETPOST("month", "int")) { $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); }
- else
- {
+ else {
if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) { // quaterly vat, we take last past complete quarter
$date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -3 - (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) % 3), 'm');
$date_end = dol_time_plus_duree($date_start, 3, 'm') - 1;
@@ -85,8 +84,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
}
}
}
- else
- {
+ else {
if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); }
if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); }
if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); }
@@ -179,8 +177,7 @@ function pt($db, $sql, $date)
$previousmode = '';
$previousmonth = '';
}
- else
- {
+ else {
$previousmode = $obj->mode;
$previousmonth = $obj->dm;
}
@@ -373,8 +370,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc
//'link' =>$expensereport->getNomUrl(1)
);
}
- else
- {
+ else {
//$invoice_supplier->id=$x_paye[$my_paye_rate]['facid'][$id];
//$invoice_supplier->ref=$x_paye[$my_paye_rate]['facnum'][$id];
//$invoice_supplier->type=$x_paye[$my_paye_rate]['type'][$id];
diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php
index 13cb2ad7386..10d902697f5 100644
--- a/htdocs/compta/tva/list.php
+++ b/htdocs/compta/tva/list.php
@@ -397,7 +397,7 @@ while ($i < min($num, $limit)) {
if (!empty($arrayfields['t.status']['checked'])) {
print '' . $tva_static->LibStatut($obj->paye, 5, $obj->alreadypayed) . ' | ';
if (!$i) $totalarray['nbfield']++;
- if(!empty($arrayfields['t.amount']['checked'])) $totalarray['pos'][$totalarray['nbfield']] = '';
+ if (!empty($arrayfields['t.amount']['checked'])) $totalarray['pos'][$totalarray['nbfield']] = '';
}
// Buttons
diff --git a/htdocs/compta/tva/payments.php b/htdocs/compta/tva/payments.php
index b6910610454..66a8a087216 100644
--- a/htdocs/compta/tva/payments.php
+++ b/htdocs/compta/tva/payments.php
@@ -95,8 +95,7 @@ if ($mode != 'tvaonly')
$center = ($year ? ''.img_previous($langs->trans("Previous"), 'class="valignbottom"')." ".$langs->trans("Year").' '.$year.' '.img_next($langs->trans("Next"), 'class="valignbottom"')."" : "");
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy', 0, '', '', $limit, 1);
}
-else
-{
+else {
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy', 0, '', '', $limit);
}
@@ -224,8 +223,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
print ''.price($totalpaye)." | ";
print "";
}
- else
- {
+ else {
dol_print_error($db);
}
print '';
@@ -303,8 +301,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
print "";
$db->free($result);
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -326,8 +323,7 @@ elseif ($mysoc->localtax2_assuj == "1")
$j = 2;
$numlt = 3;
}
-else
-{
+else {
$j = 0;
$numlt = 0;
}
@@ -404,8 +400,7 @@ while ($j < $numlt)
print "";
$db->free($result);
}
- else
- {
+ else {
dol_print_error($db);
}
}
@@ -488,8 +483,7 @@ if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read))
print "
";
}
- else
- {
+ else {
dol_print_error($db);
}
}