facho/fe/form.py(BillingReference): date se hace tipo date.
FossilOrigin-Name: 9cb71e373d05b05613a907f167d4d99121a3d34fd769769746a2279c9faa4ba5
This commit is contained in:
parent
7d82a6be91
commit
ee1052ce78
@ -5,7 +5,7 @@ import hashlib
|
|||||||
from functools import reduce
|
from functools import reduce
|
||||||
import copy
|
import copy
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from datetime import datetime
|
from datetime import datetime, date
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
import decimal
|
import decimal
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
@ -271,19 +271,31 @@ class PrePaidPayment:
|
|||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class BillingReference:
|
class BillingReference:
|
||||||
def __init__(self, ident: str, uuid: str, date: str):
|
ident: str
|
||||||
self.ident = ident
|
uuid: str
|
||||||
self.uuid = uuid
|
date: date
|
||||||
self.date = date
|
|
||||||
|
|
||||||
class CreditNoteDocumentReference(BillingReference):
|
class CreditNoteDocumentReference(BillingReference):
|
||||||
pass
|
"""
|
||||||
|
ident: Prefijo + Numero de la factura relacionada
|
||||||
|
uuid: CUFE de la factura electronica
|
||||||
|
date: fecha de emision de la factura relacionada
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
class DebitNoteDocumentReference(BillingReference):
|
class DebitNoteDocumentReference(BillingReference):
|
||||||
pass
|
"""
|
||||||
|
ident: Prefijo + Numero de la factura relacionada
|
||||||
|
uuid: CUFE de la factura electronica
|
||||||
|
date: fecha de emision de la factura relacionada
|
||||||
|
"""
|
||||||
|
|
||||||
class InvoiceDocumentReference(BillingReference):
|
class InvoiceDocumentReference(BillingReference):
|
||||||
pass
|
"""
|
||||||
|
ident: Prefijo + Numero de la nota credito relacionada
|
||||||
|
uuid: CUDE de la nota credito relacionada
|
||||||
|
date: fecha de emision de la nota credito relacionada
|
||||||
|
"""
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class InvoiceLine:
|
class InvoiceLine:
|
||||||
|
@ -400,7 +400,7 @@ class DIANInvoiceXML(fe.FeXML):
|
|||||||
reference.uuid,
|
reference.uuid,
|
||||||
schemeName='CUFE-SHA384')
|
schemeName='CUFE-SHA384')
|
||||||
fexml.set_element('./cac:BillingReference/cac:InvoiceDocumentReference/cbc:IssueDate',
|
fexml.set_element('./cac:BillingReference/cac:InvoiceDocumentReference/cbc:IssueDate',
|
||||||
reference.date)
|
reference.date.strftime("%Y-%m-%d"))
|
||||||
|
|
||||||
def set_billing_reference(fexml, invoice):
|
def set_billing_reference(fexml, invoice):
|
||||||
reference = invoice.invoice_billing_reference
|
reference = invoice.invoice_billing_reference
|
||||||
|
Loading…
Reference in New Issue
Block a user