From 13511d983eeb1487530951b5aa232303a3cecf71 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 19 Jun 2022 17:27:15 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/compta/accounting-files.php | 14 +++++++------- htdocs/projet/card.php | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 327298a033d..571d17bea08 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -181,7 +181,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " WHERE datef between ".$wheretail; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.fk_statut <> ".Facture::STATUS_DRAFT; - if(!empty($projectid)) $sql .= " AND fk_projet = ".$db->sanitize($projectid); + if (!empty($projectid)) $sql .= " AND fk_projet = ".$db->sanitize($projectid); } // Vendor invoices if (GETPOST('selectsupplierinvoices') && !empty($listofchoices['selectsupplierinvoices']['perms'])) { @@ -193,7 +193,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " WHERE datef between ".$wheretail; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.fk_statut <> ".FactureFournisseur::STATUS_DRAFT; - if(!empty($projectid)) $sql .= " AND fk_projet = ".$db->sanitize($projectid); + if (!empty($projectid)) $sql .= " AND fk_projet = ".$db->sanitize($projectid); } // Expense reports if (GETPOST('selectexpensereports') && !empty($listofchoices['selectexpensereports']['perms']) and empty($projectid)) { @@ -216,7 +216,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " WHERE datedon between ".$wheretail; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.fk_statut <> ".Don::STATUS_DRAFT; - if(!empty($projectid)) $sql .= " AND fk_projet = ".$db->sanitize($projectid); + if (!empty($projectid)) $sql .= " AND fk_projet = ".$db->sanitize($projectid); } // Payments of salaries if (GETPOST('selectpaymentsofsalaries') && !empty($listofchoices['selectpaymentsofsalaries']['perms'])) { @@ -228,7 +228,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " WHERE datep between ".$wheretail; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; //$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT; - if(!empty($projectid)) $sql .= " AND fk_projet = ".$db->sanitize($projectid); + if (!empty($projectid)) $sql .= " AND fk_projet = ".$db->sanitize($projectid); } // Social contributions if (GETPOST('selectsocialcontributions') && !empty($listofchoices['selectsocialcontributions']['perms'])) { @@ -240,7 +240,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " WHERE t.date_ech between ".$wheretail; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; //$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT; - if(!empty($projectid)) $sql .= " AND fk_projet = ".$db->sanitize($projectid); + if (!empty($projectid)) $sql .= " AND fk_projet = ".$db->sanitize($projectid); } // Various payments if (GETPOST('selectvariouspayment') && !empty($listofchoices['selectvariouspayment']['perms'])) { @@ -251,7 +251,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " FROM ".MAIN_DB_PREFIX."payment_various as t"; $sql .= " WHERE datep between ".$wheretail; $sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')'; - if(!empty($projectid)) $sql .= " AND fk_projet = ".$db->sanitize($projectid); + if (!empty($projectid)) $sql .= " AND fk_projet = ".$db->sanitize($projectid); } // Loan payments if (GETPOST('selectloanspayment') && !empty($listofchoices['selectloanspayment']['perms']) && empty($projectid)) { @@ -473,7 +473,7 @@ if ($result && $action == "dl" && !$error) { $log .= ','.$langs->transnoentitiesnoconv("VATIntra"); $log .= ','.$langs->transnoentitiesnoconv("Sens")."\n"; $zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc', 'tzuserrel')."-".dol_print_date($date_stop, 'dayrfc', 'tzuserrel'); - if(!empty($projectid)) { + if (!empty($projectid)) { $sql = 'SELECT t.ref FROM '.MAIN_DB_PREFIX.'projet as t'; $sql .= ' WHERE t.rowid = '.((int) $db->sanitize($projectid)); $resql = $db->query($sql); diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index f3b60e8593c..7a3690fb39f 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -1283,11 +1283,11 @@ if ($action == 'create' && $user->rights->projet->creer) { // Accounting Report $accouting_module_activated = !empty($conf->comptabilite->enabled) || !empty($conf->accounting->enabled); if ($accouting_module_activated && $object->statut != Project::STATUS_DRAFT) { - $start = dol_getdate((int)$object->date_start); - $end = dol_getdate((int)$object->date_end); + $start = dol_getdate((int) $object->date_start); + $end = dol_getdate((int) $object->date_end); $url = DOL_URL_ROOT.'/compta/accounting-files.php?projectid='.$object->id; - if(!empty($object->date_start)) $url .= '&date_startday='.$start['mday'].'&date_startmonth='.$start['mon'].'&date_startyear='.$start['year']; - if(!empty($object->date_end)) $url .= '&date_stopday='.$end['mday'].'&date_stopmonth='.$end['mon'].'&date_stopyear='.$end['year']; + if (!empty($object->date_start)) $url .= '&date_startday='.$start['mday'].'&date_startmonth='.$start['mon'].'&date_startyear='.$start['year']; + if (!empty($object->date_end)) $url .= '&date_stopday='.$end['mday'].'&date_stopmonth='.$end['mon'].'&date_stopyear='.$end['year']; print dolGetButtonAction('', $langs->trans('ExportAccountingReportButtonLabel'), 'default', $url, ''); }