Skip to main content

create copy of order with negative amounts

More
6 years 11 months ago #311527 by nico.van.leeuwen
-- 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.

More
6 years 11 months ago #311529 by nicolas
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.

More
6 years 11 months ago #311568 by nico.van.leeuwen
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.

More
6 years 11 months ago #311569 by Mohamed Thelji
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.

More
6 years 11 months ago #311586 by lousyfool
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.

More
6 years 11 months ago #311627 by nico.van.leeuwen
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.

More
6 years 11 months ago - 6 years 11 months ago #311588 by nicolas
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: 6 years 11 months ago by nicolas.

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

More
6 years 11 months ago #311638 by nico.van.leeuwen
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.

More
6 years 11 months ago #311664 by nicolas
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.

More
6 years 11 months ago #311684 by nico.van.leeuwen
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.201 seconds
Powered by Kunena Forum