Browse Source

added advance revenue

vnc-console 5 months ago
parent
commit
cf3e20a56b
3 changed files with 12 additions and 1 deletions
  1. 1 1
      gen_taxes_2021_12.py
  2. 10 0
      winmentor/dbread.py
  3. 1 0
      winmentor/mentorutils.py

+ 1 - 1
gen_taxes_2021_12.py

@@ -60,7 +60,7 @@ head = [
 
 
 my_headers = [
 my_headers = [
     'Denumire', 'CF', 'J', 'Adresa', 'Oras', 'Judet', 'Prescurtat', 'Admin', 'AdminP', 'RCNP', 'Obs',
     'Denumire', 'CF', 'J', 'Adresa', 'Oras', 'Judet', 'Prescurtat', 'Admin', 'AdminP', 'RCNP', 'Obs',
-    'VAT', 'VAT FINAL', 'INC_TAX', 'DIV_TAX', 'CAS', 'CASS', 'SAL_TAX', 'CAM', 'CA', 'PN', 'month'
+    'VAT', 'VAT FINAL', 'INC_TAX', 'DIV_TAX', 'CAS', 'CASS', 'SAL_TAX', 'CAM', 'CA', 'VAT CA', 'PN', 'month'
 ]
 ]
 
 
 my_headers2 = [
 my_headers2 = [

+ 10 - 0
winmentor/dbread.py

@@ -467,6 +467,16 @@ class WinMentor(object):
                 tt += int(account[ind2]) + int(account[ind3])
                 tt += int(account[ind2]) + int(account[ind3])
         return tt
         return tt
 
 
+    def advance_revenue(self, account_list, account='419') -> int:
+        '''returns billed advance revenue
+        :param account_list is account from ncont.db'''
+        div_ = 0
+        for acc in account_list:
+            if acc[1][:3] == account:
+                div_ += acc[8] + acc[6]
+                # div_ -= acc[7] + acc[5]
+        return round(div_)
+
     def divid(self, account_list, account='457') -> int:
     def divid(self, account_list, account='457') -> int:
         '''returns dividends/year
         '''returns dividends/year
         :param account_list is account from ncont.db'''
         :param account_list is account from ncont.db'''

+ 1 - 0
winmentor/mentorutils.py

@@ -111,6 +111,7 @@ class Mentorutils(WinMentor):
                 company.append(self.sal_tax_payable(self.verif_cont(company[6] + '/' + current_month + './NCONT.DB')))
                 company.append(self.sal_tax_payable(self.verif_cont(company[6] + '/' + current_month + './NCONT.DB')))
                 company.append(self.cam_payable(self.verif_cont(company[6] + '/' + current_month + './NCONT.DB')))
                 company.append(self.cam_payable(self.verif_cont(company[6] + '/' + current_month + './NCONT.DB')))
                 company.append(self.an_inc(self.verif_cont(company[6] + '/' + current_month + './NCONT.DB'), 0, 6, 8))
                 company.append(self.an_inc(self.verif_cont(company[6] + '/' + current_month + './NCONT.DB'), 0, 6, 8))
+                company.append(self.advance_revenue(self.verif_cont(company[6] + '/' + current_month + './NCONT.DB')))
                 company.append(self.result(self.verif_cont(company[6] + '/' + current_month + './NCONT.DB'), 0, 6, 8))
                 company.append(self.result(self.verif_cont(company[6] + '/' + current_month + './NCONT.DB'), 0, 6, 8))
                 company.append(current_month)
                 company.append(current_month)
                 sheet_[0].write_row(self.row, self.col, company,)
                 sheet_[0].write_row(self.row, self.col, company,)