diff options
author | San Jacobs | 2021-12-30 08:00:26 +0100 |
---|---|---|
committer | San Jacobs | 2021-12-30 08:00:26 +0100 |
commit | 4479545b560f2603cfbe2b94dc7aba45da9c158c (patch) | |
tree | 96f5f0b4698982c53894b5983457561e8d24f048 /satscalc.py | |
parent | ad7ed174785dd916d9cfb113ade6f3a96c91ac3d (diff) | |
download | satscalc-4479545b560f2603cfbe2b94dc7aba45da9c158c.tar.gz satscalc-4479545b560f2603cfbe2b94dc7aba45da9c158c.tar.bz2 satscalc-4479545b560f2603cfbe2b94dc7aba45da9c158c.zip |
Minor adjustments and formatting
Diffstat (limited to 'satscalc.py')
-rwxr-xr-x | satscalc.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/satscalc.py b/satscalc.py index 91d4004..ff62e16 100755 --- a/satscalc.py +++ b/satscalc.py @@ -175,11 +175,10 @@ if __name__ == "__main__": overtime = worktime-8 ot_factor = calc_overtime_factor(overtime, each_day["otw"]) each_day["price"] = round(baserate + (hourly_rate*ot_factor), 2) - elif 4 < worktime < 8: + elif 4 <= worktime < 8: each_day["category"] = "Short day" - overtime = worktime-8 each_day["price"] = round(hourly_rate*worktime, 2) - elif worktime <= 4: + elif worktime < 4: each_day["category"] = "4-hour limit" each_day["price"] = round(hourly_rate*4, 2) else: @@ -192,10 +191,10 @@ if __name__ == "__main__": total = 0 - print("Receipt") - print("-----\n") - print("\n\nCalculation via satscalc by SanJacobs.") - print("Please note point 15 (Disclaimer of Warranty) of the GPLv3.") + print("\n\n\nReceipt") + print("-----") + print("\nCalculation via satscalc by SanJacobs.") + print("Please note point 15 of the GPLv3. (Disclaimer of Warranty)") for day_index, each_day in enumerate(workdays): print("\n---") print(f"Day #{day_index+1}: {each_day['call'].date()} - {each_day['category']}\n") |