|
|
|
|
@ -361,9 +361,9 @@ public class ErpProductServiceImpl implements ErpProductService {
|
|
|
|
|
if (productUnitService.getProductUnit(purchaseUnitId) == null) {
|
|
|
|
|
throw exception(PRODUCT_UNIT_NOT_EXISTS);
|
|
|
|
|
}
|
|
|
|
|
if (unitId.equals(purchaseUnitId)) {
|
|
|
|
|
throw exception(PRODUCT_UNIT_CONVERT_SELF_NOT_ALLOWED);
|
|
|
|
|
}
|
|
|
|
|
// if (unitId.equals(purchaseUnitId)) {
|
|
|
|
|
// throw exception(PRODUCT_UNIT_CONVERT_SELF_NOT_ALLOWED);
|
|
|
|
|
// }
|
|
|
|
|
if (purchaseUnitConvertQuantity == null || purchaseUnitConvertQuantity.compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
|
|
throw exception(PRODUCT_PURCHASE_UNIT_CONVERT_QUANTITY_INVALID);
|
|
|
|
|
}
|
|
|
|
|
|