Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -54,16 +54,16 @@ def get_costs():
|
|
54 |
return Purchase_by + Number_machines * Maintenance + Expected_repair_costs_per_month + Wage_Fund + The_cost_of_insurance
|
55 |
|
56 |
|
57 |
-
def get_profit():
|
58 |
-
profit = get_revenue() - get_costs()
|
59 |
if profit > 0:
|
60 |
return profit
|
61 |
else:
|
62 |
return profit * 0.8
|
63 |
|
64 |
|
65 |
-
def get_PV(profit,
|
66 |
-
return
|
67 |
|
68 |
|
69 |
def get_array_discounting():
|
@@ -91,9 +91,9 @@ def get_array_PV():
|
|
91 |
|
92 |
for idx in range(1, Number_of_months + 1, 1):
|
93 |
|
94 |
-
profit = get_profit()
|
95 |
|
96 |
-
cur_PV = get_PV(profit,
|
97 |
|
98 |
array_PV.append(cur_PV)
|
99 |
|
@@ -107,8 +107,6 @@ def get_array_NPV():
|
|
107 |
return array_NPV
|
108 |
|
109 |
|
110 |
-
|
111 |
-
|
112 |
if st.button('Сюда кликнуть чтобы посчитать'):
|
113 |
Number_pallets, Number_machines, Number_employees = get_number_pallets_and_machines_employees()
|
114 |
array_PV = get_array_PV()
|
|
|
54 |
return Purchase_by + Number_machines * Maintenance + Expected_repair_costs_per_month + Wage_Fund + The_cost_of_insurance
|
55 |
|
56 |
|
57 |
+
def get_profit(amortization):
|
58 |
+
profit = get_revenue() - get_costs() - amortization
|
59 |
if profit > 0:
|
60 |
return profit
|
61 |
else:
|
62 |
return profit * 0.8
|
63 |
|
64 |
|
65 |
+
def get_PV(profit, discounting):
|
66 |
+
return profit * discounting
|
67 |
|
68 |
|
69 |
def get_array_discounting():
|
|
|
91 |
|
92 |
for idx in range(1, Number_of_months + 1, 1):
|
93 |
|
94 |
+
profit = get_profit(array_amortization[idx])
|
95 |
|
96 |
+
cur_PV = get_PV(profit, array_discounting[idx])
|
97 |
|
98 |
array_PV.append(cur_PV)
|
99 |
|
|
|
107 |
return array_NPV
|
108 |
|
109 |
|
|
|
|
|
110 |
if st.button('Сюда кликнуть чтобы посчитать'):
|
111 |
Number_pallets, Number_machines, Number_employees = get_number_pallets_and_machines_employees()
|
112 |
array_PV = get_array_PV()
|