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

[Invoices] Bulk printing invoices must show error if ABN is required but not set #12373

Open
drummer83 opened this issue Apr 12, 2024 · 0 comments · May be fixed by #12458
Open

[Invoices] Bulk printing invoices must show error if ABN is required but not set #12373

drummer83 opened this issue Apr 12, 2024 · 0 comments · May be fixed by #12458
Assignees
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround.
Milestone

Comments

@drummer83
Copy link
Contributor

drummer83 commented Apr 12, 2024

Description

This should only be fixed under invoice feature toggle

Similar to #12374.

When an instance has the setting "Require an ABN to generate an invoice" ACTIVE, then an error is shown in case an enterprise without ABN tries to generate an invoice. Currently this is only working on the Edit Order page (/admin/orders/Rxxx/edit).
The exact same error has to be shown as well, if invoices are to be generated on the orders page via bulk action (/admin/orders). Currently there is no such error on this page.

In case of selected orders of multiple enterprises, no invoice should be printed at all after the error message was shown, even in case some of the enterprises have the ABN set correctly. The error message must be shown for each enterprise with missing ABN or all of the enterprises with missing ABN must be listed in the error message.

The error shall be shown independently from:

  • New admin v3 feature toggle activated/deactivated
  • Enterprise setting "Charges GST" activated/deactivated

Expected Behavior

The error "Enterprise XY must have a valid ABN before invoices can be used." must be shown on the orders page when generating an invoice in case the instance has the setting "Require an ABN to generate an invoice" ACTIVE, and the enterprise has no ABN set.

Actual Behaviour

There is no error when generating an invoice on the orders page while the setting "Require an ABN to generate an invoice" is ACTIVE and the enterprise has no ABN set.

Steps to Reproduce

Make sure this is only done when feature toggle "invoices" is turned ON

  1. As super admin activate the setting "Require an ABN to generate an invoice" (/admin/invoice_settings/edit).
  2. As admin user (or super admin user) create an enterprise and leave the ABN field empty (/admin/enterprises/<Enterprise xy>/edit#/business_details_panel). You can also use an existing enterprise and delete the input of the ABN setting.
  3. Make sure there is a completed order available for that enterprise.
  4. On page /admin/orders select the checkbox of the order and choose 'Print invoices' from the 'Actions' dropdown menu.
  5. Check if the error is shown or not.

Animated Gif/Screenshot

Instance setting:
image

Enterprise ABN setting:
image

Create invoice on Orders page:
image

Expected error message. It is currently only shown when generating the invoice on the Edit Order page:
image

Workaround

Severity

bug-s3: a feature is broken but there is a workaround

Your Environment

  • Version used:
  • Browser name and version:
  • Operating System and version (desktop or mobile):

Possible Fix

@drummer83 drummer83 added the bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. label Apr 12, 2024
@RachL RachL added this to the Invoices milestone Apr 12, 2024
@abdellani abdellani self-assigned this May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround.
Projects
Status: In Progress ⚙
Development

Successfully merging a pull request may close this issue.

3 participants