diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php
index 85562ebc268..f443fded501 100644
--- a/htdocs/accountancy/bookkeeping/balance.php
+++ b/htdocs/accountancy/bookkeeping/balance.php
@@ -296,23 +296,23 @@ if ($action != 'export_csv')
}
print '
';
- if(!empty($show_subgroup))
+ if (!empty($show_subgroup))
{
// Permet d'afficher le compte comptable
if (empty($displayed_account) || $root_account_description != $displayed_account) {
// Affiche un Sous-Total par compte comptable
if ($displayed_account != "") {
- print ' ' . $langs->trans("SubTotal") . ': ';
- print '' . price($sous_total_debit) . ' ';
- print '' . price($sous_total_credit) . ' ';
- print '' . price(price2num($sous_total_credit - $sous_total_debit)) . ' ';
+ print ''.$langs->trans("SubTotal").': ';
+ print ''.price($sous_total_debit).' ';
+ print ''.price($sous_total_credit).' ';
+ print ''.price(price2num($sous_total_credit - $sous_total_debit)).' ';
print " \n";
print ' ';
}
// Show first line of a break
print '';
- print '' . $line->numero_compte . ($root_account_description ? ' - ' . $root_account_description : '') . ' ';
+ print ''.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').' ';
print ' ';
$displayed_account = $root_account_description;
@@ -337,9 +337,9 @@ if ($action != 'export_csv')
$sous_total_credit += $line->credit;
}
- if(!empty($show_subgroup))
+ if (!empty($show_subgroup))
{
- print '' . $langs->trans("SubTotal") . ': ' . price($sous_total_debit) . ' ' . price($sous_total_credit) . ' ' . price(price2num($sous_total_debit - $sous_total_credit)) . ' ';
+ print ''.$langs->trans("SubTotal").': '.price($sous_total_debit).' '.price($sous_total_credit).' '.price(price2num($sous_total_debit - $sous_total_credit)).' ';
print " \n";
print ' ';
}
diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php
index f9bc453d999..6b9be4d285c 100644
--- a/htdocs/compta/accounting-files.php
+++ b/htdocs/compta/accounting-files.php
@@ -712,11 +712,11 @@ if (!empty($date_start) && !empty($date_stop))
print ''.$data['paid'].' ';
// Total ET
- print ''.price($data['sens']?$data['amount_ht']:-$data['amount_ht'])." \n";
+ print ''.price($data['sens'] ? $data['amount_ht'] : -$data['amount_ht'])." \n";
// Total IT
- print ''.price($data['sens']?$data['amount_ttc']:-$data['amount_ttc'])." \n";
+ print ''.price($data['sens'] ? $data['amount_ttc'] : -$data['amount_ttc'])." \n";
// Total VAT
- print ''.price($data['sens']?$data['amount_vat']:-$data['amount_vat'])." \n";
+ print ''.price($data['sens'] ? $data['amount_vat'] : -$data['amount_vat'])." \n";
print ''.$data['thirdparty_name']." \n";
@@ -758,9 +758,9 @@ if (!empty($date_start) && !empty($date_stop))
// Balance
print '';
print ''.$langs->trans('Total').' ';
- print ''.price(price2num($totalET_credit+$totalET_debit, 'MT')).' ';
- print ''.price(price2num($totalIT_credit+$totalIT_debit, 'MT')).' ';
- print ''.price(price2num($totalVAT_credit+$totalVAT_debit, 'MT')).' ';
+ print ''.price(price2num($totalET_credit + $totalET_debit, 'MT')).' ';
+ print ''.price(price2num($totalIT_credit + $totalIT_debit, 'MT')).' ';
+ print ''.price(price2num($totalVAT_credit + $totalVAT_debit, 'MT')).' ';
print ' ';
print " \n";
}
diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php
index 9302ed09afb..7c010ea742c 100644
--- a/htdocs/core/class/interfaces.class.php
+++ b/htdocs/core/class/interfaces.class.php
@@ -379,7 +379,7 @@ class Interfaces
print 'Error: Trigger '.$modName.' does not extends DolibarrTriggers ';
}
}
- catch(Exception $e) {
+ catch (Exception $e) {
print $e->getMessage();
}
diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php
index a751f584564..b44d7260e97 100644
--- a/htdocs/core/lib/date.lib.php
+++ b/htdocs/core/lib/date.lib.php
@@ -910,7 +910,7 @@ function num_open_day($timestampStart, $timestampEnd, $inhour = 0, $lastday = 0,
if ($numholidays == 1) return 0;
}
- $nbOpenDay=$lastday;
+ $nbOpenDay = $lastday;
if ($inhour == 1) $nbOpenDay = ($nbOpenDay * 24);
return $nbOpenDay - (($inhour == 1 ? 12 : 0.5) * abs($halfday));
diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php
index 384c4fc3a7e..24811ad854d 100644
--- a/htdocs/core/modules/DolibarrModules.class.php
+++ b/htdocs/core/modules/DolibarrModules.class.php
@@ -2302,7 +2302,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
if (preg_match('/experimental/i', $version)) $versiontrans .= 'warning';
if (preg_match('/deprecated/i', $version)) $versiontrans .= 'warning';
if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) {
- print 'getVersion(1).'">';
+ print 'getVersion(1).'">';
print $this->getVersion(1);
print ' ';
}
diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php
index 024310abb09..103d0fdffba 100644
--- a/htdocs/core/modules/rapport/pdf_paiement.class.php
+++ b/htdocs/core/modules/rapport/pdf_paiement.class.php
@@ -465,14 +465,14 @@ class pdf_paiement
if ($yp > $this->tab_height - 15)
{
$pdf->SetFillColor(255, 255, 255);
- $pdf->Rect($this->marge_gauche +1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite -3, $this->line_height, 'F', array(), array());
+ $pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array());
$pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1));
$pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp);
$pdf->SetFont('', 'B', $default_font_size - 1);
- $pdf->SetXY($this->posxdate -1, $this->tab_top + 10 + $yp);
+ $pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp);
$pdf->MultiCell($this->posxpaymentamount - 2 - $this->marge_droite, $this->line_height, $langs->transnoentities('SubTotal')." : ", 0, 'R', 1);
- $pdf->SetXY($this->posxpaymentamount -1, $this->tab_top + 10 + $yp);
- $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount +1, $this->line_height, price($total_page), 0, 'R', 1);
+ $pdf->SetXY($this->posxpaymentamount - 1, $this->tab_top + 10 + $yp);
+ $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount + 1, $this->line_height, price($total_page), 0, 'R', 1);
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->SetFillColor(220, 220, 220);
$page++;
@@ -523,19 +523,19 @@ class pdf_paiement
}
// Add line to add total by payment mode if mode reglement for nex line change
- if ((($this->doc_type == 'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type == 'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) && ($mod != $lines[$j+1][2]))
+ if ((($this->doc_type == 'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type == 'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) && ($mod != $lines[$j + 1][2]))
{
$pdf->SetFillColor(245, 245, 245);
- $pdf->Rect($this->marge_gauche +1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite -3, $this->line_height, 'F', array(), array());
+ $pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array());
$pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1));
$pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp);
- $pdf->SetXY($this->posxdate -1, $this->tab_top + 10 + $yp);
+ $pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp);
$pdf->SetFont('', 'I', $default_font_size - 1);
$pdf->MultiCell($this->posxpaymentamount - 2 - $this->marge_droite, $this->line_height, $langs->transnoentities('Total').' '.$mod." : ", 0, 'R', 1);
- $pdf->SetXY($this->posxpaymentamount -1, $this->tab_top + 10 + $yp);
- $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount +1, $this->line_height, price($total_mod), 0, 'R', 1);
+ $pdf->SetXY($this->posxpaymentamount - 1, $this->tab_top + 10 + $yp);
+ $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount + 1, $this->line_height, price($total_mod), 0, 'R', 1);
$pdf->SetFont('', '', $default_font_size - 1);
- $mod = $lines[$j+1][2];
+ $mod = $lines[$j + 1][2];
$total_mod = 0;
$yp = $yp + 5;
if ($yp > $this->tab_height - 5)
@@ -551,14 +551,14 @@ class pdf_paiement
}
$total += $total_page;
$pdf->SetFillColor(255, 255, 255);
- $pdf->Rect($this->marge_gauche +1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite -3, $this->line_height, 'F', array(), array());
+ $pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array());
$pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1));
$pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp);
- $pdf->SetXY($this->posxdate -1, $this->tab_top + 10 + $yp);
+ $pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp);
$pdf->SetFont('', 'B');
$pdf->MultiCell($this->posxpaymentamount - 2 - $this->marge_droite, $this->line_height, $langs->transnoentities('Total')." : ", 0, 'R', 1);
- $pdf->SetXY($this->posxpaymentamount -1, $this->tab_top + 10 + $yp);
- $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount +1, $this->line_height, price($total), 0, 'R', 1);
+ $pdf->SetXY($this->posxpaymentamount - 1, $this->tab_top + 10 + $yp);
+ $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount + 1, $this->line_height, price($total), 0, 'R', 1);
$pdf->SetFillColor(220, 220, 220);
}
}
diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php
index 2bc6d6db962..bf1a4e26de7 100644
--- a/htdocs/emailcollector/class/emailcollector.class.php
+++ b/htdocs/emailcollector/class/emailcollector.class.php
@@ -1092,7 +1092,7 @@ class EmailCollector extends CommonObject
$i++;
$header = imap_fetchheader($connection, $imapemail, 0);
- $header = preg_replace('/\r\n\s+/m', ' ', $header); // When a header line is on several lines, merge lines
+ $header = preg_replace('/\r\n\s+/m', ' ', $header); // When a header line is on several lines, merge lines
$matches = array();
preg_match_all('/([^: ]+): (.+?(?:\r\n\s(?:.+?))*)\r\n/m', $header, $matches);
$headers = array_combine($matches[1], $matches[2]);
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index 3d6cec96319..16012022dc9 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -625,7 +625,7 @@ $(document).ready(function() {
else selectedline=this.id;
selectedtext=$('#'+selectedline).find("td:first").html();
';
-if ($action=="productinfo"){
+if ($action == "productinfo") {
$prod = new Product($db);
$prod->fetch($idproduct);
print "".$prod->label." ";
@@ -83,7 +83,7 @@ if ($action=="productinfo"){
print ' ';
print ''.$langs->trans('Add').' ';
}
-elseif ($action=="editline"){
+elseif ($action == "editline") {
$placeid = GETPOST('placeid', 'int');
$selectedline = GETPOST('selectedline', 'int');
$invoice = new Facture($db);
@@ -99,8 +99,8 @@ elseif ($action=="editline"){
print " ".$prod->description;
print "".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency)." ";
print ' ';
- print '- ';
- print '+ ';
+ print '- ';
+ print '+ ';
print ''.$langs->trans('Note').' ';
}
}
@@ -168,11 +168,11 @@ $( document ).ready(function() {
function LoadPlace(placeid){
place=placeid;
@@ -197,11 +197,11 @@ function AddProduct(placeid, productid){
function AddProductConfirm(placeid, productid){
place=placeid;
'.strtoupper(substr($langs->trans('Floors'), 0, 3)).'';
print ''.strtoupper(substr($langs->trans('Categories'), 0, 3)).' ';
print ''.strtoupper(substr($langs->trans('Order'), 0, 3)).' ';
print ''.strtoupper(substr($langs->trans('Logout'), 0, 3)).' ';
}
- else{
+ else {
print ''.strtoupper(substr($langs->trans('Categories'), 0, 5)).' ';
print ''.strtoupper(substr($langs->trans('Order'), 0, 5)).' ';
print ''.strtoupper(substr($langs->trans('Payment'), 0, 5)).' ';