diff --git a/ucetnictvi_vfcz.py b/ucetnictvi_vfcz.py index 7ae2d43..72dc665 100644 --- a/ucetnictvi_vfcz.py +++ b/ucetnictvi_vfcz.py @@ -44,7 +44,7 @@ def add_dictsms(id, pricesms): def add_dictdataamount(id, dataamount): dict = dictionary.get(id) - dataamount = round(float(dataamount)/1024, 2) + dataamount = round(float(dataamount)/1024/1024, 2) print("increasing dataamount dict key for dict: ",dict," for :",dataamount) dict["dataamount"] += dataamount @@ -167,8 +167,7 @@ with open('output_VFCZ_'+ext_date_from_filaname, 'w') as f: - - writer.writerow([key, "N/A", "N/A", data, dataamount, sms, smscount, other, "N/A"]) + writer.writerow([key, "N/A", "N/A", round(float(data)), round(float(dataamount), 2), sms, smscount, other, "N/A"]) with open('output_VFCZ_'+ext_date_from_filaname, "rb") as f: