Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Default quantity when adding new Product lines
#1
Hello,
When you add a new product/service on a Purchase Order the default quantity is 1. Also if you generate a PO from a product. What is the proper procedure for giving it another value, a numeric field on the product item?
I noticed the quantity value is saved in vtiger_inventoryproductrel table, but how do I set that field? I tried with a field set mapping Products2PurchaseOrder with 'quantity' as fieldname and the custom field in products as OrgfieldName but it does not seem to work. I checked the wiki and the forum but it is still unclear to me how can that field be controlled.
I can easily set the quantity in the releted InventoryDetails but that does not reflect in the quantity on the PO.
Thanks
Reply
#2
Try with the Inventory_Product_Default_Units global variable
Joe
TSolucio
Reply
#3
(11-18-2020, 09:17 AM)joebordes Wrote: Try with the Inventory_Product_Default_Units global variable

Got it Wink. Thanks. I did check the GV's but was looking for 'quantity' so i overlooked that one. That works for a given number. How would one pick the value of a specific numeric field in products? Do I have to use a business map in that GV to somehow retrieve the value of that field?
Reply
#4
I don't think we have support for that. There may be (should be) a hook to plugin your functionality but I don't remember right now.
Joe
TSolucio
Reply
#5
(11-18-2020, 10:47 AM)joebordes Wrote: I don't think we have support for that. There may be (should be) a hook to plugin your functionality but I don't remember right now.

My thoughts exactly Wink. Initially I figured it's more obvious, then I thought about a hook to get that data from popup but it was not clear to me how to work with that quantity field, how to address it. I still don't know but I will play with it now that i know the general direction.
As a faster but not complete way to get that info displayed was to get it in a custom field in InventoryDetails and display it in Information column on the PO's detail lines.

Thanks!
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)