diff --git a/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.js b/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.js
index a1cea8f..5170185 100644
--- a/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.js
+++ b/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.js
@@ -45,6 +45,10 @@
 		frm.set_df_property('year', 'options', options);
 	},
 
+	validate: function(frm) {
+		frm.dirty();
+	},
+
 	setup: function(frm) {
 		frm.set_query('company_address', function(doc) {
 			if(!doc.company) {
diff --git a/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py b/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py
index 619734f..6d9b8db 100644
--- a/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py
+++ b/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py
@@ -243,20 +243,15 @@
 
 		osup_det = self.report_dict["sup_details"]["osup_det"]
 
-		for d in inter_state_supply.get("Unregistered", []):
-			self.report_dict["inter_sup"]["unreg_details"].append(d)
-			osup_det["txval"] = flt(osup_det["txval"] + d["txval"], 2)
-			osup_det["iamt"] = flt(osup_det["iamt"] + d["iamt"], 2)
+		for key, value in iteritems(inter_state_supply):
+			if key[0] == "Unregistered":
+				self.report_dict["inter_sup"]["unreg_details"].append(value)
 
-		for d in inter_state_supply.get("Registered Composition", []):
-			self.report_dict["inter_sup"]["comp_details"].append(d)
-			osup_det["txval"] = flt(osup_det["txval"] + d["txval"], 2)
-			osup_det["iamt"] = flt(osup_det["iamt"] + d["iamt"], 2)
+			if key[0] == "Registered Composition":
+				self.report_dict["inter_sup"]["comp_details"].append(value)
 
-		for d in inter_state_supply.get("UIN Holders", []):
-			self.report_dict["inter_sup"]["uin_details"].append(d)
-			osup_det["txval"] = flt(osup_det["txval"] + d["txval"], 2)
-			osup_det["iamt"] = flt(osup_det["iamt"] + d["iamt"], 2)
+			if key[0] == "UIN Holders":
+				self.report_dict["inter_sup"]["uin_details"].append(value)
 
 	def get_total_taxable_value(self, doctype, reverse_charge):
 
@@ -301,41 +296,54 @@
 			(self.month_no, self.year, self.company, self.gst_details.get("gstin")), as_dict=1)[0].total
 
 	def get_inter_state_supplies(self, state_number):
-
-		inter_state_supply_taxable_value = frappe.db.sql(""" select sum(s.net_total) as total, s.place_of_supply, s.gst_category
-			from `tabSales Invoice` s where s.docstatus = 1 and month(s.posting_date) = %s and year(s.posting_date) = %s
-			and s.company = %s and s.company_gstin = %s and s.gst_category in ('Unregistered', 'Registered Composition', 'UIN Holders')
-			group by s.gst_category, s.place_of_supply""", (self.month_no, self.year, self.company, self.gst_details.get("gstin")), as_dict=1)
-
-		inter_state_supply_tax = frappe.db.sql(""" select sum(t.tax_amount_after_discount_amount) as tax_amount, s.place_of_supply, s.gst_category
-			from `tabSales Invoice` s, `tabSales Taxes and Charges` t
+		inter_state_supply_tax = frappe.db.sql(""" select t.account_head, t.tax_amount_after_discount_amount as tax_amount,
+			s.name, s.net_total, s.place_of_supply, s.gst_category from `tabSales Invoice` s, `tabSales Taxes and Charges` t
 			where t.parent = s.name and s.docstatus = 1 and month(s.posting_date) = %s and year(s.posting_date) = %s
 			and s.company = %s and s.company_gstin = %s and s.gst_category in ('Unregistered', 'Registered Composition', 'UIN Holders')
-			group by s.gst_category, s.place_of_supply""", (self.month_no, self.year, self.company, self.gst_details.get("gstin")), as_dict=1)
+		""", (self.month_no, self.year, self.company, self.gst_details.get("gstin")), as_dict=1)
 
-		inter_state_supply_tax_mapping={}
+		inter_state_supply_tax_mapping = {}
 		inter_state_supply_details = {}
 
 		for d in inter_state_supply_tax:
-			inter_state_supply_tax_mapping.setdefault(d.place_of_supply, d.tax_amount)
+			inter_state_supply_tax_mapping.setdefault(d.name, {
+				'place_of_supply': d.place_of_supply,
+				'taxable_value': d.net_total,
+				'camt': 0.0,
+				'samt': 0.0,
+				'iamt': 0.0,
+				'csamt': 0.0
+			})
 
-		for d in inter_state_supply_taxable_value:
-			inter_state_supply_details.setdefault(
-				d.gst_category, []
-			)
+			if d.account_head in [d.cgst_account for d in self.account_heads]:
+				inter_state_supply_tax_mapping[d.name]['camt'] += d.tax_amount
 
+			if d.account_head in [d.sgst_account for d in self.account_heads]:
+				inter_state_supply_tax_mapping[d.name]['samt'] += d.tax_amount
+
+			if d.account_head in [d.igst_account for d in self.account_heads]:
+				inter_state_supply_tax_mapping[d.name]['samt'] += d.tax_amount
+
+			if d.account_head in [d.cess_account for d in self.account_heads]:
+				inter_state_supply_tax_mapping[d.name]['csamt'] += d.tax_amount
+
+		for key, value in iteritems(inter_state_supply_tax_mapping):
 			if d.place_of_supply:
+				osup_det = self.report_dict["sup_details"]["osup_det"]
+				osup_det["txval"] = flt(osup_det["txval"] + value['taxable_value'], 2)
+				osup_det["camt"] = flt(osup_det["camt"] + value['camt'], 2)
+				osup_det["samt"] = flt(osup_det["samt"] + value['samt'], 2)
+				osup_det["csamt"] = flt(osup_det["csamt"] + value['csamt'], 2)
+
 				if state_number != d.place_of_supply.split("-")[0]:
-					inter_state_supply_details[d.gst_category].append({
+					inter_state_supply_details.setdefault((d.gst_category, d.place_of_supply), {
+						"txval": 0.0,
 						"pos": d.place_of_supply.split("-")[0],
-						"txval": flt(d.total, 2),
-						"iamt": flt(inter_state_supply_tax_mapping.get(d.place_of_supply), 2)
+						"iamt": 0.0
 					})
-				else:
-					osup_det = self.report_dict["sup_details"]["osup_det"]
-					osup_det["txval"] = flt(osup_det["txval"] + d.total, 2)
-					osup_det["camt"] = flt(osup_det["camt"] + inter_state_supply_tax_mapping.get(d.place_of_supply)/2, 2)
-					osup_det["samt"] = flt(osup_det["samt"] + inter_state_supply_tax_mapping.get(d.place_of_supply)/2, 2)
+
+					inter_state_supply_details[(d.gst_category, d.place_of_supply)]['txval'] += value['taxable_value']
+					inter_state_supply_details[(d.gst_category, d.place_of_supply)]['iamt'] += value['iamt']
 
 		return inter_state_supply_details
 
