예제 #1
0
def get_prices(ocr):
    price = Price(ocr)
    amounts = {
        "HT": price.get_price(price.ht),
        "TVA": price.get_price(price.tva),
        "Total": price.get_price(price.total)
    }
    return amounts
예제 #2
0
def get_prices(ocr):
    """This function gets eaten OCR data and find Total, TVA, HT then return an object
    :param ocr: eaten OCR data from an image
    :return: object as HT, TVA, Total
    :raise: need to handle empty OCR data
    """
    price = Price(ocr)
    amounts = {"HT": price.get_price(price.ht), "TVA": price.get_price(price.tva), "Total": price.get_price(price.total)}
    return amounts