From cc44b7ef4fb31cd5847b7df1b0db5883862d45f0 Mon Sep 17 00:00:00 2001 From: Weverton Date: Fri, 2 Jan 2026 09:19:43 -0300 Subject: [PATCH] first commit --- Base/Forms/FormsChartOfAccount.py | 9 + .../FormsBankAccounts.cpython-312.pyc | Bin 994 -> 1001 bytes .../FormsChartOfAccount.cpython-312.pyc | Bin 1150 -> 1397 bytes .../FormsPayMethod.cpython-312.pyc | Bin 1192 -> 1199 bytes .../FormsProductList.cpython-312.pyc | Bin 1090 -> 1097 bytes .../FormsProfessional.cpython-312.pyc | Bin 1149 -> 1156 bytes .../FormsServiceList.cpython-312.pyc | Bin 1090 -> 1097 bytes .../get_sum_of_professional_detail.py | 46 ++-- Base/Metrics/Dashboard/get_sum_of_stone.py | 24 --- .../get_total_bank.cpython-312.pyc | Bin 3168 -> 3902 bytes .../get_total_credit_prof.cpython-312.pyc | Bin 0 -> 1811 bytes .../get_total_expense.cpython-312.pyc | Bin 0 -> 1583 bytes .../get_total_expense_prof.cpython-312.pyc | Bin 0 -> 1812 bytes .../get_total_firm.cpython-312.pyc | Bin 0 -> 1439 bytes .../get_total_prof.cpython-312.pyc | Bin 1725 -> 2749 bytes .../DashboardAdmin/get_sum_of_stone.py | 36 ++++ Base/Metrics/DashboardAdmin/get_total_bank.py | 66 ++++-- .../DashboardAdmin/get_total_credit_prof.py | 46 ++++ .../DashboardAdmin/get_total_expense.py | 45 ++++ .../DashboardAdmin/get_total_expense_prof.py | 46 ++++ Base/Metrics/DashboardAdmin/get_total_firm.py | 36 ++++ Base/Metrics/DashboardAdmin/get_total_prof.py | 66 ++++-- .../get_sum_credit.cpython-312.pyc | Bin 0 -> 1689 bytes .../get_sum_expense.cpython-312.pyc | Bin 0 -> 1693 bytes .../get_total_money.cpython-312.pyc | Bin 0 -> 1729 bytes .../get_total_serv.cpython-312.pyc | Bin 0 -> 1249 bytes Base/Metrics/DashboardProf/get_sum_credit.py | 39 ++++ Base/Metrics/DashboardProf/get_sum_expense.py | 39 ++++ Base/Metrics/DashboardProf/get_total_money.py | 38 ++++ Base/Metrics/DashboardProf/get_total_serv.py | 23 ++ .../urlsBankAccount.cpython-312.pyc | Bin 999 -> 1001 bytes .../Urls/__pycache__/urlsBase.cpython-312.pyc | Bin 860 -> 982 bytes .../urlsChartOfAccount.cpython-312.pyc | Bin 1014 -> 1016 bytes .../urlsPaymentMethod.cpython-312.pyc | Bin 978 -> 980 bytes .../urlsProductList.cpython-312.pyc | Bin 993 -> 995 bytes .../urlsProfessional.cpython-312.pyc | Bin 1000 -> 1002 bytes .../urlsServiceList.cpython-312.pyc | Bin 993 -> 995 bytes Base/Urls/urlsBankAccount.py | 10 +- Base/Urls/urlsBase.py | 1 + Base/Urls/urlsChartOfAccount.py | 10 +- Base/Urls/urlsPaymentMethod.py | 10 +- Base/Urls/urlsProductList.py | 10 +- Base/Urls/urlsProfessional.py | 10 +- Base/Urls/urlsServiceList.py | 10 +- .../viewsBankAccounts.cpython-312.pyc | Bin 3980 -> 3987 bytes .../viewsChartOfAccount.cpython-312.pyc | Bin 2807 -> 2814 bytes .../viewsPayMethod.cpython-312.pyc | Bin 2737 -> 2744 bytes .../viewsProductList.cpython-312.pyc | Bin 2765 -> 2772 bytes .../viewsProfessional.cpython-312.pyc | Bin 2837 -> 2844 bytes .../viewsServiceList.cpython-312.pyc | Bin 2765 -> 2772 bytes Base/Views/views.py | 55 ++++- Base/__pycache__/__init__.cpython-312.pyc | Bin 149 -> 156 bytes Base/__pycache__/admin.cpython-312.pyc | Bin 193 -> 200 bytes Base/__pycache__/apps.cpython-312.pyc | Bin 451 -> 458 bytes Base/__pycache__/models.cpython-312.pyc | Bin 6104 -> 6301 bytes Base/migrations/0001_initial.py | 4 +- Base/migrations/0002_chartofaccount_prof.py | 18 ++ .../0003_alter_chartofaccount_prof.py | 18 ++ .../__pycache__/0001_initial.cpython-312.pyc | Bin 3888 -> 4034 bytes .../0002_chartofaccount_prof.cpython-312.pyc | Bin 0 -> 736 bytes ..._alter_chartofaccount_prof.cpython-312.pyc | Bin 0 -> 756 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 160 -> 167 bytes Base/models.py | 3 + Base/templates/ChartOfAccount/List.html | 6 + .../Dashboard/Professional.html | 0 .../Dashboard/Service.html | 0 .../Dashboards/Dashboard/Sum_of_product.html | 31 +++ .../Dashboard/Sum_of_professional_detail.html | 40 ++++ .../Dashboard/Sum_payment_method_service.html | 23 ++ .../templates/Dashboards/Dashboard/index.html | 24 +++ .../Dashboards/DashboardAdmin/Stone.html | 51 +++++ .../Dashboards/DashboardAdmin/index.html | 22 ++ .../Dashboards/DashboardAdmin/list-group.html | 11 + .../DashboardAdmin/total_banck.html | 38 ++++ .../DashboardAdmin/total_credit_prof.html | 23 ++ .../DashboardAdmin/total_expense.html | 48 +++++ .../DashboardAdmin/total_expense_prof.html} | 7 +- .../Dashboards/DashboardAdmin/total_firm.html | 56 +++++ .../DashboardAdmin/total_prof_month.html | 5 +- .../Dashboards/DashboardProf/List_prof.html | 27 +++ .../DashboardProf/Relatório de Entradas.html | 61 ++++++ .../DashboardProf/Relatório de Saídas.html | 61 ++++++ .../DashboardProf/Resumo do Mês.html | 38 ++++ .../Dashboards/DashboardProf/index.html | 24 +++ Base/templates/Login/Dashboard/Stone.html | 23 -- .../Login/Dashboard/Sum_of_product.html | 22 -- .../Dashboard/Sum_of_professional_detail.html | 27 --- .../Dashboard/Sum_payment_method_service.html | 20 -- Base/templates/Login/Dashboard/index.html | 28 --- .../templates/Login/DashboardAdmin/index.html | 25 --- Base/views/__pycache__/views.cpython-312.pyc | Bin 2969 -> 5225 bytes Base/views/__pycache__/views.cpython-313.pyc | Bin 1427 -> 0 bytes Client/FormsClient.py | 8 +- Client/migrations/0001_initial.py | 5 +- ...client_late_client_responsable_and_more.py | 30 +++ .../__pycache__/0001_initial.cpython-312.pyc | Bin 2983 -> 3079 bytes ...lient_responsable_and_more.cpython-312.pyc | Bin 0 -> 1538 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 162 -> 169 bytes Client/models.py | 30 ++- Client/templates/Client/Create.html | 52 +++-- Client/templates/Client/Detail.html | 45 ---- Client/templates/Client/Detail/Detail.html | 26 +++ .../templates/Client/Detail/Detail_btn.html | 32 +++ Client/templates/Client/Detail/Detail_p1.html | 21 ++ Client/templates/Client/Detail/Detail_p2.html | 46 ++++ Client/templates/Client/Detail/Detail_p3.html | 43 ++++ Client/templates/Client/List.html | 74 ++----- Client/templates/Client/Update.html | 59 +++++- .../templates/Client/Update_responsable.html | 72 +++++++ Client/templatetags/__init__.py | 0 .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 164 bytes .../__pycache__/phone_filters.cpython-312.pyc | Bin 0 -> 1612 bytes Client/templatetags/phone_filters.py | 36 ++++ Client/urlsClient.py | 11 +- Client/viewsClient.py | 72 ++++++- ...ormsExpense.py => FormsExpenseOrCredit.py} | 10 +- Movement/Forms/FormsProduct.py | 2 +- Movement/Forms/FormsTransition.py | 27 +++ .../__pycache__/FormsCalendar.cpython-312.pyc | Bin 1833 -> 1840 bytes .../__pycache__/FormsExpense.cpython-312.pyc | Bin 1626 -> 0 bytes .../FormsExpenseOrCredit.cpython-312.pyc | Bin 0 -> 1873 bytes .../__pycache__/FormsProduct.cpython-312.pyc | Bin 1613 -> 1620 bytes .../__pycache__/FormsStock.cpython-312.pyc | Bin 1595 -> 1602 bytes .../FormsTransition.cpython-312.pyc | Bin 0 -> 1427 bytes .../__pycache__/urlsCalendar.cpython-312.pyc | Bin 1114 -> 1116 bytes .../__pycache__/urlsExpense.cpython-312.pyc | Bin 1367 -> 0 bytes .../urlsExpenseOrCredit.cpython-312.pyc | Bin 0 -> 1554 bytes .../__pycache__/urlsProduct.cpython-312.pyc | Bin 1101 -> 1103 bytes .../__pycache__/urlsStock.cpython-312.pyc | Bin 1027 -> 1029 bytes .../urlsTransition.cpython-312.pyc | Bin 0 -> 1089 bytes Movement/Urls/urlsCalendar.py | 10 +- Movement/Urls/urlsExpense.py | 16 -- Movement/Urls/urlsExpenseOrCredit.py | 17 ++ Movement/Urls/urlsProduct.py | 12 +- Movement/Urls/urlsStock.py | 12 +- Movement/Urls/urlsTransition.py | 14 ++ .../__pycache__/viewsCalendar.cpython-312.pyc | Bin 2600 -> 2607 bytes .../viewsCalendarCreateCustom.cpython-312.pyc | Bin 3885 -> 4289 bytes .../__pycache__/viewsExpense.cpython-312.pyc | Bin 6220 -> 0 bytes .../viewsExpenseOrCredit.cpython-312.pyc | Bin 0 -> 10751 bytes .../__pycache__/viewsProduct.cpython-312.pyc | Bin 2664 -> 2671 bytes .../viewsProductCreateCustom.cpython-312.pyc | Bin 3604 -> 3609 bytes .../__pycache__/viewsStock.cpython-312.pyc | Bin 4155 -> 4162 bytes .../viewsTransition.cpython-312.pyc | Bin 0 -> 3372 bytes Movement/Views/viewsCalendarCreateCustom.py | 7 +- Movement/Views/viewsExpense.py | 102 --------- Movement/Views/viewsExpenseOrCredit.py | 196 ++++++++++++++++++ Movement/Views/viewsProductCreateCustom.py | 8 +- Movement/Views/viewsTransition.py | 52 +++++ Movement/migrations/0001_initial.py | 23 +- .../migrations/0002_expenseorcredit_credit.py | 18 ++ .../migrations/0003_expenseorcredit_prof.py | 18 ++ .../__pycache__/0001_initial.cpython-312.pyc | Bin 8114 -> 9577 bytes ...002_expenseorcredit_credit.cpython-312.pyc | Bin 0 -> 750 bytes .../0003_expenseorcredit_prof.cpython-312.pyc | Bin 0 -> 761 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 164 -> 171 bytes Movement/models.py | 35 +++- Movement/templates/Calendar/Create/date.html | 8 +- Movement/templates/Calendar/Create/index.html | 7 +- Movement/templates/Calendar/List.html | 3 +- Movement/templates/Calendar/Update.html | 4 +- Movement/templates/Expense/List.html | 78 ------- .../ExpenseOrCredit/CreateCredit.html | 22 ++ .../CreateFirm.html | 0 .../CreateProf.html | 0 .../ExpenseOrCredit/CreateProfCredit.html | 23 ++ .../{Expense => ExpenseOrCredit}/Detail.html | 0 Movement/templates/ExpenseOrCredit/List.html | 142 +++++++++++++ .../{Expense => ExpenseOrCredit}/Update.html | 0 Movement/templates/Product/Create/date.html | 14 +- Movement/templates/Product/Create/index.html | 14 +- .../{Expense => Transition}/Create.html | 2 +- .../{Expense => Transition}/Delete.html | 2 +- Movement/templates/Transition/Detail.html | 15 ++ Movement/templates/Transition/List.html | 79 +++++++ Movement/templates/Transition/Update.html | 17 ++ Setup/__pycache__/__init__.cpython-312.pyc | Bin 150 -> 157 bytes Setup/__pycache__/settings.cpython-312.pyc | Bin 2807 -> 2814 bytes Setup/__pycache__/urls.cpython-312.pyc | Bin 1360 -> 1488 bytes Setup/__pycache__/wsgi.cpython-312.pyc | Bin 634 -> 641 bytes Setup/urls.py | 23 +- Templates/Base.html | 5 +- Templates/components/_footer.html | 2 +- Templates/components/_sidebar.html | 6 + requirements.txt | Bin 60 -> 72 bytes requirements_linux.txt | 4 + requirements_win.txt | Bin 132 -> 0 bytes 187 files changed, 2484 insertions(+), 686 deletions(-) delete mode 100644 Base/Metrics/Dashboard/get_sum_of_stone.py create mode 100644 Base/Metrics/DashboardAdmin/__pycache__/get_total_credit_prof.cpython-312.pyc create mode 100644 Base/Metrics/DashboardAdmin/__pycache__/get_total_expense.cpython-312.pyc create mode 100644 Base/Metrics/DashboardAdmin/__pycache__/get_total_expense_prof.cpython-312.pyc create mode 100644 Base/Metrics/DashboardAdmin/__pycache__/get_total_firm.cpython-312.pyc create mode 100644 Base/Metrics/DashboardAdmin/get_sum_of_stone.py create mode 100644 Base/Metrics/DashboardAdmin/get_total_credit_prof.py create mode 100644 Base/Metrics/DashboardAdmin/get_total_expense.py create mode 100644 Base/Metrics/DashboardAdmin/get_total_expense_prof.py create mode 100644 Base/Metrics/DashboardAdmin/get_total_firm.py create mode 100644 Base/Metrics/DashboardProf/__pycache__/get_sum_credit.cpython-312.pyc create mode 100644 Base/Metrics/DashboardProf/__pycache__/get_sum_expense.cpython-312.pyc create mode 100644 Base/Metrics/DashboardProf/__pycache__/get_total_money.cpython-312.pyc create mode 100644 Base/Metrics/DashboardProf/__pycache__/get_total_serv.cpython-312.pyc create mode 100644 Base/Metrics/DashboardProf/get_sum_credit.py create mode 100644 Base/Metrics/DashboardProf/get_sum_expense.py create mode 100644 Base/Metrics/DashboardProf/get_total_money.py create mode 100644 Base/Metrics/DashboardProf/get_total_serv.py create mode 100644 Base/migrations/0002_chartofaccount_prof.py create mode 100644 Base/migrations/0003_alter_chartofaccount_prof.py create mode 100644 Base/migrations/__pycache__/0002_chartofaccount_prof.cpython-312.pyc create mode 100644 Base/migrations/__pycache__/0003_alter_chartofaccount_prof.cpython-312.pyc rename Base/templates/{Login => Dashboards}/Dashboard/Professional.html (100%) rename Base/templates/{Login => Dashboards}/Dashboard/Service.html (100%) create mode 100644 Base/templates/Dashboards/Dashboard/Sum_of_product.html create mode 100644 Base/templates/Dashboards/Dashboard/Sum_of_professional_detail.html create mode 100644 Base/templates/Dashboards/Dashboard/Sum_payment_method_service.html create mode 100644 Base/templates/Dashboards/Dashboard/index.html create mode 100644 Base/templates/Dashboards/DashboardAdmin/Stone.html create mode 100644 Base/templates/Dashboards/DashboardAdmin/index.html create mode 100644 Base/templates/Dashboards/DashboardAdmin/list-group.html create mode 100644 Base/templates/Dashboards/DashboardAdmin/total_banck.html create mode 100644 Base/templates/Dashboards/DashboardAdmin/total_credit_prof.html create mode 100644 Base/templates/Dashboards/DashboardAdmin/total_expense.html rename Base/templates/{Login/DashboardAdmin/total_banck.html => Dashboards/DashboardAdmin/total_expense_prof.html} (73%) create mode 100644 Base/templates/Dashboards/DashboardAdmin/total_firm.html rename Base/templates/{Login => Dashboards}/DashboardAdmin/total_prof_month.html (79%) create mode 100644 Base/templates/Dashboards/DashboardProf/List_prof.html create mode 100644 Base/templates/Dashboards/DashboardProf/Relatório de Entradas.html create mode 100644 Base/templates/Dashboards/DashboardProf/Relatório de Saídas.html create mode 100644 Base/templates/Dashboards/DashboardProf/Resumo do Mês.html create mode 100644 Base/templates/Dashboards/DashboardProf/index.html delete mode 100644 Base/templates/Login/Dashboard/Stone.html delete mode 100644 Base/templates/Login/Dashboard/Sum_of_product.html delete mode 100644 Base/templates/Login/Dashboard/Sum_of_professional_detail.html delete mode 100644 Base/templates/Login/Dashboard/Sum_payment_method_service.html delete mode 100644 Base/templates/Login/Dashboard/index.html delete mode 100644 Base/templates/Login/DashboardAdmin/index.html delete mode 100644 Base/views/__pycache__/views.cpython-313.pyc create mode 100644 Client/migrations/0002_client_late_client_responsable_and_more.py create mode 100644 Client/migrations/__pycache__/0002_client_late_client_responsable_and_more.cpython-312.pyc delete mode 100644 Client/templates/Client/Detail.html create mode 100644 Client/templates/Client/Detail/Detail.html create mode 100644 Client/templates/Client/Detail/Detail_btn.html create mode 100644 Client/templates/Client/Detail/Detail_p1.html create mode 100644 Client/templates/Client/Detail/Detail_p2.html create mode 100644 Client/templates/Client/Detail/Detail_p3.html create mode 100644 Client/templates/Client/Update_responsable.html create mode 100644 Client/templatetags/__init__.py create mode 100644 Client/templatetags/__pycache__/__init__.cpython-312.pyc create mode 100644 Client/templatetags/__pycache__/phone_filters.cpython-312.pyc create mode 100644 Client/templatetags/phone_filters.py rename Movement/Forms/{FormsExpense.py => FormsExpenseOrCredit.py} (77%) create mode 100644 Movement/Forms/FormsTransition.py delete mode 100644 Movement/Forms/__pycache__/FormsExpense.cpython-312.pyc create mode 100644 Movement/Forms/__pycache__/FormsExpenseOrCredit.cpython-312.pyc create mode 100644 Movement/Forms/__pycache__/FormsTransition.cpython-312.pyc delete mode 100644 Movement/Urls/__pycache__/urlsExpense.cpython-312.pyc create mode 100644 Movement/Urls/__pycache__/urlsExpenseOrCredit.cpython-312.pyc create mode 100644 Movement/Urls/__pycache__/urlsTransition.cpython-312.pyc delete mode 100644 Movement/Urls/urlsExpense.py create mode 100644 Movement/Urls/urlsExpenseOrCredit.py create mode 100644 Movement/Urls/urlsTransition.py delete mode 100644 Movement/Views/__pycache__/viewsExpense.cpython-312.pyc create mode 100644 Movement/Views/__pycache__/viewsExpenseOrCredit.cpython-312.pyc create mode 100644 Movement/Views/__pycache__/viewsTransition.cpython-312.pyc delete mode 100644 Movement/Views/viewsExpense.py create mode 100644 Movement/Views/viewsExpenseOrCredit.py create mode 100644 Movement/Views/viewsTransition.py create mode 100644 Movement/migrations/0002_expenseorcredit_credit.py create mode 100644 Movement/migrations/0003_expenseorcredit_prof.py create mode 100644 Movement/migrations/__pycache__/0002_expenseorcredit_credit.cpython-312.pyc create mode 100644 Movement/migrations/__pycache__/0003_expenseorcredit_prof.cpython-312.pyc delete mode 100644 Movement/templates/Expense/List.html create mode 100644 Movement/templates/ExpenseOrCredit/CreateCredit.html rename Movement/templates/{Expense => ExpenseOrCredit}/CreateFirm.html (100%) rename Movement/templates/{Expense => ExpenseOrCredit}/CreateProf.html (100%) create mode 100644 Movement/templates/ExpenseOrCredit/CreateProfCredit.html rename Movement/templates/{Expense => ExpenseOrCredit}/Detail.html (100%) create mode 100644 Movement/templates/ExpenseOrCredit/List.html rename Movement/templates/{Expense => ExpenseOrCredit}/Update.html (100%) rename Movement/templates/{Expense => Transition}/Create.html (88%) rename Movement/templates/{Expense => Transition}/Delete.html (90%) create mode 100644 Movement/templates/Transition/Detail.html create mode 100644 Movement/templates/Transition/List.html create mode 100644 Movement/templates/Transition/Update.html create mode 100644 requirements_linux.txt delete mode 100644 requirements_win.txt diff --git a/Base/Forms/FormsChartOfAccount.py b/Base/Forms/FormsChartOfAccount.py index 6af4c7c..e452c0f 100644 --- a/Base/Forms/FormsChartOfAccount.py +++ b/Base/Forms/FormsChartOfAccount.py @@ -7,18 +7,27 @@ class FormsChartOfAccount(forms.ModelForm): fields = [ 'name', 'debit', + 'credit', 'firm', + 'prof', + 'month', 'notes', ] widgets = { 'name': forms.TextInput({'class':'form-control'}), 'debit': forms.CheckboxInput({'class':''}), + 'credit': forms.CheckboxInput({'class':''}), 'firm': forms.CheckboxInput({'class':''}), + 'prof': forms.CheckboxInput({'class':''}), + 'month': forms.CheckboxInput({'class':''}), 'notes': forms.Textarea({'class':'form-control','rows':3 , }), } labels={ 'name':'Nome', 'debit':'Debito', + 'credit':'Credito', 'firm':'Firma', + 'prof':'Profissinal', + 'month':'Mensal', 'notes':'Notas', } \ No newline at end of file diff --git a/Base/Forms/__pycache__/FormsBankAccounts.cpython-312.pyc b/Base/Forms/__pycache__/FormsBankAccounts.cpython-312.pyc index e19dd4c56db40b89b744e93396d061ee4467002d..a2a489c399fd634fe7102175790815dc267cd4de 100644 GIT binary patch delta 46 zcmaFF{*rw|4wIsnvsFxJacWUadt_5!RB737)Agpzz)j* diff --git a/Base/Forms/__pycache__/FormsChartOfAccount.cpython-312.pyc b/Base/Forms/__pycache__/FormsChartOfAccount.cpython-312.pyc index 8386dfabcfa4818bc7bbc4305d114f262017bbb2..2311135e2352fa444e5085ac42e8741ea68cf89f 100644 GIT binary patch delta 507 zcmeyz@s*43G%qg~0}#wK^vUF9naFpGn;XOhg3m#W6F)DWT)?OX#Xi#PQQRr)DI6)B zDO@SsDLg5>DU5U2qj)O$H2EiAWR%uqzr~W5n45ZwH6=AEv*Z?Aa#3mukY-8CEXuvb zQc#qic8fJPKd&TX5|f&(0ML$GEJgX{#kW}e@`1Y8TtK?=Z?QXrwdLPpbpz^4yu}>= z)RnA1-A+8R#4GAogOzaZbjSy!;2~& zmqk54@^c7tb+CUBVGxnJAtG}_RPKhb)D2+;5L-kVC@a9#$yTHebVZRSknq!FDUt?p zWI%*0Ot?r5!~(0*0I}GB#N-#uLR>PeT%Q<#M3MSr78VmXRAsj~Y;yBcN^?@}igbY* n7=gGLWcUYWMn=ZF3=(%4#J{k}GIGsOov%Mr|0@HK3AO_Oo^+Es delta 414 zcmey$^^b$^G%qg~0}xa_`JAzrX(Hb(ZVnI^2tMCpnD}||WDX`ZQI;s~6!sL36wVZ` z6vjC$Q9PC0nmm&|nWRNnZn5Mg=BD0aO-W74EV;#!mRXcLxtB>zo)>7sEtaDE^5R=8 ze)&KZY%U-b`L|fzfJzc4e_)y-2VX|R>U1Jyr|-FS=93*C#x`52m1#;1`(+nA~H9GfuuB0P=KqGtw<4QLy1)LopAK+rsdjNtl)E69bSaQk?vo#l%ek zqzbO-7Kcr4eoARhs$G#fP=XPNi=~0Y2WCb_#=8s>cNxULu!t~n%}|}MKU4oJ1CR;U F3;-$;Zt(yB diff --git a/Base/Forms/__pycache__/FormsPayMethod.cpython-312.pyc b/Base/Forms/__pycache__/FormsPayMethod.cpython-312.pyc index 8bf2bab512b42350503a1a341fea76e4ba319e0d..8b54bd94f914364f7afb80e2363fc34c1adb5292 100644 GIT binary patch delta 46 zcmZ3%xt?8C$p4;vsFxJacWUadt_5!DcPyRz?5|gAKg^ diff --git a/Base/Forms/__pycache__/FormsProductList.cpython-312.pyc b/Base/Forms/__pycache__/FormsProductList.cpython-312.pyc index 6e813837293d6462c242878017d0c69ba46fad3f..5667b4e1d293407eb247c42bb71927e265447e88 100644 GIT binary patch delta 46 zcmX@aagt-hZYD)fXRDad;?$zznDErH)S{C7ycn1K%~zRn83CbQ B5s&}? delta 39 ucmX@fafoBXZYC)wXRDad;?$zznDErH)S{C7ycn0%;_Q4vsFxJacWUadt_5!R9|q9gF}lh7XPa diff --git a/Base/Forms/__pycache__/FormsServiceList.cpython-312.pyc b/Base/Forms/__pycache__/FormsServiceList.cpython-312.pyc index 84f018da24d1e28a8e43a400641be0fbced2b3c1..4e15775bfcb8a616cc944ded708abfb4d133432c 100644 GIT binary patch delta 46 zcmX@aagt-hZYD)fXRDad;?$zznDErH)S{C7ycn1K%~zRn83CbQ B5s&}? delta 39 ucmX@fafoBXZYC)wXRDad;?$zznDErH)S{C7ycn0%;_Qa%lk|G7)Bf4<=CJqy}7*B6vO^Ws|GH?%q2vuy3~9cKP=6_G*mg71@t%^FVOH zht!1cWdYYoQM!tnNu{l(!k?&92?5i&tEv2r#U{46m`~*-1bQvdy5GWVI-@M*7S)29 z%IbF0O=Yu!2S)6PpcCbxs6-!I zKesXZV6;NV+OomtN}wPAIaGc|c_h68HzVfg=fm;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0xQL*yjM)aDq5c?L$Gfw31X$FP4%EW;j46O8EZ{RcP&q0ImQ literal 0 HcmV?d00001 diff --git a/Base/Metrics/DashboardAdmin/__pycache__/get_total_firm.cpython-312.pyc b/Base/Metrics/DashboardAdmin/__pycache__/get_total_firm.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3d4e5b7f4020d77a8516386b72cc542ac65494a3 GIT binary patch literal 1439 zcmZuw&1)M+6rbJIuGadf>a}cR)g@o1W^2dvQW{DLI7%rYb}*RIpe|ijnz6j)bd35J1TTzEqQZxh6}(mp#SL)H1QHc&e|}wAjvg zSzoW|+*ZE^wVAeNX8#h&OqnUWk7zNanm`+_EeHjLb+xcCD58VdZa!E{89S;T2 z!Hq;ld}w^F>SNob;cpRQJ_HU;>3hRvLT6Z1GdlN?>p0WFdLmDQCvuD=3uw=2`Q zcYeHBJCFv5z{c!RXdrE3UiO-U0~+#@VCxGha%hd!+`Fy z+|+3!2Q%Xy4)+itZWuV8Z3m8zSdmPhKXGLjvfQELMaXVAWS?i7J&2ruy3m2h-a{^R z2rGI~1BbTf9z-q-`3$Kvq>hJ0PqAn+zosX7NsOAWVU^=-#tR#cC#H`nL3p33Q;``V z4`)S0HmtW$gA%6gxgJHBX|Wo@bSDUS6%L7^!eSbk9%6{FU2n4)r`g1)$!Sx=Wx*92 z5ymK>NgoQS8+W2ucL=f%B81xnQD&rK?K(!z=PwVCF}k@yNPCPtk6#1u!J z>PTN6>5CIpsc8RbAY1xs|De%>w|?=elJ_%_p&Mfv~=aMJ<#4A7lFDs zHo)A)p<(t7^C#uUt-(8+PYrWm-1zyuzH$3^W9OHH-t93Lv^tty{##WF+88LRHsK!x z?wC3DI&3*XGu(jn4L^j)Bk_C2FUtxE7g3kv@z~@=BhyIn7Ob=#9wO266cxi0ckTy( wSA>08gy|pf^pS_IUAj=hkikT4oiTH>!&Vdu^)h6so)LY2D5&WF!z84G)4yoGsZBK_vt=^9b;Xd)j5M7 z<6WN91;an)H^ecK$oy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FJuFh(-?K#hegc@LZVV&G9a3LY#h?Z0H6Xt+6K46#{)UEo1 z4Q;3kc9y8z4iKa_*<0kc33=3NoInJs3MotQPd-e_kX z)s?O0z`>Oev=S)osZ^~*t5o6-;S$FON7F`B>Zv!kJ|J;oX6$VOq=Ew@dEcAwy_xTQ zGjIHBJRSjL{P?A0ofH9hMkm1t4W0f1aW;VoOwI-lSL8VAhwPBU7kTFMw%~|Gk@kuB^c-f-A#Hn32erC%^u8q`*z!zlv3Yf?pv3REVg*kF6ol1Quv=4X_94W8H9}{;8ek^B#SQ$xn!*GDu5c(s53k8L z_{M8E=1JbSmj$XpU>b@{Ln7GwziN1m0x78IUlhneUSLh-9}0xSIhX>SDG-?gohXnR zLS;12uy6gbz;8&0op`_=*rwdz{+E4}hTKrDk~?mQhch!3UkD_A5#+6qy1e9&CsN1izRwc#QIGaD zmfhtFT=5a+4cqo)3Q4P$?L!X>j4y1I%N{Hn1ffsHqaBXNeu*qa`e$$* zdcIrL7a{uEch~d+tdjCBK%{?YAgC`v-?LVbzG$GYmR-X$&zg=^)k)0*F2+5(R>zXV zGQBh*qPoyI@|HHh6D{4-|DLAwwk^_`qQPKi+79nQXTblOW386m*AP) zgQ>gkx5783H&5I=v7;O#CoqyCjIl9tRDE)y;Cw!U6K2Jzmfcx%dDd}FXd~81I5vc9 zzC|E`B;zQ(zaWYAr@G{>Lx 0 or total_vendido > 0: + stones_report.append({ + 'produto': prod.name, + 'quantidade_estoque': estoque_atual, + 'valor_total_estoque_bruto': valor_liquido_vendas_estoque, + 'valor_total_estoque_liquido': custo_total_estoque, + 'valor_unitario_compra_medio': media_gross, # Alterado para refletir que é uma média + }) + + return { + 'Stone': stones_report, + } diff --git a/Base/Metrics/DashboardAdmin/get_total_bank.py b/Base/Metrics/DashboardAdmin/get_total_bank.py index 7abc551..1775f7c 100644 --- a/Base/Metrics/DashboardAdmin/get_total_bank.py +++ b/Base/Metrics/DashboardAdmin/get_total_bank.py @@ -7,8 +7,9 @@ from Base.models import ( from Movement.models import ( Calendar, Product, - Expense, - Stock + ExpenseOrCredit, + Stock, + Transition ) def metric(): @@ -36,31 +37,46 @@ def metric(): # pegando total de Desspesas sum_expense = {} for bank in banks: - sum_bank = Expense.objects.filter( + sum_bank = ExpenseOrCredit.objects.filter( # active=True, - firm=True, + # firm=True, + debit=True, + credit=False, bank__name=bank.name, ).aggregate(Sum('gross_value'))['gross_value__sum'] or 0 sum_expense[bank.name] = sum_bank - # pegando total de Desspesas Profissinal - sum_expense_prof = {} + # pegando total de Desspesas Profissinal + sum_expense_credit = {} for bank in banks: - sum_bank = Expense.objects.filter( + sum_bank = ExpenseOrCredit.objects.filter( # active=True, - firm=False, + # firm=True, + debit=False, + credit=True, bank__name=bank.name, ).aggregate(Sum('gross_value'))['gross_value__sum'] or 0 - sum_expense_prof[bank.name] = sum_bank + sum_expense_credit[bank.name] = sum_bank - # Valores de entrada do estoque - sum_stock = {} + # Valores trans. de entrada + sum_transition_credit = {} for bank in banks: - sum_bank = Stock.objects.filter( + sum_bank = Transition.objects.filter( # active=True, - bank__name=bank.name, + bank_credit__name=bank.name, ).aggregate(Sum('gross_value'))['gross_value__sum'] or 0 - sum_stock[bank.name] = sum_bank + sum_transition_credit[bank.name] = sum_bank + + + # Valores trans. de saida + sum_transition_debit = {} + for bank in banks: + sum_bank = Transition.objects.filter( + # active=True, + bank_debit__name=bank.name, + ).aggregate(Sum('gross_value'))['gross_value__sum'] or 0 + sum_transition_debit[bank.name] = sum_bank + # saldo total de tudo sum_total = {} @@ -68,15 +84,23 @@ def metric(): sum_mov_serv_get = sum_mov_serv.get(str(bank.name)) sum_mov_prod_get = sum_mov_prod.get(str(bank.name)) sum_expense_get = sum_expense.get(str(bank.name)) - sum_expense_prof_get = sum_expense_prof.get(str(bank.name)) - sum_sum_stock = sum_stock.get(str(bank.name)) + sum_expense_credit_get = sum_expense_credit.get(str(bank.name)) + sum_sum_transition_credit = sum_transition_credit.get(str(bank.name)) + sum_sum_transition_debit = sum_transition_debit.get(str(bank.name)) sum_total[bank.name] = ( sum_mov_serv_get + - sum_mov_prod_get - - sum_expense_get - - sum_expense_prof_get - - sum_sum_stock + sum_mov_prod_get + + sum_expense_credit_get + + sum_sum_transition_credit - + sum_sum_transition_debit - + sum_expense_get + ) - return sum_total \ No newline at end of file + sum_all = sum(sum_total.values()) or 0 + + return { + 'sum_total':sum_total, + 'sum_all':sum_all, + } \ No newline at end of file diff --git a/Base/Metrics/DashboardAdmin/get_total_credit_prof.py b/Base/Metrics/DashboardAdmin/get_total_credit_prof.py new file mode 100644 index 0000000..b7f1709 --- /dev/null +++ b/Base/Metrics/DashboardAdmin/get_total_credit_prof.py @@ -0,0 +1,46 @@ +from django.db.models import Sum +from django.utils import timezone +from Base.models import ( + BankAccount, + ChartOfAccount +) +from Movement.models import ( + ExpenseOrCredit, +) + +def metric(): + # Lista de Bancos + current_month = timezone.localtime(timezone.now()).month + current_year = timezone.localtime(timezone.now()).year + banks = ChartOfAccount.objects.filter( + debit=False, + credit=True, + firm=False, + ) + + # pegando total de Desspesas Profissinal + sum_expense_prof = {} + for bank in banks: + sum_bank = ExpenseOrCredit.objects.filter( + # active=True, + date__month=current_month, + date__year=current_year, + firm=False, + debit=False, + credit=True, + chart_of_account__name=bank.name, + ).aggregate(Sum('gross_value'))['gross_value__sum'] or 0 + if sum_bank > 0: + sum_expense_prof[bank.name] = sum_bank + + # saldo total de tudo + sum_total = {} + for bank in sum_expense_prof: + sum_expense_get = sum_expense_prof.get(str(bank)) + sum_total[bank] = sum_expense_get + sum_all = sum(sum_total.values()) or 0 + + return { + 'sum_total':sum_total, + 'sum_all':sum_all, + } \ No newline at end of file diff --git a/Base/Metrics/DashboardAdmin/get_total_expense.py b/Base/Metrics/DashboardAdmin/get_total_expense.py new file mode 100644 index 0000000..c3330bc --- /dev/null +++ b/Base/Metrics/DashboardAdmin/get_total_expense.py @@ -0,0 +1,45 @@ +from django.db.models import Sum +from django.utils import timezone +from collections import defaultdict +from datetime import date +from Base.models import ( + BankAccount, + ChartOfAccount +) +from Movement.models import ( + ExpenseOrCredit, +) + +def metric(): + today = date.today() + + expenses = ExpenseOrCredit.objects.filter( + firm=True, + debit=True, + date__month=today.month, + date__year=today.year + ).select_related('bank', 'chart_of_account').order_by('bank', 'date') + + # Estrutura: { 'Nome do Banco': {'registros': [...], 'total_banco': 0} } + grouped_data = {} + total_geral = 0 + + for expense in expenses: + bank_name = expense.bank.name + + if bank_name not in grouped_data: + grouped_data[bank_name] = {'registros': [], 'total_banco': 0} + + grouped_data[bank_name]['registros'].append(expense) + + # Soma os valores + valor = float(expense.gross_value) + grouped_data[bank_name]['total_banco'] += valor + total_geral += valor + + return { + 'grouped_data': grouped_data, + 'total_geral': total_geral, + } + + diff --git a/Base/Metrics/DashboardAdmin/get_total_expense_prof.py b/Base/Metrics/DashboardAdmin/get_total_expense_prof.py new file mode 100644 index 0000000..1c4846e --- /dev/null +++ b/Base/Metrics/DashboardAdmin/get_total_expense_prof.py @@ -0,0 +1,46 @@ +from django.db.models import Sum +from django.utils import timezone +from Base.models import ( + BankAccount, + ChartOfAccount +) +from Movement.models import ( + ExpenseOrCredit, +) + +def metric(): + # Lista de Bancos + current_month = timezone.localtime(timezone.now()).month + current_year = timezone.localtime(timezone.now()).year + banks = ChartOfAccount.objects.filter( + debit=True, + credit=False, + firm=False, + ) + + # pegando total de Desspesas Profissinal + sum_expense_prof = {} + for bank in banks: + sum_bank = ExpenseOrCredit.objects.filter( + # active=True, + date__month=current_month, + date__year=current_year, + firm=False, + debit=True, + credit=False, + chart_of_account__name=bank.name, + ).aggregate(Sum('gross_value'))['gross_value__sum'] or 0 + if sum_bank > 0: + sum_expense_prof[bank.name] = sum_bank + + # saldo total de tudo + sum_total = {} + for bank in sum_expense_prof: + sum_expense_get = sum_expense_prof.get(str(bank)) + sum_total[bank] = sum_expense_get + sum_all = sum(sum_total.values()) or 0 + + return { + 'sum_total':sum_total, + 'sum_all':sum_all, + } \ No newline at end of file diff --git a/Base/Metrics/DashboardAdmin/get_total_firm.py b/Base/Metrics/DashboardAdmin/get_total_firm.py new file mode 100644 index 0000000..59e22b7 --- /dev/null +++ b/Base/Metrics/DashboardAdmin/get_total_firm.py @@ -0,0 +1,36 @@ +from django.db.models import Sum,Count +from django.utils import timezone +from Base.models import ( + ServiceList, +) +from Movement.models import ( + Calendar, +) + +def metric(): + now = timezone.localtime(timezone.now()) + current_month = now.month + current_year = now.year + + # Criamos um queryset base para evitar repetição de filtros + base_queryset = Calendar.objects.filter( + date__month=current_month, + date__year=current_year + ) + + # Breakdown (Agrupado por profissional e serviço) + services_breakdown = base_queryset.values( + 'professional__name', + 'service__name' + ).annotate( + quantidade_feitas=Count('id'), + lucro_liquido=Sum('value_cash') + ).order_by('professional__name', 'service__name') + + # Total geral de lucro no mês + total_geral = base_queryset.aggregate(total=Sum('value_cash'))['total'] or 0 + + return { + 'services': services_breakdown, + 'total': total_geral + } \ No newline at end of file diff --git a/Base/Metrics/DashboardAdmin/get_total_prof.py b/Base/Metrics/DashboardAdmin/get_total_prof.py index dbcca31..64582a0 100644 --- a/Base/Metrics/DashboardAdmin/get_total_prof.py +++ b/Base/Metrics/DashboardAdmin/get_total_prof.py @@ -1,39 +1,59 @@ from django.db.models import Sum from django.utils import timezone from Base.models import Professional -from Movement.models import Calendar, Expense +from Movement.models import Calendar, ExpenseOrCredit def metric(): Professionals = Professional.objects.all() - # current_month = timezone.localtime(timezone.now()).month - # current_year = timezone.localtime(timezone.now()).year + current_month = timezone.localtime(timezone.now()).month + current_year = timezone.localtime(timezone.now()).year sum_expense_prof = {} - for Prof in Professionals: - sum_ = Expense.objects.filter( - # active=True, - firm=False, - professional__name=Prof.name, - # date__month=current_month, - # date__year=current_year - ).aggregate(Sum('gross_value'))['gross_value__sum'] or 0 - sum_expense_prof[Prof.name] = sum_ - - - sum_serv_prof = {} for Prof in Professionals: sum_ = Calendar.objects.filter( # active=True, - professional__name=Prof.name, - # date__month=current_month, - # date__year=current_year + professional__id=Prof.id, + date__month= current_month, + date__year= current_year ).aggregate(Sum('prof_money'))['prof_money__sum'] or 0 - sum_serv_prof[Prof.name] = sum_ + sum_expense_prof[Prof.name] = sum_ + + sum_serv_prof_credit = {} + for Prof in Professionals: + sum_ = ExpenseOrCredit.objects.filter( + # active=True, + firm=False, + debit=False, + credit=True, + professional__id=Prof.id, + date__month= current_month, + date__year= current_year + ).aggregate(Sum('gross_value'))['gross_value__sum'] or 0 + sum_serv_prof_credit[Prof.name] = sum_ + + sum_serv_prof_debit = {} + for Prof in Professionals: + sum_ = ExpenseOrCredit.objects.filter( + # active=True, + firm=False, + debit=True, + credit=False, + professional__id=Prof.id, + date__month= current_month, + date__year= current_year + ).aggregate(Sum('gross_value'))['gross_value__sum'] or 0 + sum_serv_prof_debit[Prof.name] = sum_ sum_total = {} for total in Professionals: - sum1 = sum_serv_prof.get(str(total.name)) - sum2 = sum_expense_prof.get(str(total.name)) - sum_total[total.name] = ( sum1 - sum2 ) + sum1 = sum_expense_prof.get(str(total.name)) + sum2 = sum_serv_prof_credit.get(str(total.name)) + sum3 = sum_serv_prof_debit.get(str(total.name)) + sum_total[total.name] = ( sum1 + sum2 - sum3 ) - return sum_total \ No newline at end of file + sum_all = sum(sum_total.values()) or 0 + + return { + 'sum_total':sum_total, + 'sum_all':sum_all, + } \ No newline at end of file diff --git a/Base/Metrics/DashboardProf/__pycache__/get_sum_credit.cpython-312.pyc b/Base/Metrics/DashboardProf/__pycache__/get_sum_credit.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..467abb9ec7844b5e3f667fdf4329fce034cca3e6 GIT binary patch literal 1689 zcmbtU%TF6e7@vK5ZERk-Wsgeo}X(Ep)_UcC5VYf9BfIpyZal`7@bnPnYN(nF=pYG=O3%=i6f z=J(C-sZ;{cw(;9y=_e6@r%dTIJ`&o~RM-O+us9nyT#j@29M3VGw*^PciJ>gmk|XD2 zCzgvjN=~6R@jl4KwvOYe#wFNJQwN$QL?5DUCTtIXMS@X zx)|OfCh~8s&K3%6VS$TKu^~o(f&T6HDb_vUzx0(m*x9V8o%7P2zS<5W z!(kMoEWbJffNkzvj5p7q{6_}f5ATC{%E{OL<(}7V7Dqqc;*W&GXkXhx32cj&xGhzM zIq>Cuid^=4J1hTh+$vY)t8%%&v+iuHf+Oi=u2@y7#>yAYydB9O=t!2_In~Z+#ongQ zO%5|2iT6?z;TuP(#w_IlUll3l!A|D0afXWDeX(0A`w?hh|?)qYb0^1Y(Yv^t-!cxc&mna%1*;5S)`Y(g&3DS z*R(@RR}py_8yluwfu#4GVi>sM(8@^A!H80K*(K~piq0dAVj$gTe#5kFJ%uD@j@w?r zv{@Yy!S%i&(kVodfkTX5B<8J@VZp~lUM<-^M2M9P;VH_vSu7%0q&q{bgox;x4%8JA zyG_xvZKMhngrMt3`%ZS$FnCuO9G=!H(R|ORTP;FFdkf-qh)qny71RBiC=5E2Fawl{ z+Kao{>HOyyBAmYqHz4voH$UeUDh^GE^NaHfv-vC)A-WB5{!f`6Be$5k|)~xxPhYC!C0`&}?z~<9=GvJK#hcZfKVS?ee3|gX(_u;kR||!-h5! zXfr#DC+bi`9S_v;M{5W6zWvaxs~6tNa{gSZ>IX2-D2&?JFZt zjG8k1Bt6zhUk%b%kCq;f)ZhEKp8ljZyA-7F9H*CSUo1C=E^QGfh&K4 Ti~sN<$3F+OYbQrJIb8cM5^0h7 literal 0 HcmV?d00001 diff --git a/Base/Metrics/DashboardProf/__pycache__/get_sum_expense.cpython-312.pyc b/Base/Metrics/DashboardProf/__pycache__/get_sum_expense.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1a87a3d5c470a796bc8fa618d2ebe221aa2f9220 GIT binary patch literal 1693 zcmbtUO-~y~7@qy~+SnM_O`$QN4hd-%3EB{~2ZX8;L%5VAQWCYX+^!byVC?P(npsnb zOvNFpIP}n-xa3fpNT`BC4!!g@^y0+_TT`k;%BeR;u2dTiqXpG5$kGbL(#SLjSrVFy^i;%wk>dCuYUJjZn27924zhO%Hwj+~dB z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=Z7Mlp1d+ zazbwaS<{<5Q81T@vL0Bryd^vV3llDe$e~2+acdTdwyxsaTpkQMIg3}2Xk2J5h8xuX u0gz#Vhxo;!S?;XjpgZIWXT{!AvEU6wlBCbz>L)PzLzX4E8SRnu;M*?^*dq}D literal 0 HcmV?d00001 diff --git a/Base/Metrics/DashboardProf/get_sum_credit.py b/Base/Metrics/DashboardProf/get_sum_credit.py new file mode 100644 index 0000000..582c64f --- /dev/null +++ b/Base/Metrics/DashboardProf/get_sum_credit.py @@ -0,0 +1,39 @@ +from django.db.models import Sum , Count +from django.utils import timezone +from Movement.models import ( + Calendar, + ExpenseOrCredit, + ChartOfAccount, +) + +def metric(Prof_id): + current_month = timezone.localtime(timezone.now()).month + current_year = timezone.localtime(timezone.now()).year + + # pegando total de Despesas + debit = ChartOfAccount.objects.filter( + firm=False, + debit=False, + credit=True, + prof=True, + ) + expense = {} + total_geral_despesas = 0 + for bank in debit: + sum_bank = ExpenseOrCredit.objects.filter( + # active=True, + date__month=current_month, + date__year=current_year, + chart_of_account__id=bank.id, + professional__id=Prof_id, + ) + total_geral_despesas += sum_bank.aggregate(Sum('gross_value'))['gross_value__sum'] or 0 + expense[bank.name] = { + 'sum_credit': sum_bank.aggregate(Sum('gross_value'))['gross_value__sum'] or 0, + 'list_credit': sum_bank , + } + + return { + 'sum_credit': expense, + 'sum_credit_all': total_geral_despesas, + } \ No newline at end of file diff --git a/Base/Metrics/DashboardProf/get_sum_expense.py b/Base/Metrics/DashboardProf/get_sum_expense.py new file mode 100644 index 0000000..d28eb7e --- /dev/null +++ b/Base/Metrics/DashboardProf/get_sum_expense.py @@ -0,0 +1,39 @@ +from django.db.models import Sum , Count +from django.utils import timezone +from Movement.models import ( + Calendar, + ExpenseOrCredit, + ChartOfAccount, +) + +def metric(Prof_id): + current_month = timezone.localtime(timezone.now()).month + current_year = timezone.localtime(timezone.now()).year + + # pegando total de Despesas + debit = ChartOfAccount.objects.filter( + firm=False, + debit=True, + credit=False, + prof=True, + ) + expense = {} + total_geral_despesas = 0 + for bank in debit: + sum_bank = ExpenseOrCredit.objects.filter( + # active=True, + date__month=current_month, + date__year=current_year, + chart_of_account__id=bank.id, + professional__id=Prof_id, + ) + total_geral_despesas += sum_bank.aggregate(Sum('gross_value'))['gross_value__sum'] or 0 + expense[bank.name] = { + 'sum_expense': sum_bank.aggregate(Sum('gross_value'))['gross_value__sum'] or 0, + 'list_expense': sum_bank , + } + + return { + 'sum_expense': expense, + 'sum_expense_all': total_geral_despesas, + } \ No newline at end of file diff --git a/Base/Metrics/DashboardProf/get_total_money.py b/Base/Metrics/DashboardProf/get_total_money.py new file mode 100644 index 0000000..1463ca4 --- /dev/null +++ b/Base/Metrics/DashboardProf/get_total_money.py @@ -0,0 +1,38 @@ +from django.db.models import Sum , Count +from django.utils import timezone +from Movement.models import ( + Calendar, + ExpenseOrCredit +) + +def metric(Prof_id): + current_month = timezone.localtime(timezone.now()).month + current_year = timezone.localtime(timezone.now()).year + + calenda = Calendar.objects.filter( + professional_id=Prof_id, + date__month=current_month, + date__year=current_year, + ) + debit = ExpenseOrCredit.objects.filter( + prof=True, + debit=True, + credit=False, + professional_id=Prof_id, + date__month=current_month, + date__year=current_year, + ) + credit = ExpenseOrCredit.objects.filter( + prof=True, + debit=False, + credit=True, + professional_id=Prof_id, + date__month=current_month, + date__year=current_year, + ) + sum_calenda = calenda.aggregate(Sum('prof_money'))['prof_money__sum'] or 0 + sum_debit = calenda.aggregate(Sum('gross_value'))['gross_value__sum'] or 0 + sum_credit = calenda.aggregate(Sum('gross_value'))['gross_value__sum'] or 0 + all = sum_calenda + sum_credit - sum_debit + + return all \ No newline at end of file diff --git a/Base/Metrics/DashboardProf/get_total_serv.py b/Base/Metrics/DashboardProf/get_total_serv.py new file mode 100644 index 0000000..ebf4f88 --- /dev/null +++ b/Base/Metrics/DashboardProf/get_total_serv.py @@ -0,0 +1,23 @@ +from django.db.models import Sum , Count +from django.utils import timezone +from Movement.models import ( + Calendar, +) + +def metric(Prof_id): + current_month = timezone.localtime(timezone.now()).month + current_year = timezone.localtime(timezone.now()).year + + qs = Calendar.objects.filter( + professional_id=Prof_id, + date__month=current_month, + date__year=current_year, + ) + # Contagem de cada serviço realizado + services_breakdown = qs.values('service__name').annotate( + total_performed=Count('id') + ).order_by('-total_performed') + + return { + 'services': services_breakdown, + } \ No newline at end of file diff --git a/Base/Urls/__pycache__/urlsBankAccount.cpython-312.pyc b/Base/Urls/__pycache__/urlsBankAccount.cpython-312.pyc index eff949340432d0ff1f7d7402bb1aba31291028a1..c94f8a7aa96d61e16d7983283731fe3ef65a78ab 100644 GIT binary patch delta 320 zcmaFP{*s;dG%qg~0}!k&;?KOWk#`%TBEu~ar^LK$$K>Sv(!7#lpUmQtu*}qQO~zX+ zd5O8Hx7a2>W0Ys)pUlpr0VEBxC}x z%3bF*zQ}8Qo!9yzuk~eK+Y2sHS6HHNvT$@rTo6{dE^K{K*!sG#^F?9j%fhY~d{VBk zqyi-`a7tZ}(Y-F?a#6udw8iAS;WZ`2#OIKT{)jkr2=)0E&ET A-2eap delta 344 zcmaFK{+ylnG%qg~0}vFvdYy4~Bkwjw7e@VCB2I~U*^bG{`K5U!#XgzEC1IJV<(iDQ zSn?8cQ>)nZor_WvOHyx%AuEH3ffQB==uc*0(qIBox)3UiDaMHdXh{(#hydAF#0?~F zahDe56eO0Eq!#5BuVnZP6k_=0;A|BWTAW%`921^emReMjpBLkjTAW>yUoiPMlM$ov zWIbm2df^Lv^4IxHF7laN=d-!UXLFg)?t*Ld6_%KrEF2w@7erLAi`ZNgvAHhda#6(P zvWVLS-_$ECX+X&foYEI$^{&ghUX*pcF6($YN;zz{}3h)W}^V H2=oE~#%p$B diff --git a/Base/Urls/__pycache__/urlsBase.cpython-312.pyc b/Base/Urls/__pycache__/urlsBase.cpython-312.pyc index 694eacb05370182dd97146b991083d2baa8d6193..156e5593dcdf56809482df66ef912875a9a8bf1e 100644 GIT binary patch delta 229 zcmcb^c8y*AG%qg~0}!0g=Fc=|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^b{YEWtNfI65RJ_+1wGfTH}A(&Q4K%wjMO%SS!z*9eqM}AesXDUYFQUgtHu$ZL3= z*YYB-+>`e(Nk}<3 zTg8MHrxq2*gr}CJ7M0}Z#kiyvXP4v`O#aGb#3(#jgIT^__yV8Ybv~nud`8##tS<6d zUFNg7;2d#$1)l mWu33fdS8_FzAWo|Atd_>OAaZr7@9xuvhy=Fau*2#Jpure+-<}F diff --git a/Base/Urls/__pycache__/urlsProfessional.cpython-312.pyc b/Base/Urls/__pycache__/urlsProfessional.cpython-312.pyc index 40751840397fdb137bd2ae5cd57b7d3237e7bff2..50bd38cc5d7f4d1372457757d4fdcf277e82c2c0 100644 GIT binary patch delta 320 zcmaFC{)(OVG%qg~0}!k&;?KOYk#`%TBEv0_fTH}g)Z*gI{Jg{*pUmQtu*}qQO~zX+ zd5O8Hx7a2>W0Ys)pUlpr0VEBI3_%`EVZa4KQG25wK%&ZzhLrjCSyk7 z$@Rp$0y(sH?UDo%atnX!6{|jMxS6K2%k;TybftQ`1sgb)# H5aG;MAhB%;Z#`%;FLd4$Dj}*JQlKl9!m9 zdW+4uC^fMp^_D1-B8U)3Srz|e7AAE@{>i#vGK?u&fD>qX5y*}rZVoqPw$I zOlWaxQE^OoYFTPgNq%08OMY@`Zfaghag494yW`}~Oh$|%lhv5z>xC}x%3kL+yvS>K zo!9arujOT4>kCfdS6Cu$vT$@rTo6{iE^K*G*z&rt<3(Y|%fikVyb`alBmpHaa7tZ} s(YY?;bWz6Xx{TLF8L!JSJ{N+suCQd2AS;WZ`2#OIKT{)jkr2>70IO?mt^fc4 delta 323 zcmaFN{*aybG%qg~0}#Abd7E)^Bkxv5Cr15S!ojIUWtqvTKAFWOARLyNTCT}>izP2H zH?@jg-?=C?u_X1DD3U6O5J+8>fc|7gCUqttr3s+|nW6uS%X==Uibo^+;u*qi+o1c`K&JT zSzYF{x!@deg(dPP3rC0K1re3&B32hgtgeeVT@-P;EaGy(JLw8bGEnjYr}PC`-RrW> n7iFEV%X(jw^}a0Ydm$wI3QG/Detail', viewsBankAccounts.BankAccountsDetailView.as_view(), name='BankAccountsDetailView'), - path('//Update', viewsBankAccounts.BankAccountsUpdateView.as_view(), name='BankAccountsUpdateView'), - path('//Delete', viewsBankAccounts.BankAccountsDeleteView.as_view(), name='BankAccountsDeleteView'), + path('', viewsBankAccounts.BankAccountsListView.as_view(), name='BankAccountsListView'), + path('Create', viewsBankAccounts.BankAccountsCreateView.as_view(), name='BankAccountsCreateView'), + path('/Detail', viewsBankAccounts.BankAccountsDetailView.as_view(), name='BankAccountsDetailView'), + path('/Update', viewsBankAccounts.BankAccountsUpdateView.as_view(), name='BankAccountsUpdateView'), + path('/Delete', viewsBankAccounts.BankAccountsDeleteView.as_view(), name='BankAccountsDeleteView'), ] \ No newline at end of file diff --git a/Base/Urls/urlsBase.py b/Base/Urls/urlsBase.py index 1a5433f..08830f5 100644 --- a/Base/Urls/urlsBase.py +++ b/Base/Urls/urlsBase.py @@ -11,5 +11,6 @@ urlpatterns = [ path('logout', auth_views.LogoutView.as_view(), name='logout'), path('dashboard', views.Dashboard.as_view(), name='Dashboard'), path('DashboardAdmin', views.DashboardAdmin.as_view(), name='DashboardAdmin'), + path('DashboardProf', views.DashboardProf.as_view(), name='DashboardProf'), ] \ No newline at end of file diff --git a/Base/Urls/urlsChartOfAccount.py b/Base/Urls/urlsChartOfAccount.py index 66c9d04..4e840d0 100644 --- a/Base/Urls/urlsChartOfAccount.py +++ b/Base/Urls/urlsChartOfAccount.py @@ -5,9 +5,9 @@ from Base.Views import ( urlpatterns = [ # URLs de Professional - path('/', viewsChartOfAccount.ChartOfAccountListView.as_view(), name='ChartOfAccountListView'), - path('/Create', viewsChartOfAccount.ChartOfAccountCreateView.as_view(), name='ChartOfAccountCreateView'), - path('//Detail', viewsChartOfAccount.ChartOfAccountDetailView.as_view(), name='ChartOfAccountDetailView'), - path('//Update', viewsChartOfAccount.ChartOfAccountUpdateView.as_view(), name='ChartOfAccountUpdateView'), - path('//Delete', viewsChartOfAccount.ChartOfAccountDeleteView.as_view(), name='ChartOfAccountDeleteView'), + path('', viewsChartOfAccount.ChartOfAccountListView.as_view(), name='ChartOfAccountListView'), + path('Create', viewsChartOfAccount.ChartOfAccountCreateView.as_view(), name='ChartOfAccountCreateView'), + path('/Detail', viewsChartOfAccount.ChartOfAccountDetailView.as_view(), name='ChartOfAccountDetailView'), + path('/Update', viewsChartOfAccount.ChartOfAccountUpdateView.as_view(), name='ChartOfAccountUpdateView'), + path('/Delete', viewsChartOfAccount.ChartOfAccountDeleteView.as_view(), name='ChartOfAccountDeleteView'), ] \ No newline at end of file diff --git a/Base/Urls/urlsPaymentMethod.py b/Base/Urls/urlsPaymentMethod.py index 885a92b..adc51ef 100644 --- a/Base/Urls/urlsPaymentMethod.py +++ b/Base/Urls/urlsPaymentMethod.py @@ -6,9 +6,9 @@ from Base.Views import ( urlpatterns = [ # URLs de Professional - path('/', viewsPayMethod.PayMethodListView.as_view(), name='PayMethodListView'), - path('/Create', viewsPayMethod.PayMethodCreateView.as_view(), name='PayMethodCreateView'), - path('//Detail', viewsPayMethod.PayMethodDetailView.as_view(), name='PayMethodDetailView'), - path('//Update', viewsPayMethod.PayMethodUpdateView.as_view(), name='PayMethodUpdateView'), - path('//Delete', viewsPayMethod.PayMethodDeleteView.as_view(), name='PayMethodDeleteView'), + path('', viewsPayMethod.PayMethodListView.as_view(), name='PayMethodListView'), + path('Create', viewsPayMethod.PayMethodCreateView.as_view(), name='PayMethodCreateView'), + path('/Detail', viewsPayMethod.PayMethodDetailView.as_view(), name='PayMethodDetailView'), + path('/Update', viewsPayMethod.PayMethodUpdateView.as_view(), name='PayMethodUpdateView'), + path('/Delete', viewsPayMethod.PayMethodDeleteView.as_view(), name='PayMethodDeleteView'), ] \ No newline at end of file diff --git a/Base/Urls/urlsProductList.py b/Base/Urls/urlsProductList.py index fbc1307..c89421b 100644 --- a/Base/Urls/urlsProductList.py +++ b/Base/Urls/urlsProductList.py @@ -6,9 +6,9 @@ from Base.Views import ( urlpatterns = [ # URLs de Professional - path('/', viewsProductList.ProductListListView.as_view(), name='ProductListListView'), - path('/Create', viewsProductList.ProductListCreateView.as_view(), name='ProductListCreateView'), - path('//Detail', viewsProductList.ProductListDetailView.as_view(), name='ProductListDetailView'), - path('//Update', viewsProductList.ProductListUpdateView.as_view(), name='ProductListUpdateView'), - path('//Delete', viewsProductList.ProductListDeleteView.as_view(), name='ProductListDeleteView'), + path('', viewsProductList.ProductListListView.as_view(), name='ProductListListView'), + path('Create', viewsProductList.ProductListCreateView.as_view(), name='ProductListCreateView'), + path('/Detail', viewsProductList.ProductListDetailView.as_view(), name='ProductListDetailView'), + path('/Update', viewsProductList.ProductListUpdateView.as_view(), name='ProductListUpdateView'), + path('/Delete', viewsProductList.ProductListDeleteView.as_view(), name='ProductListDeleteView'), ] \ No newline at end of file diff --git a/Base/Urls/urlsProfessional.py b/Base/Urls/urlsProfessional.py index e118cf1..d58165a 100644 --- a/Base/Urls/urlsProfessional.py +++ b/Base/Urls/urlsProfessional.py @@ -6,9 +6,9 @@ from Base.Views import ( urlpatterns = [ # URLs de Professional - path('/', viewsProfessional.ProfessionalListView.as_view(), name='ProfessionalListView'), - path('/Create', viewsProfessional.ProfessionalCreateView.as_view(), name='ProfessionalCreateView'), - path('//Detail', viewsProfessional.ProfessionalDetailView.as_view(), name='ProfessionalDetailView'), - path('//Update', viewsProfessional.ProfessionalUpdateView.as_view(), name='ProfessionalUpdateView'), - path('//Delete', viewsProfessional.ProfessionalDeleteView.as_view(), name='ProfessionalDeleteView'), + path('', viewsProfessional.ProfessionalListView.as_view(), name='ProfessionalListView'), + path('Create', viewsProfessional.ProfessionalCreateView.as_view(), name='ProfessionalCreateView'), + path('/Detail', viewsProfessional.ProfessionalDetailView.as_view(), name='ProfessionalDetailView'), + path('/Update', viewsProfessional.ProfessionalUpdateView.as_view(), name='ProfessionalUpdateView'), + path('/Delete', viewsProfessional.ProfessionalDeleteView.as_view(), name='ProfessionalDeleteView'), ] \ No newline at end of file diff --git a/Base/Urls/urlsServiceList.py b/Base/Urls/urlsServiceList.py index 8c5606b..8943701 100644 --- a/Base/Urls/urlsServiceList.py +++ b/Base/Urls/urlsServiceList.py @@ -6,9 +6,9 @@ from Base.Views import ( urlpatterns = [ # URLs de Professional - path('/', viewsServiceList.ServiceListListView.as_view(), name='ServiceListListView'), - path('/Create', viewsServiceList.ServiceListCreateView.as_view(), name='ServiceListCreateView'), - path('//Detail', viewsServiceList.ServiceListDetailView.as_view(), name='ServiceListDetailView'), - path('//Update', viewsServiceList.ServiceListUpdateView.as_view(), name='ServiceListUpdateView'), - path('//Delete', viewsServiceList.ServiceListDeleteView.as_view(), name='ServiceListDeleteView'), + path('', viewsServiceList.ServiceListListView.as_view(), name='ServiceListListView'), + path('Create', viewsServiceList.ServiceListCreateView.as_view(), name='ServiceListCreateView'), + path('/Detail', viewsServiceList.ServiceListDetailView.as_view(), name='ServiceListDetailView'), + path('/Update', viewsServiceList.ServiceListUpdateView.as_view(), name='ServiceListUpdateView'), + path('/Delete', viewsServiceList.ServiceListDeleteView.as_view(), name='ServiceListDeleteView'), ] \ No newline at end of file diff --git a/Base/Views/__pycache__/viewsBankAccounts.cpython-312.pyc b/Base/Views/__pycache__/viewsBankAccounts.cpython-312.pyc index 743438d9d76c9de4e9614968627c15a9241c439e..a549b2f77eac8df15772de4e299e951882d78b1c 100644 GIT binary patch delta 46 zcmeB?pDe#&F0-PSvsFxJacWUadt_5!RCF;SGfTojt@2f diff --git a/Base/Views/__pycache__/viewsChartOfAccount.cpython-312.pyc b/Base/Views/__pycache__/viewsChartOfAccount.cpython-312.pyc index dd25d7147f83a82c2c687a348851e38deb41c8ed..5edebf1b3154773f67624bb5087bf9e7d6ed81bd 100644 GIT binary patch delta 46 zcmew^`cHI26SJa^vsFxJacWU;SIv B5t{%2 delta 39 ucmew-`dxHG6SI`7vsFxJacWUadt_5!RE!x(d+;?vJXZ8 diff --git a/Base/Views/__pycache__/viewsPayMethod.cpython-312.pyc b/Base/Views/__pycache__/viewsPayMethod.cpython-312.pyc index 7b9743be1e5746d79513b40b4d3ab820dc36084f..cfe2789b3644e4a368950def34355d2c929e925b 100644 GIT binary patch delta 46 zcmdlexCM delta 39 ucmdlXx>0mP9adt_5!RCHuO?Chu^A1}8 diff --git a/Base/Views/__pycache__/viewsProductList.cpython-312.pyc b/Base/Views/__pycache__/viewsProductList.cpython-312.pyc index 0e1f48e9a31ddbfcec9ec00f114f13307ad96965..f8de648d3bd6da61a6aaa7b7339c7e228c0f4080 100644 GIT binary patch delta 46 zcmX>rdPQ_Y8MC6NvsFxJacWU;Ro) B5e@(V delta 39 ucmca2dRBBp8MBm=vsFxJacWUadt_5!RG1Aw(I~Y*$%k? diff --git a/Base/Views/__pycache__/viewsProfessional.cpython-312.pyc b/Base/Views/__pycache__/viewsProfessional.cpython-312.pyc index b26d31f26d754e4227c8c44c95eede738da60ad7..e028025c9a5655acd007c2e5483abefa332355e3 100644 GIT binary patch delta 46 zcmbO#Hb-njJF}vfvsFxJacWU;R3O B5c&WB delta 39 ucmbOuHdSmxJF}FtvsFxJacWUadt_5!R8grCF}qkmJX!= diff --git a/Base/Views/__pycache__/viewsServiceList.cpython-312.pyc b/Base/Views/__pycache__/viewsServiceList.cpython-312.pyc index 9ac5aef72d316f23ff8afb94a699c9878e4651ee..c5d22e76b6104f8c0bcc06f223a5941422438ac3 100644 GIT binary patch delta 46 zcmX>rdPQ_Y8MC6NvsFxJacWU;Ro) B5e@(V delta 39 ucmca2dRBBp8MBm=vsFxJacWUadt_5!RG1Aw(I~Y*$%k? diff --git a/Base/Views/views.py b/Base/Views/views.py index 3091ba4..0c695e9 100644 --- a/Base/Views/views.py +++ b/Base/Views/views.py @@ -5,13 +5,28 @@ from django.utils import timezone from django.contrib.auth import views as auth_views from Base.Metrics.Dashboard import ( get_sum_of_professional, - get_sum_of_stone, get_sum_of_service, get_sum_of_professional_detail, get_sum_payment_method_service, - get_sum_of_product + get_sum_of_product, ) -from Base.Metrics.DashboardAdmin import get_total_bank,get_total_prof +from Base.Metrics.DashboardAdmin import ( + get_total_bank, + get_total_prof, + get_sum_of_stone, + get_total_firm, + get_total_expense, + get_total_expense_prof, + get_total_credit_prof, +) +from Base.Metrics.DashboardProf import ( + get_total_serv, + get_sum_expense, + get_sum_credit, + get_total_money, +) +from Base.models import Professional +from Movement.models import Calendar def Home(request): context = { 'ok':' Tudo ok', } @@ -21,12 +36,11 @@ class Login(auth_views.LoginView): template_name = 'Login/Login.html' class Dashboard(LoginRequiredMixin, TemplateView): - template_name = 'Login/Dashboard/index.html' + template_name = 'Dashboards/Dashboard/index.html' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) Day = timezone.localtime(timezone.now()) context['Professional'] = get_sum_of_professional.metric(Day) - context['Stone'] = get_sum_of_stone.metric(Day) context['Service'] = get_sum_of_service.metric(Day) context['Sum_of_professional_detail'] = get_sum_of_professional_detail.metric(Day) context['Sum_payment_method_service'] = get_sum_payment_method_service.metric(Day) @@ -34,9 +48,36 @@ class Dashboard(LoginRequiredMixin, TemplateView): return context class DashboardAdmin(LoginRequiredMixin, TemplateView): - template_name = 'Login/DashboardAdmin/index.html' + template_name = 'Dashboards/DashboardAdmin/index.html' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['total_bank'] = get_total_bank.metric() - context['total_prof'] = get_total_prof.metric() + context['total_firm'] = get_total_firm.metric() + # context['total_prof'] = get_total_prof.metric() + context['total_expense'] = get_total_expense.metric() + context['Stone'] = get_sum_of_stone.metric() + # context['total_expense_prof'] = get_total_expense_prof.metric() + # context['total_credit_prof'] = get_total_credit_prof.metric() + return context + +class DashboardProf(LoginRequiredMixin, TemplateView): + template_name = 'Dashboards/DashboardProf/index.html' + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + if self.request.GET.get('Prof'): + total_serv = get_total_serv.metric(self.request.GET.get('Prof')) + sum_expense = get_sum_expense.metric(self.request.GET.get('Prof')) + sum_credit = get_sum_credit.metric(self.request.GET.get('Prof')) + sum_money = get_total_money.metric(self.request.GET.get('Prof')) + else: + total_serv = Calendar.objects.none() + sum_expense = Calendar.objects.none() + sum_credit = Calendar.objects.none() + sum_money = Calendar.objects.none() + + context['Total_serv'] = total_serv + context['Expense'] = sum_expense + context['Credit'] = sum_credit + context['Money'] = sum_money + context['Professionals'] = Professional.objects.all() return context \ No newline at end of file diff --git a/Base/__pycache__/__init__.cpython-312.pyc b/Base/__pycache__/__init__.cpython-312.pyc index bfac4a0f57563cf4635d3e2c79ca213dc9b69845..f17bc5e01da9149241ce27cd94c34e5b8c9c8833 100644 GIT binary patch delta 43 ycmbQrIEQh9ouaj~RZM7cYEf}acxqW{QAvJYj7xrUX>Mv>NpXy?tGnaG2wMP8Uk|AO delta 36 rcmbQkIF)gNos@~QRZM7cYEf}acxqW{QAvJYj7w^9c1eE0#CTf(=XMQL diff --git a/Base/__pycache__/admin.cpython-312.pyc b/Base/__pycache__/admin.cpython-312.pyc index 4df1fd899821849a5ee4ac27f209d687d3dd3fc7..635c6c0fc7340ecee41f592f0c952edbb34dc8b1 100644 GIT binary patch delta 43 ycmX@ec!F_4mZF8TRZM7cYEf}acxqW{QAvJYj7xrUX>Mv>NpXy?tGnaG7Fz&hLl9N~ delta 36 rcmX@Xc#v^ImXx8hRZM7cYEf}acxqW{QAvJYj7w^9c1eE0#BN&v_|pyn diff --git a/Base/__pycache__/apps.cpython-312.pyc b/Base/__pycache__/apps.cpython-312.pyc index c898f80f26c3ff17f0528249d70daf7bbe4c5ab2..0af0b6fd6e61732076bc540c8e29c5856a195db3 100644 GIT binary patch delta 45 zcmX@ie2RGkAETnVvsFxJacWUadt_5!DM~L*#H6x4blJr diff --git a/Base/__pycache__/models.cpython-312.pyc b/Base/__pycache__/models.cpython-312.pyc index 569f4c5ea0d60977d9f605adbdc1e99cdcaeb2e4..8cb2e22a5cf0b78e4d89c12ba50de2ac4a3e0648 100644 GIT binary patch delta 444 zcmcbiKi81=G%qg~0}xy`^vS%ok#{MxqNTG{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=)E7(FN3v+yyBPWEGwWEV>jUn8-aX>tLh@#K@tI*gJ8DRPsmShFSNQxw)Hu4aZ=p3a)WlOmVGp3XG+0<$Wk5>T_3Knmj;<<(3uB`ILD z1fgcZMO7v-Ns5c1DOF`+Nae~>nB2f9Hu)V}u%uclTNWQg3o^MzeR34LGP8!J=Hv$U z>#QtknMJvqvpHB9xwU}GinKw5&gN=PUPdWrXRDad;?$zznDErH)S{C7ycn0%;_Qd>W_WyHW)kK5BFw|d^+9U0AI}jc zu3AQKMj^IFuOj!!GW=?c4wIev4W!&ambrrn4Di;M*zA}J#V8sBCnRK=Q diff --git a/Base/migrations/__pycache__/0002_chartofaccount_prof.cpython-312.pyc b/Base/migrations/__pycache__/0002_chartofaccount_prof.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4be7918da2e2d6a3e398d4bdaf3e53fafb1f943b GIT binary patch literal 736 zcmY*W&ubG=5T3WYdD&gkQiB+=y$Fr6my+sDw9r;9NLxJk1D1v7x^I$h*dK9sBlM=w zgLvw#e}EUI{ZBjvgoJnXWoa@NN@%SF5%#6oOFn*Yk)?#9QgkdkYjN5k9L=@#ueknMde&dQ+7e; zL&-&+)Rg7Z~6OKs`VxFnJ z33HqCr>aM0C|cV|(+K^f3<*2!;cSWDV4{@$eYN|*dzoXFd#~|5%7GK_aT@evOp4q) zc(S+c?MjH*bId)Z(p%iYlX~y5t1_8VxzRh$)L~1fK>kR&6BtvlZjW{CI{mOew!vEa zWDm{Nfw?+r+#OwOjOxwPJHvW&P;Y+aKkD}{tA=Hdby}w%pJk1CzeC3m7Vr8=C*9z0 zOVOp&>5Dg1TA6!OB4Iw9Zf+~PC8@e*z9!vRCxrZ=K%7fjBlOfBuB;DM)_;Q}W%WOx CXt%5Y literal 0 HcmV?d00001 diff --git a/Base/migrations/__pycache__/0003_alter_chartofaccount_prof.cpython-312.pyc b/Base/migrations/__pycache__/0003_alter_chartofaccount_prof.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c7a30b0a65a688d936df4a899a5befef4377266c GIT binary patch literal 756 zcmZuu&ubG=5T3WYdD&gkQiGTx)>EVG!4kA5(L!5oL2U3M!m{vO_f2BL{z!K>LT(B@ zc+XyG&lsVodDO7bm^jK`90TX*wqJyQ~IfhqX|3ev{OItBylEa zlyD5QU|9oDo|EZo3C;k)B^+FhlQwa64bbQo1OHnBatyBi(eCQixMJM6D4k1b$}Z?) zDA~;%lpRx8M~ivnaK@gWp;&J;8uwZ7)=%@Kbla^S$8We_#9ymmlIkxxU?Dg|XwlAF5o%IQB5+7zZ89Qnf>2 z?}j<12dYbIs6b^eNka7FA|&jjhx3(wfvM8@$J>ACz05GpyjS=RrH_@ zo*wRc`x0XM0y9r(_Lf)ir1}TUS1Cs*YVa1+vG|oxp^Gb#J0;*XjG`6C14C zAMKI3F*G;EwY%eMwQ;q6dS_Iv53BXh_`SM)SvD+tqSGq<@GPw@`ZXOxSiI}U?PQC; zDa03oXD{ARX+`e3M8bSD+u%-mQ&M%|?3Q#Boe=Vy0&y;Bh0s%bw6-~1+x!KR6xDwL D;VHl% literal 0 HcmV?d00001 diff --git a/Base/migrations/__pycache__/__init__.cpython-312.pyc b/Base/migrations/__pycache__/__init__.cpython-312.pyc index 628813fde577df51cdd31c02726a3eaa8a2228fa..e9628d1c7f54b275a490bfe5636d5796866d6e9a 100644 GIT binary patch delta 43 ycmZ3$xSVlMv>NpXy?tGnaG2oC^Mk`L7Y delta 36 rcmZ3^xPWnjos_+^RZM7cYEf}acxqW{QAvJYj7w^9c1eE0#CQ(?>%t9y diff --git a/Base/models.py b/Base/models.py index 054b8ce..5a5bfe7 100644 --- a/Base/models.py +++ b/Base/models.py @@ -61,7 +61,10 @@ class ProductList(models.Model): class ChartOfAccount(models.Model): name = models.CharField(max_length=100) debit = models.BooleanField(default=True) + credit = models.BooleanField(default=False) firm = models.BooleanField(default=True) + prof = models.BooleanField(default=False) + month = models.BooleanField(default=False) notes = models.TextField(null=True, blank=True) class Meta: ordering = ['name'] diff --git a/Base/templates/ChartOfAccount/List.html b/Base/templates/ChartOfAccount/List.html index 3c5e45c..faedd0e 100644 --- a/Base/templates/ChartOfAccount/List.html +++ b/Base/templates/ChartOfAccount/List.html @@ -31,6 +31,8 @@ Notas Debito Firma + Mensais + Prof Ações @@ -44,6 +46,10 @@ {% else %} {% endif %} {% if Chart.firm %} {% else %} {% endif %} + {% if Chart.month %} + {% else %} {% endif %} + {% if Chart.prof %} + {% else %} {% endif %} diff --git a/Base/templates/Login/Dashboard/Professional.html b/Base/templates/Dashboards/Dashboard/Professional.html similarity index 100% rename from Base/templates/Login/Dashboard/Professional.html rename to Base/templates/Dashboards/Dashboard/Professional.html diff --git a/Base/templates/Login/Dashboard/Service.html b/Base/templates/Dashboards/Dashboard/Service.html similarity index 100% rename from Base/templates/Login/Dashboard/Service.html rename to Base/templates/Dashboards/Dashboard/Service.html diff --git a/Base/templates/Dashboards/Dashboard/Sum_of_product.html b/Base/templates/Dashboards/Dashboard/Sum_of_product.html new file mode 100644 index 0000000..6df33c4 --- /dev/null +++ b/Base/templates/Dashboards/Dashboard/Sum_of_product.html @@ -0,0 +1,31 @@ +
+
+ Produtos +
+ +
+
+ PRODUTO (QTD) + TOTAL +
+ + {% for name, value in Sum_of_product.product_report.items %} + {% if value.product_item != 0 %} +
+ + {{ name }} + {{ value.product_cont }}x + + R$ {{ value.product_item|floatformat:2 }} +
+ {% endif %} + {% empty %} +
Vazio.
+ {% endfor %} + +
+ Total da Venda + R$ {{ Sum_of_product.sum_of_product|floatformat:2 }} +
+
+
\ No newline at end of file diff --git a/Base/templates/Dashboards/Dashboard/Sum_of_professional_detail.html b/Base/templates/Dashboards/Dashboard/Sum_of_professional_detail.html new file mode 100644 index 0000000..279527c --- /dev/null +++ b/Base/templates/Dashboards/Dashboard/Sum_of_professional_detail.html @@ -0,0 +1,40 @@ +
+
Resumo de Atendimentos
+ +
+ {% for prof_name, services in Sum_of_professional_detail.professionals_report.items %} +
+
+
+ {{ prof_name }} +
+ + {% for service_name, data in services.items %} + {% if data.servCont > 0 %} +
+
+ {{ service_name }} ({{ data.servCont }}) + R$ {{ data.servSum|floatformat:2 }} +
+ + {% for client in data.clients %} +
+ {{ client.time }} {{ client.name }} + R${{ client.value|floatformat:0 }} +
+ {% endfor %} +
+ {% endif %} + {% endfor %} +
+
+ {% endfor %} +
+ +
+ Total Geral +
R$ {{ Sum_of_professional_detail.sum_of_prof|floatformat:2 }}
+
+
+{#

Total de Hoje : R$: {{ Sum_of_professional_detail.sum_of_prof|floatformat:2 }}

#} +
\ No newline at end of file diff --git a/Base/templates/Dashboards/Dashboard/Sum_payment_method_service.html b/Base/templates/Dashboards/Dashboard/Sum_payment_method_service.html new file mode 100644 index 0000000..a2896f5 --- /dev/null +++ b/Base/templates/Dashboards/Dashboard/Sum_payment_method_service.html @@ -0,0 +1,23 @@ +
+
+ Pagamentos +
+ +
+ {% for name, value in Sum_payment_method_service.bank_balance.items %} + {% if value != 0 %} +
+ {{ name }} + R$ {{ value|floatformat:2 }} +
+ {% endif %} + {% empty %} +
Vazio
+ {% endfor %} + +
+ Total Banco + R$ {{ Sum_payment_method_service.sum_of_bank|floatformat:2 }} +
+
+
diff --git a/Base/templates/Dashboards/Dashboard/index.html b/Base/templates/Dashboards/Dashboard/index.html new file mode 100644 index 0000000..541a21d --- /dev/null +++ b/Base/templates/Dashboards/Dashboard/index.html @@ -0,0 +1,24 @@ +{% extends "BaseLogin.html" %} +{% block title %} Dashboard {% endblock %} +{% block content %} + +
+
+ {% include 'Dashboards/Dashboard/Sum_of_professional_detail.html' %} +
+
+ {% include 'Dashboards/Dashboard/Sum_payment_method_service.html' %} + {% include 'Dashboards/Dashboard/Sum_of_product.html' %} +
+
+{#
#} +{#
#} +{#
{% include 'Dashboards/Dashboard/Professional.html' %}
#} + +{#
{% include 'Dashboards/Dashboard/Service.html' %}
#} +{#
#} +{#
#} +{#
#} + + +{% endblock %} diff --git a/Base/templates/Dashboards/DashboardAdmin/Stone.html b/Base/templates/Dashboards/DashboardAdmin/Stone.html new file mode 100644 index 0000000..697da98 --- /dev/null +++ b/Base/templates/Dashboards/DashboardAdmin/Stone.html @@ -0,0 +1,51 @@ +
+
+
+
+
+

Relatório de Métricas de Estoque

+ Total de Itens: {{ Stone.Stone|length }} +
+
+
+ + + + + + + + + + + + {% for item in Stone.Stone %} + + + + + + + + {% empty %} + + + + {% endfor %} + +
ProdutoQ. EstoqueCusto Bruto Valor Adquirido Preço Unit. Compra
{{ item.produto }} + + {{ item.quantidade_estoque }} + + R$ {{ item.valor_total_estoque_bruto|floatformat:2 }}R$ {{ item.valor_total_estoque_liquido|floatformat:2 }}R$ {{ item.valor_unitario_compra_medio|floatformat:2 }}
Nenhum registro encontrado.
+
+
+{# #} +
+
+
+
+ +{#{{Stone.}}#} \ No newline at end of file diff --git a/Base/templates/Dashboards/DashboardAdmin/index.html b/Base/templates/Dashboards/DashboardAdmin/index.html new file mode 100644 index 0000000..700109a --- /dev/null +++ b/Base/templates/Dashboards/DashboardAdmin/index.html @@ -0,0 +1,22 @@ +{% extends "BaseLogin.html" %} +{% block title %} Dashboard Admin {% endblock %} +{% block content %} + +
+
{% include 'Dashboards/DashboardAdmin/total_banck.html' %}
+
{% include 'Dashboards/DashboardAdmin/total_expense.html' %}
+
{% include 'Dashboards/DashboardAdmin/total_firm.html' %}
+{#
{% include 'Dashboards/DashboardAdmin/total_prof_month.html' %}
#} +{#
{% include 'Dashboards/DashboardAdmin/total_expense_prof.html' %}
#} +{#
{% include 'Dashboards/DashboardAdmin/total_credit_prof.html' %}
#} +
{% include 'Dashboards/DashboardAdmin/list-group.html' %}
+
+
+
+
{% include 'Dashboards/DashboardAdmin/Stone.html' %}
+
+
+ + + +{% endblock %} diff --git a/Base/templates/Dashboards/DashboardAdmin/list-group.html b/Base/templates/Dashboards/DashboardAdmin/list-group.html new file mode 100644 index 0000000..c6d7880 --- /dev/null +++ b/Base/templates/Dashboards/DashboardAdmin/list-group.html @@ -0,0 +1,11 @@ +
\ No newline at end of file diff --git a/Base/templates/Dashboards/DashboardAdmin/total_banck.html b/Base/templates/Dashboards/DashboardAdmin/total_banck.html new file mode 100644 index 0000000..e2fe81b --- /dev/null +++ b/Base/templates/Dashboards/DashboardAdmin/total_banck.html @@ -0,0 +1,38 @@ +
+
+

Resumo por Banco

+
+ +
+ + + + + + + + + {% for name, value in total_bank.sum_total.items %} + + + + + {% empty %} + + + + {% endfor %} + + {% if total_bank.sum_total %} + + + + + + + {% endif %} +
BancoTotal
{{ name }}R$ {{ value|floatformat:2 }}
+ Nenhum dado encontrado. +
Total GeralR$ {{ total_bank.sum_all|floatformat:2 }}
+
+
\ No newline at end of file diff --git a/Base/templates/Dashboards/DashboardAdmin/total_credit_prof.html b/Base/templates/Dashboards/DashboardAdmin/total_credit_prof.html new file mode 100644 index 0000000..1560e39 --- /dev/null +++ b/Base/templates/Dashboards/DashboardAdmin/total_credit_prof.html @@ -0,0 +1,23 @@ +

Credito do Prof.

+ + + + + + + + + {% for name, value in total_credit_prof.sum_total.items %} + + + + + {% empty %} + + + + {% endfor %} + +
BancoTotal
{{ name }}R$ {{ value|floatformat:2 }}
Vazio.
+Todos os bancos R$ {{ total_credit_prof.sum_all |floatformat:2 }} + diff --git a/Base/templates/Dashboards/DashboardAdmin/total_expense.html b/Base/templates/Dashboards/DashboardAdmin/total_expense.html new file mode 100644 index 0000000..80fd9cf --- /dev/null +++ b/Base/templates/Dashboards/DashboardAdmin/total_expense.html @@ -0,0 +1,48 @@ +
+

Relatório de Despesas

+ +
+ + + + + + + + + + {% for bank_name, info in total_expense.grouped_data.items %} + + + + + {% for item in info.registros %} + + + + + + {% endfor %} + + + + + + {% empty %} + + + + {% endfor %} + + + + + + + +
DataDescriçãoValor
+ {{ bank_name|upper }} +
{{ item.date|date:"d/m/Y" }}{{ item.chart_of_account }}R$ {{ item.gross_value|floatformat:2 }}
Subtotal {{ bank_name }}:R$ {{ info.total_banco|floatformat:2 }}
Sem lançamentos para este mês.
TOTAL GERAL DOS BANCOSR$ {{ total_expense.total_geral|floatformat:2 }}
+
+
+ diff --git a/Base/templates/Login/DashboardAdmin/total_banck.html b/Base/templates/Dashboards/DashboardAdmin/total_expense_prof.html similarity index 73% rename from Base/templates/Login/DashboardAdmin/total_banck.html rename to Base/templates/Dashboards/DashboardAdmin/total_expense_prof.html index dea01ab..2ae9333 100644 --- a/Base/templates/Login/DashboardAdmin/total_banck.html +++ b/Base/templates/Dashboards/DashboardAdmin/total_expense_prof.html @@ -1,4 +1,4 @@ -

Bancos

+

Despesas Prof

@@ -7,7 +7,7 @@ - {% for name, value in total_bank.items %} + {% for name, value in total_expense_prof.sum_total.items %} @@ -18,4 +18,5 @@ {% endfor %} -
{{ name }} R$ {{ value|floatformat:2 }}
\ No newline at end of file + +Todos os bancos R$ {{ total_expense_prof.sum_all |floatformat:2 }} \ No newline at end of file diff --git a/Base/templates/Dashboards/DashboardAdmin/total_firm.html b/Base/templates/Dashboards/DashboardAdmin/total_firm.html new file mode 100644 index 0000000..ba7187e --- /dev/null +++ b/Base/templates/Dashboards/DashboardAdmin/total_firm.html @@ -0,0 +1,56 @@ +
+
+

+ Resumo de Atendimentos +

+ Mês Atual +
+ +
+ + + + + + + + + + + {% for item in total_firm.services %} + + + + + + + {% empty %} + + + + {% endfor %} + + + {% if total_firm.services %} + + + + + + + {% endif %} +
ProfissionalServiçoQtd. RealizadaLucro Líquido
+ {{ item.professional__name }} + + {{ item.service__name }} + + {{ item.quantidade_feitas }} + + R$ {{ item.lucro_liquido|floatformat:2 }} +
+

Nenhum atendimento registrado até o momento.

+
Total Geral da Firma: + R$ {{ total_firm.total|floatformat:2 }} +
+
+
\ No newline at end of file diff --git a/Base/templates/Login/DashboardAdmin/total_prof_month.html b/Base/templates/Dashboards/DashboardAdmin/total_prof_month.html similarity index 79% rename from Base/templates/Login/DashboardAdmin/total_prof_month.html rename to Base/templates/Dashboards/DashboardAdmin/total_prof_month.html index 9e0eeb9..93ddfb3 100644 --- a/Base/templates/Login/DashboardAdmin/total_prof_month.html +++ b/Base/templates/Dashboards/DashboardAdmin/total_prof_month.html @@ -7,7 +7,7 @@ - {% for name, value in total_prof.items %} + {% for name, value in total_prof.sum_total.items %} {{ name }} R$ {{ value|floatformat:2 }} @@ -18,4 +18,5 @@ {% endfor %} - \ No newline at end of file + +Todos os Prof. R$ {{ total_prof.sum_all |floatformat:2 }} \ No newline at end of file diff --git a/Base/templates/Dashboards/DashboardProf/List_prof.html b/Base/templates/Dashboards/DashboardProf/List_prof.html new file mode 100644 index 0000000..3d1d846 --- /dev/null +++ b/Base/templates/Dashboards/DashboardProf/List_prof.html @@ -0,0 +1,27 @@ +
+
+ + {% for Prof in Professionals %} + + + + + + {% endfor %} + +
+
+ +
+
+
\ No newline at end of file diff --git a/Base/templates/Dashboards/DashboardProf/Relatório de Entradas.html b/Base/templates/Dashboards/DashboardProf/Relatório de Entradas.html new file mode 100644 index 0000000..73a88da --- /dev/null +++ b/Base/templates/Dashboards/DashboardProf/Relatório de Entradas.html @@ -0,0 +1,61 @@ +
+
+
+

Relatório de Entradas

+
+
+ + + + + + + + + {% for nome_servico, dados in Credit.sum_credit.items %} + {# Verifica se a soma do serviço é maior que zero #} + {% if dados.sum_credit > 0 %} + + + + + + {% for detalhe in dados.list_credit %} + {# Verifica se o valor individual é maior que zero #} + {% if detalhe.gross_value > 0 %} + + + + + {% endif %} + {% endfor %} + {% endif %} + + {% empty %} + + + + {% endfor %} + +
Descrição / DataValor (R$)
+
{{ nome_servico }}
+
+ + R$ {{ dados.sum_credit|floatformat:2 }} + +
+ {{ detalhe.date|date:"d/m/Y" }} + + {{ detalhe.gross_value|floatformat:2 }} +
+ Nenhum serviço realizado neste mês. +
+
+ +
+
\ No newline at end of file diff --git a/Base/templates/Dashboards/DashboardProf/Relatório de Saídas.html b/Base/templates/Dashboards/DashboardProf/Relatório de Saídas.html new file mode 100644 index 0000000..59c8c4a --- /dev/null +++ b/Base/templates/Dashboards/DashboardProf/Relatório de Saídas.html @@ -0,0 +1,61 @@ +
+
+
+

Relatório de Saídas

+
+
+ + + + + + + + + {% for nome_servico, dados in Expense.sum_expense.items %} + {# Verifica se a soma do serviço é maior que zero #} + {% if dados.sum_expense > 0 %} + + + + + + {% for detalhe in dados.list_expense %} + {# Verifica se o valor individual é maior que zero #} + {% if detalhe.gross_value > 0 %} + + + + + {% endif %} + {% endfor %} + {% endif %} + + {% empty %} + + + + {% endfor %} + +
Descrição / DataValor (R$)
+
{{ nome_servico }}
+
+ + R$ {{ dados.sum_expense|floatformat:2 }} + +
+ {{ detalhe.date|date:"d/m/Y" }} + + {{ detalhe.gross_value|floatformat:2 }} +
+ Nenhum serviço realizado neste mês. +
+
+ +
+
\ No newline at end of file diff --git a/Base/templates/Dashboards/DashboardProf/Resumo do Mês.html b/Base/templates/Dashboards/DashboardProf/Resumo do Mês.html new file mode 100644 index 0000000..af1d7f3 --- /dev/null +++ b/Base/templates/Dashboards/DashboardProf/Resumo do Mês.html @@ -0,0 +1,38 @@ +
+
+
+

Serviços Realizados

+
+
+
+ + + + + + + + + {% for item in Total_serv.services %} + + + + + {% empty %} + + + + {% endfor %} + +
ServiçoQuantidade
{{ item.service__name }} + + {{ item.total_performed }} + +
+ + Nenhum serviço realizado neste mês. +
+
+
+
+
\ No newline at end of file diff --git a/Base/templates/Dashboards/DashboardProf/index.html b/Base/templates/Dashboards/DashboardProf/index.html new file mode 100644 index 0000000..dc6fb3b --- /dev/null +++ b/Base/templates/Dashboards/DashboardProf/index.html @@ -0,0 +1,24 @@ +{% extends "BaseLogin.html" %} +{% block title %} Dashboard Prof {% endblock %} +{% block content %} + +
+ {% include 'Dashboards/DashboardProf/List_prof.html' %} +
+ +
+

Resumo do Mês

+

+ Total Ganho a Receber: R$ + + {{ Money|floatformat:2 }} + +

+
+ +
+ {% include 'Dashboards/DashboardProf/Resumo do Mês.html' %} + {% include 'Dashboards/DashboardProf/Relatório de Saídas.html' %} + {% include 'Dashboards/DashboardProf/Relatório de Entradas.html' %} +
+{% endblock %} \ No newline at end of file diff --git a/Base/templates/Login/Dashboard/Stone.html b/Base/templates/Login/Dashboard/Stone.html deleted file mode 100644 index c867012..0000000 --- a/Base/templates/Login/Dashboard/Stone.html +++ /dev/null @@ -1,23 +0,0 @@ -

Estoque

-
- - - - - - - - - {% for Prod, sum in Stone.Stone.items %} - {% if sum != 0 %} - - - - - {% endif %} - {% empty %} {% endfor %} - -
ProdutosTotal
{{ Prod }}{{ sum|floatformat:0 }}
Vazio.
-
- -
\ No newline at end of file diff --git a/Base/templates/Login/Dashboard/Sum_of_product.html b/Base/templates/Login/Dashboard/Sum_of_product.html deleted file mode 100644 index 8cf8654..0000000 --- a/Base/templates/Login/Dashboard/Sum_of_product.html +++ /dev/null @@ -1,22 +0,0 @@ -

Produtos

- - - - - - - - - - {% for name, value in Sum_of_product.product_report.items %} - {% if value.product_item != 0 %} - - - - - - {% endif %} - {% empty %} {% endfor %} - -
ProdutoTotalQuant.
{{ name }}R$ {{ value.product_item|floatformat:2 }}{{ value.product_cont }}
Vazio.
-

Total da Venda : R$: {{ Sum_of_product.sum_of_product|floatformat:2 }}

\ No newline at end of file diff --git a/Base/templates/Login/Dashboard/Sum_of_professional_detail.html b/Base/templates/Login/Dashboard/Sum_of_professional_detail.html deleted file mode 100644 index f9a1d5a..0000000 --- a/Base/templates/Login/Dashboard/Sum_of_professional_detail.html +++ /dev/null @@ -1,27 +0,0 @@ -

Relatório de Profissionais

- - - - - - - - - - - {% for professional, services in Sum_of_professional_detail.professionals_report.items %} - {% for service, value in services.items %} - {% if value.servSum != 0 %} - - - - - - - {% endif %} - {% endfor %} - {% endfor %} - -
ProfissionalServiçoValor BrutoQuant.
{{ professional }}{{ service }}R$ {{ value.servSum|floatformat:2 }}{{ value.servCont }}
-

Total de Hoje : R$: {{ Sum_of_professional_detail.sum_of_prof|floatformat:2 }}

-
\ No newline at end of file diff --git a/Base/templates/Login/Dashboard/Sum_payment_method_service.html b/Base/templates/Login/Dashboard/Sum_payment_method_service.html deleted file mode 100644 index afd3322..0000000 --- a/Base/templates/Login/Dashboard/Sum_payment_method_service.html +++ /dev/null @@ -1,20 +0,0 @@ -

Pagamentos

- - - - - - - - - {% for name, value in Sum_payment_method_service.bank_balance.items %} - {% if value != 0 %} - - - - - {% endif %} - {% empty %} {% endfor %} - -
BancoTotal
{{ name }}R$ {{ value|floatformat:2 }}
Vazio
-

Total : R$: {{ Sum_payment_method_service.sum_of_bank|floatformat:2 }}

diff --git a/Base/templates/Login/Dashboard/index.html b/Base/templates/Login/Dashboard/index.html deleted file mode 100644 index a4429cf..0000000 --- a/Base/templates/Login/Dashboard/index.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "BaseLogin.html" %} -{% block title %} Dashboard {% endblock %} -{% block content %} - -
-
{% include 'Login/Dashboard/Sum_of_professional_detail.html' %}
-
-
{% include 'Login/Dashboard/Stone.html' %}
-
-
-
-
-
{% include 'Login/Dashboard/Sum_payment_method_service.html' %}
-
-
-
{% include 'Login/Dashboard/Professional.html' %}
-
-
-
{% include 'Login/Dashboard/Sum_of_product.html' %}
-
-
-
{% include 'Login/Dashboard/Service.html' %}
-
-
-
- - -{% endblock %} diff --git a/Base/templates/Login/DashboardAdmin/index.html b/Base/templates/Login/DashboardAdmin/index.html deleted file mode 100644 index 8505e14..0000000 --- a/Base/templates/Login/DashboardAdmin/index.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "BaseLogin.html" %} -{% block title %} Dashboard Admin {% endblock %} -{% block content %} - - -
-
-
{% include 'Login/DashboardAdmin/total_banck.html' %}
-
{% include 'Login/DashboardAdmin/total_prof_month.html' %}
-{#
#} -{#
#} -
-{% endblock %} diff --git a/Base/views/__pycache__/views.cpython-312.pyc b/Base/views/__pycache__/views.cpython-312.pyc index e2808d277f7d075dee3fb85a1594a0cf9dd5e137..f9e5e3325a42ab8263068d6b26d51e64ebd79ba8 100644 GIT binary patch literal 5225 zcmb_gU2GHC6`t|G7+rl&TNyBkz4-+W%3xv+g_3HWAb*8 zcf2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`RJ4b5iY!{DE9XATCw{5+9fu85uvbF)%9LWl*@! Zpz(!GnUQS**L4AvivlWN8GszH82}c(gW>=H delta 475 zcmZpdST4?cnwOW00SJz~X3Z3t$h(Y762t?7&qf>fZeyH$lu3zEa`FKt^~uwj!X_6p zNifT>iSA4%4<|sGsE?%;?kGGh@=y2sT#Va=>jS0DSRn{=}ei7YcybnrZYx~S88f% zO_pPQ!zePDo6UG~B%2MtCetm}q@2XO>{~2(r8zm1r?M$As!iU(7Qw9nbWD*Zh|roW z&F;=9F*%w2$YdjqASqX8tC-N@)S}{;@YJ%@qLTc)7?;%I?2`O~$xAt`8B-@e1YLFpMWE37Zbn15hq66O1%DbC6Dfmu?BtN)0QpaD>Hq)$ diff --git a/Client/migrations/__pycache__/0002_client_late_client_responsable_and_more.cpython-312.pyc b/Client/migrations/__pycache__/0002_client_late_client_responsable_and_more.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e7dae55467e041b4d6c7cb03a5ce752110448c26 GIT binary patch literal 1538 zcmcIk&2QX96d!-AW4oJlV+sqDCMrqVT0&N!oDhnXrkmxX-Lz2x>S|SYvNOAQ@!DbR zMcQ%!sRxd|ap%;MNbo1Xi31lbA$c{2a^S>?l@cyJ@y1>^t5Udi4sYJPdH%hR-y8oj zJ8L3X#&-?xF9o4L#GzQFiE^|F$~TB0BKfE(!7lr9Uui0RwW&%-Ms-A#dx)r1>1AjI zK)xRUu2{{|P_j#Z3bkR&-0XW@hGQ=bBChpALj9;M?uu2OC`aE)B09|?H)SFbxhppn z8Bz6F(TGA+xYK%b1<=V(N{8A3pow)jQ{?qONP31;$-kJE#2^MWdS|9>x!x=Cp1SJ2 zGuWe}Y*Yc5u5L4uaU-XJH5Yv<=^*LCnkG`KIdyUhH9?Ywg^s z`Z%VWw!~)$?cjkQ+X@Vh7#26ceah8LmO38w2|vYXv=8Hi_k6m;=X2og6WiU{+~nlo zc8Qnvd>niVCK+jEcY{4yh~U|&=tPK55$fY6}r(TIuX!}WDSHbs?8 z702?GF!U)7G7~p9Lq@%B@F5*?jr4HP4Y^GAxSo{*DRcAcmfP6cdGGy3otx`|j>(td zKAk+mhv*29(PMw(oz`wdS=9QNeole0pmjBD5Bfk-)Vf})ueUZprR)ZcT6r56#4NP5F*|jL-{Mege55LZ3_Yb6M!cX~@p^-a{{S z))Hqeb?S*zPo3?=+5Qy|0O|{=kwI-upsE#1`|1OBsVLai_$xVA4%u_^AD~kZ#?FHq zH=f*QLy%FQckH4-$)IfEsK1*}(i(dMj^Ym&ErJ*;k|Z5zNIL&Jx^%2nCGEbMR+f{> K^4|y!8Nfe#X?r{X literal 0 HcmV?d00001 diff --git a/Client/migrations/__pycache__/__init__.cpython-312.pyc b/Client/migrations/__pycache__/__init__.cpython-312.pyc index a1a4d9bd5118edb1581bc0c6a6be79e8d34d5ba2..0183a9a98f5e6193ddbc6644a4a7c4a1527b3857 100644 GIT binary patch delta 43 ycmZ3)xRP;#ouY@cRZM7cYEf}acxqW{QAvJYj7xrUX>Mv>NpXy?tGnaG2rmFtgb&>S delta 36 rcmZ3 -

Cadastrar

-
+
+

Cadastrar Cliente

+
-
- {% csrf_token %} - {{ form.as_p }} - -
- Cancelar e Voltar +
+ {% csrf_token %} + +
+ + {{ form.first_name }} +
+ +
+ + {{ form.last_name }} +
+ +
+
+ + {{ form.phone }} +
+ +
+ + {{ form.double_workload }} +
+
+ +
+ + {{ form.professional }} +
+ +
+ + +
+ +
- - {% endblock %} diff --git a/Client/templates/Client/Detail.html b/Client/templates/Client/Detail.html deleted file mode 100644 index 111a70f..0000000 --- a/Client/templates/Client/Detail.html +++ /dev/null @@ -1,45 +0,0 @@ -{% extends "BaseLogin.html" %} -{% block title %} Bank Accounts List {% endblock %} -{% block content %} -
-

Detalhes do Banco

-
-
-

{{ object.first_name }} {{ object.last_name }}


-

Tel.: {{ object.phone }}

-

Prof. de Preferencia : {{ object.professional }}

-

Tempo Duplo : {{ object.double_workload }}

-

Nota: {{ object.notes }}

-
- -

Ultimas visitas

-
- - - - - - - - - - {% for client in clients %} - - - - - - {% empty %} - - - - {% endfor %} - -
Dia HorarioProfissinal
{{ client.date|date:"d/m/Y" }}{{ client.time }} {{ client.professional }}
Nada
-
- Editar -
-
- Cancelar e Voltar -
-{% endblock %} \ No newline at end of file diff --git a/Client/templates/Client/Detail/Detail.html b/Client/templates/Client/Detail/Detail.html new file mode 100644 index 0000000..4fc2808 --- /dev/null +++ b/Client/templates/Client/Detail/Detail.html @@ -0,0 +1,26 @@ +{% extends "BaseLogin.html" %} +{% block title %} Cliente {% endblock %} +{% block content %} + +
+{#

Detalhes do Cliente

#} +
+
+
+ {% include 'Client/Detail/Detail_p1.html' %} +
+ {% include 'Client/Detail/Detail_p2.html' %} + {% include 'Client/Detail/Detail_p3.html' %} +
+
+
+ {% include 'Client/Detail/Detail_btn.html' %} +
+
+
+ + + + +{% endblock %} + diff --git a/Client/templates/Client/Detail/Detail_btn.html b/Client/templates/Client/Detail/Detail_btn.html new file mode 100644 index 0000000..c1b4b40 --- /dev/null +++ b/Client/templates/Client/Detail/Detail_btn.html @@ -0,0 +1,32 @@ +
+ +
+ + +
+ +
+ + +
+ + {% if perms.brands.change_brands %} + + Editar Infirmações + + {% endif %} + + {% if perms.brands.change_brands %} + + Editar Responsavel + + {% endif %} + + + + +
+ + diff --git a/Client/templates/Client/Detail/Detail_p1.html b/Client/templates/Client/Detail/Detail_p1.html new file mode 100644 index 0000000..6028bcc --- /dev/null +++ b/Client/templates/Client/Detail/Detail_p1.html @@ -0,0 +1,21 @@ +{% load phone_filters %} +
+

{{ object.first_name }} {{ object.last_name }}

+
+

Tel.: {{ object.phone|format_phone_true }}

+

Prof. de Preferência: {{ object.professional }}

+ {% if object.responsable %} +

+ + Responsável: + + {{ object.responsable }} + +

+ {% endif %} +

Última visita: {{ object.last_visit|date:"d/m/Y" }}

+

Nota: {{ object.notes|default:"Nenhuma nota adicionada." }}

+
+ + diff --git a/Client/templates/Client/Detail/Detail_p2.html b/Client/templates/Client/Detail/Detail_p2.html new file mode 100644 index 0000000..b04f9a1 --- /dev/null +++ b/Client/templates/Client/Detail/Detail_p2.html @@ -0,0 +1,46 @@ + +
Detalhes
+

+

+ {% csrf_token %} + + Tempo Duplo +
+

+ +

+

+ {% csrf_token %} + + Costuma Atrasar +
+

+ +

+

+ {% csrf_token %} + + FeedBack no Google +
+

+ + + diff --git a/Client/templates/Client/Detail/Detail_p3.html b/Client/templates/Client/Detail/Detail_p3.html new file mode 100644 index 0000000..b49c3df --- /dev/null +++ b/Client/templates/Client/Detail/Detail_p3.html @@ -0,0 +1,43 @@ +
Lembrete de volta
+ +
+
+ {% csrf_token %} + + 3 meses +
+ +
+ {% csrf_token %} + + 6 meses +
+ +
+ {% csrf_token %} + + 1 Ano +
+
+ + + + diff --git a/Client/templates/Client/List.html b/Client/templates/Client/List.html index d5c1e9b..1d54768 100644 --- a/Client/templates/Client/List.html +++ b/Client/templates/Client/List.html @@ -1,5 +1,6 @@ {% extends "BaseLogin.html" %} {% block title %} List {% endblock %} +{% load phone_filters %} {% block content %}

Clientes


@@ -29,83 +30,46 @@
-{#
#} -{#
#} -{#
#} -{# #} -{# #} -{#
#} -{#
#} -{#
#} -{# {% if perms.brands.add_brands %}#} -{# {% endif %}#}
- - - - + + + + - - - - - + + {% for Client in Clients %} + - - - - + + + - - - - + {% endfor %} diff --git a/Client/templates/Client/Update.html b/Client/templates/Client/Update.html index 9f4f270..dce4625 100644 --- a/Client/templates/Client/Update.html +++ b/Client/templates/Client/Update.html @@ -2,15 +2,62 @@ {% block title %} Bank Accounts List {% endblock %} {% block content %}
-

Editar Bancos

+

Editar Clientes

- {% csrf_token %} - {{ form.as_p }} - - - Cancelar e Voltar + {% csrf_token %} + +
+
+ + + {% if form.first_name.errors %}
{{ form.first_name.errors }}
{% endif %} +
+ +
+ + +
+
+ +
+
+ + +
+ +
+ + +
+
+
+
+ + +
+
+
+
+ + +
+ +
+ + +
+
diff --git a/Client/templates/Client/Update_responsable.html b/Client/templates/Client/Update_responsable.html new file mode 100644 index 0000000..0ed58f8 --- /dev/null +++ b/Client/templates/Client/Update_responsable.html @@ -0,0 +1,72 @@ +{% extends "BaseLogin.html" %} +{% load phone_filters %} + +{% block title %} Editar Cliente {% endblock %} + +{% block content %} +
+

Editar Responsável

+ +
+
+ +
+ +
+ + +
+ + +
+ +
+ {% csrf_token %} + + + + + + +
+
+ + +
+ {% for client in Clients %} + + {% empty %} +
Nenhum cliente encontrado.
+ {% endfor %} +
+
+
+ +
+ + +
+ + +
+
+
+{% endblock %} \ No newline at end of file diff --git a/Client/templatetags/__init__.py b/Client/templatetags/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Client/templatetags/__pycache__/__init__.cpython-312.pyc b/Client/templatetags/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..90104b45c26ed241ea20789ad23fbc55df4b0b29 GIT binary patch literal 164 zcmX@j%ge<81UV}|Wq|0%AOanHW&w&!XQ*V*Wb|9fP{ah}eFmxdB&HX~#K&jmWtPOp k>lIYq;;_lhPbtkwwJTx;n#l;n#UREV!Z literal 0 HcmV?d00001 diff --git a/Client/templatetags/__pycache__/phone_filters.cpython-312.pyc b/Client/templatetags/__pycache__/phone_filters.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6fbb1f32db74de9da6dba79f45a61d17967893cc GIT binary patch literal 1612 zcmd5+L1+_M7=CXilbIwFW88MTwn*o&LL;_V+`?)_XlvVxRx^E_h zb}LjAHsZk?1naJ1#7jy&M z>s^G1a1(8Dq;GJ<22OA`kdP|8Py&03OEc4^?$SxzP?{ej!f*2fxO-?GId~QmoNnaQ z=q~5^=5Ad+9jwQ;|6Qq$=h1Sl&T{Q>)YsRL8`{Yt!qpChSQ8QF5eX2f75#-s5U{i# z$beEhdUT=slwf7A)(Dlhrl{3GOR}`To!Y3LaWC3 zGg^|oK-xAeFF0kGE@htRxXhCchZrft^+c0eOW2cUbTdmG{?N3~X9tcaFF2Gr$%}M` zGS{|}r{H!OxQdfJGdSFr8~{k!IqD<_OapMT{)$~a8qCUsb_ou z8CR-@J4YB-HB-5Za`ywcst#E*Krh~?opG0CDQksz3#a`FZd*WW>YneD&+1P36yt@~ zf(nYDrM^;s(I|o{j+K>TZyE&jAJW!hO*xhEJB}n|FG$k5m9iQCjCt~DV}j{y)>9Zw z84ipQi$UC<3cs@@/Detail', viewsClient.ClientDetailView.as_view(), name='ClientDetailView'), - path('//Update', viewsClient.ClientUpdateView.as_view(), name='ClientUpdateView'), - path('//Delete', viewsClient.ClientDeleteView.as_view(), name='ClientDeleteView'), + path('', viewsClient.ClientListView.as_view(), name='ClientListView'), + path('Create', viewsClient.ClientCreateView.as_view(), name='ClientCreateView'), + path('/Detail', viewsClient.ClientDetailView.as_view(), name='ClientDetailView'), + path('/Update', viewsClient.ClientUpdateView.as_view(), name='ClientUpdateView'), + path('/UpdateResp', viewsClient.ClientUpdateResponsableView.as_view(), name='ClientUpdateResponsableView'), + path('/Delete', viewsClient.ClientDeleteView.as_view(), name='ClientDeleteView'), ] \ No newline at end of file diff --git a/Client/viewsClient.py b/Client/viewsClient.py index 1454967..fedda74 100644 --- a/Client/viewsClient.py +++ b/Client/viewsClient.py @@ -4,6 +4,10 @@ from Client import models, FormsClient from Movement.models import Calendar from django.urls import reverse_lazy # from django.core import serializers +from django.shortcuts import redirect +from django.contrib import messages +# importate para função ou no filtro +from django.db.models import Q class ClientListView(LoginRequiredMixin, PermissionRequiredMixin, ListView): model = models.Client @@ -26,7 +30,6 @@ class ClientListView(LoginRequiredMixin, PermissionRequiredMixin, ListView): queryset = queryset.none() return queryset - class ClientCreateView(LoginRequiredMixin, PermissionRequiredMixin, CreateView): model = models.Client template_name = 'Client/Create.html' @@ -34,18 +37,33 @@ class ClientCreateView(LoginRequiredMixin, PermissionRequiredMixin, CreateView): success_url = reverse_lazy('ClientListView') permission_required = 'Client.add_client' - class ClientDetailView(LoginRequiredMixin, PermissionRequiredMixin, DetailView): model = models.Client - template_name = 'Client/Detail.html' + template_name = 'Client/Detail/Detail.html' permission_required = 'Client.view_client' + def post(self, request, *args, **kwargs): + self.object = self.get_object() - def get_context_data(self, **kwargs): - context = super().get_context_data(**kwargs) - context['clients'] = Calendar.objects.filter( - client__id=self.object.id - ).order_by('-id').distinct()[:3] - return context + if request.POST.get('double_workload') == 'double_workload': + self.object.double_workload = not self.object.double_workload + + if request.POST.get('late') == 'late': + self.object.late = not self.object.late + + if request.POST.get('feed_back') == 'feed_back': + self.object.feed_back = not self.object.feed_back + + if request.POST.get('msg_3_months') == 'msg_3_months': + self.object.msg_3_months = not self.object.msg_3_months + + if request.POST.get('msg_6_months') == 'msg_6_months': + self.object.msg_6_months = not self.object.msg_6_months + + if request.POST.get('msg_12_months') == 'msg_12_months': + self.object.msg_12_months = not self.object.msg_12_months + + self.object.save() + return redirect('ClientDetailView', pk=self.object.id) class ClientUpdateView(LoginRequiredMixin, PermissionRequiredMixin, UpdateView): model = models.Client @@ -54,6 +72,42 @@ class ClientUpdateView(LoginRequiredMixin, PermissionRequiredMixin, UpdateView): success_url = reverse_lazy('ClientListView') permission_required = 'Client.change_client' +class ClientUpdateResponsableView(LoginRequiredMixin, PermissionRequiredMixin, UpdateView): + model = models.Client + template_name = 'Client/Update_responsable.html' + form_class = FormsClient.FormsClient + permission_required = 'Client.change_client' + + def get_success_url(self): + return redirect('ClientDetailView', pk=self.object.pk)['Location'] + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + search_term = self.request.GET.get('Client') + + if search_term: + filter_client = models.Client.objects.filter( + Q(first_name__icontains=search_term) | + Q(last_name__icontains=search_term) + ) + else: + filter_client = models.Client.objects.none() + + context['Clients'] = filter_client + return context + + def form_valid(self, form): + print(self.request) + form.instance.created_by = self.request.user + messages.success(self.request, 'Registro realizado com sucesso!') + return super().form_valid(form) + + def form_invalid(self, form): + print(self.request) + errors = form.errors.as_text() + messages.error(self.request, f'Verifique os dados: {errors}') + return super().form_invalid(form) + class ClientDeleteView(LoginRequiredMixin, PermissionRequiredMixin, DeleteView): model = models.Client template_name = 'Client/Delete.html' diff --git a/Movement/Forms/FormsExpense.py b/Movement/Forms/FormsExpenseOrCredit.py similarity index 77% rename from Movement/Forms/FormsExpense.py rename to Movement/Forms/FormsExpenseOrCredit.py index c14045c..1418a5b 100644 --- a/Movement/Forms/FormsExpense.py +++ b/Movement/Forms/FormsExpenseOrCredit.py @@ -2,14 +2,16 @@ from django import forms from Movement import models from django.utils import timezone -class FormsExpense(forms.ModelForm): +class FormsExpenseOrCredit(forms.ModelForm): class Meta: - model = models.Expense + model = models.ExpenseOrCredit fields = [ 'date', 'chart_of_account', 'bank', 'firm', + 'debit', + 'prof', 'professional', 'gross_value', ] @@ -19,7 +21,9 @@ class FormsExpense(forms.ModelForm): }), 'chart_of_account': forms.Select({'class': 'form-select'}), 'bank': forms.Select({'class': 'form-select'}), + 'debit': forms.CheckboxInput({'class': ''}), 'firm': forms.CheckboxInput({'class': ''}), + 'prof': forms.CheckboxInput({'class': ''}), 'professional': forms.Select({'class': 'form-select'}), 'gross_value': forms.NumberInput(attrs={'step': 1}), @@ -29,6 +33,8 @@ class FormsExpense(forms.ModelForm): 'chart_of_account':'Plano de contas', 'bank':'Banco', 'firm':'Firma', + 'debit':'Debito', + 'prof':'Prof.', 'gross_value':'Valor', 'professional':'Profissional', } \ No newline at end of file diff --git a/Movement/Forms/FormsProduct.py b/Movement/Forms/FormsProduct.py index 9132a74..f2d0196 100644 --- a/Movement/Forms/FormsProduct.py +++ b/Movement/Forms/FormsProduct.py @@ -34,6 +34,6 @@ class FormsProduct(forms.ModelForm): 'product':'Produto', 'pay_method':'M. Pagamento', 'professional':'Profissional', - 'quantity':'Quantiddade', + 'quantity':'Quantidade', # 'net_value':'Valor Liquido', } \ No newline at end of file diff --git a/Movement/Forms/FormsTransition.py b/Movement/Forms/FormsTransition.py new file mode 100644 index 0000000..8ac24ae --- /dev/null +++ b/Movement/Forms/FormsTransition.py @@ -0,0 +1,27 @@ +from django import forms +from Movement import models +from django.utils import timezone + +class FormsTransition(forms.ModelForm): + class Meta: + model = models.Transition + fields = [ + 'date', + 'bank_credit', + 'bank_debit', + 'gross_value', + ] + widgets = { + 'date': forms.DateInput(format=('%Y-%m-%d'), attrs={'type': 'date', 'class':'', + 'value':timezone.localtime(timezone.now()).date() + }), + 'bank_credit': forms.Select({'class': 'form-select'}), + 'bank_debit': forms.Select({'class': 'form-select'}), + 'gross_value': forms.NumberInput(attrs={'step': 1}), + } + labels={ + 'date':'Data', + 'bank_credit':'Entrada', + 'bank_debit':'Saida', + 'gross_value':'Valor', + } \ No newline at end of file diff --git a/Movement/Forms/__pycache__/FormsCalendar.cpython-312.pyc b/Movement/Forms/__pycache__/FormsCalendar.cpython-312.pyc index 290a989acd9d9562c1790c8b05d8243aca6a7a16..b6df685d13386c5b52854f6f29227a1ee1b2867a 100644 GIT binary patch delta 46 zcmZ3%^z7Tm;j%n B5pw_l delta 39 ucmdnMw~}webrvaSXRDad;?$zznDErH)S{C7ycn0%;_QD$ diff --git a/Movement/Forms/__pycache__/FormsExpense.cpython-312.pyc b/Movement/Forms/__pycache__/FormsExpense.cpython-312.pyc deleted file mode 100644 index e6995e75d7c5747f73135e079ec657135c239b4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1626 zcmbVM%}*Og6rcUHF*X=uQjAFhRS{i*QKc%Cnlyz#pdT^>wQ8%lmR5sj0Gs`AXVxSj zwI>c#>H$usQlzH6)De-wv429PUO;YzH4>+ua)XezQVvyTc5TH`a%o5Qo8P>7`&ld z$3S~rfKdpAi&Bg4KST|_luP|zT(7=_s{=)f(u2;HG9=yAb8!?!G1P^+Q5^N41o!l8 z^cu;hJ?&YWn8zM8bfzNcVHPi}LgJb3vIz?Xx8itAU4qUUQGteMi3G8&VZpX)!QgzrWGtmDbxHgLuR_DMd&dNdLE%9!J{`j zg)c*~g$w*Z>f!PukugIeeS%EA0X?|cy=Xzl9YT1h;5r`Ul+(~DxJ;Yl(je15gO*EJ zbdgIeHYFOmuZDDT79zTZ#DwV7F`u(ssh z@gHEF3l)0_lVB0LT|_I`qfEEp5^vS};GFY;r_(c6@}E*nX#R7&j)~_w`5Tz7d2TsB zgB=f(MNISa?mD*lD(@#auuatyJ5K*L$ji;mkelr|1vS+RDLKhnd;>&|D)q#0j&z*?Xh4Ylp+{)RR{l$BpU2ZRJ@`^n}skhzPKVE z!70z5%);*mCHEeAi}Q=3r$XwfB1zH-=syAJ6EOTly(mR?E>|aaC;tQ-`hxxi)O3Oy diff --git a/Movement/Forms/__pycache__/FormsExpenseOrCredit.cpython-312.pyc b/Movement/Forms/__pycache__/FormsExpenseOrCredit.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ac534f55481c824b37f853d64c2fe403d16e5fec GIT binary patch literal 1873 zcmb_d%TF6e7@vLmfgKFk5M$aJS^_H`O)Di;lcqdPlGZ%hDy`yLvKG$(>#TR(*)<7B zy>Xy7a)L;alIBuJL@LMr36*-mawS`%a_T8J2#G31J#=Q*mK@;FN*&q1`CjvV^UZwU z>~F!KAJFmY@6WXr34lKt(-@R@#_^YQ+6E9nP6v4|#c_=0bv`eo1cw%MF)yVg4)EYQ zfZ_A?`!`ue76S8$n>XH8Z-&l#g|L|QU&-lBw@HzCp)<+ZguS~m@pZCVY)I&&PS z#5O=6#X*qbov0j*%J1^7MM_u`6p@5ynB&B~0x~Q#kEbw#n*D~ymWIbaxMq(?$a(9U zrYR*Y(=&L&rDPr;PcGD?s*{k10u-s%mkXcPI`Yob^4+>X3a%_A`sDDD1o4k%s%<2}i2E*qV z1R1n4U`2`BC=hX4wbk|31zk1FI7IQRY1k?aKB*d6lSnf(BbCV0EG2VYTA)b%y&gqcQu%`F=;)~ zmPB%zpPq?^bZBArQV<`_0o^nTMH{o%i1>6ftLp4+AcA4ubeak}FN`He^5w=YuJ#A)-d1TmD zdNy%=B0WV(gclHH%~iw{X{U}{Jdwm`VU38aqOgy8m+9Z4uOiq0wNPg@bfFx&uqnOZ zeeM2D`LGj2-rGuS&)=UfefF!ofBV~7bZF;%H9Ay|4waIn8$TzXCU@s5(W}+ycsV*= ziB28~{5aSC67Z3ZLmBjrJeGb6{1_-L?|r{NlBmRIYT-C_n7p5SJW#r}-}`YTe5Do{ z+`3hb43;B6xs>hIcMiW5eax@ZQWX6MI*GkBuEg0v-NM&tVS;ch}yzSnKF!zi@D0}6ABh~tduWzfffiSZ}{$Lb=ZJPlx1Z?R(E0Dtj)lK%yu;2JWUIoiH5 z%&Eq*=~j)maZ_%k1zg=|(bjaUUPrU+L&NUTjq+w>;{C*}+)wdk>Yufr#U7wTf#bLX caQ*adt_5!R9!YZ;SvSSq|y| diff --git a/Movement/Forms/__pycache__/FormsStock.cpython-312.pyc b/Movement/Forms/__pycache__/FormsStock.cpython-312.pyc index 7a55a99fde3467293067e7ac3232e326521bb7a5..e4e87199e611c0ce67d5dc4fbae08b95c1a6b984 100644 GIT binary patch delta 46 zcmdnZbBJey4vV6@vsFxJacWUadt_5!De5UuZ#c~I}V`$ diff --git a/Movement/Forms/__pycache__/FormsTransition.cpython-312.pyc b/Movement/Forms/__pycache__/FormsTransition.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e083a069ede1ae50d28809c27d06354cc389b254 GIT binary patch literal 1427 zcmb7E&2Jk;6rb5od!00HzM%Gk8bN3lIp)+0L~WupEkz_nl+Tr=)xPTsXEw^M#VMEsi@h21oksG^V@B&#rBb$N!WJGS{dY-lZ>z&=5TkJ+o%?MTgVhJ}V=X&kQb(yjF2z{K zITvPp|0Bx$53W2mT==+nMHP_inviq`q(qyM_->LQ5|Z-9bPOjuzV z1z$ULO0XL%1yAHgGV$_c>p59i;l zeHsxO)jlU{gvMb|yB5})J_+KewzzO(t~Sphp&t>x4A+Qo)RK0j_N?IQYKtkNF;qxj z<6ra>H=Cea96u~h>=!4t)Tfd4VY6qmmkjDpJ~6cJH0nGdr+S1 zmfqT#d|0_(Y3sYM?OnQhP@3(QD?67D%a#3dW%v3obGz^TUcP!VsE-(1`tdLrEp?x5-5qX1ky7jdJ&2L(I)s?8dHs@ zfSWW>#4K4krr`z(R>HK6x$Gv>t`DTXYBP4dsMpv<@v9Q|oMw43Gt14SD!M}7;rv31 i(d*nC%MijN@ahpLAAyNy$~ZLclI`$b_!rX8&yOA literal 0 HcmV?d00001 diff --git a/Movement/Urls/__pycache__/urlsCalendar.cpython-312.pyc b/Movement/Urls/__pycache__/urlsCalendar.cpython-312.pyc index 41fb72db865e322dcb1bdfa36199dd09b7c91e12..241dad4359444faaa58faadd6aafec2f1c153dfc 100644 GIT binary patch delta 276 zcmcb`afgHVG%qg~0}!k&;?H#0$a|5Ikzw)!Mma|QNlfaD{F61oWDt`Y(=DFK)l9b( zJ)Es#LW@(2ieti4%TkL<^7CR`@{>z*Q}arSV|-oR9Vh2A8`nz#O=JY(;$=YM12ZEd z<6Q=s?<~xWOdt6eSUEd{I%2Q$YG35lzRqiWk=OV#ujvJwz$+|44_P=aa7xYay)I*O zQO4%FjLStCm&-D47kpE$u%zB3TGA3jE6`583sT0{rF0IQ~xz1;Dkd8t7dl8GsmNTi4ZM$*QGJOl(CJ3u54|cH+cCq=*~N_xzv#{qA|rmcQq6y8w@e>W*Sk0Q?}q zVld(2<}U=`3y^^fRiMEEgk+si6B;$3AV>fNWeQQF^kQT594#1;1TMn0On*yW;4{g% zW$a)^Hi%c}jf_-`k;V*mb$77d$jHPPyO>eflEK6nS)Emik^5=0gHv?)37@iRMC&?*eN5~qn>mo#*i zstXp99OQG6DNu;*tWa+&y3;g|59%G{NQ%1Z3zWF8Z^|)Vpu~M0q@wk61LfAogk?Qd zEX}_cl}6%~@)ow9WgM;ANF3RoS93lik0gC))J`nbw#bL=vzUrBq&qcoqHWPc%*XD@ zPf7NhG0ywNFcV>yQgjbXDQbBsMcw&#Le_dWOL@I|pTRZbSL+~4x4(iL^0xmx5t?G( zMwTtULStk(hAwuHee4*fDBzZm)kC(pXi)6qrbW_ucy7%+_0w(5kWW-}V3jct|3rX& zg{Nx@LU;wrzv%=_{K|r4X0kU?J$Bz^_dT}ZvW*%0c-nd~r+b%ldcuG1dR)Wh8Xnhl zx#o;(PleZWdVq7&%!6~$tF+uo%c}@(MVM6%r`@-6`rUsdaXF99%O2ly`Ig5EE-%b@ XOg)+>hnE|2*Tqae@rkkS;|~7;DNtNn diff --git a/Movement/Urls/__pycache__/urlsExpenseOrCredit.cpython-312.pyc b/Movement/Urls/__pycache__/urlsExpenseOrCredit.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ba9f2020689965c14b87caafc391532dfe1ef890 GIT binary patch literal 1554 zcmb7^Pm9w)7{+JP)c#Gob{B(7lodfJLiM`KvQWCKw77QvxE5Mn;Tb#0g_=Mn-~RBncxkBST;qDZ*Hok&$K?bA)kj zM#kBIQHxZQolJKA3q@q1&o>qO5qU1OHT1;Vc-lm!h03^qk*e7~@E125ZD#hCX4!X% znz~KJKnLkn&9qmVkJqlPBU{mQUm7%^IiXhnut=}nLU|dXWY@5mHGUJ{Y3@e(Hgr6Y$C!d^+ zuxY&pC-f`)UM{T2dltf$TtRJw?S?6@Hy*ZVG?u)%aWgL$NQv+kBEw;3@*c@ireQKm z%QZWGbk%66Egh}lCBi5FI$#}>TR#LL{0O9PJO{bsBnZb2Gmdb{6P8_J*%R`vknaiw zr?lVWYoGY26I*no>z-6{rIIJ@xYABny5rpM^!S4h|LPt}j(F7*i>_Go#BEpH?uxrk v^;wU9POSgaEW2Xa6DzJ*>5BLI04T7?eFY#~;sU^QO@BU~=3XT5MY8LkGZCjU literal 0 HcmV?d00001 diff --git a/Movement/Urls/__pycache__/urlsProduct.cpython-312.pyc b/Movement/Urls/__pycache__/urlsProduct.cpython-312.pyc index d861df4c67a82ed24ad1f53271a5addc5155a550..e5635e6abd4879a4a185d27e03a2ed9870a1cf48 100644 GIT binary patch delta 251 zcmX@hah`+sG%qg~0}!k&;?LCE$a|iVkzw*ZMp;Jw$$uHufTSuDi1cMrWxB;Pxs>UO zqPw$IOlWaxQE^OoYFTPgNq%08OMY@`Zfaghag494yW`|!W+O(a$xDXEuJdYM zbi{6MH#2dGAyUobh9*@#hc@(gDAdf|?o>wH=l`LwR{ z8C~Qvy3A*C!P@@{OTa@GjtiX9Gh(jGT3?j4zAo#0QP%mgtm_4zq$@1RH_4Y|hI+WVrk_jPH>;EU41m!(55#FSiNE&agH!OzslT_g_lD**b8RQvz{ diff --git a/Movement/Urls/__pycache__/urlsStock.cpython-312.pyc b/Movement/Urls/__pycache__/urlsStock.cpython-312.pyc index 907d92726a553121aec0be816eb5802061da5cc6..15efba1741707ff415c8d4ea0985f0f94114535a 100644 GIT binary patch delta 250 zcmZqXXyxEN&CAQh00e7`_%mN^yqZHFEw#l~{r5X7r|6o)Bl5$KS(uHZC zqN}r2OlWaxQE^OoYFTPgNq%08OMY@`Zfaghag494yW?aTW&=ja$-d0;^+Fv{*LhVh z@~U3v)xF58dzn}Nf|!OzslT_g_lEC8P2R15$B delta 248 zcmZqWXy)KO&CAQh00b|WGiQF-$h)4AiBW&@UPdYADt7(JHyNdw1oS6=WmExCQcPgV zo@t+yowHR;XmM&$aZGq>S!z*9eqM}AYH@Z+e!*lpW&=iv$^Ojp^}-!l*ZI^g@~K_t z)4Ry0cbU)Ng1P4v7O$Hu937GqysnGrT@=x~E@F03#O$(&#RdD|D=Z;ExeJ`qGor4` pnqQPPzb!OzslT_gtdDgc_RQ#k+t diff --git a/Movement/Urls/__pycache__/urlsTransition.cpython-312.pyc b/Movement/Urls/__pycache__/urlsTransition.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6156a87c4119529997498e8883df58a4b18b5097 GIT binary patch literal 1089 zcmbVLJ#W)M7{0Te=EHG<5>Ns84`fNkh^lH*B^9Bfd`N_%$WmqSsdeg)=*|ghH@1vy zure^9@;?|@VkMHrNldV?6;&)u+>uxp94P}g_^BcCF)v_biyOUJPM*WMr%E?36C7}xE6Pcy4FKYc;uN!N%Y2Ot%oK&j#ItdS)o$= z!5b@(Dg!e(VYN82(M$3Kn;x+P+xIA-HxB%fAnw~Fc*-=q$1`0-H(D5(0iv7#$mS#$ zo)@=mFW4HK?$p{SFl{HHoRbM+MP-BaHc%_qGZN5 zUpJz1JuKIwaw9A^rsds9$DAq8+1Vs}`|ZO>Z-#m^(mSEvnd8B`UkF$A5j1R literal 0 HcmV?d00001 diff --git a/Movement/Urls/urlsCalendar.py b/Movement/Urls/urlsCalendar.py index f8bf26f..98ff770 100644 --- a/Movement/Urls/urlsCalendar.py +++ b/Movement/Urls/urlsCalendar.py @@ -7,10 +7,10 @@ from Movement.Views import ( urlpatterns = [ # URLs de Professional - path('/', viewsCalendar.CalendarListView.as_view(), name='MovCalendarListView'), + path('', viewsCalendar.CalendarListView.as_view(), name='MovCalendarListView'), # path('/Create', viewsCalendar.CalendarCreateView.as_view(), name='CalendarCreateView'), - path('//Detail', viewsCalendar.CalendarDetailView.as_view(), name='MovCalendarDetailView'), - path('//Update', viewsCalendar.CalendarUpdateView.as_view(), name='MovCalendarUpdateView'), - path('//Delete', viewsCalendar.CalendarDeleteView.as_view(), name='MovCalendarDeleteView'), - path('/CreateCuston', viewsCalendarCreateCustom.CalendarCreateCustomView.as_view(), name='MovCalendarCreateCustom'), + path('/Detail', viewsCalendar.CalendarDetailView.as_view(), name='MovCalendarDetailView'), + path('/Update', viewsCalendar.CalendarUpdateView.as_view(), name='MovCalendarUpdateView'), + path('/Delete', viewsCalendar.CalendarDeleteView.as_view(), name='MovCalendarDeleteView'), + path('CreateCuston', viewsCalendarCreateCustom.CalendarCreateCustomView.as_view(), name='MovCalendarCreateCustom'), ] \ No newline at end of file diff --git a/Movement/Urls/urlsExpense.py b/Movement/Urls/urlsExpense.py deleted file mode 100644 index 0027cfe..0000000 --- a/Movement/Urls/urlsExpense.py +++ /dev/null @@ -1,16 +0,0 @@ -from django.urls import path -# from django.contrib.auth import views as auth_views -from Movement.Views import ( - viewsExpense , -) - -urlpatterns = [ - # URLs de Professional - path('/', viewsExpense.ExpenseListView.as_view(), name='MovExpenseListView'), - path('/Create', viewsExpense.ExpenseCreateView.as_view(), name='MovExpenseCreateView'), - path('//Detail', viewsExpense.ExpenseDetailView.as_view(), name='MovExpenseDetailView'), - path('//Update', viewsExpense.ExpenseUpdateView.as_view(), name='MovExpenseUpdateView'), - path('//Delete', viewsExpense.ExpenseDeleteView.as_view(), name='MovExpenseDeleteView'), - path('/CreateFirm', viewsExpense.ExpenseFirmCreateView.as_view(), name='MovExpenseFirmCreateView'), - path('/CreateProf', viewsExpense.ExpenseProfCreateView.as_view(), name='MovExpenseProfCreateView'), -] \ No newline at end of file diff --git a/Movement/Urls/urlsExpenseOrCredit.py b/Movement/Urls/urlsExpenseOrCredit.py new file mode 100644 index 0000000..53cdda5 --- /dev/null +++ b/Movement/Urls/urlsExpenseOrCredit.py @@ -0,0 +1,17 @@ +from django.urls import path +# from django.contrib.auth import views as auth_views +from Movement.Views import ( + viewsExpenseOrCredit, +) + +urlpatterns = [ + # URLs de Professional + path('', viewsExpenseOrCredit.ExpenseOrCreditListView.as_view(), name='MovExpenseOrCreditListView'), + # path('Create', viewsExpenseOrCredit.ExpenseOrCreditCreateView.as_view(), name='MovExpenseOrCreditCreateView'), + path('/Detail', viewsExpenseOrCredit.ExpenseOrCreditDetailView.as_view(), name='MovExpenseOrCreditDetailView'), + path('/Delete', viewsExpenseOrCredit.ExpenseOrCreditDeleteView.as_view(), name='MovExpenseOrCreditDeleteView'), + path('CreateFirm', viewsExpenseOrCredit.ExpenseOrCreditFirmCreateView.as_view(), name='MovExpenseOrCreditFirmCreateView'), + path('CreateProf', viewsExpenseOrCredit.ExpenseOrCreditProfCreateView.as_view(), name='MovExpenseOrCreditProfCreateView'), + path('ProfCredit', viewsExpenseOrCredit.ExpenseOrCreditProfCreditCreateView.as_view(), name='MovExpenseOrCreditProfCreditCreateView'), + path('FirmCredit', viewsExpenseOrCredit.ExpenseOrCreditFirmCreditCreateView.as_view(), name='MovExpenseOrCreditFirmCreditCreateView'), +] \ No newline at end of file diff --git a/Movement/Urls/urlsProduct.py b/Movement/Urls/urlsProduct.py index fd7274a..f8c4380 100644 --- a/Movement/Urls/urlsProduct.py +++ b/Movement/Urls/urlsProduct.py @@ -7,10 +7,10 @@ from Movement.Views import ( urlpatterns = [ # URLs de Professional - path('/', viewsProduct.ProductListView.as_view(), name='MovProductListView'), - # path('/Create', viewsProduct.ProductCreateView.as_view(), name='MovProductCreateView'), - path('//Detail', viewsProduct.ProductDetailView.as_view(), name='MovProductDetailView'), - path('//Update', viewsProduct.ProductUpdateView.as_view(), name='MovProductUpdateView'), - path('//Delete', viewsProduct.ProductDeleteView.as_view(), name='MovProductDeleteView'), - path('/CreateCuston', viewsProductCreateCustom.ProductCreateCustomView.as_view(), name='MovProductCreateCustom'), + path('', viewsProduct.ProductListView.as_view(), name='MovProductListView'), + # path('Create', viewsProduct.ProductCreateView.as_view(), name='MovProductCreateView'), + path('/Detail', viewsProduct.ProductDetailView.as_view(), name='MovProductDetailView'), + path('/Update', viewsProduct.ProductUpdateView.as_view(), name='MovProductUpdateView'), + path('/Delete', viewsProduct.ProductDeleteView.as_view(), name='MovProductDeleteView'), + path('CreateCuston', viewsProductCreateCustom.ProductCreateCustomView.as_view(), name='MovProductCreateCustom'), ] \ No newline at end of file diff --git a/Movement/Urls/urlsStock.py b/Movement/Urls/urlsStock.py index 34ccb76..74d260d 100644 --- a/Movement/Urls/urlsStock.py +++ b/Movement/Urls/urlsStock.py @@ -6,10 +6,10 @@ from Movement.Views import ( urlpatterns = [ # URLs de Professional - path('/', viewsStock.StockListView.as_view(), name='MovStockListView'), - path('/Create', viewsStock.StockCreateView.as_view(), name='MovStockCreateView'), - path('//Detail', viewsStock.StockDetailView.as_view(), name='MovStockDetailView'), - path('//Update', viewsStock.StockUpdateView.as_view(), name='MovStockUpdateView'), - path('//Delete', viewsStock.StockDeleteView.as_view(), name='MovStockDeleteView'), - # path('/CreateCuston', viewsStockCreateCustom.StockCreateCustomView.as_view(), name='MovStockCreateCustom'), + path('', viewsStock.StockListView.as_view(), name='MovStockListView'), + path('Create', viewsStock.StockCreateView.as_view(), name='MovStockCreateView'), + path('/Detail', viewsStock.StockDetailView.as_view(), name='MovStockDetailView'), + path('/Update', viewsStock.StockUpdateView.as_view(), name='MovStockUpdateView'), + path('/Delete', viewsStock.StockDeleteView.as_view(), name='MovStockDeleteView'), + # path('CreateCuston', viewsStockCreateCustom.StockCreateCustomView.as_view(), name='MovStockCreateCustom'), ] \ No newline at end of file diff --git a/Movement/Urls/urlsTransition.py b/Movement/Urls/urlsTransition.py new file mode 100644 index 0000000..a38fcc8 --- /dev/null +++ b/Movement/Urls/urlsTransition.py @@ -0,0 +1,14 @@ +from django.urls import path +# from django.contrib.auth import views as auth_views +from Movement.Views import ( + viewsTransition , +) + +urlpatterns = [ + # URLs de Professional + path('', viewsTransition.TransitionListView.as_view(), name='MovTransitionListView'), + path('Create', viewsTransition.TransitionCreateView.as_view(), name='MovTransitionCreateView'), + path('/Detail', viewsTransition.TransitionDetailView.as_view(), name='MovTransitionDetailView'), + path('/Update', viewsTransition.TransitionUpdateView.as_view(), name='MovTransitionUpdateView'), + path('/Delete', viewsTransition.TransitionDeleteView.as_view(), name='MovTransitionDeleteView'), +] \ No newline at end of file diff --git a/Movement/Views/__pycache__/viewsCalendar.cpython-312.pyc b/Movement/Views/__pycache__/viewsCalendar.cpython-312.pyc index 7bdb74b175f0e113d87d5a3743c494dcfbba99f1..1db5d876a62fe2a9e6591d8fea48235142e66e00 100644 GIT binary patch delta 46 zcmZ1>vR-7v5oSd%XRDad;?$zznDErH)S{C7ycn1K&G(qS*Z`gX B5o-Vd delta 39 ucmZ24vO;9T5oRf8XRDad;?$zznDErH)S{C7ycn0%;_Q`uv?MLsY9&%>LDZJkKn>k3B;-+Mw}pll zJcu+0DRmIkgW8jiR7rmQt*o3}xr0|_8a&lH$m5@@%CnpMvD>*5z$jPaTiE+#@!_a|8 zm@qt9&M-B|zkqdJS_}!ujxQUMupK`)L>w;ijLZ`7(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viewsExpense.cpython-312.pyc deleted file mode 100644 index 6cb1bd0f85422c67ce6e9b28eb3b2d819072a651..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6220 zcmeGgOKcm*b#}QVS0qL1LrJtO$F!wbrrgSoq%?*jxbaW^Bv#${lVYourMV-U>@F$K zu53%7VI2%q0#Z0W6mHRLDe>aj({{hm|nLeOg5CP&zp7*E;ns zrHkXT)~!dCs6a$=ny78}h#H`NDpTRH*ZwA@hjW6!32}~C<@9n+J8;6B8!~bO;BLGJ4(AHA{9##usR-&wG!j3_5xfM3kIk z`C0gGkVQ&MgOOI74=@k>Dg!|MiSUq^Ro059Kzk`Du^G8)p0^WxJX)$Guz#{*|3Y%{_D8ltj*0mk-JZ}t9b+= z&0mr5Oj{C~BIrGW|H)(~ozH<0=8QzZ@*4AVlv$x`)J)!(r)6P&*@W_ zED!K3-)u%RDPs}X(Q4E3>6C^>WO;J=Tb5Uc1+OP0OERc7Ysv0Hte1~YCevEVFp^0F zwGfZTm!2O#ab)JQ0rolb0h+0q&&`~q#t+T>+{_7@gN-gwW9EGRCe@)ggWh7yph39C zKRUO-cEDnb15M^NT7M7}p|J?y*%Eo$9eeOrxqEoEJFzUUN4oD9Rtjs8-Q~#cwa8#O zGWcj}HF98C`Yae(@7w+G?t{C(Ge5e!+Bdm;W-~xKV#|?DKZ(VW@ie}FEk0I`kNxrR zpC*4l`G=#c@#AapGv)Z1O%I6;SBMx3!z>@4Re{|}B4o+QWGp0Sq26$m)s4ENx6Ne!YL=!=n;4u+K^Va?R~M{q(5DkW zlBh?FEL>JryQ7FS)wE=?D6m1;&_LUMhYbN_oi0E(G`bgI@GQD(aJvzK} ze!YLFB=xO#MVH=P?;iv7E3wTR+av(k>+bZ1u!3HSt#S##_JRuaxAF}|771-rt6ruA zAn*hiB#6OoOsNIn#cnsu*fcxPbb(1V8O-w@9&J*p+7N7}iy^iTK9~(7*pC3!!x9Ka z5F9{&g0cd$5SDElXXxEl(3nrBA#5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=(41p*WGuv2UJ zeq56^stsnchJv@_Sy%;Yv}>#Z^s&&O5r<(PfqRoU#Ckmp*TsaT zM%-L02&glcNlXuZi&%Re(Oy91nEAHhiSSrCjjOs=TrjY>ZGmP3}EJxm*>tsGLz;yQ=? z7Y+gH8Z`e>L#qs5qxtjMMXV0REoZd?VBmLk<$MiSiEb&+c;%~DUL5~lsEM?;U zFW`A)jD}W$`|C=r9SaT(@$JhIA6}C_I92#k5x-u#VfgGf2Ju6%!y|PNpAkJ~4D<^j zet0#WP{#dVqc51aUzsoT7@0vwsmrW)ew#a>!D{3VJ63IX9sU1+Tf7?dPhm$CKgFpJ zfv|@CPplO7I|2RuHP9bN{l=ib&ZJeCHoeJWb{+l8eILXC|BDm=UO};!P@g*mpyyz7 z9vtUeQNR4uWqveK|4-;WtB>|O0Qes=+8hFQh6n}*cSQS&ej2%(D1D~2qv2P`&V0nTI z@`RS^JOM`?4RxwPF&WF8%d)>;$$%~Jr;9|KVgN?*oKXh~#8rxiMQzu+T(=R=MHGKKS(ksTY%z$)1w&ANi_LHJ23~ImX@28ib z4RDRfZ-ZE{a~$^}iTs^JJ|w5^k?r?L$33$79_hVDdhU^pOZ--@Ex%z$e%I0W_bd^( zSQ_W-Tz|fMSHAz)`^T0DTr9c0+}3gnTr6#9hnC*m`6ov6Cn8G(u9o(6RyD!Z(jfNQ XI+%ZQEPwhXz1RARrcVf5v4{9CE;M={ literal 0 HcmV?d00001 diff --git a/Movement/Views/__pycache__/viewsProduct.cpython-312.pyc b/Movement/Views/__pycache__/viewsProduct.cpython-312.pyc index 46e2fcd8b9df4514bc052dea875f9055a6f620ca..73fb82a4239176fe6b370192da2f575f262eb928 100644 GIT binary patch delta 46 zcmaDM@?K=aD`rJcXRDad;?$zznDErH)S{C7ycn1K%`7Y_Yyh`D B5m5jD delta 39 ucmaDa@Mv> zNpXy?tGnam|4f-OQb0{V8W`>fiBD9&D5P~!$Yezrkmz8)!7sMCjk%qPQFJpOTLUwr x{N{d6ZYD;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U>ZY4pAwrTi||wUA(|ubvk2eA_i^C6XKeh8@2?GQB|h zKD#UIpp9_n0NFVX$iWE5gRbHSHE1EyJFwe`w8IvW425kvBOQbvTs%9A#>x_F{hwkJ z4YmvvgnicEKjy9!Uu|3I|D0Oh)uxRRJ8UyD22-pitwhSt8Ljq_R+yL82$b=7)FjznA z44VB?2iL^VoP?h-1m@k;X{#5HDEw+VbC~z4McAOSbptct)G1L`$TLhSCZfU1HN(pj z!&?~dZ@!KS%nG-&xdn4BtK-epU?`Xj?^L|YIry^HmDQF7$qCvrA8Gaknqb&65p^PF z0YZ3Y+hS}9gjFS0j#!IsuOTj7uuqhWY#ctr(l<;n+kQb1UJ>~>BEKRxw#dj9No|p% zTjYaXF(D+^-aEE7I`Lv|mq258Bp{5frAF7XlP{{f1RA?te&MtifyQn)Ae`|c(Aez~ My~v*g8dhch4VlXp1ONa4 literal 0 HcmV?d00001 diff --git a/Movement/Views/viewsCalendarCreateCustom.py b/Movement/Views/viewsCalendarCreateCustom.py index 2d65da5..5792b83 100644 --- a/Movement/Views/viewsCalendarCreateCustom.py +++ b/Movement/Views/viewsCalendarCreateCustom.py @@ -5,13 +5,14 @@ from Movement import models from Client.models import Client from django.urls import reverse_lazy from django.contrib import messages +from decimal import Decimal class CalendarCreateCustomView(LoginRequiredMixin, PermissionRequiredMixin, CreateView): model = models.Calendar template_name = 'Calendar/Create/index.html' form_class = FormsCalendar.FormsCalendar - success_url = reverse_lazy('MovCalendarListView') + success_url = reverse_lazy('Dashboard') permission_required = 'Base.add_' def get_context_data(self, **kwargs): @@ -43,7 +44,9 @@ class CalendarCreateCustomView(LoginRequiredMixin, PermissionRequiredMixin, Crea form.instance.gross_value = gross_value form.instance.net_value = net_value form.instance.value_cash = value_cash - form.instance.prof_money = prof_money + form.instance.prof_money = prof_money - Decimal('0.01') + (Client.objects.filter(id=form.instance.client.id) + .update(last_visit=form.instance.date)) form.instance.created_by = self.request.user messages.success(self.request, 'Registro realizado com sucesso!') return super().form_valid(form) diff --git a/Movement/Views/viewsExpense.py b/Movement/Views/viewsExpense.py deleted file mode 100644 index 20ef7b1..0000000 --- a/Movement/Views/viewsExpense.py +++ /dev/null @@ -1,102 +0,0 @@ -from django.views.generic import ListView, CreateView, UpdateView, DeleteView, DetailView -from django.contrib.auth.mixins import LoginRequiredMixin , PermissionRequiredMixin -from Movement.Forms import FormsExpense -from Movement import models -from Base.models import ChartOfAccount -from django.urls import reverse_lazy -from django.contrib import messages -from django.utils import timezone - -class ExpenseListView(LoginRequiredMixin, PermissionRequiredMixin, ListView): - model = models.Expense - template_name = 'Expense/List.html' - context_object_name = 'Expenses' - paginate_by = 10 - permission_required = 'Base.view_professional' - def get_queryset(self): - queryset = super().get_queryset() - date = self.request.GET.get('date') - if date: - queryset = queryset.filter(date__icontains=date) - else: - queryset = queryset.filter( - date__icontains=timezone.localtime(timezone.now()).month - ) - return queryset - -class ExpenseCreateView(LoginRequiredMixin,PermissionRequiredMixin, CreateView): - model = models.Expense - template_name = 'Expense/Create.html' - form_class = FormsExpense.FormsExpense - success_url = reverse_lazy('MovExpenseListView') - permission_required = 'Base.add_professional' - -class ExpenseDetailView(LoginRequiredMixin,PermissionRequiredMixin, DetailView): - model = models.Expense - template_name = 'Expense/Detail.html' - permission_required = 'Base.view_professional' - -class ExpenseUpdateView(LoginRequiredMixin,PermissionRequiredMixin, UpdateView): - model = models.Expense - template_name = 'Expense/Update.html' - form_class = FormsExpense.FormsExpense - success_url = reverse_lazy('ExpenseListView') - permission_required = 'Base.change_professional' - -class ExpenseDeleteView(LoginRequiredMixin,PermissionRequiredMixin, DeleteView): - model = models.Expense - template_name = 'Expense/Delete.html' - success_url = reverse_lazy('MovExpenseListView') - permission_required = 'Base.delete_professional' - -class ExpenseFirmCreateView(LoginRequiredMixin,PermissionRequiredMixin, CreateView): - model = models.Expense - template_name = 'Expense/CreateFirm.html' - form_class = FormsExpense.FormsExpense - success_url = reverse_lazy('MovExpenseListView') - permission_required = 'Base.add_professional' - - def get_form(self, form_class=None): - form = super().get_form(form_class) - form.fields['chart_of_account'].queryset = ChartOfAccount.objects.filter( - firm=True, - debit=True, - ) - return form - - def form_valid(self, form): - form.instance.firm = True - form.instance.created_by = self.request.user - messages.success(self.request, 'Registro realizado com sucesso!') - return super().form_valid(form) - - def form_invalid(self, form): - errors = form.errors.as_text() - messages.error(self.request, f'Verifique os dados: {errors}') - return super().form_invalid(form) - -class ExpenseProfCreateView(LoginRequiredMixin,PermissionRequiredMixin, CreateView): - model = models.Expense - template_name = 'Expense/CreateProf.html' - form_class = FormsExpense.FormsExpense - success_url = reverse_lazy('MovExpenseListView') - permission_required = 'Base.add_professional' - - def get_form(self, form_class=None): - form = super().get_form(form_class) - form.fields['chart_of_account'].queryset = ChartOfAccount.objects.filter( - firm=False, - debit=True, - ) - return form - - def form_valid(self, form): - form.instance.firm = False - form.instance.created_by = self.request.user - messages.success(self.request, 'Registro realizado com sucesso!') - return super().form_valid(form) - - def form_invalid(self, form): - errors = form.errors.as_text() - messages.error(self.request, f'Verifique os dados: {errors}') - return super().form_invalid(form) \ No newline at end of file diff --git a/Movement/Views/viewsExpenseOrCredit.py b/Movement/Views/viewsExpenseOrCredit.py new file mode 100644 index 0000000..649b49e --- /dev/null +++ b/Movement/Views/viewsExpenseOrCredit.py @@ -0,0 +1,196 @@ +from django.views.generic import ListView, CreateView, UpdateView, DeleteView, DetailView +from django.contrib.auth.mixins import LoginRequiredMixin , PermissionRequiredMixin +from Movement.Forms import FormsExpenseOrCredit +from Movement import models +from Base.models import ChartOfAccount +from django.urls import reverse_lazy +from django.contrib import messages +from django.utils import timezone + +class ExpenseOrCreditListView(LoginRequiredMixin, PermissionRequiredMixin, ListView): + model = models.ExpenseOrCredit + template_name = 'ExpenseOrCredit/List.html' + context_object_name = 'Expenses' + paginate_by = 10 + permission_required = 'Base.view_professional' + def get_queryset(self): + queryset = super().get_queryset() + + month = self.request.GET.get('month') + mov_type = self.request.GET.get('type') + resp = self.request.GET.get('resp') + + # Validação: Se NÃO houver month E NÃO houver type E NÃO houver resp, retorna vazio + if not any([month, mov_type, resp]): + return super().get_queryset().none() + + # Se passou da validação, começamos o filtro + queryset = super().get_queryset() + year = timezone.localtime(timezone.now()).year + + # 1. Filtro de Data + if month: + queryset = queryset.filter(date__month=month, date__year=year) + else: + # Se você quiser que o mês atual seja o padrão caso month não venha, + # mas type ou resp venham: + current_month = timezone.localtime(timezone.now()).month + queryset = queryset.filter(date__month=current_month, date__year=year) + + # 2. Filtro de Tipo + if mov_type == 'credit': + queryset = queryset.filter(credit=True, debit=False) + elif mov_type == 'debit': + queryset = queryset.filter(credit=False, debit=True) + + # 3. Filtro de Responsável + if resp == 'firm': + queryset = queryset.filter(firm=True, prof=False) + elif resp == 'prof': + queryset = queryset.filter(firm=False, prof=True) + + return queryset + +# class ExpenseOrCreditCreateView(LoginRequiredMixin,PermissionRequiredMixin, CreateView): +# model = models.ExpenseOrCredit +# template_name = 'ExpenseOrCredit/Create.html' +# form_class = FormsExpenseOrCredit.FormsExpenseOrCredit +# success_url = reverse_lazy('MovExpenseOrCreditListView') +# permission_required = 'Base.add_professional' + +class ExpenseOrCreditDetailView(LoginRequiredMixin,PermissionRequiredMixin, DetailView): + model = models.ExpenseOrCredit + template_name = 'ExpenseOrCredit/Detail.html' + permission_required = 'Base.view_professional' + +class ExpenseOrCreditDeleteView(LoginRequiredMixin,PermissionRequiredMixin, DeleteView): + model = models.ExpenseOrCredit + # template_name = 'Expense/Delete.html' + success_url = reverse_lazy('MovExpenseOrCreditListView') + permission_required = 'Base.delete_professional' + + def form_valid(self, form): + messages.success(self.request, 'Registro Deletado com sucesso!') + return super().form_valid(form) + + def form_invalid(self, form): + errors = form.errors.as_text() + messages.error(self.request, f'Verifique os dados: {errors}') + return super().form_invalid(form) + +class ExpenseOrCreditFirmCreateView(LoginRequiredMixin,PermissionRequiredMixin, CreateView): + model = models.ExpenseOrCredit + template_name = 'ExpenseOrCredit/CreateFirm.html' + form_class = FormsExpenseOrCredit.FormsExpenseOrCredit + success_url = reverse_lazy('MovExpenseOrCreditListView') + permission_required = 'Base.add_professional' + + def get_form(self, form_class=None): + form = super().get_form(form_class) + form.fields['chart_of_account'].queryset = ChartOfAccount.objects.filter( + firm=True, + debit=True, + credit=False, + ) + return form + + def form_valid(self, form): + form.instance.firm = True + form.instance.debit = True + form.instance.created_by = self.request.user + messages.success(self.request, 'Registro realizado com sucesso!') + return super().form_valid(form) + + def form_invalid(self, form): + errors = form.errors.as_text() + messages.error(self.request, f'Verifique os dados: {errors}') + return super().form_invalid(form) + +class ExpenseOrCreditProfCreateView(LoginRequiredMixin,PermissionRequiredMixin, CreateView): + model = models.ExpenseOrCredit + template_name = 'ExpenseOrCredit/CreateProf.html' + form_class = FormsExpenseOrCredit.FormsExpenseOrCredit + success_url = reverse_lazy('MovExpenseOrCreditListView') + permission_required = 'Base.add_professional' + + def get_form(self, form_class=None): + form = super().get_form(form_class) + form.fields['chart_of_account'].queryset = ChartOfAccount.objects.filter( + firm=False, + debit=True, + credit=False, + prof=True, + ) + return form + + def form_valid(self, form): + form.instance.firm = False + form.instance.debit = True + form.instance.prof = True + form.instance.created_by = self.request.user + messages.success(self.request, 'Registro realizado com sucesso!') + return super().form_valid(form) + + def form_invalid(self, form): + errors = form.errors.as_text() + messages.error(self.request, f'Verifique os dados: {errors}') + return super().form_invalid(form) + +class ExpenseOrCreditFirmCreditCreateView(LoginRequiredMixin,PermissionRequiredMixin, CreateView): + model = models.ExpenseOrCredit + template_name = 'ExpenseOrCredit/CreateCredit.html' + form_class = FormsExpenseOrCredit.FormsExpenseOrCredit + success_url = reverse_lazy('MovExpenseOrCreditListView') + permission_required = 'Base.add_professional' + + def get_form(self, form_class=None): + form = super().get_form(form_class) + form.fields['chart_of_account'].queryset = ChartOfAccount.objects.filter( + firm=True, + credit=True, + ) + return form + + def form_valid(self, form): + form.instance.firm = True + form.instance.debit = False + form.instance.credit = True + form.instance.created_by = self.request.user + messages.success(self.request, 'Registro realizado com sucesso!') + return super().form_valid(form) + + def form_invalid(self, form): + errors = form.errors.as_text() + messages.error(self.request, f'Verifique os dados: {errors}') + return super().form_invalid(form) + +class ExpenseOrCreditProfCreditCreateView(LoginRequiredMixin,PermissionRequiredMixin, CreateView): + model = models.ExpenseOrCredit + template_name = 'ExpenseOrCredit/CreateProfCredit.html' + form_class = FormsExpenseOrCredit.FormsExpenseOrCredit + success_url = reverse_lazy('MovExpenseOrCreditListView') + permission_required = 'Base.add_professional' + + def get_form(self, form_class=None): + form = super().get_form(form_class) + form.fields['chart_of_account'].queryset = ChartOfAccount.objects.filter( + firm=False, + debit=False, + credit=True, + prof=True, + ) + return form + + def form_valid(self, form): + form.instance.firm = False + form.instance.debit = False + form.instance.credit = True + form.instance.prof = True + form.instance.created_by = self.request.user + messages.success(self.request, 'Registro realizado com sucesso!') + return super().form_valid(form) + + def form_invalid(self, form): + errors = form.errors.as_text() + messages.error(self.request, f'Verifique os dados: {errors}') + return super().form_invalid(form) \ No newline at end of file diff --git a/Movement/Views/viewsProductCreateCustom.py b/Movement/Views/viewsProductCreateCustom.py index acf9b01..b9a6f46 100644 --- a/Movement/Views/viewsProductCreateCustom.py +++ b/Movement/Views/viewsProductCreateCustom.py @@ -11,17 +11,11 @@ class ProductCreateCustomView(LoginRequiredMixin, PermissionRequiredMixin, Creat model = models.Product template_name = 'Product/Create/index.html' form_class = FormsProduct.FormsProduct - success_url = reverse_lazy('MovProductListView') + success_url = reverse_lazy('Dashboard') permission_required = 'Base.add_' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) - # if self.request.GET.get('Client'): - # filter_client = Client.objects.filter( - # id=self.request.GET.get('Client') or '' - # ) - # else: filter_client = Client.objects.none() - # context['Client'] = filter_client return context def get_form(self, form_class=None): diff --git a/Movement/Views/viewsTransition.py b/Movement/Views/viewsTransition.py new file mode 100644 index 0000000..7232f29 --- /dev/null +++ b/Movement/Views/viewsTransition.py @@ -0,0 +1,52 @@ +from django.views.generic import ListView, CreateView, UpdateView, DeleteView, DetailView +from django.contrib.auth.mixins import LoginRequiredMixin , PermissionRequiredMixin +from Movement.Forms import FormsTransition +from Movement import models +from django.urls import reverse_lazy +from django.utils import timezone + +class TransitionListView(LoginRequiredMixin, PermissionRequiredMixin, ListView): + model = models.Transition + template_name = 'Transition/List.html' + context_object_name = 'Transitions' + paginate_by = 10 + permission_required = 'Base.view_professional' + def get_queryset(self): + queryset = super().get_queryset() + date = self.request.GET.get('month') + if date: + queryset = queryset.filter( + date__month=date, + date__year=timezone.localtime(timezone.now()).year, + ) + else: + queryset = queryset.filter( + date__month=timezone.localtime(timezone.now()).month, + date__year =timezone.localtime(timezone.now()).year, + ) + return queryset + +class TransitionCreateView(LoginRequiredMixin,PermissionRequiredMixin, CreateView): + model = models.Transition + template_name = 'Transition/Create.html' + form_class = FormsTransition.FormsTransition + success_url = reverse_lazy('MovTransitionListView') + permission_required = 'Base.add_professional' + +class TransitionDetailView(LoginRequiredMixin,PermissionRequiredMixin, DetailView): + model = models.Transition + template_name = 'Transition/Detail.html' + permission_required = 'Base.view_professional' + +class TransitionUpdateView(LoginRequiredMixin,PermissionRequiredMixin, UpdateView): + model = models.Transition + template_name = 'Transition/Update.html' + form_class = FormsTransition.FormsTransition + success_url = reverse_lazy('MovTransitionListView') + permission_required = 'Base.change_professional' + +class TransitionDeleteView(LoginRequiredMixin,PermissionRequiredMixin, DeleteView): + model = models.Transition + template_name = 'Transition/Delete.html' + success_url = reverse_lazy('MovTransitionListView') + permission_required = 'Base.delete_professional' \ No newline at end of file diff --git a/Movement/migrations/0001_initial.py b/Movement/migrations/0001_initial.py index fdc9842..4eddf6d 100644 --- a/Movement/migrations/0001_initial.py +++ b/Movement/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 5.2.7 on 2025-11-01 11:15 +# Generated by Django 6.0 on 2025-12-24 11:22 import django.db.models.deletion from django.conf import settings @@ -42,13 +42,14 @@ class Migration(migrations.Migration): }, ), migrations.CreateModel( - name='Expense', + name='ExpenseOrCredit', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('active', models.BooleanField(default=False)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ('date', models.DateField()), + ('debit', models.BooleanField(default=True)), ('firm', models.BooleanField(default=True)), ('gross_value', models.DecimalField(decimal_places=2, max_digits=10)), ('bank', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='ExpenseBank', to='Base.bankaccount')), @@ -99,4 +100,22 @@ class Migration(migrations.Migration): 'ordering': ['product'], }, ), + migrations.CreateModel( + name='Transition', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('active', models.BooleanField(default=False)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ('date', models.DateField()), + ('gross_value', models.DecimalField(decimal_places=2, max_digits=10)), + ('bank_credit', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='TransitionBankCredit', to='Base.bankaccount')), + ('bank_debit', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='TransitionBankDebit', to='Base.bankaccount')), + ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)), + ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'ordering': ['date'], + }, + ), ] diff --git a/Movement/migrations/0002_expenseorcredit_credit.py b/Movement/migrations/0002_expenseorcredit_credit.py new file mode 100644 index 0000000..8479f0e --- /dev/null +++ b/Movement/migrations/0002_expenseorcredit_credit.py @@ -0,0 +1,18 @@ +# Generated by Django 6.0 on 2025-12-24 14:06 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('Movement', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='expenseorcredit', + name='credit', + field=models.BooleanField(default=False), + ), + ] diff --git a/Movement/migrations/0003_expenseorcredit_prof.py b/Movement/migrations/0003_expenseorcredit_prof.py new file mode 100644 index 0000000..03a621e --- /dev/null +++ b/Movement/migrations/0003_expenseorcredit_prof.py @@ -0,0 +1,18 @@ +# Generated by Django 6.0 on 2025-12-24 14:47 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('Movement', '0002_expenseorcredit_credit'), + ] + + operations = [ + migrations.AddField( + model_name='expenseorcredit', + name='prof', + field=models.BooleanField(default=False), + ), + ] diff --git a/Movement/migrations/__pycache__/0001_initial.cpython-312.pyc b/Movement/migrations/__pycache__/0001_initial.cpython-312.pyc index 4e8f4b8bb1faf2b4f11a8bb54c3a4b696881481f..06a4f4ee77a54d231791e42715b94a850050262e 100644 GIT binary patch delta 842 zcmZ9KNlX(_7{}*L?ZQB(tsS~TTaYDUDy^s>OtG|VWpx1;EE3=iW2FmD3z35dZyv?( zLSl^GJkSuaG0}^9@J29gVlt+QcfIw12aE@2rl`O>yyg4;`Mv-D<-NZ6V~F0?>nTDS z=AGf#H}@L7NnSB;y`R<~9|S2o=(Qcl4@<`uO=oahwq`>mYYAe3#AoHI>Ks0w^XUvo z+m0Kv9UE%6t$wQ2<5Som3BFe}qYGf9woxZ^lXh(vW-*fuz;9|>)s3Ct(>;e+RorwD z*B?R$6?6{{!GwMlh2gXQB?>CEUWwKUJ9I;tXx=9tu+;}H!&PlRNpRHN)8Nxs=!cV#9+0L94aq4$TiJq!mB$!40vJ^skKr~Y6R&>aq~tf? zQ4D3hf8FuwDckD!$xFFSBal`@-~A;nndZiYu)yJ1rl`i;Tr87|m>(m%lvPIr1Cz2QX~qdXg;jymDss0rV-VRg*&5@X--H-uX8J$ zkVz$@y{Y--1eeUDqoaKTJy5C+ke{ert7VTw^^mZvFt)tIyWS)^yak8%75?Jr${X3- zGdrMKC(Y0$4`FhyU&}YP=W9AjDzcj1J;78^rIy^N^Nq^jAu8ODC{gDs=v-e-wK5Pw zE_=Y0_xN9EM32AV@xSf=5P267*^vS}BC?YOc2Z=g3+!}>AQC7{O3NTQMeY(r-7WcG zio%|?*)Hwks7EgJlQ-n9=cdw~f-T!+_+_Qxqb*!tT`5^~C>GZT%l2wblD$QeN5?e} zhXfv~+)Zc(+T1?Jg7i}aUY_nqQ&GnzQg}JebqjHL;C5N>A*6XsiN=P4vEe5npA_*Q DxG(o5 delta 529 zcmaFqwaK3EG%qg~0}vc}&6-&zHIZ)}(;NPc`(oK9+cIe}8cZ%=$rdzBFYY?5NSIf8?qk=-msb&dII*2!_Kv)Or4v{U$j3Iw>+87(Gju$^YKoNT}? z$!V2hog%WvW;OFH&#%SkI(ZhqEU(*YCb%5LNA74o0^6$X zk>ZH#mUIrFt@i1RnT%_6VZKjiiIS-F)b!dcA~KnYgWa{FAT_Tzb@M(kcSc5=$!rpe zo699s7^U2utztrpQ;UjY!c)sqi%RnIVq8*-vrF;|Chw87WxC0+`M2axrpY$)<(nI2 zCo;-P@`~_%kYf;(o)LCI)%=2t#Rq04QNAyV!kk%_@h*eH ceFlv$Y;lZ?Y!kSy3#eQaQ2ELL;(<*80KIpL{r~^~ diff --git a/Movement/migrations/__pycache__/0002_expenseorcredit_credit.cpython-312.pyc b/Movement/migrations/__pycache__/0002_expenseorcredit_credit.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..553738072d62388a0a7a937309f5e68f96d5e88f GIT binary patch literal 750 zcmZ8e&ubGw6n?Y2nd~m9)*x1GkBzvOl8PtMLanx-rg#xySsB;NYuKEF0!+&ZhADrwrz=wc|< z%^p-eTRN@9JZd<*l^tS&X(4OPW^lS`SOZ1f^B_%0YxN-}fA8vog+@bQx25{TLOlG4{3}#yVFsj_MhXX*><&I!N!D&oP<0^gsY~q5m_R$^L zt3!KrymEVd<;J+)IKDNiH-`1bXZ%*bdtS91cVf~y{qRJrEc)$xmUMVGOgq^Ie^Y8N z70+J0rqjyY>k3Kx{_F#{#7#x@Zu2$eCMF@|7X{*-(;A`2?r3>^xV-)o6e+9!07|aD AX8-^I literal 0 HcmV?d00001 diff --git a/Movement/migrations/__pycache__/0003_expenseorcredit_prof.cpython-312.pyc b/Movement/migrations/__pycache__/0003_expenseorcredit_prof.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d078d6b2c96d88683ae6f93f5806638800059f75 GIT binary patch literal 761 zcmZWm&ubGw6n?Y2nd~m9)*wbqkBzvO60|3&g<5SvP4Obay0EU9m#|@fq_aseH-#QN z_SU0UrTtGl1%!mTdh!-XMG!$}HVN^^JG}Y6H}Ac9-D>g{`_49G~o&bDNWMPFl zm~KmO3Je&DASNz}HCH2`!9FnU7?_TvLl;HM^Gu&%S05No;j1E!ChRzD^Pm@|NhWBV zGK{k3vId|yC)1Y_oC1PN7`PfEZQ|-0pwY<({<8$+7);&K&ZWQOiZSE7a3-ZGJEx1G zWH)nAbWCA27W2sA%tm^IF(y4xt=H?feSF=;B*T<9IkK?l&kk|4#`Z&yO(Pf^mja&P%Rp4`Em|8}6HZgdA+{dn#a$nHsZ3=<00=0w-7(l<{gHdt%# z?2%a=n$>aT*7!jX(V-C(bB z<+Mv>NpXy?tGnaG2p<4eb`RwM delta 36 rcmZ3@xP)#} -
+{#
#} diff --git a/Movement/templates/Calendar/Create/index.html b/Movement/templates/Calendar/Create/index.html index 899fd07..37b6856 100644 --- a/Movement/templates/Calendar/Create/index.html +++ b/Movement/templates/Calendar/Create/index.html @@ -18,11 +18,12 @@ {% include 'Calendar/Create/date.html' %}
{% include 'Calendar/Create/time.html' %} {% include 'Calendar/Create/first_time.html' %} +
+ +       + Cancelar - -       - Cancelar diff --git a/Movement/templates/Calendar/List.html b/Movement/templates/Calendar/List.html index 03f48ca..73dd5c6 100644 --- a/Movement/templates/Calendar/List.html +++ b/Movement/templates/Calendar/List.html @@ -25,7 +25,7 @@
- + @@ -46,6 +46,7 @@ {# #} {# #} {# {% endif %}#} + {# {% if perms.brands.delete_brands %}#} diff --git a/Movement/templates/Calendar/Update.html b/Movement/templates/Calendar/Update.html index f60a1ac..a900619 100644 --- a/Movement/templates/Calendar/Update.html +++ b/Movement/templates/Calendar/Update.html @@ -10,7 +10,9 @@ {{ form.as_p }} - Cancelar e Voltar + diff --git a/Movement/templates/Expense/List.html b/Movement/templates/Expense/List.html deleted file mode 100644 index 0ba1d80..0000000 --- a/Movement/templates/Expense/List.html +++ /dev/null @@ -1,78 +0,0 @@ -{% extends "BaseLogin.html" %} -{% block title %} List {% endblock %} -{% block content %} -

Despesas


-
-
-
-
- - -
- -
-{# {% if perms.brands.add_brands %}#} -{#
#} -{# #} -{# Criar #} -{#
#} - - -{# {% endif %}#} -
- -
-
Marcar Nome Sobrenome Telefone Nome Completo Telefone Profissinal T. D. FeedBack Notas Produto Ações T. Duplo U. Visita
-
+ +{# #} + + +
+ - + {{ Client.first_name }} {{ Client.last_name }} {{ Client.phone }} {{ Client.professional.symbol }} {{ Client.professional }} {{ Client.first_name }} {{ Client.last_name }} {{ Client.professional.symbol }} {{ Client.phone|format_phone }} {{ Client.professional.name }} {% if Client.double_workload %} {% else %} {% endif %} {% if Client.feed_back %} - {% else %} {% endif %} {{ Client.notes }} -
- - -
-
- - - -{# {% if perms.brands.change_brands %}#} - - - -{# {% endif %}#} -{# {% if perms.brands.delete_brands %}#} - - - -{# {% endif %}#} - {{ Client.last_visit|date:"d/m/Y" }}
Hora professional Cliente service Service Ações
- - - - - - - - - - - - - {% for Exp in Expenses %} - - - - - - - - - - {% endfor %} - -
Data Plano de Contas Banco Firma Prof Valor Ações
{{ Exp.date|date:"d/m/Y" }} {{ Exp.chart_of_account }} {{ Exp.bank }} {{ Exp.firm }} {{ Exp.professional }} {{ Exp.gross_value }} - - - -{# {% if perms.brands.change_brands %}#} - - - -{# {% endif %}#} -{# {% if perms.brands.delete_brands %}#} - - - -{# {% endif %}#} -
-
- {% include 'components/_pagination.html' %} -{% endblock %} diff --git a/Movement/templates/ExpenseOrCredit/CreateCredit.html b/Movement/templates/ExpenseOrCredit/CreateCredit.html new file mode 100644 index 0000000..55e9f10 --- /dev/null +++ b/Movement/templates/ExpenseOrCredit/CreateCredit.html @@ -0,0 +1,22 @@ +{% extends "BaseLogin.html" %} +{% block title %} Create {% endblock %} +{% block content %} + +
+

Despesa Do Prof.

+
+
+
+ {% csrf_token %} + {{ form.date.label }} {{ form.date }}

+ {{ form.chart_of_account.label }}
{{ form.chart_of_account }}
+ {{ form.bank.label }}
{{ form.bank }}
+ {{ form.gross_value.label }} {{ form.gross_value }}

+ +
+{# Cancelar e Voltar #} +
+
+
+ +{% endblock %} \ No newline at end of file diff --git a/Movement/templates/Expense/CreateFirm.html b/Movement/templates/ExpenseOrCredit/CreateFirm.html similarity index 100% rename from Movement/templates/Expense/CreateFirm.html rename to Movement/templates/ExpenseOrCredit/CreateFirm.html diff --git a/Movement/templates/Expense/CreateProf.html b/Movement/templates/ExpenseOrCredit/CreateProf.html similarity index 100% rename from Movement/templates/Expense/CreateProf.html rename to Movement/templates/ExpenseOrCredit/CreateProf.html diff --git a/Movement/templates/ExpenseOrCredit/CreateProfCredit.html b/Movement/templates/ExpenseOrCredit/CreateProfCredit.html new file mode 100644 index 0000000..b79d2f2 --- /dev/null +++ b/Movement/templates/ExpenseOrCredit/CreateProfCredit.html @@ -0,0 +1,23 @@ +{% extends "BaseLogin.html" %} +{% block title %} Create {% endblock %} +{% block content %} + +
+

Despesa Do Prof.

+
+
+
+ {% csrf_token %} + {{ form.date.label }} {{ form.date }}

+ {{ form.chart_of_account.label }}
{{ form.chart_of_account }}
+ {{ form.bank.label }}
{{ form.bank }}
+ {{ form.professional.label }}
{{ form.professional }}
+ {{ form.gross_value.label }} {{ form.gross_value }}

+ +
+{# Cancelar e Voltar #} +
+
+
+ +{% endblock %} \ No newline at end of file diff --git a/Movement/templates/Expense/Detail.html b/Movement/templates/ExpenseOrCredit/Detail.html similarity index 100% rename from Movement/templates/Expense/Detail.html rename to Movement/templates/ExpenseOrCredit/Detail.html diff --git a/Movement/templates/ExpenseOrCredit/List.html b/Movement/templates/ExpenseOrCredit/List.html new file mode 100644 index 0000000..098f4cb --- /dev/null +++ b/Movement/templates/ExpenseOrCredit/List.html @@ -0,0 +1,142 @@ +{% extends "BaseLogin.html" %} +{% block title %} List {% endblock %} +{% block content %} + +
+
+
+
+

+ Despesas +

+
+ + + + +
+
+ +
+ +
+
+ +
+
+
+
+ Tipo: +
+ + + + + +
+
+ +
+ Resp: +
+ + + + + +
+
+ + +
+
+
+
+
+ + + +
+ + + + + + + + + + + + + + + + + {% for Exp in Expenses %} + + + + + + + + + + + + + {% endfor %} + +
Data Plano de Contas Valor Banco Firma Credito Debito Prof Profissimal Ações
{{ Exp.date|date:"d/m/Y" }} {{ Exp.chart_of_account }} R$ {{ Exp.gross_value }} {{ Exp.bank }} {% if Exp.firm %} + {% else %} {% endif %} {% if Exp.credit %} + {% else %} {% endif %} {% if Exp.debit %} + {% else %} {% endif %} {% if Exp.prof %} + {% else %} {% endif %} {% if Exp.professional %} {{ Exp.professional }} + {% else %} {% endif %} +
+ {% csrf_token %} + +
+
+
+ {% include 'components/_pagination.html' %} + +
+ +
+ + +{% endblock %} + + + diff --git a/Movement/templates/Expense/Update.html b/Movement/templates/ExpenseOrCredit/Update.html similarity index 100% rename from Movement/templates/Expense/Update.html rename to Movement/templates/ExpenseOrCredit/Update.html diff --git a/Movement/templates/Product/Create/date.html b/Movement/templates/Product/Create/date.html index a4b6958..ed5189c 100644 --- a/Movement/templates/Product/Create/date.html +++ b/Movement/templates/Product/Create/date.html @@ -1,6 +1,10 @@ -

#} + -

\ No newline at end of file + > \ No newline at end of file diff --git a/Movement/templates/Product/Create/index.html b/Movement/templates/Product/Create/index.html index 6c312f7..f605f08 100644 --- a/Movement/templates/Product/Create/index.html +++ b/Movement/templates/Product/Create/index.html @@ -3,7 +3,7 @@ {% block content %}
-

Cadastrar

+

lançar um produto

@@ -13,14 +13,12 @@
{% include 'Product/Create/client.html' %}
-
-
{% include 'Product/Create/date.html' %}
-
{{ form.quantity.label }}
{{ form.quantity }}
-
-
{% include 'Product/Create/product.html' %}
-
{% include 'Product/Create/pay_method.html' %}
-
{% include 'Product/Create/professional.html' %}
+
{% include 'Product/Create/product.html' %}
+
{% include 'Product/Create/pay_method.html' %}
+
{% include 'Product/Create/professional.html' %}
+
{{ form.quantity.label }}
{{ form.quantity }}
+
{% include 'Product/Create/date.html' %}
diff --git a/Movement/templates/Expense/Create.html b/Movement/templates/Transition/Create.html similarity index 88% rename from Movement/templates/Expense/Create.html rename to Movement/templates/Transition/Create.html index 5ced28a..74871fa 100644 --- a/Movement/templates/Expense/Create.html +++ b/Movement/templates/Transition/Create.html @@ -11,7 +11,7 @@ {{ form.as_p }} - Cancelar e Voltar + Cancelar e Voltar
diff --git a/Movement/templates/Expense/Delete.html b/Movement/templates/Transition/Delete.html similarity index 90% rename from Movement/templates/Expense/Delete.html rename to Movement/templates/Transition/Delete.html index 83943d8..440c2d4 100644 --- a/Movement/templates/Expense/Delete.html +++ b/Movement/templates/Transition/Delete.html @@ -13,6 +13,6 @@
- Cancelar e Voltar + Cancelar e Voltar {% endblock %} diff --git a/Movement/templates/Transition/Detail.html b/Movement/templates/Transition/Detail.html new file mode 100644 index 0000000..d603d0b --- /dev/null +++ b/Movement/templates/Transition/Detail.html @@ -0,0 +1,15 @@ +{% extends "BaseLogin.html" %} +{% block title %} Bank Accounts List {% endblock %} +{% block content %} +
+

Detalhes do Banco

+
+
+

{{ object.name }}

+

Descrição: {{ object.description }}

+{# Editar #} +
+
+ Cancelar e Voltar +
+{% endblock %} \ No newline at end of file diff --git a/Movement/templates/Transition/List.html b/Movement/templates/Transition/List.html new file mode 100644 index 0000000..3230fb2 --- /dev/null +++ b/Movement/templates/Transition/List.html @@ -0,0 +1,79 @@ +{% extends "BaseLogin.html" %} +{% block title %} List {% endblock %} +{% block content %} +

Tranf. entre Bancos


+
+
+
+
+ + +
+
+
+{# {% if perms.brands.add_brands %}#} + +{# {% endif %}#} +
+ +
+ + + +{# #} + + + + + + + + + {% for Bank in Transitions %} + +{# #} + + + + + + + {% endfor %} + +
ID Data Entrada Saida Valor Ações
{{ Bank.id }} {{ Bank.date|date:"d/m/Y" }} {{ Bank.bank_credit }} {{ Bank.bank_debit }} {{ Bank.gross_value }} + + + +{# {% if perms.brands.change_brands %}#} + + + +{# {% endif %}#} +{# {% if perms.brands.delete_brands %}#} + + + +{# {% endif %}#} +
+
+ {% include 'components/_pagination.html' %} +{% endblock %} diff --git a/Movement/templates/Transition/Update.html b/Movement/templates/Transition/Update.html new file mode 100644 index 0000000..f60a1ac --- /dev/null +++ b/Movement/templates/Transition/Update.html @@ -0,0 +1,17 @@ +{% extends "BaseLogin.html" %} +{% block title %} Bank Accounts List {% endblock %} +{% block content %} +
+

Editar Bancos

+
+
+
+ {% csrf_token %} + {{ form.as_p }} + +
+ Cancelar e Voltar +
+
+
+{% endblock %} \ No newline at end of file diff --git a/Setup/__pycache__/__init__.cpython-312.pyc b/Setup/__pycache__/__init__.cpython-312.pyc index 329fbad7139aab19437675a39eeafb149ca14488..5109ac0e9c1d87fa1edea511dae242096972860c 100644 GIT binary patch delta 43 ycmbQnIG1sPouZAiRZM7cYEf}acxqW{QAvJYj7xrUX>Mv>NpXy?tGnaG2s;2z*bl7$ delta 36 rcmbQsIE`_Fos_AwRZM7cYEf}acxqW{QAvJYj7w^9c1eE0#CSUZ=h_We diff --git a/Setup/__pycache__/settings.cpython-312.pyc b/Setup/__pycache__/settings.cpython-312.pyc index 775b12d14d938a594a67b2e6d2460993fa4a62e6..3adfafaa64d7c7164abab93f81cfe90c00757eaa 100644 GIT binary patch delta 46 zcmew^`cHI238$isvsFxJacWUadt_5!RD!)nT!B6oDVJl diff --git a/Setup/__pycache__/urls.cpython-312.pyc b/Setup/__pycache__/urls.cpython-312.pyc index 923a460c17906663c47a6ec04fb21ea847bfe805..bc69e3a994d8fac01f6a37da9402aef0bda9bd0d 100644 GIT binary patch literal 1488 zcma)+zfaph6vxlWg(T!x`PGmRNGYwVP$_PQsx+efNI(oFfJ6~el*P3VFeG+#c4)b+ z8{L`-W$ak-k5uYn$z5ux>d>hh6&q9UE}_K4LvJ|0_dehEp8b5fud&!5plf~hmHN#O zz%S-puaT~C`9%QW3@AVmYM?Gu1cBMUny>D!`0KC&1>gh7ulSL0$g5o!=sXXjZl8JQ zzD|tiLApaFa8A3hcZ1OhSk5_^xQ@QMKHsqY(1SF-dYB`?+82#=zSmB!?UPCg-q}!%0ABiN{uj7P7nW+0= zbcFq~E+eB%xcaVvGy`qo5=M$j-*CD=;g*IZSmJ9eX@+Xje=3qpf6fiw$c3D^awuv0 zdS2Ew6RU49y*7Xo=?2+3!H`C9fQ2EgiX6zIPK56Cq?rh7#%FLzF}Rv56{eSu5;G%qg~0}$+b#hO{f%)sy%#DM`JDC6^*jp{2IInsHf*ehi;WhZ}OwB@_S z6Ht_&mRek#nV*-KGueSjhW8e?Q(|7WV{&qSX!E=KVX)eY`_x0XgIl%MVKwM zIJ+djVDds1WiBybFfsyh@$<>&Sj_6>W{O`>w7o28cbUchCJRT0>`e9x3f7k;Y%a6d z62ZT~DLK>pg0kafX{XC9&L9o)Gu1CB*0A3vsFxJacWUadt_5!DJbxQ~({D4ru@Y diff --git a/Setup/urls.py b/Setup/urls.py index 5d8eb31..a53dd56 100644 --- a/Setup/urls.py +++ b/Setup/urls.py @@ -4,16 +4,17 @@ from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('', include('Base.Urls.urlsBase')), - path('Professional', include('Base.Urls.urlsProfessional')), - path('BankAccount', include('Base.Urls.urlsBankAccount')), - path('ServiceList', include('Base.Urls.urlsServiceList')), - path('ProductList', include('Base.Urls.urlsProductList')), - path('ChartOfAccount', include('Base.Urls.urlsChartOfAccount')), - path('PaymentMethod', include('Base.Urls.urlsPaymentMethod')), - path('Client', include('Client.urlsClient')), - path('Mov/Calendar', include('Movement.Urls.urlsCalendar')), - path('Mov/Stock', include('Movement.Urls.urlsStock')), - path('Mov/Product', include('Movement.Urls.urlsProduct')), - path('Mov/Expense', include('Movement.Urls.urlsExpense')), + path('Professional/', include('Base.Urls.urlsProfessional')), + path('BankAccount/', include('Base.Urls.urlsBankAccount')), + path('ServiceList/', include('Base.Urls.urlsServiceList')), + path('ProductList/', include('Base.Urls.urlsProductList')), + path('ChartOfAccount/', include('Base.Urls.urlsChartOfAccount')), + path('PaymentMethod/', include('Base.Urls.urlsPaymentMethod')), + path('Client/', include('Client.urlsClient')), + path('Mov/Calendar/', include('Movement.Urls.urlsCalendar')), + path('Mov/Stock/', include('Movement.Urls.urlsStock')), + path('Mov/Product/', include('Movement.Urls.urlsProduct')), + path('Mov/ExpenseOrCredit/', include('Movement.Urls.urlsExpenseOrCredit')), + path('Mov/Transition/', include('Movement.Urls.urlsTransition')), ] diff --git a/Templates/Base.html b/Templates/Base.html index e627969..3d7753a 100644 --- a/Templates/Base.html +++ b/Templates/Base.html @@ -5,12 +5,13 @@ {% block title %} {% endblock %} - + {% include 'components/_header.html' %}
{% block content %} diff --git a/Templates/components/_footer.html b/Templates/components/_footer.html index 5cfaa06..c62dd57 100644 --- a/Templates/components/_footer.html +++ b/Templates/components/_footer.html @@ -1,4 +1,4 @@ -
+
diff --git a/Templates/components/_sidebar.html b/Templates/components/_sidebar.html index 5b08698..b00e7f5 100644 --- a/Templates/components/_sidebar.html +++ b/Templates/components/_sidebar.html @@ -13,12 +13,18 @@ {% if perms.Base.view_bankaccount %} Client {% endif %} + {% if perms.Base.view_bankaccount %} + Prof + {% endif %} {% if perms.Base.view_bankaccount %} MovCalendar {% endif %} {% if perms.Base.view_bankaccount %} MovProduct {% endif %} + {% if perms.Base.view_bankaccount %} + Despesas ou Creditos + {% endif %}
{% endif %} diff --git a/requirements.txt b/requirements.txt index cf43e80e12c258e04bf751df63e61ec298f4c1d8..8bd7992a842cfa1264a289f3966ec4810f65a4d9 100644 GIT binary patch literal 72 zcmezWFOi{`A)O(Up@<=sA&r5Tfs4U~A&ViAArB~;59Sv$6f)#66adAFfNE30VkHb! N3@Jd75+DZY0RTO24S@gv literal 60 zcmYc+PR}e#O|!K%)-yEFGvIQ`O3X{ox3x9ZGtx8XDlW_^NGvK&wY4?SGu1QZDh&^I P_q4S&(lgLAHsAsP9-9!3 diff --git a/requirements_linux.txt b/requirements_linux.txt new file mode 100644 index 0000000..149762e --- /dev/null +++ b/requirements_linux.txt @@ -0,0 +1,4 @@ +asgiref +Django +sqlparse +uWSGI diff --git a/requirements_win.txt b/requirements_win.txt deleted file mode 100644 index 0792fb10b05463b8d3ca7257036bf446265bd32d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 132 zcmW-ZISPP45Ckh0{EFxJPSU2+VYVR=gBvswt+jBFs5Ez+gb)JHXQokf8 qqhqCKmvtDgMV!(Yy}8&pWdtpaW~6Siycv;)K|CsH-)YwwcgBC!X%nCT