summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-12-31 15:59:45 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-12-31 15:59:45 +0700
commit1ec4b411c91851202a6058b531257f45fdd76457 (patch)
tree10cc7ee5a9243080a88bc25160972b2813211c2b
parentd35c2dce88a87bc05d30c4935d51d7d58aa5d37d (diff)
parente90f1b5a714bc1a18073df18f7798d28cafab7c4 (diff)
Merge branch 'cr/ppn12%' into production
-rw-r--r--indoteknik_api/controllers/api_v1/sale_order.py2
-rw-r--r--indoteknik_api/models/product_product.py20
-rw-r--r--indoteknik_custom/models/logbook_bill.py2
-rw-r--r--indoteknik_custom/models/promotion/sale_order.py2
-rwxr-xr-xindoteknik_custom/models/purchase_pricelist.py4
-rw-r--r--indoteknik_custom/models/requisition.py2
-rwxr-xr-xindoteknik_custom/models/sale_order.py10
-rw-r--r--indoteknik_custom/models/sale_order_line.py6
-rw-r--r--indoteknik_custom/models/stock_move.py2
-rw-r--r--indoteknik_custom/models/website_user_cart.py6
10 files changed, 28 insertions, 28 deletions
diff --git a/indoteknik_api/controllers/api_v1/sale_order.py b/indoteknik_api/controllers/api_v1/sale_order.py
index 8b95ade8..f972fd46 100644
--- a/indoteknik_api/controllers/api_v1/sale_order.py
+++ b/indoteknik_api/controllers/api_v1/sale_order.py
@@ -398,7 +398,7 @@ class SaleOrder(controller.Controller):
parameters = {
'warehouse_id': 8,
'carrier_id': 1,
- 'sales_tax_id': 23,
+ 'sales_tax_id': 218,
'pricelist_id': user_pricelist or product_pricelist_default_discount_id,
'payment_term_id': 26,
'team_id': 2,
diff --git a/indoteknik_api/models/product_product.py b/indoteknik_api/models/product_product.py
index f8869c7d..d7e20ac3 100644
--- a/indoteknik_api/models/product_product.py
+++ b/indoteknik_api/models/product_product.py
@@ -139,39 +139,39 @@ class ProductProduct(models.Model):
return retValue
def _get_website_price_exclude_tax(self):
- default_divide_tax = float(1.11)
+ default_divide_tax = float(1.12)
price_incl = self._get_website_price_include_tax()
res = price_incl / default_divide_tax
return math.floor(res)
def _v2_get_website_price_exclude_tax(self):
- default_divide_tax = float(1.11)
+ default_divide_tax = float(1.12)
price_incl = self._v2_get_website_price_include_tax()
res = price_incl / default_divide_tax
return math.floor(res)
def _get_website_price_after_disc_and_tax(self):
- default_divide_tax = float(1.11)
+ default_divide_tax = float(1.12)
price_after_disc = self._get_website_price_after_disc()
res = price_after_disc / default_divide_tax
res = math.ceil(res)
return res
def _v2_get_website_price_after_disc_and_tax(self):
- default_divide_tax = float(1.11)
+ default_divide_tax = float(1.12)
price_after_disc = self._v2_get_website_price_after_disc()
res = price_after_disc / default_divide_tax
res = math.ceil(res)
return res
def _get_website_tax(self):
- default_percent_tax = float(11)
+ default_percent_tax = float(12)
price_after_disc = self._get_website_price_after_disc_and_tax()
res = price_after_disc * default_percent_tax / 100
return math.floor(res)
def _v2_get_website_tax(self):
- default_percent_tax = float(11)
+ default_percent_tax = float(12)
price_after_disc = self._v2_get_website_price_after_disc_and_tax()
res = price_after_disc * default_percent_tax / 100
return math.floor(res)
@@ -229,7 +229,7 @@ class ProductProduct(models.Model):
def _get_pricelist_tier(self, tier_number):
config_param_name = f'product.pricelist.tier{tier_number}'
product_pricelist_tier = int(self.env['ir.config_parameter'].get_param(config_param_name))
- default_divide_tax = float(1.11)
+ default_divide_tax = float(1.12)
base_price = discount = price = 0
pricelist_item = self.env['product.pricelist.item'].search([
('pricelist_id', '=', int(product_pricelist_tier)),
@@ -273,12 +273,12 @@ class ProductProduct(models.Model):
base_price = 0
if base_pricelist:
base_price = base_pricelist.computed_price
- # base_price = base_pricelist.computed_price / 1.11
+ # base_price = base_pricelist.computed_price / 1.12
discount = 0
price_flashsale = 0
- default_divide_tax = float(1.11)
- default_tax = float(11)
+ default_divide_tax = float(1.12)
+ default_tax = float(12)
if item.price_discount > 0:
discount = item.price_discount
price_flashsale = base_price - (base_price * discount // 100)
diff --git a/indoteknik_custom/models/logbook_bill.py b/indoteknik_custom/models/logbook_bill.py
index bb956092..3c33aeb7 100644
--- a/indoteknik_custom/models/logbook_bill.py
+++ b/indoteknik_custom/models/logbook_bill.py
@@ -22,7 +22,7 @@ class LogbookBill(models.TransientModel):
('product_id', '=', line.product_id.id),
], order='id desc', limit=1)
total += line.quantity_done * po.price_unit
- total_with_tax = total * 1.11
+ total_with_tax = total * 1.12
return total_with_tax
diff --git a/indoteknik_custom/models/promotion/sale_order.py b/indoteknik_custom/models/promotion/sale_order.py
index 1c31d060..6cb56914 100644
--- a/indoteknik_custom/models/promotion/sale_order.py
+++ b/indoteknik_custom/models/promotion/sale_order.py
@@ -37,7 +37,7 @@ class SaleOrder(models.Model):
else:
all_products = self._merge_promotion_products(promotion)
- promotion_price = promotion['price']['price_discount'] * line.quantity * 1.11
+ promotion_price = promotion['price']['price_discount'] * line.quantity * 1.12
promotion_amt_total = sum(product['price']['price'] * product['qty'] for product in all_products)
promotion_used_price = 0
diff --git a/indoteknik_custom/models/purchase_pricelist.py b/indoteknik_custom/models/purchase_pricelist.py
index e5b35d7f..c543070a 100755
--- a/indoteknik_custom/models/purchase_pricelist.py
+++ b/indoteknik_custom/models/purchase_pricelist.py
@@ -48,9 +48,9 @@ class PurchasePricelist(models.Model):
def _constrains_include_price(self):
price, taxes = self._get_valid_price()
- # When have tax is excluded or empty tax, then multiply by 1.11
+ # When have tax is excluded or empty tax, then multiply by 1.12
if (taxes and not taxes.price_include) or not taxes:
- price *= 1.11
+ price *= 1.12
self.include_price = price
diff --git a/indoteknik_custom/models/requisition.py b/indoteknik_custom/models/requisition.py
index c972b485..78cdf80d 100644
--- a/indoteknik_custom/models/requisition.py
+++ b/indoteknik_custom/models/requisition.py
@@ -159,7 +159,7 @@ class Requisition(models.Model):
offset=i * PRODUCT_PER_PO,
limit=PRODUCT_PER_PO
)
- tax = [22]
+ tax = [220]
for line in lines:
product = line.product_id
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index f5e7e8a1..2b448874 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -1217,7 +1217,7 @@ class SaleOrder(models.Model):
line_voucher = used_discount * line_contribution
line_voucher_item = line_voucher / line.product_uom_qty
- line_price_unit = line.price_unit / 1.11 if any(tax.id == 23 for tax in line.tax_id) else line.price_unit
+ line_price_unit = line.price_unit / 1.12 if any(tax.id == 217 for tax in line.tax_id) else line.price_unit
line_discount_item = line_price_unit * line.discount / 100 + line_voucher_item
line_voucher_item = line_discount_item / line_price_unit * 100
@@ -1330,13 +1330,13 @@ class SaleOrder(models.Model):
if last_so and rec_purchase_price != last_so.purchase_price:
rec_taxes = self.env['account.tax'].search([('id', '=', rec_taxes_id)], limit=1)
if rec_taxes.price_include:
- selling_price = (rec_purchase_price / 1.11) / (1 - (last_so.item_percent_margin_without_deduction / 100))
+ selling_price = (rec_purchase_price / 1.12) / (1 - (last_so.item_percent_margin_without_deduction / 100))
else:
selling_price = rec_purchase_price / (1 - (last_so.item_percent_margin_without_deduction / 100))
tax_id = last_so.tax_id
for tax in tax_id:
if tax.price_include:
- selling_price = selling_price + (selling_price*11/100)
+ selling_price = selling_price + (selling_price*12/100)
else:
selling_price = selling_price
discount = 0
@@ -1352,13 +1352,13 @@ class SaleOrder(models.Model):
elif last_so and rec_vendor_id == order_line.vendor_id.id and rec_purchase_price != last_so.purchase_price:
rec_taxes = self.env['account.tax'].search([('id', '=', rec_taxes_id)], limit=1)
if rec_taxes.price_include:
- selling_price = (rec_purchase_price / 1.11) / (1 - (last_so.item_percent_margin_without_deduction / 100))
+ selling_price = (rec_purchase_price / 1.12) / (1 - (last_so.item_percent_margin_without_deduction / 100))
else:
selling_price = rec_purchase_price / (1 - (last_so.item_percent_margin_without_deduction / 100))
tax_id = last_so.tax_id
for tax in tax_id:
if tax.price_include:
- selling_price = selling_price + (selling_price*11/100)
+ selling_price = selling_price + (selling_price*12/100)
else:
selling_price = selling_price
discount = 0
diff --git a/indoteknik_custom/models/sale_order_line.py b/indoteknik_custom/models/sale_order_line.py
index a31ff569..a82bcc8a 100644
--- a/indoteknik_custom/models/sale_order_line.py
+++ b/indoteknik_custom/models/sale_order_line.py
@@ -96,7 +96,7 @@ class SaleOrderLine(models.Model):
purchase_price = line.purchase_price
if line.purchase_tax_id.price_include:
- purchase_price = line.purchase_price / 1.11
+ purchase_price = line.purchase_price / 1.12
purchase_price = purchase_price * line.product_uom_qty
margin_per_item = sales_price - purchase_price
@@ -124,7 +124,7 @@ class SaleOrderLine(models.Model):
purchase_price = line.purchase_price
if line.purchase_tax_id.price_include:
- purchase_price = line.purchase_price / 1.11
+ purchase_price = line.purchase_price / 1.12
purchase_price = purchase_price * line.product_uom_qty
margin_per_item = sales_price - purchase_price
@@ -175,7 +175,7 @@ class SaleOrderLine(models.Model):
# # tax_id = last_so.tax_id
# if rec_vendor_id == self.vendor_id and rec_purchase_price != last_so.purchase_price:
# if rec_taxes.price_include:
- # selling_price = (rec_purchase_price/1.11) / (1-(last_so.line_item_margin / 100))
+ # selling_price = (rec_purchase_price/1.12) / (1-(last_so.line_item_margin / 100))
# else:
# selling_price = rec_purchase_price / (1-(last_so.line_item_margin / 100))
# tax_id = last_so.tax_id
diff --git a/indoteknik_custom/models/stock_move.py b/indoteknik_custom/models/stock_move.py
index e1d4e74c..c0ac341c 100644
--- a/indoteknik_custom/models/stock_move.py
+++ b/indoteknik_custom/models/stock_move.py
@@ -112,7 +112,7 @@ class StockMove(models.Model):
# 440 is static id for "PPN Keluaran" on account.account model
debit_account_id = self.picking_id.account_id.id if self.picking_id.account_id.id else 538
- tax = cost * (11 / 100)
+ tax = cost * (12 / 100)
move_lines = self._prepare_account_move_line(qty, cost, credit_account_id, debit_account_id, description)
move_lines += self._prepare_account_move_line(qty, tax, 440, debit_account_id, description)
diff --git a/indoteknik_custom/models/website_user_cart.py b/indoteknik_custom/models/website_user_cart.py
index 44393cf1..8da716a1 100644
--- a/indoteknik_custom/models/website_user_cart.py
+++ b/indoteknik_custom/models/website_user_cart.py
@@ -163,7 +163,7 @@ class WebsiteUserCart(models.Model):
voucher_shipping_info = voucher_shipping.apply(order_line)
discount_voucher_shipping = voucher_shipping_info['discount']['all']
- tax = round(subtotal * 0.11)
+ tax = round(subtotal * 0.12)
grand_total = subtotal + tax
total_weight = sum(x['weight'] * x['quantity'] for x in products)
total_weight = round(total_weight, 2)
@@ -240,7 +240,7 @@ class WebsiteUserCart(models.Model):
total_voucher += voucher_product
if total_discount > 0:
- ppn = total_discount * 0.11
+ ppn = total_discount * 0.12
return {
'total_discount': self.format_currency(total_discount),
'total_voucher': self.format_currency(total_voucher),
@@ -352,7 +352,7 @@ class WebsiteUserCart(models.Model):
discounted_price = fixed_price - (fixed_price * discount / 100)
- final_price = discounted_price / 1.11
+ final_price = discounted_price / 1.12
return {
'price': final_price,