gen_turnover_2021_12.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. # -*- encoding: UTF-8 -*-
  2. import re
  3. import sys
  4. from winmentor import WinMentor, Mentorutils, check_list, file_open
  5. gen_month = re.search('[0-9]{4}?_[0-9]{2}?', sys.argv[0])
  6. exclude = [
  7. 'ASIVP', 'ASOBS', 'CLEAN', 'ECOS', 'MEDFAC', 'MEDCOM',
  8. 'COMELECT', 'DATAV', 'ECOPROT', 'JOART', 'CRH', 'RECYC', 'QCLINIC'
  9. ]
  10. head = ['Denumire', 'CF', 'J', 'Adresa', 'Oras', 'Judet', 'Prescurtat', 'Admin', 'AdminP', 'RCNP', 'Obs']
  11. my_headers = [
  12. 'Denumire', 'CF', 'J', 'Adresa', 'Oras', 'Judet', 'Prescurtat',
  13. 'Admin', 'AdminP', 'RCNP', 'Obs', 'TurnO', 'Result', 'divid',
  14. 'divid_current', 'divid_intermed', 'divid_inter_current', 'spons', 'month'
  15. ]
  16. mentor = WinMentor()
  17. utils = Mentorutils()
  18. office = mentor.filtered_firmlist(headers=head, ban=exclude)
  19. utils.gen_turnover('turn_over', 'to', office, m_month=gen_month.group(), n_headers=my_headers)
  20. # office = mentor.filtered_firmlist('/firme.db', headers=head, ban=exclude)
  21. # utils.gen_tax_payable('taxes', 'tx', office, n_headers=['Denumire', 'CF', 'J', 'Adresa', 'Oras', 'Judet',
  22. # 'Prescurtat', 'Obs', 'Vat', 'Tax', 'Ins', 'Sal_tax', 'Cam', 'month'])
  23. # utils.gen_txt('/firme.db', 'lista_cf.txt', _attr_index=1)
  24. # check_list('lista_cf.txt')
  25. file_open('turn_over.xlsm')
  26. # file_start('taxes')