vnc-console 1 рік тому
батько
коміт
bd8ff07db9
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      winmentor/dbread.py

+ 2 - 1
winmentor/dbread.py

@@ -292,12 +292,13 @@ class WinMentor(object):
             df_obligf.drop(columns=['Moneda', 'Cod'], inplace=True)
             df_obligf.drop(columns=['TipDoc'], inplace=True)
             df_obligall = pd.concat([df_oblig, df_obligf])
-        except KeyError as exc_:
+        except KeyError:
             df_obligall = df_oblig
         options = ['581', '455', '455.01', '167', '666']
         suppliers = ['401', '404', '409', '409.01', '409.02', '409.03', '409.04']
         clients = ['411', '411.01', '419', '419.01', '419.02', '472', '472.01', '472.02', '472.03']
         df_obligall['TipPartener'] = df_obligall.apply(lambda row: self._part_type(row), axis=1)
+        df_obligall.loc[df_obligall['Simbol_y'] == 'lei', 'Curs'] = 1
         df_obligall['RestRon'] = df_obligall['Rest'] * df_obligall['Curs']
         mask = (~df_obligall['Simbol_x'].isin(options)) & (df_obligall['Rest'] != 0)
         df_obligsp = df_obligall.loc[mask & (df_obligall['Simbol_x'].isin(suppliers))]