Openbravo Issue Tracking System - Localization Pack: Spain
View Issue Details
0045306Localization Pack: SpainSIIpublic2020-10-27 12:182020-11-03 08:11
Practics 
Mery Anelo 
urgentcriticalalways
closedfixed 
5
 
 
0045306: Proceso background falla si está configurado Alta en SII facturas de compra tras su contabilización
La consulta HQL no es capaz de ejecutarse cuando está marcado dicho check ya que se compara el campo posted (de la factura) como si fuera un Boolean cuando no lo es.
El problema está en la línea 300 del fichero SendInvoicesGroupsToAEAT.java.
Configurar SII
Activar alta en SII facturas de compra tras su contabilización
Generar una factura de compra publicable a SII
Lanzar proceso background
Comprobar que el proceso falla con el siguiente error: org.hibernate.QueryException: Unable to render boolean literal value using expected LiteralType [ select i.id, i.documentNo, i.salesTransaction from Invoice i where i.aeatsiiIssent = false and i.organization.id = (:orgId) and i.processed = true and i.aeatsiiErrorRegistral = false and ( (i.salesTransaction = true and ((i.invoiceDate <= :todayMinusCadenceSales and i.invoiceDate >= :sinceSii) or (month(i.aeatsiiFechaOperacion) - month(DATE(:today)) = 0 and (i.invoiceDate < :today or (i.invoiceDate <= :dateLimitSII and i.invoiceDate > :salesLimitCadence and DATE(i.invoiceDate) = DATE(:today)) ) ) or (month(i.aeatsiiFechaOperacion) <> month(i.invoiceDate) and DATE(i.invoiceDate) = DATE(:today)) ) ) or (i.salesTransaction = false and i.posted = true and ((i.aeatsiiFechaRegCont <= :todayMinusCadencePurchase and i.aeatsiiFechaRegCont >= :sinceSii) or (month(i.aeatsiiFechaOperacion) - month(DATE(:today)) = 0 and (i.aeatsiiFechaRegCont < :today or (i.aeatsiiFechaRegCont <= :dateLimitSII and i.aeatsiiFechaRegCont > :purchaseLimitCadence and DATE(i.aeatsiiFechaRegCont) = DATE(:today)) ) ) ) or (month(i.aeatsiiFechaRegCont) <> month(i.aeatsiiFechaOperacion) and DATE(i.aeatsiiFechaRegCont) = DATE(:today)) ) ) ]
No tags attached.
Issue History
2020-10-27 12:18PracticsNew Issue
2020-10-27 12:18PracticsAssigned To => Jorge Bravo
2020-10-27 12:21Jorge BravoAssigned ToJorge Bravo => Mery Anelo
2020-10-29 03:16Mery AneloStatusnew => scheduled
2020-10-29 03:26Mery AneloNote Added: 0123982
2020-10-29 03:48hgbotNote Added: 0123983
2020-11-03 08:11hgbotResolutionopen => fixed
2020-11-03 08:11hgbotStatusscheduled => closed
2020-11-03 08:11hgbotNote Added: 0124111
2020-11-03 08:11hgbotNote Added: 0124112

Notes
(0123982)
Mery Anelo   
2020-10-29 03:26   
Test plan:
- Log as Group Admin Role.
- Configure SII.
- Make sure you have the "Send to SII only Posted Purchase Invoices" check active.
- Generate a purchase invoice to be sent to the SII.(Make sure the date is correct in terms of the established cadence.)
- Complete and post.
- Go to Windows "Process Request" and configure the process "Grouped invoices SII sending process" to "Run Immediately".
- See in the log of the process, tab "Process Monitor" that the invoice created was sent successfully.
(0123983)
hgbot   
2020-10-29 03:48   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.sii/-/merge_requests/5 [^]
(0124111)
hgbot   
2020-11-03 08:11   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.sii [^]
Changeset: a620155b5225489cd06accd02e0bbf965c8ba973
Author: Mery Anelo <mery.anelo@smfconsulting.es>
Date: 2020-11-03T07:11:46+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.sii/-/commit/a620155b5225489cd06accd02e0bbf965c8ba973 [^]

Fixed BUG-45306: Grouped invoices SII sending process - Posted invoices

Correction of process "Grouped invoices SII sending process" for sending posted invoices when the SII configuration indicates "Send to SII only Posted Purchase Invoices"

---
M src-db/database/sourcedata/AD_MODULE.xml
M src/org/openbravo/module/sii/process/background/SendInvoicesGroupsToAEAT.java
---
(0124112)
hgbot   
2020-11-03 08:11   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.sii/-/merge_requests/5 [^]