- Posts: 2
- Thank you received: 0
PDF Invoice 5.2.23 – Prepayment invoices (TypeCode 386) and incorrect actual del
2 hours 30 minutes ago #100000732
by lkadner
PDF Invoice 5.2.23 – Prepayment invoices (TypeCode 386) and incorrect actual del was created by lkadner
-- HikaShop version -- : HikaShop Essential 6.8.2
-- Joomla version -- : 6.2.0
-- Browser(s) name and version -- : Firefox 160.0
Hello HikaShop Support Team,
We are using HikaShop Essential 6.8.2 together with the purchased PDF Invoice plugin 5.2.23, including Factur-X with the EN 16931 profile.
Our shop sells a physical travel agent identity card. The workflow is as follows:
However, three questions remain regarding the Factur-X generation.
1. Prepayment invoice – document TypeCode 386
In
,
currently calls
with the fixed TypeCode
.
For our workflow, we would like to use
(Prepayment invoice), subject to confirmation that this is the appropriate document type.
Is there an existing configuration option to issue prepayment invoices? If not, could you consider adding support for TypeCode 386, for example based on the order/payment workflow?
2. Incorrect actual delivery date
The generated Factur-X XML currently contains:
with
set to
, the invoice issue date.
In our test order, no delivery had taken place on that date. The product had not even been manufactured.
We found that
creates this delivery event using
.
Could the plugin avoid generating an actual delivery date when no delivery has taken place? We do not want to submit an incorrect delivery date in an electronic invoice.
3. Information about pending manufacture and delivery
The PDF should explain that the invoice requests payment in advance and that manufacture and delivery will take place later.
We would also like to include a corresponding note in the structured Factur-X XML, for example through an
element.
Is there an existing setting for such invoice notes, or could this functionality be added?
4. Final invoice after full prepayment
As the customer pays the full amount before delivery, we would also appreciate your recommendation on how to handle the subsequent final invoice, if required.
How should HikaShop link the prepayment invoice to the final invoice so that the advance payment is correctly taken into account without invoicing the amount twice?
Example:
We would strongly prefer an official, update-safe solution within your PDF Invoice plugin rather than modifying its core files. We are aware of the
event, but would like to know whether the functionality can be supported directly by the plugin.
We can provide the generated PDF/A-3 invoice with its embedded
privately for further analysis.
Thank you for your assistance.
Kind regards,
TSS GROUP
-- Joomla version -- : 6.2.0
-- Browser(s) name and version -- : Firefox 160.0
Hello HikaShop Support Team,
We are using HikaShop Essential 6.8.2 together with the purchased PDF Invoice plugin 5.2.23, including Factur-X with the EN 16931 profile.
Our shop sells a physical travel agent identity card. The workflow is as follows:
- The customer places an order and receives an invoice immediately.
- Payment is made in advance, either by bank transfer or PayPal.
- The card is manufactured only after full payment and, where necessary, verification of eligibility.
- The card is shipped afterwards. At the time of invoicing, the actual delivery date is not yet known.
However, three questions remain regarding the Factur-X generation.
1. Prepayment invoice – document TypeCode 386
In
Code:
facturx.php
Code:
HikashopFacturXHelper::generateInvoiceXml()
Code:
_generateXml()
Code:
380
For our workflow, we would like to use
Code:
386
Is there an existing configuration option to issue prepayment invoices? If not, could you consider adding support for TypeCode 386, for example based on the order/payment workflow?
2. Incorrect actual delivery date
The generated Factur-X XML currently contains:
Code:
ram:ActualDeliverySupplyChainEvent
Code:
udt:DateTimeString format="102"
Code:
20261117
In our test order, no delivery had taken place on that date. The product had not even been manufactured.
We found that
Code:
facturx.php
Code:
$documentDate
Could the plugin avoid generating an actual delivery date when no delivery has taken place? We do not want to submit an incorrect delivery date in an electronic invoice.
3. Information about pending manufacture and delivery
The PDF should explain that the invoice requests payment in advance and that manufacture and delivery will take place later.
We would also like to include a corresponding note in the structured Factur-X XML, for example through an
Code:
IncludedNote
Is there an existing setting for such invoice notes, or could this functionality be added?
4. Final invoice after full prepayment
As the customer pays the full amount before delivery, we would also appreciate your recommendation on how to handle the subsequent final invoice, if required.
How should HikaShop link the prepayment invoice to the final invoice so that the advance payment is correctly taken into account without invoicing the amount twice?
Example:
- Order: N1033
- Invoice: RBA202600019
- Invoice date: 17 November 2026
- Gross total: EUR 29.00
- Payment method: Bank transfer
- Payment status at invoice issue: Unpaid
- Delivery status at invoice issue: Not yet delivered
- Factur-X document TypeCode generated: 380
- Actual delivery date generated: 20261117
We would strongly prefer an official, update-safe solution within your PDF Invoice plugin rather than modifying its core files. We are aware of the
Code:
onHikashopAfterGenerateStructuredInvoice
We can provide the generated PDF/A-3 invoice with its embedded
Code:
factur-x.xml
Thank you for your assistance.
Kind regards,
TSS GROUP
Please Log in or Create an account to join the conversation.
17 minutes ago #100000735
by nicolas
Replied by nicolas on topic PDF Invoice 5.2.23 – Prepayment invoices (TypeCode 386) and incorrect actual del
Hi,
1. Document type 386: the plugin has no setting for it and we would advise you to keep 380. Under German VAT rules (UStAE 14.8 paragraph 6) you may issue, before the delivery, one invoice covering the whole price and VAT of the supply; no further advance invoices are needed then. That is a normal commercial invoice (380). Type 386 tells the customer's system that this is a partial advance invoice and that a final invoice deducting it will follow, which is not your case, and the German XRechnung rules (BR-DE-17) do not accept 386 at all. What makes the invoice clear is the note explaining that it asks for payment in advance and that manufacture and delivery follow (point 3).
2. Delivery date: you are right, the plugin wrote the invoice date as the actual delivery date on every Factur-X invoice although HikaShop does not know when the goods are delivered. This is fixed in version 5.2.24 of the PDF Invoice plugin, available now in your account on our website (and through Joomla's updater): install it over your current version, your settings are kept. The Factur-X file then no longer contains an actual delivery date (it is optional in EN 16931), except for an exempt intra-Community supply to a business in another EU country, where the standard requires one. Note that German law still asks the invoice to state the time of the supply; for an invoice issued before the delivery, please check with your tax adviser how you want to word it on the PDF (for example the expected month of delivery, in the note below).
3. Note: version 5.2.24 also adds an "Invoice note" setting in the plugin's settings (shown when Factur-X is enabled). Its text is written in the Factur-X file of every invoice as an IncludedNote, for example "Rechnung über Vorauszahlung: Herstellung und Lieferung erfolgen nach Zahlungseingang." To print the same text on the PDF, put it in the plugin's "Footer" setting. Both are settings, so they survive updates.
4. Final invoice: with one invoice for the full price issued in advance and paid in full, the rule above means no further invoice is needed for the same sale, so nothing is invoiced twice. If you issue a final invoice anyway, it must deduct the amount paid in advance and its VAT (UStAE 14.8 paragraph 7), which the plugin does not do: it creates one invoice per order. If you would rather invoice only once the card is shipped, you can instead choose when HikaShop creates the invoice number: in HikaShop > System > Order statuses, the "Invoice" column ( www.hikashop.com/support/documentation/4...rstatus-listing.html ) can be set on the "shipped" status only, and the plugin's "Statuses for email attachment" setting to the same status. The customer then pays from the order confirmation and the bank details it gives, and receives the invoice with the card. Be aware that this setting is also used for the stock, so test it with an order first.
1. Document type 386: the plugin has no setting for it and we would advise you to keep 380. Under German VAT rules (UStAE 14.8 paragraph 6) you may issue, before the delivery, one invoice covering the whole price and VAT of the supply; no further advance invoices are needed then. That is a normal commercial invoice (380). Type 386 tells the customer's system that this is a partial advance invoice and that a final invoice deducting it will follow, which is not your case, and the German XRechnung rules (BR-DE-17) do not accept 386 at all. What makes the invoice clear is the note explaining that it asks for payment in advance and that manufacture and delivery follow (point 3).
2. Delivery date: you are right, the plugin wrote the invoice date as the actual delivery date on every Factur-X invoice although HikaShop does not know when the goods are delivered. This is fixed in version 5.2.24 of the PDF Invoice plugin, available now in your account on our website (and through Joomla's updater): install it over your current version, your settings are kept. The Factur-X file then no longer contains an actual delivery date (it is optional in EN 16931), except for an exempt intra-Community supply to a business in another EU country, where the standard requires one. Note that German law still asks the invoice to state the time of the supply; for an invoice issued before the delivery, please check with your tax adviser how you want to word it on the PDF (for example the expected month of delivery, in the note below).
3. Note: version 5.2.24 also adds an "Invoice note" setting in the plugin's settings (shown when Factur-X is enabled). Its text is written in the Factur-X file of every invoice as an IncludedNote, for example "Rechnung über Vorauszahlung: Herstellung und Lieferung erfolgen nach Zahlungseingang." To print the same text on the PDF, put it in the plugin's "Footer" setting. Both are settings, so they survive updates.
4. Final invoice: with one invoice for the full price issued in advance and paid in full, the rule above means no further invoice is needed for the same sale, so nothing is invoiced twice. If you issue a final invoice anyway, it must deduct the amount paid in advance and its VAT (UStAE 14.8 paragraph 7), which the plugin does not do: it creates one invoice per order. If you would rather invoice only once the card is shipped, you can instead choose when HikaShop creates the invoice number: in HikaShop > System > Order statuses, the "Invoice" column ( www.hikashop.com/support/documentation/4...rstatus-listing.html ) can be set on the "shipped" status only, and the plugin's "Statuses for email attachment" setting to the same status. The customer then pays from the order confirmation and the bank details it gives, and receives the invoice with the card. Be aware that this setting is also used for the stock, so test it with an order first.
Please Log in or Create an account to join the conversation.
Time to create page: 0.059 seconds