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

#   no invoice number for such orders

##

- **[urampa](/forum/user/2568-urampa "View urampa's Profile")**
- [![urampa's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/2568-urampa "View urampa's Profile") Topic Author
- [ Offline](/forum/user/2568-urampa)

Less More

- Posts: 6
- Thank you received: 0
-
-

8 years 4 months ago [\#294112](#294112) by [urampa](/forum/user/2568-urampa "View urampa's Profile")  *[no invoice number for such orders](/forum/35-orders-management/895009-no-invoice-number-for-such-orders#294112 "-- HikaShop version -- : HikaShop Business: 3.4.0 -- Joomla version -- : 3.8.6  Is it possible to block the invoice number to be generated only for such orders? I need base it on a custom field to generate or not the invoice number.")* was created by *[urampa](/forum/user/2568-urampa "View urampa's Profile")*

-- HikaShop version -- : HikaShop Business: 3.4.0
-- Joomla version -- : 3.8.6

Is it possible to block the invoice number to be generated only for such orders? I need base it on a custom field to generate or not the invoice number.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5NTAwOS1uby1pbnZvaWNlLW51bWJlci1mb3Itc3VjaC1vcmRlcnM/dG1wbD1tYXJrZG93bg==) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14274
-
-

8 years 4 months ago [\#294115](#294115) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[no invoice number for such orders](/forum/35-orders-management/895009-no-invoice-number-for-such-orders#294115 "-- HikaShop version -- : HikaShop Business: 3.4.0 -- Joomla version -- : 3.8.6  Is it possible to block the invoice number to be generated only for such orders? I need base it on a custom field to generate or not the invoice number.")*

Hi,

It's kind of possible.
I think you should be able to do that with a mass action:
[ www.hikashop.com/support/documentation/167-massaction-form.html](https://www.hikashop.com/support/documentation/167-massaction-form.html)
With a trigger "on after order updated", you could have a filter "order column" (for a custom order field) or "user column" (for a custom user field), and actions "update the values" on the columns "order_invoice_number", "order_invoice_id", "order_invoice_created" to empty their values.
That way the system would generate the invoice but it would be wiped out directly after being generated.

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

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

- **[urampa](/forum/user/2568-urampa "View urampa's Profile")**
- [![urampa's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/2568-urampa "View urampa's Profile") Topic Author
- [ Offline](/forum/user/2568-urampa)

Less More

- Posts: 6
- Thank you received: 0
-
-

8 years 4 months ago [\#294185](#294185) by [urampa](/forum/user/2568-urampa "View urampa's Profile")  Replied by *[urampa](/forum/user/2568-urampa "View urampa's Profile")* on topic *[no invoice number for such orders](/forum/35-orders-management/895009-no-invoice-number-for-such-orders#294185 "-- HikaShop version -- : HikaShop Business: 3.4.0 -- Joomla version -- : 3.8.6  Is it possible to block the invoice number to be generated only for such orders? I need base it on a custom field to generate or not the invoice number.")*

I've modified massaction_order plugin because the trigger onAfterOrderUpdate makes no result. I have copied part of onBeforeOrderUpdate settings:
$o = clone $order;
if(!empty($order-&gt;old)){
foreach($order-&gt;old as $key =&gt; $value) {
if(!isset($o-&gt;$key))
$o-&gt;$key = $value;
}
}
$orders = array($o);
instead of
$orders = array($order);
and now the massaction return correct value.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5NTAwOS1uby1pbnZvaWNlLW51bWJlci1mb3Itc3VjaC1vcmRlcnM/dG1wbD1tYXJrZG93bg==) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86315
- Thank you received: 14274
-
-

8 years 4 months ago [\#294187](#294187) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[no invoice number for such orders](/forum/35-orders-management/895009-no-invoice-number-for-such-orders#294187 "-- HikaShop version -- : HikaShop Business: 3.4.0 -- Joomla version -- : 3.8.6  Is it possible to block the invoice number to be generated only for such orders? I need base it on a custom field to generate or not the invoice number.")*

Thank you for your feedback.
We'll add that on our end.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5NTAwOS1uby1pbnZvaWNlLW51bWJlci1mb3Itc3VjaC1vcmRlcnM/dG1wbD1tYXJrZG93bg==) 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.110 seconds

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

[](#top)
