Gstr reports (#12940)
* GSTR1 for B2B (#12296) * [minor] Modified GSTR1 report to identify missing GST Account in GST Settings (#12426) * [minor] Modified GSTR1 report to identify missing GST Account in GST Settings * Update gstr_1.py * GSTR1 for B2B, B2CL and B2CS (#12459) * [Report] GSTR - 1 CDNR Report (#12554) * [wip] cdnr * [WIP] cdnr with optional data * [wip] Export GSTR-1 * [minor] Minor changes in export * [new] Custom field added for GST * [fix] Minor changes in GSTR1 Report * [minor] Minor changes in gstr1 * [fix] Codacy Fixed * Update setup.py * [wip] Gstr2 * [fix] Fetch correct Tax Details * [minor] ITC data append to row * [fix] CDNR negative value * Cleanup and fixes on GSTR-2 * Minor fixes in gstr reports (#12848) * [new] B2C limit fetch from GST Settings (#12905) * [new] b2c limit fetch from gst setting * [fix] Patch Added for b2c limit * Update gstr_1.py * Update utils.py * Cusotm fields related GSTR2 * minor fixes * minor fixes * some more fixes * Added duplicate patch and some tests as not required on develop
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import frappe, re
|
||||
from frappe import _
|
||||
from frappe.utils import cstr
|
||||
from erpnext.regional.india import states, state_numbers
|
||||
from erpnext.controllers.taxes_and_totals import get_itemised_tax, get_itemised_taxable_amount
|
||||
|
||||
@@ -29,12 +30,12 @@ def get_itemised_tax_breakup_header(item_doctype, tax_accounts):
|
||||
return [_("HSN/SAC"), _("Taxable Amount")] + tax_accounts
|
||||
else:
|
||||
return [_("Item"), _("Taxable Amount")] + tax_accounts
|
||||
|
||||
|
||||
def get_itemised_tax_breakup_data(doc):
|
||||
itemised_tax = get_itemised_tax(doc.taxes)
|
||||
|
||||
itemised_taxable_amount = get_itemised_taxable_amount(doc.items)
|
||||
|
||||
|
||||
if not frappe.get_meta(doc.doctype + " Item").has_field('gst_hsn_code'):
|
||||
return itemised_tax, itemised_taxable_amount
|
||||
|
||||
@@ -60,7 +61,19 @@ def get_itemised_tax_breakup_data(doc):
|
||||
|
||||
return hsn_tax, hsn_taxable_amount
|
||||
|
||||
def set_place_of_supply(doc, method):
|
||||
if not frappe.get_meta('Address').has_field('gst_state'): return
|
||||
|
||||
if doc.doctype == "Sales Invoice":
|
||||
address_name = doc.shipping_address_name or doc.customer_address
|
||||
elif doc.doctype == "Purchase Invoice":
|
||||
address_name = doc.shipping_address or doc.supplier_address
|
||||
|
||||
if address_name:
|
||||
address = frappe.db.get_value("Address", address_name, ["gst_state", "gst_state_number"], as_dict=1)
|
||||
doc.place_of_supply = cstr(address.gst_state_number) + "-" + cstr(address.gst_state)
|
||||
|
||||
# don't remove this function it is used in tests
|
||||
def test_method():
|
||||
'''test function'''
|
||||
return 'overridden'
|
||||
return 'overridden'
|
||||
|
||||
Reference in New Issue
Block a user