Skip to content

Commit

Permalink
fixup! [IMP] #341 ps_planning: select move lines via move's period
Browse files Browse the repository at this point in the history
  • Loading branch information
hbrunn committed Nov 13, 2024
1 parent 3ec00bd commit 3f66a1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ps_planning/models/ps_planning_billing_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ def init(self):
WHEN project_invoicing_properties.actual_time_spent THEN (
select sum(quantity) / 8
from account_move_line aml
join account_move am on aml.move_id=am.id
join ps_invoice psi on aml.ps_invoice_id=psi.id
where
aml.analytic_account_id=project_project.analytic_account_id
and aml.product_uom_id=(select product_uom_hour from xmlids)
and am.period_id=ps_planning_line_planned.range_id
and psi.period_id=ps_planning_line_planned.range_id
)
WHEN project_invoicing_properties.fixed_amount THEN (
select sum(days)
Expand All @@ -106,7 +106,7 @@ def init(self):
(
select sum(aml.price_total)
from account_move_line aml
join account_move am on aml.move_id=am.id
join ps_invoice psi on aml.ps_invoice_id=psi.id
where
aml.analytic_account_id=project_project.analytic_account_id
and aml.product_uom_id=(
Expand All @@ -119,7 +119,7 @@ def init(self):
)
END
)
and am.period_id=ps_planning_line_planned.range_id
and psi.period_id=ps_planning_line_planned.range_id
) as billed_value
FROM
ps_contracted_line
Expand Down

0 comments on commit 3f66a1e

Please sign in to comment.