update man_hours rate

main
MrWaradana 1 month ago
parent aae078bdfc
commit 9ea9c9b92c

@ -465,10 +465,10 @@ class Prediksi:
def _get_man_hour_for_year(year): def _get_man_hour_for_year(year):
try: try:
cur = connection.cursor() cur = connection.cursor()
cur.execute("SELECT man_hour FROM lcc_ms_year_data WHERE year = %s", (year,)) # cur.execute("SELECT man_hour FROM lcc_ms_year_data WHERE year = %s", (year,))
r = cur.fetchone() # r = cur.fetchone()
if r and r[0] is not None: # if r and r[0] is not None:
return float(r[0]) # return float(r[0])
cur.execute("SELECT value_num FROM lcc_ms_master WHERE name='manhours_rate'") cur.execute("SELECT value_num FROM lcc_ms_master WHERE name='manhours_rate'")
r2 = cur.fetchone() r2 = cur.fetchone()
if r2 and r2[0] is not None: if r2 and r2[0] is not None:

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save