优化单据创建时物料库存不足的提示语句

This commit is contained in:
彭枝刚 2025-01-15 10:18:59 +08:00
parent de092f9bb7
commit 083c2467ca

View File

@ -2297,10 +2297,10 @@ public class DocumentServiceImpl extends ServiceImpl<DocumentMapper, Document> i
Constant.DOCUMENT_ATTRIBUTE_TRANSFER.equals(detailed.getDocumentType())) {
Inventory inventory = inventoryService.groupBy(inventoryDto);
if (inventory == null) {
throw BusinessException.build("该物料在" + sourceWarehouse + "仓库没有足够库存!");
throw BusinessException.build("该物料["+byMes.getItem()+"]在" + sourceWarehouse + "仓库完全没有库存!");
}
if (detailed.getApplicationsQuantity().compareTo(inventory.getQtyOnHand()) > 0) {
throw BusinessException.build("该物料在" + sourceWarehouse + "仓库没有足够库存!");
throw BusinessException.build("该物料["+byMes.getItem()+"]在" + sourceWarehouse + "仓库没有足够库存!["+inventory.getErpStorageLocation()+"]仓库的库存量是["+inventory.getQtyOnHand()+"]");
}
}
if (detailed.getSalesOrder() != null && detailed.getSalesOrderSeq() != null) {