diff --git a/sii/resource.py b/sii/resource.py index 6654e49..5c14025 100644 --- a/sii/resource.py +++ b/sii/resource.py @@ -340,9 +340,11 @@ def get_fact_rect_sustitucion_fields(invoice, opcion=False): :return: """ rectificativa_fields = { - 'TipoRectificativa': 'S', # Por sustituciĆ³n - 'FechaOperacion': get_fecha_operacion_rec(invoice) + 'TipoRectificativa': 'S' # Por sustituciĆ³n } + + if 'out_' in invoice.type: + rectificativa_fields['FechaOperacion'] = get_fecha_operacion_rec(invoice) if opcion == 1: factura_rectificada = invoice.rectifying_id