PDF Invoice 5.0.5 – Factur-X marks unpaid bank transfer invoices as fully prepai

  • Posts: 6
  • Thank you received: 0
  • Hikaserial Standard Hikashop Business
2 hours 11 minutes ago #373422

Hello,

I found what seems to be an issue in the Factur-X generation of PDF Invoice 5.0.5.

In facturx.php, the monetary summation currently always contains:

$this->_addElement($dom, $monetarySummation, $this->nsRam, 'ram:TotalPrepaidAmount', $this->_amount($tax_inclusive_amount));
$this->_addElement($dom, $monetarySummation, $this->nsRam, 'ram:DuePayableAmount', $this->_amount(0));

This means that every generated Factur-X invoice is marked as fully prepaid, regardless of the actual payment method or whether any payment has already been received.

In my case, the payment method is:

order_payment_method = banktransfer

It is displayed to the customer as “Rechnung” / payment by invoice.

The payment method is configured so that the HikaShop order status is immediately set to confirmed. This is intentional, because the confirmation email, invoice and event ticket should be generated immediately after the order.

However, at that point no payment has been received yet. The customer still has to pay the invoice by bank transfer.

The generated Factur-X XML currently contains:

<ram:TotalPrepaidAmount>250.00</ram:TotalPrepaidAmount>
<ram:DuePayableAmount>0.00</ram:DuePayableAmount>

This results in the validator visualization showing:

Prepaid amount: 250.00 EUR
Amount due: 0.00 EUR

But the correct values at the time the invoice is issued should be:

Prepaid amount: 0.00 EUR
Amount due: 250.00 EUR

The Factur-X document passes validation without errors or warnings, because the XML is formally consistent, but the payment information is factually incorrect.

It looks like the current Factur-X generator always assumes that the full invoice amount has already been paid.

Could you please check whether TotalPrepaidAmount and DuePayableAmount should instead be determined based on the actual payment state / payment method?

For reference:

PDF Invoice version: 5.0.5
Payment method: banktransfer
Order status: confirmed
Invoice total: 250.00 EUR
Payment received at invoice creation: 0.00 EUR

Regards,
Thomas

Please Log in or Create an account to join the conversation.

  • Posts: 86177
  • Thank you received: 14212
  • MODERATOR
20 minutes ago #373423

Hello,

Thank you for the detailed report, you were right. The plugin always wrote Factur-X and UBL invoices as fully paid.

We fixed this in version 5.0.6 of the PDF invoice plugin, which you can download now. An invoice is written as not paid yet, with nothing prepaid, the whole amount due and the payment method as payment terms, when the order has no invoice number or uses a payment method chosen in the new "Payment methods paid after the invoice" setting of the plugin.

Since your bank transfer orders are confirmed, and so get their invoice number, before the money arrives, select your bank transfer payment method in that setting after the update. Your invoices should then show a prepaid amount of 0.00 and an amount due of 250.00 in the validator.

Please Log in or Create an account to join the conversation.

Time to create page: 0.050 seconds
Powered by Kunena Forum