Jump to content

create Quote with products with quantity in stock enable


zitu4life

Recommended Posts

This is quite confiusing and perphaps shouldnt be like this.

My case:

If create an quote and then Add a Predefined Product that has stock quantity enable and than convert this quote to invoice and then client pays this invoice nothing happen to stock quantitiy, I guess it should decrease but not...stok control will only decrease if an invoice is created from add order from admin or client page.

I guess it shloud decrease if we use Add a Predefined Product from quote, so all our produts\services will be available from our pruduts and service list.

example:

I got produt A 10 units in stock.

Create a quote with 3 units of produt A, then client accept quote and I convert quote to invoice with this 3 units and later client pays invoice...

What we should expect, my stock reduces 10-3=7, but stocksremains in 10.

Stock only decrease if invoice are created direct from Add Order.

 

 

 

 

 

Edited by WHMCS ChrisD
Removed links at users request
Link to comment
Share on other sites

11 hours ago, zitu4life said:

This is quite confusing and shapers shouldn't be like this.

i'd be tempted to suggest that if this is the case, you might want to make a Bug Report to determine whether it's a bug or by intentional design.

though sadly, looking at the URL that you posted, you aren't getting your WHMCS license directly from WHMCS and so can't make a bug report in that way. 🙄

Link to comment
Share on other sites

WHMCS confirm that this behaviour is by design. When a quote is converted in to an invoice, a respective product/service based on your "Predefined" products in the quotes are also not created, which is why the stock level does not decrease.

At this time the the Add Predefined Product functionality is design to be an "Ease-of-use" function to allow you to quickly populate the fields in a quote.

For me it is strange...this mean that if if want to buy one time produt it will be displayed all the time on main client sumary tab, instead only on an invoice. Recuring subscription it is important to be displayed on client sumury page, but one time product sounds strange.


 

Link to comment
Share on other sites

@WHMCS ChrisD

Ticket: #NKB-635939 - [NOT A BUG] producut stock quantitiy enable

WHMCS reply:

Hi 

Thanks for contacting WHMCS with your Bug Report.

At this time, I can confirm that this behaviour is by design. When a quote is converted in to an invoice, a respective product/service based on your "Predefined" products in the quotes is also not created, which is why the stock level does not decrease.

At this time the the Add Predefined Product functionality is design to be an "Ease-of-use" function to allow you to quickly populate the fields in a quote.

However I can see how when converting a quote to an invoice, also generating an order for any added predefined products could be useful. Therefore I would encourage you to please submit a request to our feature requests tracker where other users can contribute to and vote on your idea. Ideas with the most votes and activity do get reviewed by our team.

http://requests.whmcs.com

If you have any further questions, please don't hesitate to get back in touch.

Best regards,

---------------------------------------------------------------------

by Admin login, the only way to decrease stock control is to add an order, ok, but when we add an order it will be displayed for records in client summary, can you imagine we we add an order with 50 units for an item that were bought I one time, client summary page will displayed all 50 itens permanently in client summary page, this is not needed, because produt is not service that we want to has it on client page...If a client with all those 50 itens bought opens a ticket it will also be visible for support agent, and also it is borring to has 50 or even 100, 500 displayed on client summary...we only need an invoice records, not lot of one time produts displayed.

perphaps i am wrong but it could be better to fix it with an optin to choose to hide produts that we want on client summury page.

Edited by zitu4life
Link to comment
Share on other sites

On 09/07/2019 at 12:20, zitu4life said:

by Admin login, the only way to decrease stock control is to add an order

you could manually adjust the stock figure in the specific product without the need to make an order.

On 09/07/2019 at 12:20, zitu4life said:

If a client with all those 50 items bought opens a ticket it will also be visible for support agent, and also it is boring to has 50 or even 100, 500 displayed on client summary...we only need an invoice records, not lot of one time products displayed.

perhaps i am wrong but it could be better to fix it with an option to choose to hide products that we want on client summary page.

you could do that already either by editing the client summary template, or by using a hook to modify the array(s) used in that template.

if these products aren't services, would using Billable Items instead of invoicing be better for your situation ?

Link to comment
Share on other sites

On 7/7/2019 at 10:17 PM, zitu4life said:

Hi @brian!, Hi @WHMCS ChrisDBillable itens works fine and was the quiquest way to fix the problem from admin side...I would not know how to add an hook to do that.

Manualy modify the produt stock, will work but also increases the chances for error and also would need to remenber all the time to change stock item.

If it is a subscription bases service will use add an order, and if it is product will use billable items and if it is both will merge invoices...but at the END we still with other things...REPORTS....there is REPORT INCOME BY PRODUT, if these things do not be counted in stock control, it will not be counted in REPORT (I have tested it) so, how we can use reports to take decision, to check helth of our business...in report by product we can check what produts are sold most...but if WHMCS do not look at this, will be all time a gap.

 

Edited by zitu4life
Link to comment
Share on other sites

On 7/7/2019 at 10:17 PM, zitu4life said:

After some try, decide the best way is allways to add an order from admin side (no manualy invoice, no billable itens, and even when we convert an quote to invoice, we should add an order,, or perphaps do no convert quote to invoce)...

They are all related to ADD ORDER. stock are linked to ADD order, and reports are linked to ADD ORDER...
Using manual invoice, or billable only for specific cases.

So the point is only to hide or group produts and services we do not want to show all the time there in client summary page. WHMCS can build an option to hide as we want or even option to hide during ADD ORDER, or possible one Hook for that.

 

Edited by zitu4life
Link to comment
Share on other sites

1 hour ago, zitu4life said:

Manually modify the product stock, will work but also increases the chances for error and also would need to remember all the time to change stock item.

true, but there's no simple way to automate discounting stock level via a billable item that I can think of - a feature request would likely take years to complete (though if you do submit one, post the link to it in this thread otherwise nobody will find it and it won't receive any more votes).

1 hour ago, zitu4life said:

If it is a subscription bases service will use add an order, and if it is product will use billable items and if it is both will merge invoices...but at the END we still with other things...REPORTS....there is REPORT INCOME BY PRODUCT, if these things do not be counted in stock control, it will not be counted in REPORT (I have tested it) so, how we can use reports to take decision, to check health of our business...in report by product we can check what products are sold most...but if WHMCS do not look at this, will be all time a gap.

I suppose you could create a custom report but it could be a nightmare.... from what you describe, it sounds easier if they were all products.

41 minutes ago, zitu4life said:

After some try, decide the best way is always to add an order from admin side (no manually invoice, no billable items, and even when we convert an quote to invoice, we should add an order,, or perhaps do no convert quote to invoice)...

adding the order manually, and not converting a quote to an invoice, sounds the simplest solution from what you describe.

43 minutes ago, zitu4life said:

They are all related to ADD ORDER. stock are linked to ADD order, and reports are linked to ADD ORDER...

reports will be linked to existing products - there are ways you can add a product to a client without using Add Order, but doing so is the easiest way.

45 minutes ago, zitu4life said:

So the point is only to hide or group products and services we do not want to show all the time there in client summary page.

do you mean the products page on the Summary tab of the Client Summary page (as per below) or on the "Products" tab dropdown ?

PEdb0cY.png

47 minutes ago, zitu4life said:

WHMCS can build an option to hide as we want or even option to hide during ADD ORDER, or possible one Hook for that.

forget about getting WHMCS to do it as that would take too long (unless they're going to add it to v7.8) - hiding them (a list of products) from the above summary product table would be very easy to do using a hook, e.g let's hide "Basic Hosting 2019" from that above list...

1MeMq2T.png

now you can still access these missing services from the product/services tab, but they'll be removed from the client summary products table.

if you wanted to hide a product from the Add Order dropdown, you can already do that by "retiring" the product...

https://docs.whmcs.com/Products_and_Services#Details_Tab

Quote
  • Retire - When ticked the product is hidden from admin area lists, such as the Products/Services dropdown in the client's Products/Services tab (though it won't apply to services already with this product)

although retired, the client will still be able to order the product from the cart - assuming that it's not hidden too.

Link to comment
Share on other sites

49 minutes ago, brian! said:

Hi @brian! only want to hide it from client summary page only, the example you share with "Basic Hosting 2019" looks what i am looking for, but this hook will look to specific product I selected...I mean, I can set a hook for those products that I want to hide.
Product A
Product B
Product C

And every time I add an order with products will not see that on client summary page!!!

Can you please share a hook example.

thank you.

 

 

Link to comment
Share on other sites

Just now, zitu4life said:

only want to hide it from client summary page only, the example you share with "Basic Hosting 2019" looks what i am looking for, but this hook will look to specific product I selected...I mean, I can set a hook for those products that I want to hide.
Product A
Product B
Product C

And every time I add an order with products will not see that on client summary page!!!

yes. 🙂

1 minute ago, zitu4life said:

Can you please share a hook example. 

<?php

# Remove Selective Products From Client Summary Page Hook
# Written by brian!

function client_summary_remove_products_hook($vars)
{
	if ($vars['filename'] == 'clientssummary'){
		$productsummary = $vars['productsummary'];	
		$removeproducts = array('Basic Hosting 2019');
		foreach($productsummary as $key => $product){
			if(in_array($product['dpackage'],$removeproducts)){
				unset($productsummary[$key]);
			}
		}
		return array("productsummary" => $productsummary);
	}
}
add_hook("AdminAreaPage", 1, "client_summary_remove_products_hook");

all that you should need to change in the hook is the $removeproducts array values, e.g...

$removeproducts = array('Product A','Product B','Product C');

just remember that if you ever change these product names in WHMCS, you'll need to rename them in the hook too. 🙂

Link to comment
Share on other sites

45 minutes ago, brian! said:

Hi @brian! ✌️ It works fine!!! many thanks, all support helped me improve in lot of way, also to learn different way to do things in WHMCS . Now will have a better stock control, using more reports to take important business decision and finally this hook keeps client summary page looks better...will request future request and also post the link to it in this thread.
 

 

Edited by zitu4life
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated