First commit (wating to add alerts in budget)

This commit is contained in:
BACHIR SOULDI
2025-09-04 13:21:24 +01:00
parent f70bf3341b
commit 9eb959f07a
192 changed files with 51034 additions and 4992 deletions

View File

@@ -137,21 +137,19 @@ public class SaleOrderWorkflowServiceImpl implements SaleOrderWorkflowService {
Beans.get(BlockingService.class)
.getBlocking(partner, saleOrder.getCompany(), BlockingRepository.SALE_BLOCKING);
if (blocking != null && saleOrder.getInTaxTotal().compareTo(blocking.getMaxAmount()) > 0) {
System.out.println("************************************");
System.out.println(blocking);
System.out.println(saleOrder.getInTaxTotal().compareTo(blocking.getMaxAmount()) > 0);
System.out.println("************************************");
saleOrder.setBlockedOnCustCreditExceed(true);
// if (!saleOrder.getManualUnblock()) {
saleOrderRepo.save(saleOrder);
String reason =
blocking.getBlockingReason() != null ? blocking.getBlockingReason().getName() : "";
throw new BlockedSaleOrderException(
partner, I18n.get("Client is sale blocked:") + " " + reason);
saleOrderRepo.save(saleOrder);
String reason =
blocking.getBlockingReason() != null ? blocking.getBlockingReason().getName() : "";
throw new BlockedSaleOrderException(
partner, I18n.get("Client is sale blocked:") + " " + reason);
// }
}