Skip to content

Commit

Permalink
[UPD] ssi_revenue_recognition
Browse files Browse the repository at this point in the history
* Menyesuaikan perhitungan Qty Accepted pada RR
  • Loading branch information
andhit-r committed Oct 13, 2024
1 parent 8e65f51 commit d228286
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ssi_revenue_recognition/models/revenue_recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,15 @@ def _get_policy_field(self):
"quantity",
"performance_obligation_acceptance_ids",
"performance_obligation_acceptance_ids.state",
"performance_obligation_acceptance_ids.qty_fulfilled",
"performance_obligation_acceptance_ids.qty_accepted",
)
def _compute_quantity_accepted(self):
for record in self:
qty_accepted = qty_diff = percentage = amount_accepted = 0.0
for acceptance in record.performance_obligation_acceptance_ids.filtered(
lambda r: r.state == "done"
):
qty_accepted += acceptance.qty_fulfilled
qty_accepted += acceptance.qty_accepted

qty_diff = record.quantity - qty_accepted
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<field name="date_start" />
<field name="date_end" />
<field name="qty_fulfilled" sum="Total Qty Fulfillment" />
<field name="qty_accepted" sum="Total Qty Accepted" />
</xpath>
</data>
</field>
Expand Down
4 changes: 2 additions & 2 deletions ssi_revenue_recognition/views/revenue_recognition_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@
<field name="performance_obligation_acceptance_ids" />
<group name="acceptance_1" colspan="4" col="2">
<group name="acceptance_1_1" colspan="1" col="2">
<field name="quantity" />
<field name="quantity" invisible="1" />
<field name="quantity_accepted" />
<field name="quantity_diff" />
<field name="quantity_diff" invisible="1" />
<field name="percentage_accepted" />
<field name="amount_accepted" />
</group>
Expand Down

0 comments on commit d228286

Please sign in to comment.