Report expenses amount added
|
@ -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
|
||||
|
|
|
@ -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"/>
|
||||
|
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 310 B After Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 576 B After Width: | Height: | Size: 576 B |
0
sticky_pivot_view/static/description/assets/icons/education-black.png
Normal file → Executable file
Before Width: | Height: | Size: 733 B After Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 911 B After Width: | Height: | Size: 911 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
0
sticky_pivot_view/static/description/assets/icons/manufacturing-black.png
Normal file → Executable file
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 878 B After Width: | Height: | Size: 878 B |
Before Width: | Height: | Size: 653 B After Width: | Height: | Size: 653 B |
0
sticky_pivot_view/static/description/assets/icons/restaurant-black.png
Normal file → Executable file
Before Width: | Height: | Size: 905 B After Width: | Height: | Size: 905 B |
Before Width: | Height: | Size: 839 B After Width: | Height: | Size: 839 B |
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 427 B |
Before Width: | Height: | Size: 627 B After Width: | Height: | Size: 627 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 988 B After Width: | Height: | Size: 988 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
sticky_pivot_view/static/description/assets/modules/approval_image.png
Normal file → Executable file
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
0
sticky_pivot_view/static/description/assets/modules/budget_image.png
Normal file → Executable file
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
0
sticky_pivot_view/static/description/assets/modules/export_image.png
Normal file → Executable file
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
0
sticky_pivot_view/static/description/assets/modules/magento_image.png
Normal file → Executable file
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
0
sticky_pivot_view/static/description/assets/modules/shopify_image.png
Normal file → Executable file
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 176 KiB After Width: | Height: | Size: 176 KiB |
0
sticky_pivot_view/static/description/assets/screenshots/sticky_pivot_view.png
Normal file → Executable file
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |