create copy of order with negative amounts

  • Posts: 290
  • Thank you received: 22
4 years 6 months ago #311527

-- HikaShop version -- : 4.2.1
-- Joomla version -- : 3.9.12
-- PHP version -- : 7.3

Hi,
I've seen several questions about creating credit invoices but none with a useful answer so I'm trying a different approach.

In order to get a correct "credit invoice" all we need is a copy of the original order that has the same products, same customer etc. but only with negative product amounts. The invoice number should be new, just like if a new order is placed to maintain the correct invoice number sequence as is required by our TAX law.

Would this be possible (now or maybe later?).
Or would this be possible with a custom job and them maybe donated to the project?

Thanks for your response.
Nico

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
4 years 6 months ago #311529

Hi,

On the orders listing, you can select the checkbox of the order you want to duplicate and then click on the "copy" button at the top.
Then, edit the copy and edit each product to add a minus for the prices so that they are negative.
That should do it unless I'm missing something ?

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

  • Posts: 290
  • Thank you received: 22
4 years 6 months ago #311568

That would be great but trying this gives me an empty order.
As soon as I change the 1 to -1 the product goes missing :blink:

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

  • Posts: 12953
  • Thank you received: 1778
4 years 6 months ago #311569

Hello,

You should actually edit the "price" of your product and add a minus to it.

Kind regards,
Mohamed Thelji.

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

  • Posts: 2143
  • Thank you received: 747
4 years 6 months ago #311586

Hi,

Just reading this... sounds all simple enough.
But what does this to quantity/stock levels, reports/statistics, etc?


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 290
  • Thank you received: 22
4 years 6 months ago #311627

Hi,

Yes changing the amount to a negative value works as far as the invoice amount goes.

As lousyfool is telling, this is not doing anything for the stock levels etc.
Personally I'm not using the statistics that much but it would be great if this is working also.

If this could be made to work than that would solve a big issue that I have (almost with every customer) in using HikaShop with invoices.

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
4 years 6 months ago #311588

Hi,

Well, it depends of the status of the order.
You could create a specific order status to use for such orders and exclude these orders from the statistics ( and create new statistics to count these orders if necessary)

Regarding have refund invoices, I think it would make more sense to have a "refund invoice" option so that when it's activated, HikaShop would create a second "invoice number" for the order when the order status changes to "refunded", and you would then have a "refund invoice" button on the order edition screen to be able to print the refund invoice, using the refund invoice number and the amounts in negative.
What do you think about this ?

Last edit: 4 years 6 months ago by nicolas.

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

  • Posts: 290
  • Thank you received: 22
4 years 6 months ago #311638

Hi, that sound good.
For me it's nog so relevant how we create the credit invoice but more that there is an option for it.

You guys know how HikaShop is coded internally and know what is the best option to get it done.

If it would also work with the PDF invoice manager plugin and keep the stock correct then that would be awesome :)

Thanks for figuring this out !

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
4 years 6 months ago #311664

Hi,

Yes, the solution I propose would make it so that the stock would be correct. PDF invoice support could be added quite easily with the solution I'm talking about.

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

  • Posts: 290
  • Thank you received: 22
4 years 6 months ago #311684

It all sound like a great improvement to me !
If anyone else can think of anything to add/or something we did not think about then please let's hear it.

Thanks again for thinking about a solution!

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

Time to create page: 0.100 seconds
Powered by Kunena Forum