[Invoices] Bulk sending invoices must show error if ABN is required but not set #12374
Labels
bug-s3
The bug is stopping a critical or non-critical feature but there is a usable workaround.
Milestone
Description
This should only be fixed under invoice feature toggle
Similar to #12373.
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 send 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 sent on the orders page via bulk action (
/admin/orders
). Currently there is no such error on this page but the email is NOT sent.In case of selected orders of multiple enterprises, no invoice should be sent 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:
Expected Behavior
The error "Enterprise XY must have a valid ABN before invoices can be used." must be shown on the orders page when sending an invoice in case the instance has the setting "Require an ABN to generate an invoice" ACTIVE, and the enterprise has no ABN set. The email must not be sent (this part is working already).
Actual Behaviour
There is no error when sending 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
/admin/invoice_settings/edit
)./admin/enterprises/<Enterprise xy>/edit#/business_details_panel
). You can also use an existing enterprise and delete the input of the ABN setting.Animated Gif/Screenshot
Instance setting:
Enterprise ABN setting:
Send invoice on Orders page:
Expected error message. It is currently only shown when sending the invoice on the Edit Order page:
Workaround
Severity
bug-s3: a feature is broken but there is a workaround
Your Environment
Possible Fix
The text was updated successfully, but these errors were encountered: