Skip to content

Commit

Permalink
Merge pull request #179 from gisce/remove_fecha_operacion
Browse files Browse the repository at this point in the history
Deshacer fecha operacion en facturas anuladoras A, B
  • Loading branch information
guilleJB authored Oct 23, 2024
2 parents dcc227a + 3bda0a7 commit 58c0f69
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
10 changes: 6 additions & 4 deletions sii/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
28 changes: 16 additions & 12 deletions spec/serialization_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,19 +930,21 @@ 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(
self.fact_rect_emit['FacturaExpedida']['TipoRectificativa']
).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 = (
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 58c0f69

Please sign in to comment.