diff --git a/Calc3D.py b/Calc3D.py index dddb008..0a5af1f 100644 --- a/Calc3D.py +++ b/Calc3D.py @@ -114,7 +114,7 @@ def main(): values[6], values[4]) # p, t, h, md, d, st, mk, am, post, x try: - result = calculating(cost, values[5], params['marge']) # cost, mod, marg + result = calculating(abs(cost), values[5], params['marge']) # cost, mod, marg except KeyError: Sgi.popup_ok(new_marge) result = 0 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 6812ec4..0000000 --- a/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright <2023> - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/calculating.py b/calculating.py index bddf01b..23f31b8 100644 --- a/calculating.py +++ b/calculating.py @@ -15,7 +15,7 @@ def cost_prise(p, t, h, md, d, st, mk, am, post, x): x = int(x) # количество экземпляров except ValueError: x = 1 - result = (p / 1000 * t / 60 * h) + (md * d * (st / mk) + am + post) * x + result = (abs(p) / 1000 * abs(t) / 60 * abs(h)) + (abs(md) * abs(d) * (abs(st) / abs(mk)) + abs(am) + abs(post)) * x return round(result, 2) diff --git a/lang_list.py b/lang_list.py deleted file mode 100644 index 19f94ef..0000000 --- a/lang_list.py +++ /dev/null @@ -1 +0,0 @@ -lang_list = ['Русский', 'English'] diff --git a/themes_list.py b/lists.py similarity index 98% rename from themes_list.py rename to lists.py index e34b7a3..3d09a4e 100644 --- a/themes_list.py +++ b/lists.py @@ -21,3 +21,4 @@ themes_list = ['Black', 'BlueMono', 'BluePurple', 'BrightColors', 'BrownBlue', ' 'Material1', 'Material2', 'NeutralBlue', 'Purple', 'Python', 'PythonPlus', 'Reddit', 'Reds', 'SandyBeach', 'SystemDefault', 'SystemDefault1', 'SystemDefaultForReal', 'Tan', 'TanBlue', 'TealMono', 'Topanga'] +lang_list = ['Русский', 'English'] diff --git a/setts.py b/setts.py index 78d222e..842f469 100644 --- a/setts.py +++ b/setts.py @@ -3,8 +3,8 @@ import PySimpleGUI as Sgi import gettext from texts import amortization_calc, new_sets -from themes_list import themes_list -from lang_list import lang_list +from lists import themes_list, lang_list + with open('setts.json') as file: old_data = json.load(file)