Why won’t an e-invoice send?
This matters most for suppliers to the public sector, where electronic invoicing (e-Račun via UJP) is mandatory, not a convenience. The five messages below cover every reason VegaERP refuses to send, regenerate, or cancel an e-invoice.
What the screen says
The e-invoice can’t be sent, regenerated, or cancelled
These three messages differ by only one sentence, because all three come from the same e-document status. VegaERP always names that status; below is the full message text. The brackets list every possible state; on screen you only see the one that actually applies to your document:
This e-invoice is [a draft / generated / being sent / sent / accepted / rejected / cancelled], so its XML cannot be rebuilt. Only a draft, generated or rejected e-invoice can be regenerated.
This e-invoice is [a draft / generated / being sent / sent / accepted / rejected / cancelled], so it cannot be sent to UJP. Only a generated e-invoice can be sent.
This e-invoice is [a draft / generated / being sent / sent / accepted / rejected / cancelled], so it cannot be cancelled at UJP. Only a sent or accepted e-invoice can be cancelled.
On screen this reads, for example, “This e-invoice is accepted, so it cannot be sent to UJP.” The word VegaERP fills in is always one of the states: a draft, generated, being sent, sent, accepted, rejected, or cancelled.
The buyer’s country is missing
When sending or generating an e-invoice for a customer with no country recorded:
This customer has no country recorded, so the e-invoice cannot state the buyer’s country, a mandatory field that must never be guessed, because guessing it would also give them a Slovenian VAT number they do not have. Open the customer, set their country, and generate the e-invoice again.
Your company’s country is not recognized
If your company’s country field is set to something VegaERP doesn’t recognize (a typo, for example):
This business’s country is not a country we recognise, so the e-invoice cannot state the seller’s country or their VAT number. Open Settings → Company and set the country to its two-letter code (for example SI).
Why this happens
The status messages
An e-invoice moves through a sequence of states: draft → generated → being sent → sent → accepted (or rejected), and can finally become cancelled. Each action is only allowed from one or two of those states:
- Send e-invoice is only allowed for a generated e-invoice. A sent or accepted one can’t be sent again, because that would deposit the same document with the recipient twice. - Regenerate XML is allowed for a draft, generated, or rejected e-invoice. A sent or accepted one can’t be regenerated, because that version has already reached UJP and is recorded as final. - Cancel Submission is only allowed for a sent or accepted e-invoice. A draft or generated one can’t be cancelled, because it was never submitted in the first place.
The most common cause of this message is that the action already happened: someone else did it, or you did it in another tab, or UJP updated the status in the meantime (from sent to accepted or rejected, for example), and the screen still shows the old state.
A missing or unrecognized country
Under the eSlog/EN 16931 standard an e-invoice must always state the buyer’s and the issuer’s country, because the document’s VAT identifier is derived from it. VegaERP never guesses it. If the country is missing, or recorded in a form it doesn’t recognize, it would rather not create the e-invoice at all than assign the customer the wrong country or a Slovenian VAT number they don’t hold.
What to do
The status message
- Open Accounting → VAT & Compliance → E-Invoices and find the document.
- Check the actual status in the Status column: UJP may have already accepted or rejected the document in the meantime.
- If the status is Rejected, the rejection reason is usually shown beside the document; fix the data on the source invoice, then open the row’s actions menu (the three-dot icon) and click Regenerate XML, then Send e-invoice.
- If the status is Accepted, sending can no longer be repeated. That is not an error: the document arrived successfully. Make any correction with a credit note or a storno on the source invoice instead, as described in Invoicing & e-Račun.
- If the status is still Generated and the message persists, refresh the page and try again. This is most likely two requests that ran at the same moment.
The buyer’s country is missing
- Open CRM → Partners and find the customer.
- Click Edit and enter their country in the Country field.
- Save, go back to the invoice, and try sending or downloading the e-invoice again.
Your company’s country is not recognized
- Open Settings → Company.
- Enter a two-letter country code in the Country field, SI for Slovenia.
- Save, and try sending or downloading the e-invoice again.
If you can’t fix this yourself
If an e-invoice is Rejected, the reason almost always comes from UJP or a PEPPOL access point, not from VegaERP. It is a data error on the invoice or in the recipient’s registered details. See the common-issues section in Invoicing & e-Račun for more. If the message persists after you fix the data, or the status in VegaERP doesn’t match what you see on the UJP portal, contact support and give the invoice number and the status VegaERP shows.