diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2024-08-13 14:19:02 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2024-08-13 14:19:02 +0700 |
| commit | 2788396b4b1ccbb83c287f9bba0d52e7799f7b38 (patch) | |
| tree | e3a68dc724e14113257d9b848ff8535f2cc527cd | |
| parent | fa8a40973dee9f4f4cd2d7908e9a1ed4fb75cfaa (diff) | |
add todo in calculate selling price
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 9 |
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 |
