From 4d3d041dd883034003f0daede35a2f6f55502081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillem=20Juli=C3=A0?= Date: Wed, 23 Oct 2024 17:47:13 +0200 Subject: [PATCH 1/2] Remove fecha operacion en facturas anuladoras --- sii/resource.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sii/resource.py b/sii/resource.py index 5c14025..773d2f6 100644 --- a/sii/resource.py +++ b/sii/resource.py @@ -344,7 +344,8 @@ def get_fact_rect_sustitucion_fields(invoice, opcion=False): } if 'out_' in invoice.type: - rectificativa_fields['FechaOperacion'] = get_fecha_operacion_rec(invoice) + pass + #rectificativa_fields['FechaOperacion'] = get_fecha_operacion_rec(invoice) if opcion == 1: factura_rectificada = invoice.rectifying_id @@ -434,9 +435,10 @@ def get_factura_emitida(invoice, rect_sust_opc1=False, rect_sust_opc2=False): 'DetalleInmueble': detalle_inmueble } if invoice.rectificative_type in ('A', 'B'): - factura_expedida.update( - {'FechaOperacion': get_fecha_operacion_rec(invoice)} - ) + pass + # factura_expedida.update( + # {'FechaOperacion': get_fecha_operacion_rec(invoice)} + # ) if rectificativa: opcion = 0 if rect_sust_opc1: From 3bda0a7f0bb5d7aa737c6456de13ee543cba91c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillem=20Juli=C3=A0?= Date: Wed, 23 Oct 2024 17:50:37 +0200 Subject: [PATCH 2/2] TEST: undo --- spec/serialization_spec.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/spec/serialization_spec.py b/spec/serialization_spec.py index a06a3bc..3e295db 100644 --- a/spec/serialization_spec.py +++ b/spec/serialization_spec.py @@ -930,9 +930,10 @@ def group_by_tax_rate(iva_values, in_invoice): ) with context('en los datos de abonadora'): with it('la FechaOperacion debe ser por factura original'): - expect( - self.fact_refund_emit['FacturaExpedida']['FechaOperacion'] - ).to(equal('31-12-2016')) + pass + # expect( + # self.fact_refund_emit['FacturaExpedida']['FechaOperacion'] + # ).to(equal('31-12-2016')) with context('en los datos de rectificación'): with it('el TipoRectificativa debe ser por sustitución (S)'): expect( @@ -940,9 +941,10 @@ def group_by_tax_rate(iva_values, in_invoice): ).to(equal('S')) with it('la FechaOperacion debe ser por factura original'): - expect( - self.fact_rect_emit['FacturaExpedida']['FechaOperacion'] - ).to(equal('31-12-2016')) + pass + # expect( + # self.fact_rect_emit['FacturaExpedida']['FechaOperacion'] + # ).to(equal('31-12-2016')) with before.all: self.importe_rectificacion = ( @@ -1005,14 +1007,16 @@ def group_by_tax_rate(iva_values, in_invoice): ) with context('en los datos de abonadora'): with it('la FechaOperacion debe ser por factura original'): - expect( - self.fact_refund_emit['FacturaExpedida']['FechaOperacion'] - ).to(equal('07-12-2023')) + pass + # expect( + # self.fact_refund_emit['FacturaExpedida']['FechaOperacion'] + # ).to(equal('07-12-2023')) with context('en los datos de rectificación'): with it('la FechaOperacion debe ser por factura original'): - expect( - self.fact_rect_emit['FacturaExpedida']['FechaOperacion'] - ).to(equal('07-12-2023')) + pass + # expect( + # self.fact_rect_emit['FacturaExpedida']['FechaOperacion'] + # ).to(equal('07-12-2023')) with description('en los datos de una factura rectificativa recibida'): with before.all: