Skip to content

Commit

Permalink
fix: use taxable value instead of base amount in gstr3b details report
Browse files Browse the repository at this point in the history
  • Loading branch information
ljain112 committed Oct 25, 2023
1 parent e479034 commit 13fd959
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def extend_columns(self):
)

def get_data(self):
self.gst_accounts = get_gst_accounts_by_type(self.company, "Input")
purchase_data = self.get_itc_from_purchase()
boe_data = self.get_itc_from_boe()
journal_entry_data = self.get_itc_from_journal_entry()
Expand Down Expand Up @@ -152,7 +153,6 @@ def get_itc_from_purchase(self):
def get_itc_from_boe(self):
boe = frappe.qb.DocType("Bill of Entry")
boe_taxes = frappe.qb.DocType("Bill of Entry Taxes")
self.gst_accounts = get_gst_accounts_by_type(self.company, "Input")

query = (
frappe.qb.from_(boe)
Expand Down Expand Up @@ -299,7 +299,7 @@ def get_data(self):
)

intra, inter = 0, 0
base_amount = invoice.base_amount
taxable_value = invoice.taxable_value

if (
invoice.is_nil_exempt == 1
Expand All @@ -311,9 +311,9 @@ def get_data(self):
nature_of_supply = "Non GST Supply"

if supplier_state == place_of_supply:
intra = base_amount
intra = taxable_value
else:
inter = base_amount
inter = taxable_value

formatted_data.append(
{
Expand Down Expand Up @@ -347,7 +347,7 @@ def get_inward_nil_exempt(self):
purchase_invoice.posting_date,
purchase_invoice.place_of_supply,
purchase_invoice.supplier_address,
Sum(purchase_invoice_item.base_amount).as_("base_amount"),
Sum(purchase_invoice_item.taxable_value).as_("taxable_value"),
purchase_invoice_item.is_nil_exempt,
purchase_invoice_item.is_non_gst,
purchase_invoice.supplier_gstin,
Expand Down

0 comments on commit 13fd959

Please sign in to comment.