summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindoteknik_custom/models/sale_order.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 5e5d76b4..0be40fd0 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -838,6 +838,10 @@ class SaleOrder(models.Model):
# TODO ongkos kirim, biaya pihak ketiga calculate @stephan
# TODO voucher @stephan
# TODO vendor hilanging child di field SO Line @stephan
+ # TODO button pindahin @stephan
+ # TODO last so 1 tahun ke belakang @stephan
+ # TODO pastikan harga beli 1 tahun ke belakang jg
+ # TODO counter di klik berapa banyak
for order_line in self.order_line:
rec_purchase_price, rec_taxes_id, rec_vendor_id = order_line._get_purchase_price(order_line.product_id)
state = ['sale', 'done']
@@ -884,6 +888,11 @@ class SaleOrder(models.Model):
else:
selling_price = rec_purchase_price / (1 - (last_so.item_percent_margin / 100))
tax_id = last_so.tax_id
+ for tax in tax_id:
+ if tax.price_include:
+ selling_price = selling_price + (selling_price * 11 / 100)
+ else:
+ selling_price = selling_price
discount = 0
elif last_so:
selling_price = last_so.price_unit