PHP8 Warnings - Accountancy - Result sales revenues by user
This commit is contained in:
parent
4c8ba7db21
commit
d523c64f93
@ -135,23 +135,36 @@ $commonparams['sortorder'] = $sortorder;
|
||||
$commonparams['sortfield'] = $sortfield;
|
||||
|
||||
$headerparams = array();
|
||||
$headerparams['date_startyear'] = $date_startyear;
|
||||
$headerparams['date_startmonth'] = $date_startmonth;
|
||||
$headerparams['date_startday'] = $date_startday;
|
||||
$headerparams['date_endyear'] = $date_endyear;
|
||||
$headerparams['date_endmonth'] = $date_endmonth;
|
||||
$headerparams['date_endday'] = $date_endday;
|
||||
$headerparams['q'] = $q;
|
||||
if (!empty($date_startyear)) {
|
||||
$headerparams['date_startyear'] = $date_startyear;
|
||||
}
|
||||
if (!empty($date_startmonth)) {
|
||||
$headerparams['date_startmonth'] = $date_startmonth;
|
||||
}
|
||||
if (!empty($date_startday)) {
|
||||
$headerparams['date_startday'] = $date_startday;
|
||||
}
|
||||
if (!empty($date_endyear)) {
|
||||
$headerparams['date_endyear'] = $date_endyear;
|
||||
}
|
||||
if (!empty($date_endmonth)) {
|
||||
$headerparams['date_endmonth'] = $date_endmonth;
|
||||
}
|
||||
if (!empty($date_endday)) {
|
||||
$headerparams['date_endday'] = $date_endday;
|
||||
}
|
||||
if (!empty($q)) {
|
||||
$headerparams['q'] = $q;
|
||||
}
|
||||
|
||||
$tableparams = array();
|
||||
$tableparams['search_categ'] = $selected_cat;
|
||||
$tableparams['subcat'] = ($subcat === true) ? 'yes' : '';
|
||||
|
||||
// Adding common parameters
|
||||
$allparams = array_merge($commonparams, $headerparams, $tableparams);
|
||||
$headerparams = array_merge($commonparams, $headerparams);
|
||||
$tableparams = array_merge($commonparams, $tableparams);
|
||||
|
||||
$paramslink="";
|
||||
foreach ($allparams as $key => $value) {
|
||||
$paramslink .= '&'.$key.'='.$value;
|
||||
}
|
||||
@ -172,6 +185,9 @@ if ($modecompta == "BOOKKEEPINGCOLLECTED") {
|
||||
$modecompta = "RECETTES-DEPENSES";
|
||||
}
|
||||
|
||||
$exportlink="";
|
||||
$namelink="";
|
||||
|
||||
// Show report header
|
||||
if ($modecompta == "CREANCES-DETTES") {
|
||||
$name = $langs->trans("Turnover").', '.$langs->trans("ByUserAuthorOfInvoice");
|
||||
@ -230,6 +246,8 @@ foreach ($headerparams as $key => $value) {
|
||||
}
|
||||
|
||||
$catotal = 0;
|
||||
$catotal_ht = 0;
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(f.total_ht) as amount, sum(f.total_ttc) as amount_ttc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
@ -245,8 +263,8 @@ if ($modecompta == 'CREANCES-DETTES') {
|
||||
}
|
||||
} elseif ($modecompta == "RECETTES-DEPENSES") {
|
||||
/*
|
||||
* Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les
|
||||
* vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin)
|
||||
* List of payments (old payments are not seen by this query because on older versions,
|
||||
* they were not linked via the table llx_paiement_facture. They are added later)
|
||||
*/
|
||||
$sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(pf.amount) as amount_ttc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
@ -287,7 +305,7 @@ if ($result) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
// Adding old-version payments, non-bound by "paiement_facture" then without User
|
||||
// Adding old-version payments, non-bound by table llx_paiement_facture then without User
|
||||
if ($modecompta == 'RECETTES-DEPENSES') {
|
||||
$sql = "SELECT -1 as rowidx, '' as name, '' as firstname, sum(DISTINCT p.amount) as amount_ttc";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user