Skip to content

Commit

Permalink
fix: update success message
Browse files Browse the repository at this point in the history
(cherry picked from commit be12ec3)
  • Loading branch information
vorasmit authored and mergify[bot] committed Sep 16, 2024
1 parent 9438d8d commit 781edf7
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions india_compliance/gst_india/utils/e_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def verify_e_invoice_details(current_gstin, current_invoice_amount, signed_data)
)


def log_and_process_e_invoice_generation(doc, result, sandbox_mode=False):
def log_and_process_e_invoice_generation(doc, result, sandbox_mode=False, message=None):
"""
Load and process the e-Invoice generation result.
"""
Expand Down Expand Up @@ -320,11 +320,10 @@ def log_and_process_e_invoice_generation(doc, result, sandbox_mode=False):
if not frappe.request:
return

frappe.msgprint(
_("e-Invoice generated successfully"),
indicator="green",
alert=True,
)
if not message:
message = "e-Invoice generated successfully"

frappe.msgprint(_(message), indicator="green", alert=True)

return send_updated_doc(doc)

Expand Down Expand Up @@ -394,7 +393,9 @@ def mark_e_invoice_as_generated(doctype, docname, values):
}
)

return log_and_process_e_invoice_generation(doc, result)
return log_and_process_e_invoice_generation(
doc, result, message="e-Invoice updated successfully"
)


@frappe.whitelist()
Expand Down

0 comments on commit 781edf7

Please sign in to comment.