satdigitalinvoice.setup_utils.get_invoices_data()   A
last analyzed

Complexity

Conditions 5

Size

Total Lines 16
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 16
rs 9.1832
c 0
b 0
f 0
cc 5
nop 3
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