Always update inventory availability flags
The automatic updating of the "Is available?" and "Availability status" is controlled by the "Is Auto Deducted?" flag: when enabled it will update the first two based on quantity and distribution critical amount, otherwise it does not touch them. This behavior is the same as the original GG. (see support#431 (closed))
Change the business logic (src/main/java/org/gringlobal/service/triggers/InventoryTriggers.java) so that "Is available?" and "Availability status" are updated regardless of "Is auto deducted" value. Also set isAvailable = N when quantity is 0:
// if (i.getIsAutoDeducted().equals("N")) return; // Disabled
if (i.getQuantityOnHand() == null || i.getQuantityOnHand().doubleValue() == 0d) {
i.setIsAvailable("N");
// i.setAvailabilityStatusCode(CommunityCodeValues.INVENTORY_AVAILABILITY_LOWINVENTORY.value); // Maybe?
return;
}