diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 0a969dd3e79..584ece47079 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -74,11 +74,11 @@ $year = GETPOST('year', 'int'); // this is used for navigation previous/next. I if (empty($year)) { $year_current = dol_print_date(dol_now(), "%Y"); $month_current = dol_print_date(dol_now(), "%m"); - $year_start = $year_current - ($nbofyear - 1); + $year_start = $year_current; } else { $year_current = $year; $month_current = dol_print_date(dol_now(), "%m"); - $year_start = $year - $nbofyear + (getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') > 1 ? 0 : 1); + $year_start = $year; } $date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear); $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); @@ -88,14 +88,17 @@ if (empty($date_start) || empty($date_end)) { // We define date_start and date_e $q = GETPOST("q") ? GETPOST("q", 'int') : 0; if ($q == 0) { // We define date_start and date_end - $year_end = $year_start + $nbofyear - (getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') > 1 ? 0 : 1); + $year_end = $year_start; $month_start = GETPOST("month") ? GETPOST("month", 'int') : getDolGlobalInt('SOCIETE_FISCAL_MONTH_START', 1); if (!GETPOST('month')) { if (!$year && $month_start > $month_current) { $year_start--; $year_end--; } - $month_end = $month_start - 1; + if (getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') > 1) { + $month_end = $month_start - 1; + $year_end = $year_start + 1; + } if ($month_end < 1) { $month_end = 12; } diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index df226ad807e..7a8be178efa 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -334,7 +334,7 @@ if (isModEnabled('project')) { $now = dol_now(); $title = $langs->trans("SocialContribution").' - '.$langs->trans("Card"); -$help_url = 'EN:Module_Taxes_and_social_contributions|FR:Module Taxes et dividendes|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)'; +$help_url = 'EN:Module_Taxes_and_social_contributions|FR:Module_Taxes_et_charges_spéciales|ES:Módulo Impuestos y cargas sociales (IVA, impuestos)'; llxHeader("", $title, $help_url); diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index dd5c4451b60..8f7f126f4ac 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -373,7 +373,7 @@ class DiscountAbsolute if ($this->fk_facture_source) { $sql = "UPDATE ".$this->db->prefix()."facture"; $sql .= " set paye=0, fk_statut=1"; - $sql .= " WHERE (type IN (".$this->db->sanitize(CommonInvoice::TYPE_CREDIT_NOTE.", ".CommonInvoice::TYPE_DEPOSIT).") AND rowid = ".((int) $this->fk_facture_source); + $sql .= " WHERE type IN (".$this->db->sanitize(CommonInvoice::TYPE_CREDIT_NOTE.", ".CommonInvoice::TYPE_DEPOSIT).") AND rowid = ".((int) $this->fk_facture_source); dol_syslog(get_class($this)."::delete Update credit note or deposit invoice statut", LOG_DEBUG); $result = $this->db->query($sql); @@ -388,7 +388,7 @@ class DiscountAbsolute } elseif ($this->fk_invoice_supplier_source) { $sql = "UPDATE ".$this->db->prefix()."facture_fourn"; $sql .= " set paye=0, fk_statut=1"; - $sql .= " WHERE (type IN (".$this->db->sanitize(CommonInvoice::TYPE_CREDIT_NOTE.", ".CommonInvoice::TYPE_DEPOSIT).") AND rowid = ".((int) $this->fk_invoice_supplier_source); + $sql .= " WHERE type IN (".$this->db->sanitize(CommonInvoice::TYPE_CREDIT_NOTE.", ".CommonInvoice::TYPE_DEPOSIT).") AND rowid = ".((int) $this->fk_invoice_supplier_source); dol_syslog(get_class($this)."::delete Update credit note or deposit invoice statut", LOG_DEBUG); $result = $this->db->query($sql); diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 8d2a5c115d4..41ee4189a3d 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -613,7 +613,6 @@ if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { } print ''."\n"; -$totalarray = array(); $totalarray['nbfield'] = 0; // Fields title label @@ -686,7 +685,6 @@ $warehouse = new Entrepot($db); // -------------------------------------------------------------------- $i = 0; $savnbfield = $totalarray['nbfield']; -$totalarray = array(); $totalarray['nbfield'] = 0; $imaxinloop = ($limit ? min($num, $limit) : $num); while ($i < $imaxinloop) { diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 36cc92ec90c..cc3bba8129e 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -936,6 +936,9 @@ if (!empty($socid)) { } if ($search_usage_event_organization == 1) { $url .= '&usage_organize_event=1'; + if (((int) $search_usage_opportunity) < 1) { + $url .= '&usage_opportunity=0'; + } } $newcardbutton = '';