diff --git a/Core/Base/PluginManager.php b/Core/Base/PluginManager.php index bbca2bccf6..cef1ae6b20 100644 --- a/Core/Base/PluginManager.php +++ b/Core/Base/PluginManager.php @@ -32,7 +32,7 @@ final class PluginManager /** * FacturaScripts core version. */ - const CORE_VERSION = 2021.40; + const CORE_VERSION = 2021.41; /** * Path to list plugins on file. diff --git a/Core/Controller/Dashboard.php b/Core/Controller/Dashboard.php index e36fe4c392..05588f708a 100644 --- a/Core/Controller/Dashboard.php +++ b/Core/Controller/Dashboard.php @@ -119,7 +119,7 @@ public function privateCore(&$response, $user, $permissions) private function getStatsMonth(int $previous): string { $mask = '-' . $previous . ' month'; - return date('F', strtotime($mask)); + return strtolower(date('F', strtotime($mask))); } /** @@ -213,8 +213,12 @@ private function loadOpenLinks() $this->setOpenLinksForDocument(new PedidoCliente(), 'order'); $this->setOpenLinksForDocument(new PresupuestoCliente(), 'estimation'); + $minDate = date(Producto::DATE_STYLE, strtotime('-2 days')); + $minDateTime = date(Producto::DATETIME_STYLE, strtotime('-2 days')); + $customerModel = new Cliente(); - foreach ($customerModel->all([], ['fechaalta' => 'DESC'], 0, 3) as $customer) { + $whereCustomer = [new DataBaseWhere('fechaalta', $minDate, '>=')]; + foreach ($customerModel->all($whereCustomer, ['fechaalta' => 'DESC'], 0, 3) as $customer) { $this->openLinks[] = [ 'type' => 'customer', 'url' => $customer->url(), @@ -224,7 +228,8 @@ private function loadOpenLinks() } $contactModel = new Contacto(); - foreach ($contactModel->all([], ['fechaalta' => 'DESC'], 0, 3) as $contact) { + $whereContact = [new DataBaseWhere('fechaalta', $minDate, '>=')]; + foreach ($contactModel->all($whereContact, ['fechaalta' => 'DESC'], 0, 3) as $contact) { $this->openLinks[] = [ 'type' => 'contact', 'url' => $contact->url(), @@ -234,12 +239,13 @@ private function loadOpenLinks() } $productModel = new Producto(); - foreach ($productModel->all([], ['actualizado' => 'DESC'], 0, 3) as $product) { + $whereProd = [new DataBaseWhere('actualizado', $minDateTime, '>=')]; + foreach ($productModel->all($whereProd, ['actualizado' => 'DESC'], 0, 3) as $product) { $this->openLinks[] = [ 'type' => 'product', 'url' => $product->url(), 'name' => $product->referencia, - 'date' => $product->fechaalta + 'date' => $product->actualizado ]; } @@ -310,7 +316,11 @@ private function loadStats() */ private function setOpenLinksForDocument($model, $label) { - $where = [new DataBaseWhere('nick', $this->user->nick)]; + $minDate = date(BusinessDocument::DATE_STYLE, strtotime('-2 days')); + $where = [ + new DataBaseWhere('fecha', $minDate, '>='), + new DataBaseWhere('nick', $this->user->nick) + ]; foreach ($model->all($where, [$model->primaryColumn() => 'DESC'], 0, 3) as $doc) { $this->openLinks[] = [ 'type' => $label, diff --git a/Core/Translation/ca_ES.json b/Core/Translation/ca_ES.json index 9c06e1dfd3..807da2abf2 100644 --- a/Core/Translation/ca_ES.json +++ b/Core/Translation/ca_ES.json @@ -109,6 +109,7 @@ "attribute-value-4": "Atribut 4", "attribute-values": "Valors d'atribut", "attributes": "Atributs", + "august": "Agosto", "authentication": "Autenticació", "auto": "Auto", "auto-apply-to": "aplicar automàticament a", @@ -621,6 +622,7 @@ "journal-closing": "Diari de tancament", "journal-opening": "Diari d'obertura", "journals": "Diaris", + "july": "Julio", "keys": "Claus", "lang-code": "Codi d'idioma", "language": "Llenguatge", @@ -1000,6 +1002,7 @@ "send-mail-error": "S'ha produït un error en enviar el correu electrònic", "send-mail-ok": "Correu enviat", "sepa-suffix": "Sufix SEPA", + "september": "Septiembre", "sequences": "Seqüències", "serial-number": "Nombre de Sèrie", "serie": "Sèrie", diff --git a/Core/Translation/de_DE.json b/Core/Translation/de_DE.json index 466bdc3848..332f3da268 100644 --- a/Core/Translation/de_DE.json +++ b/Core/Translation/de_DE.json @@ -109,6 +109,7 @@ "attribute-value-4": "attribute-value-4", "attribute-values": "Attribute values", "attributes": "Attribute", + "august": "Agosto", "authentication": "authentication", "auto": "Auto", "auto-apply-to": "auto-apply-to", @@ -621,6 +622,7 @@ "journal-closing": "journal-closing", "journal-opening": "journal-opening", "journals": "Journals", + "july": "Julio", "keys": "keys", "lang-code": "Sprachcode", "language": "Sprache:", @@ -1000,6 +1002,7 @@ "send-mail-error": "send-mail-error", "send-mail-ok": "send-mail-ok", "sepa-suffix": "sepa-suffix", + "september": "Septiembre", "sequences": "sequences", "serial-number": "Serial Number", "serie": "Serie", diff --git a/Core/Translation/en_EN.json b/Core/Translation/en_EN.json index 488243190c..51794f472d 100644 --- a/Core/Translation/en_EN.json +++ b/Core/Translation/en_EN.json @@ -109,6 +109,7 @@ "attribute-value-4": "Attribute 4", "attribute-values": "Attribute values", "attributes": "Attributes", + "august": "Agosto", "authentication": "Authentication", "auto": "Auto", "auto-apply-to": "Automatically apply to", @@ -621,6 +622,7 @@ "journal-closing": "Journal for closing", "journal-opening": "Journal for opening", "journals": "Journals", + "july": "Julio", "keys": "keys", "lang-code": "Language code", "language": "Language", @@ -1000,6 +1002,7 @@ "send-mail-error": "Error when sending the email", "send-mail-ok": "Email sent correctly", "sepa-suffix": "SEPA suffix", + "september": "Septiembre", "sequences": "Sequences", "serial-number": "Serial Number", "serie": "Serie", diff --git a/Core/Translation/es_AR.json b/Core/Translation/es_AR.json index 1dc60b8758..46aa6fa7f8 100644 --- a/Core/Translation/es_AR.json +++ b/Core/Translation/es_AR.json @@ -109,6 +109,7 @@ "attribute-value-4": "Atributo 4", "attribute-values": "Valores de atributo", "attributes": "Atributos", + "august": "Agosto", "authentication": "Autenticación", "auto": "Auto", "auto-apply-to": "Aplicar automáticamente a", @@ -621,6 +622,7 @@ "journal-closing": "Diario de cierre", "journal-opening": "Diario de apertura", "journals": "Diarios", + "july": "Julio", "keys": "Claves", "lang-code": "Código de idioma", "language": "Idioma", @@ -1000,6 +1002,7 @@ "send-mail-error": "Error al enviar el email", "send-mail-ok": "Email enviado correctamente", "sepa-suffix": "Sufijo SEPA", + "september": "Septiembre", "sequences": "Secuencias", "serial-number": "Número de Serie", "serie": "Serie", diff --git a/Core/Translation/es_CL.json b/Core/Translation/es_CL.json index ff041e11f8..e12e129b47 100644 --- a/Core/Translation/es_CL.json +++ b/Core/Translation/es_CL.json @@ -109,6 +109,7 @@ "attribute-value-4": "Atributo 4", "attribute-values": "Valores de atributo", "attributes": "Atributos", + "august": "Agosto", "authentication": "Autenticación", "auto": "Auto", "auto-apply-to": "Aplicar automáticamente a", @@ -621,6 +622,7 @@ "journal-closing": "Diario de cierre", "journal-opening": "Diario de apertura", "journals": "Diarios", + "july": "Julio", "keys": "Claves", "lang-code": "Código de idioma", "language": "Idioma", @@ -1000,6 +1002,7 @@ "send-mail-error": "Error al enviar el email", "send-mail-ok": "Email enviado correctamente", "sepa-suffix": "Sufijo SEPA", + "september": "Septiembre", "sequences": "Secuencias", "serial-number": "Número de Serie", "serie": "Serie", diff --git a/Core/Translation/es_CO.json b/Core/Translation/es_CO.json index ef962b7d07..9741309ffd 100644 --- a/Core/Translation/es_CO.json +++ b/Core/Translation/es_CO.json @@ -109,6 +109,7 @@ "attribute-value-4": "Atributo 4", "attribute-values": "Valores de atributo", "attributes": "Atributos", + "august": "Agosto", "authentication": "Autenticación", "auto": "Auto", "auto-apply-to": "Aplicar automáticamente a", @@ -621,6 +622,7 @@ "journal-closing": "Diario de cierre", "journal-opening": "Diario de apertura", "journals": "Diarios", + "july": "Julio", "keys": "Claves", "lang-code": "Código de idioma", "language": "Idioma", @@ -1000,6 +1002,7 @@ "send-mail-error": "Error al enviar el correo", "send-mail-ok": "Correo enviado correctamente", "sepa-suffix": "Sufijo SEPA", + "september": "Septiembre", "sequences": "Secuencias", "serial-number": "Número de Serie", "serie": "Serie", diff --git a/Core/Translation/es_CR.json b/Core/Translation/es_CR.json index 90fe66570c..a37379fa4a 100644 --- a/Core/Translation/es_CR.json +++ b/Core/Translation/es_CR.json @@ -109,6 +109,7 @@ "attribute-value-4": "Atributo 4", "attribute-values": "Valores de atributo", "attributes": "Atributos", + "august": "Agosto", "authentication": "Autenticación", "auto": "Auto", "auto-apply-to": "Aplicar automáticamente a", @@ -621,6 +622,7 @@ "journal-closing": "Diario de cierre", "journal-opening": "Diario de apertura", "journals": "Diarios", + "july": "Julio", "keys": "Claves", "lang-code": "Código de idioma", "language": "Idioma", @@ -1000,6 +1002,7 @@ "send-mail-error": "Error al enviar el email", "send-mail-ok": "Email enviado correctamente", "sepa-suffix": "Sufijo SEPA", + "september": "Septiembre", "sequences": "Secuencias", "serial-number": "Número de Serie", "serie": "Serie", diff --git a/Core/Translation/es_DO.json b/Core/Translation/es_DO.json index 1d9bab5806..8b70ea1cf4 100644 --- a/Core/Translation/es_DO.json +++ b/Core/Translation/es_DO.json @@ -109,6 +109,7 @@ "attribute-value-4": "Atributo 4", "attribute-values": "Valores de atributo", "attributes": "Atributos", + "august": "Agosto", "authentication": "Autenticación", "auto": "Auto", "auto-apply-to": "Aplicar automáticamente a", @@ -621,6 +622,7 @@ "journal-closing": "Diario de cierre", "journal-opening": "Diario de apertura", "journals": "Diarios", + "july": "Julio", "keys": "Claves", "lang-code": "Código de idioma", "language": "Idioma", @@ -1000,6 +1002,7 @@ "send-mail-error": "Error al enviar el email", "send-mail-ok": "Email enviado correctamente", "sepa-suffix": "Sufijo SEPA", + "september": "Septiembre", "sequences": "Secuencias", "serial-number": "Número de Serie", "serie": "Serie", diff --git a/Core/Translation/es_EC.json b/Core/Translation/es_EC.json index b05f443b37..eb5e57dd45 100644 --- a/Core/Translation/es_EC.json +++ b/Core/Translation/es_EC.json @@ -109,6 +109,7 @@ "attribute-value-4": "Atributo 4", "attribute-values": "Valores de atributo", "attributes": "Atributos", + "august": "Agosto", "authentication": "Autenticación", "auto": "Auto", "auto-apply-to": "Aplicar automáticamente a", @@ -621,6 +622,7 @@ "journal-closing": "Diario de cierre", "journal-opening": "Diario de apertura", "journals": "Diarios", + "july": "Julio", "keys": "Claves", "lang-code": "Código de idioma", "language": "Idioma", @@ -1000,6 +1002,7 @@ "send-mail-error": "Error al enviar el correo", "send-mail-ok": "Correo enviado correctamente", "sepa-suffix": "Sufijo SEPA", + "september": "Septiembre", "sequences": "Secuencias", "serial-number": "Número de Serie", "serie": "Serie", diff --git a/Core/Translation/es_ES.json b/Core/Translation/es_ES.json index bace5a1f16..243b41083a 100644 --- a/Core/Translation/es_ES.json +++ b/Core/Translation/es_ES.json @@ -109,6 +109,7 @@ "attribute-value-4": "Atributo 4", "attribute-values": "Valores de atributo", "attributes": "Atributos", + "august": "Agosto", "authentication": "Autenticación", "auto": "Auto", "auto-apply-to": "Aplicar automáticamente a", @@ -621,6 +622,7 @@ "journal-closing": "Diario de cierre", "journal-opening": "Diario de apertura", "journals": "Diarios", + "july": "Julio", "keys": "Claves", "lang-code": "Código de idioma", "language": "Idioma", @@ -1000,6 +1002,7 @@ "send-mail-error": "Error al enviar el email", "send-mail-ok": "Email enviado correctamente", "sepa-suffix": "Sufijo SEPA", + "september": "Septiembre", "sequences": "Secuencias", "serial-number": "Número de Serie", "serie": "Serie", diff --git a/Core/Translation/es_GT.json b/Core/Translation/es_GT.json index 3968beac23..854c80f139 100644 --- a/Core/Translation/es_GT.json +++ b/Core/Translation/es_GT.json @@ -109,6 +109,7 @@ "attribute-value-4": "Atributo 4", "attribute-values": "Valores de atributo", "attributes": "Atributos", + "august": "Agosto", "authentication": "Autenticación", "auto": "Auto", "auto-apply-to": "Aplicar automáticamente a", @@ -621,6 +622,7 @@ "journal-closing": "Diario de cierre", "journal-opening": "Diario de apertura", "journals": "Diarios", + "july": "Julio", "keys": "Claves", "lang-code": "Código de idioma", "language": "Idioma", @@ -1000,6 +1002,7 @@ "send-mail-error": "Error al enviar el email", "send-mail-ok": "Email enviado correctamente", "sepa-suffix": "Sufijo SEPA", + "september": "Septiembre", "sequences": "Secuencias", "serial-number": "Número de Serie", "serie": "Serie", diff --git a/Core/Translation/es_MX.json b/Core/Translation/es_MX.json index bf8c75ee4d..61d46e6e04 100644 --- a/Core/Translation/es_MX.json +++ b/Core/Translation/es_MX.json @@ -109,6 +109,7 @@ "attribute-value-4": "Atributo 4", "attribute-values": "Valores de atributo", "attributes": "Atributos", + "august": "Agosto", "authentication": "Autenticación", "auto": "Auto", "auto-apply-to": "Aplicar automáticamente a", @@ -621,6 +622,7 @@ "journal-closing": "Diario de cierre", "journal-opening": "Diario de apertura", "journals": "Diarios", + "july": "Julio", "keys": "Claves", "lang-code": "Código de idioma", "language": "Idioma", @@ -1000,6 +1002,7 @@ "send-mail-error": "send-mail-error", "send-mail-ok": "Email enviado correctamente", "sepa-suffix": "Sufijo SEPA", + "september": "Septiembre", "sequences": "Secuencias", "serial-number": "Número de Serie", "serie": "Serie", diff --git a/Core/Translation/es_PE.json b/Core/Translation/es_PE.json index 2b96a94869..af71548cdd 100644 --- a/Core/Translation/es_PE.json +++ b/Core/Translation/es_PE.json @@ -109,6 +109,7 @@ "attribute-value-4": "Atributo 4", "attribute-values": "Valores de atributo", "attributes": "Atributos", + "august": "Agosto", "authentication": "Autenticación", "auto": "Auto", "auto-apply-to": "Aplicar automáticamente a", @@ -621,6 +622,7 @@ "journal-closing": "Diario de cierre", "journal-opening": "Diario de apertura", "journals": "Diarios", + "july": "Julio", "keys": "Claves", "lang-code": "Código de idioma", "language": "Idioma", @@ -1000,6 +1002,7 @@ "send-mail-error": "Error al enviar el correo", "send-mail-ok": "Correo enviado correctamente", "sepa-suffix": "Sufijo SEPA", + "september": "Septiembre", "sequences": "Secuencias", "serial-number": "Número de serie", "serie": "Serie", diff --git a/Core/Translation/es_UY.json b/Core/Translation/es_UY.json index 1b9fe32124..b3378f06ce 100644 --- a/Core/Translation/es_UY.json +++ b/Core/Translation/es_UY.json @@ -109,6 +109,7 @@ "attribute-value-4": "Atributo 4", "attribute-values": "Valores de atributo", "attributes": "Atributos", + "august": "Agosto", "authentication": "Autenticación", "auto": "Auto", "auto-apply-to": "Aplicar automáticamente a", @@ -621,6 +622,7 @@ "journal-closing": "Diario de cierre", "journal-opening": "Diario de apertura", "journals": "Diarios", + "july": "Julio", "keys": "Claves", "lang-code": "Código de idioma", "language": "Idioma", @@ -1000,6 +1002,7 @@ "send-mail-error": "Error al enviar el correo", "send-mail-ok": "Correo enviado correctamente", "sepa-suffix": "Sufijo SEPA", + "september": "Septiembre", "sequences": "Secuencias", "serial-number": "Número de Serie", "serie": "Serie", diff --git a/Core/Translation/eu_ES.json b/Core/Translation/eu_ES.json index aedb364b4c..0d82593261 100644 --- a/Core/Translation/eu_ES.json +++ b/Core/Translation/eu_ES.json @@ -109,6 +109,7 @@ "attribute-value-4": "4. ezaugarria", "attribute-values": "Atributu balioak", "attributes": "Atributuak", + "august": "Agosto", "authentication": "Autentifikazioa", "auto": "Auto", "auto-apply-to": "Automatikoki aplikatu honi", @@ -621,6 +622,7 @@ "journal-closing": "Itxieraren egunkaria", "journal-opening": "Irikitzearen egunkaria", "journals": "Egunerokoak", + "july": "Julio", "keys": "Gakoak", "lang-code": "Hizkuntza kodea", "language": "Hizkuntza", @@ -1000,6 +1002,7 @@ "send-mail-error": "Errorea posta elektronikoa bidaltzean", "send-mail-ok": "Posta ondo bidalia", "sepa-suffix": "SEPA atzizkia", + "september": "Septiembre", "sequences": "Sekuentziak", "serial-number": "Serie zenbakia", "serie": "Seriea", diff --git a/Core/Translation/fr_FR.json b/Core/Translation/fr_FR.json index 9e8e7beb9a..828515c7aa 100644 --- a/Core/Translation/fr_FR.json +++ b/Core/Translation/fr_FR.json @@ -109,6 +109,7 @@ "attribute-value-4": "attribute-value-4", "attribute-values": "Valeur d'attribut", "attributes": "Les attributs", + "august": "Agosto", "authentication": "authentication", "auto": "Auto", "auto-apply-to": "auto-apply-to", @@ -621,6 +622,7 @@ "journal-closing": "journal-closing", "journal-opening": "journal-opening", "journals": "Journaux", + "july": "Julio", "keys": "clés", "lang-code": "Code de langue", "language": "Langue", @@ -1000,6 +1002,7 @@ "send-mail-error": "send-mail-error", "send-mail-ok": "send-mail-ok", "sepa-suffix": "sepa-suffix", + "september": "Septiembre", "sequences": "sequences", "serial-number": "Numéro de série", "serie": "série", diff --git a/Core/Translation/gl_ES.json b/Core/Translation/gl_ES.json index 6a75ab4cc1..46146e5761 100644 --- a/Core/Translation/gl_ES.json +++ b/Core/Translation/gl_ES.json @@ -109,6 +109,7 @@ "attribute-value-4": "Atributo valor 4", "attribute-values": "Valores de atributo", "attributes": "Atributos", + "august": "Agosto", "authentication": "Autenticación", "auto": "Auto", "auto-apply-to": "Aplicar automáticamente a", @@ -621,6 +622,7 @@ "journal-closing": "Diario de peche", "journal-opening": "Diario de apertura", "journals": "Diarios", + "july": "Julio", "keys": "Claves", "lang-code": "Código de idioma", "language": "Idioma", @@ -1000,6 +1002,7 @@ "send-mail-error": "Error ao enviar o email", "send-mail-ok": "Email enviado correctamente", "sepa-suffix": "sufixo SEPA", + "september": "Septiembre", "sequences": "Secuencias", "serial-number": "Número de serie", "serie": "Serie", diff --git a/Core/Translation/it_IT.json b/Core/Translation/it_IT.json index 0483b3ef7c..1cbe79e201 100644 --- a/Core/Translation/it_IT.json +++ b/Core/Translation/it_IT.json @@ -109,6 +109,7 @@ "attribute-value-4": "attribute-value-4", "attribute-values": "Attribute values", "attributes": "attributi", + "august": "Agosto", "authentication": "authentication", "auto": "Auto", "auto-apply-to": "auto-apply-to", @@ -621,6 +622,7 @@ "journal-closing": "journal-closing", "journal-opening": "journal-opening", "journals": "Journals", + "july": "Julio", "keys": "keys", "lang-code": "Codice della lingua", "language": "Lingua", @@ -1000,6 +1002,7 @@ "send-mail-error": "send-mail-error", "send-mail-ok": "send-mail-ok", "sepa-suffix": "sepa-suffix", + "september": "Septiembre", "sequences": "sequences", "serial-number": "Serial Number", "serie": "serie", diff --git a/Core/Translation/pt_PT.json b/Core/Translation/pt_PT.json index ab3caf7016..03afeaa265 100644 --- a/Core/Translation/pt_PT.json +++ b/Core/Translation/pt_PT.json @@ -109,6 +109,7 @@ "attribute-value-4": "attribute-value-4", "attribute-values": "Attribute values", "attributes": "Atributos", + "august": "Agosto", "authentication": "authentication", "auto": "Auto", "auto-apply-to": "Automaticamente aplicar a", @@ -621,6 +622,7 @@ "journal-closing": "journal-closing", "journal-opening": "journal-opening", "journals": "Journals", + "july": "Julio", "keys": "keys", "lang-code": "Código de idioma", "language": "Língua", @@ -1000,6 +1002,7 @@ "send-mail-error": "send-mail-error", "send-mail-ok": "send-mail-ok", "sepa-suffix": "sepa-suffix", + "september": "Septiembre", "sequences": "sequences", "serial-number": "Número de Série", "serie": "Série", diff --git a/Core/Translation/va_ES.json b/Core/Translation/va_ES.json index 40b8239811..33f107ca9a 100644 --- a/Core/Translation/va_ES.json +++ b/Core/Translation/va_ES.json @@ -109,6 +109,7 @@ "attribute-value-4": "Atribut 4", "attribute-values": "Valors de l'atribut", "attributes": "Atributs", + "august": "Agosto", "authentication": "Autenticació", "auto": "Auto", "auto-apply-to": "Aplica automàticament a", @@ -621,6 +622,7 @@ "journal-closing": "DIari de tancament", "journal-opening": "Diari d'obertura", "journals": "Diaris", + "july": "Julio", "keys": "Claus", "lang-code": "Còdic de l'idioma", "language": "Idioma", @@ -1000,6 +1002,7 @@ "send-mail-error": "Hi ha hagut un erro a l'enviar el correu", "send-mail-ok": "El correu s'ha enviar correctament", "sepa-suffix": "Sufix SEPA", + "september": "Septiembre", "sequences": "Sequències", "serial-number": "Número de Série", "serie": "Série", diff --git a/Core/View/Dashboard.html.twig b/Core/View/Dashboard.html.twig index fe8106641a..a7d808193c 100644 --- a/Core/View/Dashboard.html.twig +++ b/Core/View/Dashboard.html.twig @@ -107,7 +107,7 @@