Эх сурвалжийг харах

implemented other tax (446.08)

vnc-console 4 сар өмнө
parent
commit
3ae89c77c2

+ 2 - 1
winmentor/dbread.py

@@ -681,7 +681,8 @@ class WinMentor(object):
                               precedentc=acc[6],
                               curentd=acc[7],
                               curentc=acc[8])
-            payable = account.simbol == accounts
+            # payable = account.simbol == accounts
+            payable = accounts in account.simbol
             # deductible = account.simbol == acc_2
             if payable:
                 tt += account.curentc

+ 1 - 0
winmentor/mentorutils.py

@@ -106,6 +106,7 @@ class Mentorutils(WinMentor):
                 company.append(self.vat_final(self.verif_cont(company[6] + '/' + current_month + './NCONT.DB')))
                 company.append(self.tax_payable(self.verif_cont(company[6] + '/' + current_month + './NCONT.DB')))
                 company.append(self.div_tax_payable(self.verif_cont(company[6] + '/' + current_month + './NCONT.DB')))
+                company.append(self.other_tax_payable(self.verif_cont(company[6] + '/' + current_month + './NCONT.DB')))
                 company.append(self.CAS_payable(self.verif_cont(company[6] + '/' + current_month + './NCONT.DB')))
                 company.append(self.CASS_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')))

+ 5 - 4
winmentor/taxesgsheet.py

@@ -2,13 +2,13 @@
 Created on 21 Jan 2023 @author: vnc-console
 '''
 import gspread
-from gspread.client import BackoffClient
+from gspread import BackOffHTTPClient
 from winmentor import WinMentor
 from beautiful_date import *  # @UnusedWildImport
 
 g_sheet = '17ZympS8FjiCqsGbkKz1CPN_7NKdV_idXmYs61Mdxnsc'
 # g_sheet = '1G4l7Klb34Nu1h7lBNvA-q4FB5WlQmtoxS3xLFM5XEVw'  # HUN
-gc = gspread.service_account(filename='../Pygsheet-4a83fcaf2282.json', client_factory=BackoffClient)
+gc = gspread.service_account(filename='../Pygsheet-4a83fcaf2282.json', http_client=BackOffHTTPClient)
 # print(gc.list_spreadsheet_files())
 gsh = gc.open_by_key(g_sheet)
 sh1 = gsh.worksheet('ROU')
@@ -82,7 +82,8 @@ def main(month_=None):
                     print('writing CAM')
                     sh1.update_cell(cell.row, 15, mentor.tax_payable(account))
                     print('writing income tax')
-                    sh1.update_cell(cell.row, 18, mentor.div_tax_payable(account))
+                    other_tax = mentor.div_tax_payable(account) + mentor.other_tax_payable(account)
+                    sh1.update_cell(cell.row, 18, other_tax)
                     print('writing dividend tax')
                     sh1.update_cell(cell.row, 20, mentor.an_inc(account, 0, 6, 8))
                     print('writing turnover')
@@ -91,4 +92,4 @@ def main(month_=None):
 
 
 if __name__ == '__main__':
-    main(month_='2023_01')
+    main(month_=mentor_date)

+ 5 - 4
winmentor/taxesgsheethun.py

@@ -2,13 +2,13 @@
 Created on 21 Jan 2023 @author: vnc-console
 '''
 import gspread
-from gspread.client import BackoffClient
+from gspread import BackOffHTTPClient
 from winmentor import WinMentor
 from beautiful_date import *  # @UnusedWildImport
 
 # g_sheet = '17ZympS8FjiCqsGbkKz1CPN_7NKdV_idXmYs61Mdxnsc'
 g_sheet = '1G4l7Klb34Nu1h7lBNvA-q4FB5WlQmtoxS3xLFM5XEVw'  # HUN
-gc = gspread.service_account(filename='../Pygsheet-4a83fcaf2282.json', client_factory=BackoffClient)
+gc = gspread.service_account(filename='../Pygsheet-4a83fcaf2282.json', http_client=BackOffHTTPClient)
 # print(gc.list_spreadsheet_files())
 gsh = gc.open_by_key(g_sheet)
 # sh1 = gsh.worksheet('ROU')
@@ -82,7 +82,8 @@ def main(month_=None):
                     print('writing CAM')
                     sh1.update_cell(cell.row, 15, mentor.tax_payable(account))
                     print('writing income tax')
-                    sh1.update_cell(cell.row, 18, mentor.div_tax_payable(account))
+                    other_tax = mentor.div_tax_payable(account) + mentor.other_tax_payable(account)
+                    sh1.update_cell(cell.row, 18, other_tax)
                     print('writing dividend tax')
                     sh1.update_cell(cell.row, 20, mentor.an_inc(account, 0, 6, 8))
                     print('writing turnover')
@@ -91,4 +92,4 @@ def main(month_=None):
 
 
 if __name__ == '__main__':
-    main(month_='2023_01')
+    main(month_=mentor_date)