[Skip to main content](#vessel-content)

#   Need negative quantities in back end new orders

##

- **[lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")**
- [![lanzanet's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7823.png)](/forum/user/7823-lanzanet "View lanzanet's Profile") Topic Author
- [ Offline](/forum/user/7823-lanzanet)

Less More

- Posts: 107
- Thank you received: 3
-
-

14 years 3 months ago [\#59044](#59044) by [lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")  *[Need negative quantities in back end new orders](/forum/2-general-talk-about-hikashop/59044-need-negative-quantities-in-back-end-new-orders#59044 "Hi. Is it possible to insert negative quantities in back end new orders? In Spain, when an order is cancelled, the shop creates a reverse order to the client with the same products as the original...")* was created by *[lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")*

Hi. Is it possible to insert negative quantities in back end new orders? In Spain, when an order is cancelled, the shop creates a reverse order to the client with the same products as the original order, but with negative quantities. On the other hand, a client could buy some products and could change one of them (some days later), then I could make a new order in back end, with a negative quantity in the product he is changing and a positive one in the new product he is buying me.

Is it possible or is there any way to do this without any modification?

Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU5MDQ0LW5lZWQtbmVnYXRpdmUtcXVhbnRpdGllcy1pbi1iYWNrLWVuZC1uZXctb3JkZXJzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

14 years 3 months ago [\#59093](#59093) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Need negative quantities in back end new orders](/forum/2-general-talk-about-hikashop/59044-need-negative-quantities-in-back-end-new-orders#59093 "Hi. Is it possible to insert negative quantities in back end new orders? In Spain, when an order is cancelled, the shop creates a reverse order to the client with the same products as the original...")*

Hi,

That's not possible. You can't have negative quantities of products.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU5MDQ0LW5lZWQtbmVnYXRpdmUtcXVhbnRpdGllcy1pbi1iYWNrLWVuZC1uZXctb3JkZXJzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")**
- [![lanzanet's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7823.png)](/forum/user/7823-lanzanet "View lanzanet's Profile") Topic Author
- [ Offline](/forum/user/7823-lanzanet)

Less More

- Posts: 107
- Thank you received: 3
-
-

14 years 3 months ago -  14 years 3 months ago [\#59128](#59128) by [lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")  Replied by *[lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")* on topic *[Re: Need negative quantities in back end new orders](/forum/2-general-talk-about-hikashop/59044-need-negative-quantities-in-back-end-new-orders#59128 "Hi. Is it possible to insert negative quantities in back end new orders? In Spain, when an order is cancelled, the shop creates a reverse order to the client with the same products as the original...")*

Well, though is not possible to have negative quantities in products, here is a detail of how I've created a negative invoice I was needed for my shop to be 'legal' in Spain. I detail these steps thinking about other users may need these invoices too, and this could help them.

Is not possible to have negative quantities in products, but it's possible to have negative prices in products or new invoice lines on back end invoices. Then, you can add a product named "Negative Invoice (incl. 18% IVA) number: " (for example). I must incude '(incl. 18% IVA)' because though tax quantity appears ok in the invoice, the tax description is not showing, and only 'VAT' (in my case IVA) appears, so no VAT type is showed in the invoice. Please Nicolas, maybe Is there any way to show the tax description modifyng some code? ![:unsure:](/media/kunena/emoticons/18.png ":unsure:") . When an order like this has to be created, you have to go to your back end and add a new order, select a client and complete all address data. Nicolas, other question, Could be possible that when a client is selected here we could 'select' an address of that client instead of complete all address data?. Then, you can add the new product you have created and add to the product description something like 'Refund of invoice number XXX' and complete the price quantities in negative values. In this way, you can have a negative invoice of the amount ot the invoce you want to refund. It's a little hard to understand, but here in Spain, I need to do this, and this way works for me.

You have now your negative invoice created, but you need to send to the client by mail (via attachment PDF plugin) or the client can print (or see) his invoice in the front end. Then you need to modify something for the VAT quantity to appears in the invoice (I think these are minor modifications and may not affect other Hikashop parts, please Nicolas, confirm this if you can).

1. For the invoice you send to the client via attachment PDF plugin, you have to edit plugins/hikashop/attachinvoice/attachinvoice/invoice.php, look for the line if($taxes &lt; 0) and replace by if($taxes != 0) (by the end of the file).

2. For the invoice the client can print himself in the front end you have to go to Hikashop-&gt;Display-&gt;Views and edit the file show.php of the ‘order’ view of your front end active template. Look for the line if($taxes &lt; 0) and replace by if($taxes != 0) (by the end of the file).

3. For the invoice you can print in your back end, you must go to Hikashop-&gt;Display-&gt;Views and edit the file invoice.php of the ‘order’ view of your back end (admin) active template. Look for the line if($taxes &lt; 0) and replace by if($taxes != 0).

Well, now it works for me. I hope these steps will help someone in the same situation.

Thanks.

Last edit: 14 years 3 months ago by [lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU5MDQ0LW5lZWQtbmVnYXRpdmUtcXVhbnRpdGllcy1pbi1iYWNrLWVuZC1uZXctb3JkZXJzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

14 years 3 months ago [\#59220](#59220) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Need negative quantities in back end new orders](/forum/2-general-talk-about-hikashop/59044-need-negative-quantities-in-back-end-new-orders#59220 "Hi. Is it possible to insert negative quantities in back end new orders? In Spain, when an order is cancelled, the shop creates a reverse order to the client with the same products as the original...")*

> Please Nicolas, maybe Is there any way to show the tax description modifyng some code?

That can be added with a translation override:
[ www.hikashop.com/en/download/languages.html#modify](http://www.hikashop.com/en/download/languages.html#modify)

> Nicolas, other question, Could be possible that when a client is selected here we could 'select' an address of that client instead of complete all address data?

That's something that we've been working on. It will be in next version.

1. &amp; 2. &amp; 3. We'll add these minor changes for next version. It won't cause any issue and could help in cases similar to you so I think that they are good modifications to have by default.

The following user(s) said Thank You: [lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzU5MDQ0LW5lZWQtbmVnYXRpdmUtcXVhbnRpdGllcy1pbi1iYWNrLWVuZC1uZXctb3JkZXJzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.053 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
