Fixing style errors.

This commit is contained in:
stickler-ci 2022-06-19 17:27:15 +00:00
parent eb4c42e987
commit 13511d983e
2 changed files with 11 additions and 11 deletions

View File

@ -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);

View File

@ -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 .= '&amp;date_startday='.$start['mday'].'&amp;date_startmonth='.$start['mon'].'&amp;date_startyear='.$start['year'];
if(!empty($object->date_end)) $url .= '&amp;date_stopday='.$end['mday'].'&amp;date_stopmonth='.$end['mon'].'&amp;date_stopyear='.$end['year'];
if (!empty($object->date_start)) $url .= '&amp;date_startday='.$start['mday'].'&amp;date_startmonth='.$start['mon'].'&amp;date_startyear='.$start['year'];
if (!empty($object->date_end)) $url .= '&amp;date_stopday='.$end['mday'].'&amp;date_stopmonth='.$end['mon'].'&amp;date_stopyear='.$end['year'];
print dolGetButtonAction('', $langs->trans('ExportAccountingReportButtonLabel'), 'default', $url, '');
}