Billing - dates change

  • Posts: 4
  • Thank you received: 0
8 years 2 months ago #248633

Hello everyone!

We are currently encountering a pretty serious issue with the dates of the invoices which we can print from the back-end of our shop:

Whenever we re-print invoices / bills a second time they will change the displayed date to the current date or apparently to any random date too (we had at least one case reported by an employee).

This issue has arised together with our upgrade to the business version of hikashop over a month ago and has caused terrible chaos already. We'd be very thankful for any hints about system settings that could be influencing the billing dates as we're quite positive that this is not a bug or error.

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

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 2 months ago #248641

Hello,

If I have good memory, it's first time, we have these kind of issue report...
Do you have some override view on your invoice ?

Check this in Components => HikaShop => Configuration, and in Display dropdown select Views
Use your three filters dropdown, like on this screenshot :



If you see a trash icon on your invoice file, try to remove it (don't forget to save aside your custom view).
I hope that will solve your issue.

Awaiting news from you.

Regards

Attachments:
Last edit: 8 years 2 months ago by Philip.
The following user(s) said Thank You: G_Minor_Records

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

  • Posts: 4
  • Thank you received: 0
8 years 2 months ago #248751

Thanks for your reply!

The issue in the picture: The "unchangeable" date in the order (order_created) on the left and the displayed date on the invoice. In this case the date on the invoice equals the date of the manual change of the order status from "open" to "received" ("bestätigt" in German). edit: while the invoice date should always equal the date when the order was created OR at least stay the same date - and should especially NOT change around whenever something happens in the course of the order (e.g. customer cancelles - invoice date changes?!? why?)

I deleted the customizations and checked the date on the bills again - the echo for the date displayed on the invoice depends on the terms $this->element->order_created and $this->element->order_created and apparently since our upgrade to the business version there seems to be an additional IF{} differentiation that sometimes changes the date on the invoice to other dates from the order-history

We could solve the problem by eliminating the IF{} clause, which for now does the trick.

if(!empty($this->element->order_invoice_created)) {
	echo JText::_('DATE').': '.hikashop_getDate($this->element->order_created,'%d %B %Y');
}else{
	echo JText::_('DATE').': '.hikashop_getDate($this->element->order_created,'%d %B %Y');
}  ?>

Attachments:
Last edit: 8 years 2 months ago by Jerome. Reason: [code] is nice

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 2 months ago #248759

Hi,

It is not a random date and the system works like it is supposed to be.
The order_created date is the date when the order was placed by the customer (at the end of the checkout, before redirecting to the payment gateway). So that's the date of the creation of the order.
The order_invoice_created is the date when the invoice was created and the invoice number generated (after the payment of the customer).
Those two dates can be similar, but it's possible that the customer pays the order later on and thus you get an invoice creation date different from the order creation date.
In fact when you print the invoice of an order before the order is confirmed and the invoice is created, it is not really an invoice. It's a "quote". We still display it as "invoice" because merchants use HikaShop in lots of different ways where it sometimes make sense to print an invoice before the order is confirmed.

The invoice creation date and the order creation date do not change when an order is cancelled. You must be wrong. Or you have created some mass actions or custom plugin to change these dates when the order status changes, which I don't recommend.

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

  • Posts: 4
  • Thank you received: 0
8 years 2 months ago #248825

Hello Nicolas!

Thanks for clarifying. Before Philip's answer I wasn't shure where to look (I'm not exactly a programmer) but I'm starting to understand the problem.

Of course, the dates were not really "random", but we have not been able to see a pattern until Philip pointed out the php-customizations. We are a small company and do most of the work ourselves, but we had help with the set-up and don't know about all the details.

Indeed, some of the "invoices" have been printed before payment and have subsequently been showing the "correct" date for our purposes. I checked and in those cases where customers payed later (e.g. via bank transaction) the dates have been wrong on the re-prints, like you pointed out.

To put matters in simple words: For our needs, the "invoice" needs to show the date of the creation of the order, regardless of any payments, changes in the order status or anything else and should therefore always correspond with the "order created" date.

1) We receive an order
2) We print the delivery note and invoice twice - one for the customer (shipment), one for the books
3) When payment arrives, we send the shipment from our outbox.

Paypal arrives instantly and auto-changes the order status to 'payed', cash payments and bank transactions have to be set manually. In these cases the date of the invoice should also be the order_created date. Does our primitive work-around do the trick?

Thanks guys!

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 2 months ago #248829

Hi,

Yes, no problem. That's what I would have recommended to do if you needed to always see the order_created date in your invoices.

The following user(s) said Thank You: G_Minor_Records

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

  • Posts: 4
  • Thank you received: 0
8 years 2 months ago #248885

Well - problem solved!

Thanks everyone :)

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

Time to create page: 0.062 seconds
Powered by Kunena Forum