Skip to content

Commit

Permalink
[Karthi] | BAH-3598 | Refactor. Cost Price and sale price logic has b…
Browse files Browse the repository at this point in the history
…een added (#75)
  • Loading branch information
karthikeyansp91 authored Mar 5, 2024
1 parent bb69f7f commit be2a22f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bahmni_stock/models/stock_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def _check_cost_price_values(self):
('higher_price', '=', 0)],limit=1)
if markup_table_line:
self.sale_price = self.cost_price + (self.cost_price * markup_table_line.markup_percentage / 100)

else:
self.sale_price = self.cost_price
else:
pass

Expand All @@ -51,7 +52,8 @@ def default_get(self, fields):
('higher_price', '=', 0)],limit=1)
if markup_table_line:
res.update({'cost_price': cost_value,'sale_price': cost_value + (cost_value * markup_table_line.markup_percentage / 100)})

else:
res.update({'cost_price': cost_value,'sale_price': cost_value })
else:
pass
return res
Expand Down

0 comments on commit be2a22f

Please sign in to comment.