fix: Update account heads in GST test cases
This commit is contained in:
parent
bb679cc036
commit
779d2afa60
@ -2087,9 +2087,9 @@ def make_sales_invoice_for_ewaybill():
|
|||||||
if not gst_account:
|
if not gst_account:
|
||||||
gst_settings.append("gst_accounts", {
|
gst_settings.append("gst_accounts", {
|
||||||
"company": "_Test Company",
|
"company": "_Test Company",
|
||||||
"cgst_account": "CGST - _TC",
|
"cgst_account": "Output Tax CGST - _TC",
|
||||||
"sgst_account": "SGST - _TC",
|
"sgst_account": "Output Tax SGST - _TC",
|
||||||
"igst_account": "IGST - _TC",
|
"igst_account": "Output Tax IGST - _TC",
|
||||||
})
|
})
|
||||||
|
|
||||||
gst_settings.save()
|
gst_settings.save()
|
||||||
@ -2106,7 +2106,7 @@ def make_sales_invoice_for_ewaybill():
|
|||||||
|
|
||||||
si.append("taxes", {
|
si.append("taxes", {
|
||||||
"charge_type": "On Net Total",
|
"charge_type": "On Net Total",
|
||||||
"account_head": "CGST - _TC",
|
"account_head": "Output Tax CGST - _TC",
|
||||||
"cost_center": "Main - _TC",
|
"cost_center": "Main - _TC",
|
||||||
"description": "CGST @ 9.0",
|
"description": "CGST @ 9.0",
|
||||||
"rate": 9
|
"rate": 9
|
||||||
@ -2114,7 +2114,7 @@ def make_sales_invoice_for_ewaybill():
|
|||||||
|
|
||||||
si.append("taxes", {
|
si.append("taxes", {
|
||||||
"charge_type": "On Net Total",
|
"charge_type": "On Net Total",
|
||||||
"account_head": "SGST - _TC",
|
"account_head": "Output Tax SGST - _TC",
|
||||||
"cost_center": "Main - _TC",
|
"cost_center": "Main - _TC",
|
||||||
"description": "SGST @ 9.0",
|
"description": "SGST @ 9.0",
|
||||||
"rate": 9
|
"rate": 9
|
||||||
|
@ -46,14 +46,14 @@ class TestGSTR3BReport(unittest.TestCase):
|
|||||||
make_sales_invoice()
|
make_sales_invoice()
|
||||||
create_purchase_invoices()
|
create_purchase_invoices()
|
||||||
|
|
||||||
if frappe.db.exists("GSTR 3B Report", "GSTR3B-March-2019-_Test Address-Billing"):
|
if frappe.db.exists("GSTR 3B Report", "GSTR3B-March-2019-_Test Address GST-Billing"):
|
||||||
report = frappe.get_doc("GSTR 3B Report", "GSTR3B-March-2019-_Test Address-Billing")
|
report = frappe.get_doc("GSTR 3B Report", "GSTR3B-March-2019-_Test Address GST-Billing")
|
||||||
report.save()
|
report.save()
|
||||||
else:
|
else:
|
||||||
report = frappe.get_doc({
|
report = frappe.get_doc({
|
||||||
"doctype": "GSTR 3B Report",
|
"doctype": "GSTR 3B Report",
|
||||||
"company": "_Test Company GST",
|
"company": "_Test Company GST",
|
||||||
"company_address": "_Test Address-Billing",
|
"company_address": "_Test Address GST-Billing",
|
||||||
"year": getdate().year,
|
"year": getdate().year,
|
||||||
"month": month_number_mapping.get(getdate().month)
|
"month": month_number_mapping.get(getdate().month)
|
||||||
}).insert()
|
}).insert()
|
||||||
@ -89,7 +89,7 @@ class TestGSTR3BReport(unittest.TestCase):
|
|||||||
|
|
||||||
si.append("taxes", {
|
si.append("taxes", {
|
||||||
"charge_type": "On Net Total",
|
"charge_type": "On Net Total",
|
||||||
"account_head": "IGST - _GST",
|
"account_head": "Output Tax IGST - _GST",
|
||||||
"cost_center": "Main - _GST",
|
"cost_center": "Main - _GST",
|
||||||
"description": "IGST @ 18.0",
|
"description": "IGST @ 18.0",
|
||||||
"rate": 18
|
"rate": 18
|
||||||
@ -117,7 +117,7 @@ def make_sales_invoice():
|
|||||||
|
|
||||||
si.append("taxes", {
|
si.append("taxes", {
|
||||||
"charge_type": "On Net Total",
|
"charge_type": "On Net Total",
|
||||||
"account_head": "IGST - _GST",
|
"account_head": "Output Tax IGST - _GST",
|
||||||
"cost_center": "Main - _GST",
|
"cost_center": "Main - _GST",
|
||||||
"description": "IGST @ 18.0",
|
"description": "IGST @ 18.0",
|
||||||
"rate": 18
|
"rate": 18
|
||||||
@ -138,7 +138,7 @@ def make_sales_invoice():
|
|||||||
|
|
||||||
si1.append("taxes", {
|
si1.append("taxes", {
|
||||||
"charge_type": "On Net Total",
|
"charge_type": "On Net Total",
|
||||||
"account_head": "IGST - _GST",
|
"account_head": "Output Tax IGST - _GST",
|
||||||
"cost_center": "Main - _GST",
|
"cost_center": "Main - _GST",
|
||||||
"description": "IGST @ 18.0",
|
"description": "IGST @ 18.0",
|
||||||
"rate": 18
|
"rate": 18
|
||||||
@ -159,7 +159,7 @@ def make_sales_invoice():
|
|||||||
|
|
||||||
si2.append("taxes", {
|
si2.append("taxes", {
|
||||||
"charge_type": "On Net Total",
|
"charge_type": "On Net Total",
|
||||||
"account_head": "IGST - _GST",
|
"account_head": "Output Tax IGST - _GST",
|
||||||
"cost_center": "Main - _GST",
|
"cost_center": "Main - _GST",
|
||||||
"description": "IGST @ 18.0",
|
"description": "IGST @ 18.0",
|
||||||
"rate": 18
|
"rate": 18
|
||||||
@ -195,7 +195,7 @@ def create_purchase_invoices():
|
|||||||
|
|
||||||
pi.append("taxes", {
|
pi.append("taxes", {
|
||||||
"charge_type": "On Net Total",
|
"charge_type": "On Net Total",
|
||||||
"account_head": "CGST - _GST",
|
"account_head": "Input Tax CGST - _GST",
|
||||||
"cost_center": "Main - _GST",
|
"cost_center": "Main - _GST",
|
||||||
"description": "CGST @ 9.0",
|
"description": "CGST @ 9.0",
|
||||||
"rate": 9
|
"rate": 9
|
||||||
@ -203,7 +203,7 @@ def create_purchase_invoices():
|
|||||||
|
|
||||||
pi.append("taxes", {
|
pi.append("taxes", {
|
||||||
"charge_type": "On Net Total",
|
"charge_type": "On Net Total",
|
||||||
"account_head": "SGST - _GST",
|
"account_head": "Input Tax SGST - _GST",
|
||||||
"cost_center": "Main - _GST",
|
"cost_center": "Main - _GST",
|
||||||
"description": "SGST @ 9.0",
|
"description": "SGST @ 9.0",
|
||||||
"rate": 9
|
"rate": 9
|
||||||
@ -410,10 +410,10 @@ def make_company():
|
|||||||
company.country = "India"
|
company.country = "India"
|
||||||
company.insert()
|
company.insert()
|
||||||
|
|
||||||
if not frappe.db.exists('Address', '_Test Address-Billing'):
|
if not frappe.db.exists('Address', '_Test Address GST-Billing'):
|
||||||
address = frappe.get_doc({
|
address = frappe.get_doc({
|
||||||
|
"address_title": "_Test Address GST",
|
||||||
"address_line1": "_Test Address Line 1",
|
"address_line1": "_Test Address Line 1",
|
||||||
"address_title": "_Test Address",
|
|
||||||
"address_type": "Billing",
|
"address_type": "Billing",
|
||||||
"city": "_Test City",
|
"city": "_Test City",
|
||||||
"state": "Test State",
|
"state": "Test State",
|
||||||
@ -444,9 +444,9 @@ def set_account_heads():
|
|||||||
if not gst_account:
|
if not gst_account:
|
||||||
gst_settings.append("gst_accounts", {
|
gst_settings.append("gst_accounts", {
|
||||||
"company": "_Test Company GST",
|
"company": "_Test Company GST",
|
||||||
"cgst_account": "CGST - _GST",
|
"cgst_account": "Output Tax CGST - _GST",
|
||||||
"sgst_account": "SGST - _GST",
|
"sgst_account": "Output Tax SGST - _GST",
|
||||||
"igst_account": "IGST - _GST",
|
"igst_account": "Output Tax IGST - _GST"
|
||||||
})
|
})
|
||||||
|
|
||||||
gst_settings.save()
|
gst_settings.save()
|
||||||
|
@ -210,8 +210,6 @@ def get_or_create_account(company_name, account):
|
|||||||
'account_number': account.get('account_number')
|
'account_number': account.get('account_number')
|
||||||
})
|
})
|
||||||
|
|
||||||
print(company_name, account, existing_accounts)
|
|
||||||
|
|
||||||
if existing_accounts:
|
if existing_accounts:
|
||||||
return frappe.get_doc('Account', existing_accounts[0].name)
|
return frappe.get_doc('Account', existing_accounts[0].name)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user