First commit (wating to add alerts in budget)
This commit is contained in:
@@ -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);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user