|
@@ -111,7 +111,7 @@ class WinMentor(object):
|
|
|
return m_list
|
|
|
|
|
|
def make_sal_list(self, file_1, file_2) -> list:
|
|
|
- '''returns list with all employees in current month
|
|
|
+ '''returns list with all_ employees in current month
|
|
|
:param file_1 is npers.db from shortname
|
|
|
:param file_2 is likisal.db shortname/current_month'''
|
|
|
file_name1 = self.update_copy(self.winment_path + file_1)
|
|
@@ -253,7 +253,7 @@ class WinMentor(object):
|
|
|
|
|
|
def get_bank_accounts(self, short_name, db_file='/nbanca.db'):
|
|
|
#.......................................................................
|
|
|
- # TO DO: put an all parameter to yield all accounts or
|
|
|
+ # TO DO: put an all_ parameter to yield all_ accounts or
|
|
|
# just one,
|
|
|
# make a named tuple with bank accounts.
|
|
|
#.......................................................................
|
|
@@ -275,6 +275,40 @@ class WinMentor(object):
|
|
|
bank_account.append(bank_codes[bank_account[0]])
|
|
|
if bank_account[2].startswith(' '):
|
|
|
yield bank_account
|
|
|
+
|
|
|
+ def get_oblig(self, short_name, db_file='/ObligPI.DB'):
|
|
|
+ headers = ['Part', 'TipDoc', 'Doc', 'NrDoc', 'DataDoc', 'Valoare', 'Rest']
|
|
|
+ short_name = self.winment_path + short_name
|
|
|
+ # nbanks = self.update_copy(short_name + '/nbanci.db')
|
|
|
+ oblig_db = self.update_copy(short_name + db_file)
|
|
|
+ bank_codes = {}
|
|
|
+ with Table(oblig_db) as table: # , Table(nbanks) as nbanks
|
|
|
+ all_ = []
|
|
|
+ parts = []
|
|
|
+ tips = []
|
|
|
+ docs = []
|
|
|
+ nrs = []
|
|
|
+ dates = []
|
|
|
+ values = []
|
|
|
+ rests = []
|
|
|
+ for row in table:
|
|
|
+ if row.TipDoc == 1:
|
|
|
+ parts.append(row.Part)
|
|
|
+ all_.append(parts)
|
|
|
+ tips.append(row.TipDoc)
|
|
|
+ all_.append(tips)
|
|
|
+ docs.append(row.Doc)
|
|
|
+ all_.append(docs)
|
|
|
+ nrs.append(row.NrDoc)
|
|
|
+ all_.append(nrs)
|
|
|
+ dates.append(row.DataDoc)
|
|
|
+ all_.append(dates)
|
|
|
+ values.append(row.Valoare)
|
|
|
+ all_.append(values)
|
|
|
+ rests.append(row.Rest)
|
|
|
+ all_.append(rests)
|
|
|
+ df_dict = dict(zip(headers, all_))
|
|
|
+ print(df_dict)
|
|
|
|
|
|
|
|
|
def corp_list(self, name=None):
|