mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-05 11:33:56 +00:00
fix: Test case for GSTR 3b report
This commit is contained in:
@@ -172,7 +172,6 @@ class GSTR3BReport(Document):
|
||||
self.json_output = frappe.as_json(self.report_dict)
|
||||
|
||||
def set_inward_nil_exempt(self, inward_nil_exempt):
|
||||
|
||||
self.report_dict["inward_sup"]["isup_details"][0]["inter"] = flt(inward_nil_exempt.get("gst").get("inter"), 2)
|
||||
self.report_dict["inward_sup"]["isup_details"][0]["intra"] = flt(inward_nil_exempt.get("gst").get("intra"), 2)
|
||||
self.report_dict["inward_sup"]["isup_details"][1]["inter"] = flt(inward_nil_exempt.get("non_gst").get("inter"), 2)
|
||||
@@ -362,7 +361,7 @@ class GSTR3BReport(Document):
|
||||
WHERE docstatus = 1 and gst_category = 'Registered Composition'
|
||||
and month(posting_date) = %s and year(posting_date) = %s
|
||||
and company = %s and company_gstin = %s
|
||||
group by place_of_supply""", (self.month_no, self.year, self.company, self.gst_details.get("gstin")), as_dict=1, debug=1)
|
||||
group by place_of_supply""", (self.month_no, self.year, self.company, self.gst_details.get("gstin")), as_dict=1)
|
||||
|
||||
inward_nil_exempt_details = {
|
||||
"gst": {
|
||||
|
||||
@@ -63,7 +63,7 @@ class TestGSTR3BReport(unittest.TestCase):
|
||||
self.assertEqual(output["sup_details"]["osup_zero"]["iamt"], 18),
|
||||
self.assertEqual(output["inter_sup"]["unreg_details"][0]["iamt"], 18),
|
||||
self.assertEqual(output["sup_details"]["osup_nil_exmp"]["txval"], 100),
|
||||
self.assertEqual(output["inward_sup"]["isup_details"][0]["inter"], 250)
|
||||
self.assertEqual(output["inward_sup"]["isup_details"][0]["intra"], 250)
|
||||
self.assertEqual(output["itc_elg"]["itc_avl"][4]["samt"], 22.50)
|
||||
self.assertEqual(output["itc_elg"]["itc_avl"][4]["camt"], 22.50)
|
||||
|
||||
@@ -190,6 +190,19 @@ def create_purchase_invoices():
|
||||
|
||||
pi1.submit()
|
||||
|
||||
pi2 = make_purchase_invoice(company="_Test Company GST",
|
||||
customer = '_Test Registered Supplier',
|
||||
currency = 'INR',
|
||||
item = 'Milk',
|
||||
warehouse = 'Finished Goods - _GST',
|
||||
expense_account = 'Cost of Goods Sold - _GST',
|
||||
cost_center = 'Main - _GST',
|
||||
rate=250,
|
||||
qty=1,
|
||||
do_not_save=1
|
||||
)
|
||||
pi2.submit()
|
||||
|
||||
def make_suppliers():
|
||||
|
||||
if not frappe.db.exists("Supplier", "_Test Registered Supplier"):
|
||||
|
||||
Reference in New Issue
Block a user