satdigitalinvoice.setup_utils   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 16
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A get_invoices_data() 0 16 5
1
def get_invoices_data(all_invoices, dp, rfc):
2
    for c in all_invoices.values():
3
        if c["Fecha"] == dp and c["Emisor"]["Rfc"] == rfc and c["TipoDeComprobante"] == "I":
4
            # print(c)
5
            print("- Rfc:", c["Receptor"]["Rfc"])
6
            print("  UsoCFDI:", c["Receptor"]["UsoCFDI"].code)
7
            print("  MetodoPago:", c["MetodoPago"].code)
8
            print("  Conceptos:")
9
            print("  - CuentaPredial:", repr(c["Conceptos"][0]["CuentaPredial"]))
10
            print("    ClaveProdServ:", repr(c["Conceptos"][0]["ClaveProdServ"].code))
11
            print("    Cantidad:", "1.0")
12
            print("    ClaveUnidad:", c["Conceptos"][0]["ClaveUnidad"].code)
13
            print("    Descripcion:", repr(c["Conceptos"][0]["Descripcion"].replace("MES DE SEPTIEMBRE DEL 2022", "{periodo}")))
14
            print("    ValorUnitario:", c["Conceptos"][0]["ValorUnitario"])
15
            print("  Total:", c["Total"])
16
            print()
17