Merge branch 'develop' into employee-leave-balance-summary
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 2af1269..2f74d54 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -632,4 +632,5 @@
erpnext.patches.v12_0.add_default_dashboards
erpnext.patches.v12_0.remove_bank_remittance_custom_fields
erpnext.patches.v12_0.generate_leave_ledger_entries
-erpnext.patches.v12_0.move_credit_limit_to_customer_credit_limit
\ No newline at end of file
+erpnext.patches.v12_0.move_credit_limit_to_customer_credit_limit
+erpnext.patches.v12_0.add_variant_of_in_item_attribute_table
diff --git a/erpnext/patches/v12_0/add_variant_of_in_item_attribute_table.py b/erpnext/patches/v12_0/add_variant_of_in_item_attribute_table.py
index bc61190..bb13078 100644
--- a/erpnext/patches/v12_0/add_variant_of_in_item_attribute_table.py
+++ b/erpnext/patches/v12_0/add_variant_of_in_item_attribute_table.py
@@ -1,8 +1,8 @@
import frappe
def execute():
- frappe.db.sql('''
- UPDATE `tabItem Variant Attribute` t1
- INNER JOIN `tabItem` t2 ON t2.name = t1.parent
- SET t1.variant_of = t2.variant_of
- ''')
+ frappe.db.sql('''
+ UPDATE `tabItem Variant Attribute` t1
+ INNER JOIN `tabItem` t2 ON t2.name = t1.parent
+ SET t1.variant_of = t2.variant_of
+ ''')
diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py
index c397133..43e232b 100644
--- a/erpnext/regional/report/gstr_1/gstr_1.py
+++ b/erpnext/regional/report/gstr_1/gstr_1.py
@@ -163,15 +163,14 @@
if not b2c_limit:
frappe.throw(_("Please set B2C Limit in GST Settings."))
- if self.filters.get("type_of_business") == "B2C Large" and customers:
+ if self.filters.get("type_of_business") == "B2C Large":
conditions += """ and SUBSTR(place_of_supply, 1, 2) != SUBSTR(company_gstin, 1, 2)
- and grand_total > {0} and is_return != 1 and gst_category ='Unregistered' """.\
- format(flt(b2c_limit), ", ".join([frappe.db.escape(c.name) for c in customers]))
- elif self.filters.get("type_of_business") == "B2C Small" and customers:
+ and grand_total > {0} and is_return != 1 and gst_category ='Unregistered' """.format(flt(b2c_limit))
+
+ elif self.filters.get("type_of_business") == "B2C Small":
conditions += """ and (
SUBSTR(place_of_supply, 1, 2) = SUBSTR(company_gstin, 1, 2)
- or grand_total <= {0}) and is_return != 1 and gst_category ='Unregistered' """.\
- format(flt(b2c_limit), ", ".join([frappe.db.escape(c.name) for c in customers]))
+ or grand_total <= {0}) and is_return != 1 and gst_category ='Unregistered' """.format(flt(b2c_limit))
elif self.filters.get("type_of_business") == "CDNR":
conditions += """ and is_return = 1 """