Change company, what happens to old invoices?

  • Posts: 272
  • Thank you received: 13
11 years 10 months ago #83901

Company Alpha sell goods. In 2013 it change name to Company Beta and also change Vat number and address. But the ecommerce is always the same. So users still have their invoices.

Now, what would report the invoices generated before company change when user go to his account an see invoice? Will it still report old company or new one?

Have you considered this case? If not, would you consider it so that old invoices will report old company or at least remove them from user view and show only in back end with old companies values?

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

  • Posts: 12953
  • Thank you received: 1778
11 years 10 months ago #83963

Hi,

If you want to edit the invoice, you'll be able to do that through "Hikashop->Display->Views" and by editing the invoice file of the order view.

Hope this will help you.

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

  • Posts: 272
  • Thank you received: 13
11 years 10 months ago #83978

So, in the case I will change company address, etc... I can then go to old invoices, one by one, edit them with old company data and save them one by one; so every user will have their old invoices with old companies datas and new invoices with new company datas?

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

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 10 months ago #84192

Hi,

Your configuration address is not stored in the database so if you change the value in your configuration, all displayed invoices would use the new values.
If you want to haves some "temporal" values, you should put the old values in the invoice view and, using the "order_created" value, you would display an old value or the current value.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 272
  • Thank you received: 13
11 years 10 months ago #84235

Thanks Jerome,

Not sure I understood.

I could use something in the view file:

if "order_created" <= 01-05-2014 (example) then show "old company"
else show php code taking values from DB.


Right?

If this is correct, would you please wright me here the code I should use and where should I edit the invoice view file?

Thanks so much.

Last edit: 11 years 10 months ago by deltafidesign.

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

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 10 months ago #84327

Hi,

In the view "front-end | order | show" you would find:

  <div id="hikashop_order_left_part" class="hikashop_order_left_part"><?php
    echo $this->store_address;
  ?></div>
Which would display the store address.
So, you can edit this view (and same view but in the backend) in order to put something like:
  <div id="hikashop_order_left_part" class="hikashop_order_left_part"><?php
    if($this->element->order_created > 1357549494) // the timestamp value of the date
      echo $this->store_address;
    else {
      echo 'My old company name<br/>'.
           'my old company address...<br/>'.
           'etc....';
    }
  ?></div>

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: deltafidesign

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

  • Posts: 272
  • Thank you received: 13
11 years 10 months ago #84366

Really thank you!

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

Time to create page: 0.080 seconds
Powered by Kunena Forum