Tricky Asset/Product/Invoice question - Printable Version +- CoreBOSBB (https://discussions.corebos.org) +-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17) +--- Forum: Modules/Extension Support (https://discussions.corebos.org/forumdisplay.php?fid=9) +--- Thread: Tricky Asset/Product/Invoice question (/showthread.php?tid=1120) |
Tricky Asset/Product/Invoice question - radu - 06-11-2018 Hello, Maybe someone can help me out with this one: I have an asset associated with a product and a invoice(that product's invoice to be more precisely). Since the price of the product on the invoice can be different from the price from the product module is there a way to setup a filter in assets list view(assets module) so that I can see on a column the unit price that is on the invoice NOT the unit price of the product as declared in products module? Thank you. RE: Tricky Asset/Product/Invoice question - joebordes - 06-11-2018 Two ideas come to mind: 1.- create a custom field of type currency, add some code to go to the invoice and fetch the value you need and save it in the field 2.- create a custom field of type relation pointing to the Inventory Details module. That will permit you to select the details of the exact line the product is on. That record has the prices and you will be able to select it on the list view. In this option, you could also add some code to filter the InventoryDetails and show only those related to the invoice, maybe even the product... RE: Tricky Asset/Product/Invoice question - radu - 06-11-2018 (06-11-2018, 03:25 PM)joebordes Wrote: Two ideas come to mind: Thank you again Joe! The inventory details option crossed my mind but selecting by hand the exact detail is kinda error-prone. Seems like properly solving the issue involves doing some sort of coding. Can you please point me to some resources(documentation or examples) on how to do those kind of 'interventions'? RE: Tricky Asset/Product/Invoice question - joebordes - 06-12-2018 Option 1 is an "after-save" event: http://corebos.org/documentation/doku.php?id=en:devel:corebos_hooks Option 2 is popup filter code: http://corebos.org/documentation/doku.php?id=en:devel:conditional_popup |