Credit notes

  • Posts: 8
  • Thank you received: 0
  • Hikashop Business
2 weeks 6 days ago #371802

-- HikaShop version -- : 6.4.1
-- Joomla version -- : 6.0.3
-- PHP version -- : 8.4
-- Browser(s) name and version -- : Edge Version 147.0.3912.98

Hi,
Please how can I get ordered numbers in the Factor X credit note all my credit notes display the same number.
Are there any settings for this, or else please how can I get different letters and numbers on the credit notes?
And we need the corresponding order number to show on the credit note please.

Kind regards
Hans Peter Betzler

Last edit: 2 weeks 5 days ago by hpbdesignCEO.

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

  • Posts: 8
  • Thank you received: 0
  • Hikashop Business
2 weeks 5 days ago #371812

Hi,
as I found that the credit notes are not as we need them in Germany I used Chatgpt to alter the codes, now the credit note uses their own numbering and displays the corresponding order number.
I attach the zip here maybe you like to check it out and use it for german customers, etc...

Kind regards
Hans Peter Betzler

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

  • Posts: 85615
  • Thank you received: 14037
  • MODERATOR
2 weeks 5 days ago #371817

Hi,

There was no zip in your message so I'm not sure what you did.
However, I looked into it today and I've added a new setting to be able to specify a credit note number format in the plugin. I've just published a new version :
www.hikashop.com/marketplace/product/18-plugin-pdf.html

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

  • Posts: 8
  • Thank you received: 0
  • Hikashop Business
2 weeks 4 days ago #371820

Hi nicolas,
thats wonderful you are the best :)
Would it also be possible to have the corresponding order number on the credit note please?

Kind regards
Hans Peter Betzler

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

  • Posts: 8
  • Thank you received: 0
  • Hikashop Business
2 weeks 4 days ago #371821

Hi nicolas,
I just tested the new virsion.
Now every credit note uses the same number, what is missing is that the numbers should increment and not be used twice please.

Kind regards
Hans Peter Betzler

PS: I try again to attach a zip here...
Sorry but I get this: attachinvoice_hpb_facturx_creditnote_sequence_1.0.4_embedded_logo.zip
File upload failed.

Last edit: 2 weeks 4 days ago by hpbdesignCEO.

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

  • Posts: 85615
  • Thank you received: 14037
  • MODERATOR
2 weeks 4 days ago #371824

Hello,

About the numbering, the fix in 4.0.4 only takes effect for orders refunded AFTER the update was installed. The credit-note number was already saved on the orders you had refunded before the update, so reprinting those still shows the previous (duplicate) value. To verify the fix is doing its job, please refund a brand-new test order and check its credit-note number against another fresh test refund: they should now be different and increment. For your already-refunded orders, the simplest cleanup is to set them back to a non-refunded status, save, then back to "Refunded". That re-triggers the credit-note number allocation and stores a fresh, unique number on each one.

Now to your other question: version 4.0.5 of the plugin is published. It adds the original invoice reference on credit notes with each credit note now showing the number and issue date of the invoice it relates to, both on the printed PDF (under the credit-note title) and inside the Factur-X and UBL XML files (in the standard "Billing reference" / "Invoice referenced document" fields used by accounting software).

Please update the plugin from your Joomla update manager, then run the small refund test above to confirm the numbering and to see the new reference line.

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

  • Posts: 8
  • Thank you received: 0
  • Hikashop Business
2 weeks 4 days ago #371825

Hi nicolas,
sadly I need to confirm that after entering a credit note number the, numbers used are always the same.
Can you please confirm that for example S26 - 0001 is possible?
Or else what would be a correct entry?


Kind regards
Hans Peter Betzler

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

  • Posts: 85615
  • Thank you received: 14037
  • MODERATOR
2 weeks 4 days ago #371827

Hello,

Yes, "S26 - 0001" is achievable. Use this format string in the "Credit note number format" field of the plugin parameters:

S{date format='y'} - {id size='4'}

Breakdown:

- S, the literal letter S.
- {date format='y'}, the current year as 2 digits (so "26" in 2026, "27" in 2027, and so on). If you prefer the full 4-digit year, use {date format='Y'}.
- The literal characters " - " in between (a space, dash, space).
- {id size='4'}, the credit-note counter padded to 4 digits ("0001", "0002", ..., "0010", ..., "9999").

Available tokens for this field, for reference:

- {id}, the credit-note number (no padding).
- {id size='N'}, same number padded with leading zeros to N digits, replace N with the width you want.
- {date format='X'}, the date when the credit note was generated, with X being any PHP date format (Y for full year, y for 2-digit year, m for month, d for day, etc.).
- {automatic_code}, an alphanumeric code derived from the counter.
- {user xxx}, a value from the customer's user record (replace xxx with a field name).

One thing to keep in mind: the {id} counter is shared across all credit notes globally and never resets. So if you start with this new format after already having issued, say, 12 credit notes, the next one will be "S26 - 0013", not "S26 - 0001". If you need a counter that restarts every year, please let us know, that would be a separate feature.

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

  • Posts: 8
  • Thank you received: 0
  • Hikashop Business
2 weeks 4 days ago #371836

Hi nicolas,
first of all thankyou for your outstanding support, its brilliant.
I am pleased that after implementing your last explanation its working very good.

I think its not a must but it would be cool if credit notes would also reset
at the beginnig of the year, that would keep things nice and tidy.

One last thing I just come accross would be a field to add the company logo in my case top center please :)

Kind regards
Hans Peter Betzler

Last edit: 2 weeks 4 days ago by hpbdesignCEO.

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

  • Posts: 85615
  • Thank you received: 14037
  • MODERATOR
2 weeks 3 days ago #371843

Hi,

I've published a new version of the plugin with a setting for the reset.

Regarding the logo, it's already in place in the plugin. You just have to configure a logo in the HikaShop configuration page and it will be used by the plugin.

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

Time to create page: 0.077 seconds
Powered by Kunena Forum