Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cancel e-invoice on cancel of invoice from list view #2668

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

Sanket322
Copy link
Contributor

@Sanket322 Sanket322 commented Oct 16, 2024

closes: #2662
closes: #2711

Huly®: IC-2792

Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 61.37%. Comparing base (ad4e139) to head (bc15d03).
Report is 12 commits behind head on develop.

Files with missing lines Patch % Lines
...ia_compliance/gst_india/overrides/sales_invoice.py 60.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2668      +/-   ##
===========================================
+ Coverage    61.34%   61.37%   +0.03%     
===========================================
  Files          119      119              
  Lines        11506    11521      +15     
===========================================
+ Hits          7058     7071      +13     
- Misses        4448     4450       +2     
Files with missing lines Coverage Δ
india_compliance/gst_india/utils/e_invoice.py 79.69% <100.00%> (+0.12%) ⬆️
india_compliance/gst_india/utils/e_waybill.py 71.60% <100.00%> (+0.04%) ⬆️
india_compliance/hooks.py 100.00% <ø> (ø)
...ia_compliance/gst_india/overrides/sales_invoice.py 80.85% <60.00%> (-0.77%) ⬇️

... and 4 files with indirect coverage changes

Impacted file tree graph

@@ -200,6 +201,23 @@ def before_cancel(doc, method=None):
)


def on_cancel(doc, method=None):
if (
Copy link
Member

@vorasmit vorasmit Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gst settings for cancel with APIs.
Also check if its cancellable before calling cancel APIs

def on_cancel(doc, method=None):
if (
not doc.irn
or not frappe.form_dict
Copy link
Member

@vorasmit vorasmit Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's restrict this to just list view cancel events.
Possible UX: Select Invoices => Actions => Cancel => evaluate if any invoice has e-Invoice or e-Waybill that is cancellable => if Yes, Pop up for reason of cancellation => Cancel IRN and e-Waybill. Alternatively, option to cancel Invoices without cancelling should be possible as a secondary button.

@Sanket322 Sanket322 force-pushed the cancel_e_invoice_from_list_view branch from 2a0501c to c064abe Compare November 27, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants