Epesi ENS | Epesi Academy | epesi.cloud PaaS | GitHub

Help Me! | Download from SourceForge Download Epesi BIM Free & Open Source CRM


Hi,

we are using EPESI 1.7.1 (unable to update because of a lot of customizations) with the premium warehouse module. I want to add a field in the Warehouse -> Items results view which shows the quantity of items available only in the warehouse that is selected in the warehouse filter on this site. Currently there is only a field which shows the total quantity (i.e. the sum, or quantity at hand) items across all warehouses, which is a bit confusing for users. Is there a simple way to add such a field?

I have already added a custom field and tried to add a new function in LocationCommon_0.php which should return the quantity of the item in the currently selected/filtered warehouse, but I am unable to get the correct result.

21 days later

Never mind, I have found a simple solution. If anyone else is interested:

In LocationCommon_0.php
create a copy of function display_item_quantity_in_warehouse

get selected warehouse with
$selected_warehouse = $_POST['filter__sku'];

and filter in
foreach ($locations as $v) {
if($selected_warehouse != "__NULL" && $v['warehouse'] != $selected_warehouse) // exclude all but filtered
continue;

Finally, created a custom column using this new function.

I am glad it worked for you and thank you for sharing your solution.

Write a Reply...