From 407c7426caf69b929a626ea9e12e94b8882ae8b0 Mon Sep 17 00:00:00 2001 From: prakash Date: Mon, 28 Mar 2022 23:05:23 +0530 Subject: [PATCH] Report expenses amount added --- .../report/project_revenue_custom_report.py | 28 +++++++++++------- .../project_revenue_custom_report_views.xml | 1 + sticky_pivot_view/README.rst | 0 sticky_pivot_view/__manifest__.py | 0 sticky_pivot_view/doc/RELEASE_NOTES.md | 0 .../static/description/assets/icons/check.png | Bin .../description/assets/icons/chevron.png | Bin .../static/description/assets/icons/cogs.png | Bin .../description/assets/icons/consultation.png | Bin .../description/assets/icons/ecom-black.png | Bin .../assets/icons/education-black.png | Bin .../description/assets/icons/hotel-black.png | Bin .../description/assets/icons/license.png | Bin .../description/assets/icons/lifebuoy.png | Bin .../static/description/assets/icons/logo.png | Bin .../assets/icons/manufacturing-black.png | Bin .../description/assets/icons/pos-black.png | Bin .../description/assets/icons/puzzle.png | Bin .../assets/icons/restaurant-black.png | Bin .../assets/icons/service-black.png | Bin .../assets/icons/trading-black.png | Bin .../description/assets/icons/training.png | Bin .../description/assets/icons/update.png | Bin .../static/description/assets/icons/user.png | Bin .../description/assets/icons/wrench.png | Bin .../assets/modules/approval_image.png | Bin .../assets/modules/budget_image.png | Bin .../assets/modules/export_image.png | Bin .../assets/modules/magento_image.png | Bin .../description/assets/modules/pos_image.png | Bin .../assets/modules/shopify_image.png | Bin .../description/assets/screenshots/hero.png | Bin .../assets/screenshots/sticky_pivot_view.png | Bin .../static/description/banner.png | Bin sticky_pivot_view/static/description/icon.png | Bin .../static/description/index.html | 0 sticky_pivot_view/static/src/css/main.css | 0 sticky_pivot_view/static/src/xml/pivot.xml | 0 sticky_pivot_view/views/assets.xml | 0 39 files changed, 19 insertions(+), 10 deletions(-) mode change 100644 => 100755 sticky_pivot_view/README.rst mode change 100644 => 100755 sticky_pivot_view/__manifest__.py mode change 100644 => 100755 sticky_pivot_view/doc/RELEASE_NOTES.md mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/check.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/chevron.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/cogs.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/consultation.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/ecom-black.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/education-black.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/hotel-black.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/license.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/lifebuoy.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/logo.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/manufacturing-black.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/pos-black.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/puzzle.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/restaurant-black.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/service-black.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/trading-black.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/training.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/update.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/user.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/icons/wrench.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/modules/approval_image.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/modules/budget_image.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/modules/export_image.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/modules/magento_image.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/modules/pos_image.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/modules/shopify_image.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/screenshots/hero.png mode change 100644 => 100755 sticky_pivot_view/static/description/assets/screenshots/sticky_pivot_view.png mode change 100644 => 100755 sticky_pivot_view/static/description/banner.png mode change 100644 => 100755 sticky_pivot_view/static/description/icon.png mode change 100644 => 100755 sticky_pivot_view/static/description/index.html mode change 100644 => 100755 sticky_pivot_view/static/src/css/main.css mode change 100644 => 100755 sticky_pivot_view/static/src/xml/pivot.xml mode change 100644 => 100755 sticky_pivot_view/views/assets.xml diff --git a/project_report/report/project_revenue_custom_report.py b/project_report/report/project_revenue_custom_report.py index 7fa6237..ff621f5 100755 --- a/project_report/report/project_revenue_custom_report.py +++ b/project_report/report/project_revenue_custom_report.py @@ -28,8 +28,9 @@ class ProjectRevenueCustomReport(models.Model): timesheet_sdatetime = fields.Datetime(string='Timesheet Start Time', readonly=True) unit_amount = fields.Float('Timesheet Hours') timesheet_cost = fields.Float('Timesheet Cost') - profit_per = fields.Float(string='Profit Percentage', digits=(16, 2)) + profit_per = fields.Float(string='Profit (%)', digits=(16, 2)) profit_amt = fields.Float(string='Profit Amount', digits=(16, 2)) + expenses_amt = fields.Float(string='Expenses Amount', digits=(16, 2)) pro_hourly_rate = fields.Float("Hourly Rate", group_operator="sum") budgeted_hours = fields.Float("Budgeted Hours", digits=(16, 2), readonly=True, group_operator="sum") budgeted_revenue = fields.Float("Budgeted Revenue", digits=(16, 2), readonly=True, group_operator="sum") @@ -54,6 +55,7 @@ class ProjectRevenueCustomReport(models.Model): pro_hourly_rate, actual_revenue, actual_cost, + expenses_amt, profit_amt, profit_per, unit_amount, @@ -71,6 +73,7 @@ class ProjectRevenueCustomReport(models.Model): 0.0 AS pro_hourly_rate, 0.0 AS actual_revenue, (AAL.amount * -1) AS actual_cost, + 0.0 AS expenses_amt, 0.0 AS profit_amt, 0.0 AS profit_per, AAL.unit_amount, @@ -93,8 +96,9 @@ class ProjectRevenueCustomReport(models.Model): pro.hourly_rate AS pro_hourly_rate, 0.0 AS actual_revenue, 0.0 AS actual_cost, - pro.profit_per, + pro.expenses_amt AS expenses_amt, pro.profit_amt, + pro.profit_per, 0.0 as unit_amount, 0.0 as timesheet_cost, null::timestamp as timesheet_sdatetime @@ -113,8 +117,9 @@ class ProjectRevenueCustomReport(models.Model): 0.0 AS pro_hourly_rate, (AAL.unit_amount * pro.hourly_rate) AS actual_revenue, (AAL.amount * -1) AS actual_cost, - 0.0 AS profit_per, - 0.0 AS profit_amt, + 0.0 AS expenses_amt, + 0.0 AS profit_amt, + 0.0 AS profit_per, AAL.unit_amount, ((AAL.amount * -1)/NULLIF(AAL.unit_amount, 0)) as timesheet_cost, AAL.start_datetime AS timesheet_sdatetime @@ -135,8 +140,9 @@ class ProjectRevenueCustomReport(models.Model): COALESCE(pro_emp.price_unit, 0) as pro_hourly_rate, 0.0 AS actual_revenue, 0.0 AS actual_cost, - 0.0 as profit_per, - 0.0 as profit_amt, + 0.0 AS expenses_amt, + 0.0 as profit_amt, + 0.0 as profit_per, 0.0 as unit_amount, 0.0 as timesheet_cost, null::timestamp as timesheet_sdatetime @@ -158,8 +164,9 @@ class ProjectRevenueCustomReport(models.Model): 0.0 AS budgeted_hours, 0.0 AS actual_revenue, 0.0 AS actual_cost, - pro.profit_per, - pro.profit_amt, + pro.expenses_amt AS expenses_amt, + pro.profit_amt, + pro.profit_per, 0.0 as unit_amount, 0.0 as timesheet_cost, null::timestamp as timesheet_sdatetime @@ -178,8 +185,9 @@ class ProjectRevenueCustomReport(models.Model): 0.0 AS budgeted_hours, (AAL.unit_amount * pro_emp.price_unit) AS actual_revenue, case when pro_emp.employee_price is null then (AAL.amount * -1) else (AAL.unit_amount * pro_emp.employee_price) end as actual_cost, - 0.0 AS profit_per, - 0.0 AS profit_amt, + 0.0 AS expenses_amt, + 0.0 AS profit_amt, + 0.0 AS profit_per, AAL.unit_amount, case when pro_emp.employee_price is null then ((AAL.amount * -1)/NULLIF(AAL.unit_amount, 0)) else pro_emp.employee_price end as timesheet_cost, AAL.start_datetime AS timesheet_sdatetime diff --git a/project_report/report/project_revenue_custom_report_views.xml b/project_report/report/project_revenue_custom_report_views.xml index 2c140d6..51e3e29 100755 --- a/project_report/report/project_revenue_custom_report_views.xml +++ b/project_report/report/project_revenue_custom_report_views.xml @@ -12,6 +12,7 @@ + diff --git a/sticky_pivot_view/README.rst b/sticky_pivot_view/README.rst old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/__manifest__.py b/sticky_pivot_view/__manifest__.py old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/doc/RELEASE_NOTES.md b/sticky_pivot_view/doc/RELEASE_NOTES.md old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/check.png b/sticky_pivot_view/static/description/assets/icons/check.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/chevron.png b/sticky_pivot_view/static/description/assets/icons/chevron.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/cogs.png b/sticky_pivot_view/static/description/assets/icons/cogs.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/consultation.png b/sticky_pivot_view/static/description/assets/icons/consultation.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/ecom-black.png b/sticky_pivot_view/static/description/assets/icons/ecom-black.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/education-black.png b/sticky_pivot_view/static/description/assets/icons/education-black.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/hotel-black.png b/sticky_pivot_view/static/description/assets/icons/hotel-black.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/license.png b/sticky_pivot_view/static/description/assets/icons/license.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/lifebuoy.png b/sticky_pivot_view/static/description/assets/icons/lifebuoy.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/logo.png b/sticky_pivot_view/static/description/assets/icons/logo.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/manufacturing-black.png b/sticky_pivot_view/static/description/assets/icons/manufacturing-black.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/pos-black.png b/sticky_pivot_view/static/description/assets/icons/pos-black.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/puzzle.png b/sticky_pivot_view/static/description/assets/icons/puzzle.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/restaurant-black.png b/sticky_pivot_view/static/description/assets/icons/restaurant-black.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/service-black.png b/sticky_pivot_view/static/description/assets/icons/service-black.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/trading-black.png b/sticky_pivot_view/static/description/assets/icons/trading-black.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/training.png b/sticky_pivot_view/static/description/assets/icons/training.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/update.png b/sticky_pivot_view/static/description/assets/icons/update.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/user.png b/sticky_pivot_view/static/description/assets/icons/user.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/icons/wrench.png b/sticky_pivot_view/static/description/assets/icons/wrench.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/modules/approval_image.png b/sticky_pivot_view/static/description/assets/modules/approval_image.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/modules/budget_image.png b/sticky_pivot_view/static/description/assets/modules/budget_image.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/modules/export_image.png b/sticky_pivot_view/static/description/assets/modules/export_image.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/modules/magento_image.png b/sticky_pivot_view/static/description/assets/modules/magento_image.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/modules/pos_image.png b/sticky_pivot_view/static/description/assets/modules/pos_image.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/modules/shopify_image.png b/sticky_pivot_view/static/description/assets/modules/shopify_image.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/screenshots/hero.png b/sticky_pivot_view/static/description/assets/screenshots/hero.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/assets/screenshots/sticky_pivot_view.png b/sticky_pivot_view/static/description/assets/screenshots/sticky_pivot_view.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/banner.png b/sticky_pivot_view/static/description/banner.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/icon.png b/sticky_pivot_view/static/description/icon.png old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/description/index.html b/sticky_pivot_view/static/description/index.html old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/src/css/main.css b/sticky_pivot_view/static/src/css/main.css old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/static/src/xml/pivot.xml b/sticky_pivot_view/static/src/xml/pivot.xml old mode 100644 new mode 100755 diff --git a/sticky_pivot_view/views/assets.xml b/sticky_pivot_view/views/assets.xml old mode 100644 new mode 100755