Report expenses amount added

This commit is contained in:
prakash 2022-03-28 23:05:23 +05:30
parent 3d1a0a79a5
commit 407c7426ca
39 changed files with 19 additions and 10 deletions

View File

@ -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

View File

@ -12,6 +12,7 @@
<field name="actual_cost" type="measure"/>
<field name="budgeted_hours" type="measure"/>
<field name="pro_hourly_rate" type="measure"/>
<field name="expenses_amt" type="measure"/>
<field name="profit_amt" type="measure"/>
<field name="profit_per" type="measure"/>
<field name="unit_amount" type="measure"/>

0
sticky_pivot_view/README.rst Normal file → Executable file
View File

0
sticky_pivot_view/__manifest__.py Normal file → Executable file
View File

0
sticky_pivot_view/doc/RELEASE_NOTES.md Normal file → Executable file
View File

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 310 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 576 B

View File

Before

Width:  |  Height:  |  Size: 733 B

After

Width:  |  Height:  |  Size: 733 B

View File

Before

Width:  |  Height:  |  Size: 911 B

After

Width:  |  Height:  |  Size: 911 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 673 B

After

Width:  |  Height:  |  Size: 673 B

View File

Before

Width:  |  Height:  |  Size: 878 B

After

Width:  |  Height:  |  Size: 878 B

View File

Before

Width:  |  Height:  |  Size: 653 B

After

Width:  |  Height:  |  Size: 653 B

View File

Before

Width:  |  Height:  |  Size: 905 B

After

Width:  |  Height:  |  Size: 905 B

View File

Before

Width:  |  Height:  |  Size: 839 B

After

Width:  |  Height:  |  Size: 839 B

View File

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 427 B

View File

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 627 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 988 B

After

Width:  |  Height:  |  Size: 988 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View File

Before

Width:  |  Height:  |  Size: 176 KiB

After

Width:  |  Height:  |  Size: 176 KiB

View File

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 108 KiB

0
sticky_pivot_view/static/description/banner.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

0
sticky_pivot_view/static/description/icon.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

0
sticky_pivot_view/static/description/index.html Normal file → Executable file
View File

0
sticky_pivot_view/static/src/css/main.css Normal file → Executable file
View File

0
sticky_pivot_view/static/src/xml/pivot.xml Normal file → Executable file
View File

0
sticky_pivot_view/views/assets.xml Normal file → Executable file
View File