Commit f5b25653 authored by Anthony Jacob's avatar Anthony Jacob
Browse files

update input excel file and matching index in main.py

parent a3ecec33
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
Facture*.docx
Facture*.pdf
venv/
.vscode/
−212 B (39.9 KiB)

File changed.

No diff preview for this file type.

+5 −11
Original line number Diff line number Diff line
@@ -12,12 +12,10 @@ HEADER_INDEX = {
        "invoice": 1,
        "surname": 2,
        "name": 3,
        "wire": 4,
        "banknote": 5,
        "checknote": 6,
        "street": 8,
        "postcode": 9,
        "city": 10,
        "price": 4,
        "street": 7,
        "postcode": 8,
        "city": 9,
    }


@@ -86,11 +84,7 @@ def process_data(worksheet, row):
            invoice_data["surname"] = column[row].value
        elif (index == HEADER_INDEX["name"]):
            invoice_data["name"] = column[row].value
        elif (index == HEADER_INDEX["wire"] and column[row].value and column[row].value != ""):
            invoice_data["price"] = column[row].value
        elif (index == HEADER_INDEX["banknote"] and column[row].value and column[row].value != ""):
            invoice_data["price"] = column[row].value
        elif (index == HEADER_INDEX["checknote"] and column[row].value and column[row].value != ""):
        elif (index == HEADER_INDEX["price"] and column[row].value and column[row].value != ""):
            invoice_data["price"] = column[row].value
        elif (index == HEADER_INDEX["street"]):
            invoice_data["street"] = ""