| Line 55... |
Line 55... |
| 55 |
Map<String, DispatchNotificationModel> dispatchNotication, String airwaybillNo, LocalDateTime shippingTimestamp)
|
55 |
Map<String, DispatchNotificationModel> dispatchNotication, String airwaybillNo, LocalDateTime shippingTimestamp)
|
| 56 |
throws ProfitMandiBusinessException {
|
56 |
throws ProfitMandiBusinessException {
|
| 57 |
|
57 |
|
| 58 |
for (Order order : orders) {
|
58 |
for (Order order : orders) {
|
| 59 |
if (order.getStatus().equals(OrderStatus.BILLED)) {
|
59 |
if (order.getStatus().equals(OrderStatus.BILLED)) {
|
| 60 |
if(order.getBillingTimestamp().isBefore(shippingTimestamp)) {
|
60 |
if(order.getBillingTimestamp().isAfter(shippingTimestamp)) {
|
| 61 |
throw new ProfitMandiBusinessException("Uploaded File", "",
|
61 |
throw new ProfitMandiBusinessException("Uploaded File", "",
|
| 62 |
"Invoice Number " + order.getInvoiceNumber() + " cannot be shipped before billing date");
|
62 |
"Invoice Number " + order.getInvoiceNumber() + " cannot be shipped before billing date");
|
| 63 |
}
|
63 |
}
|
| 64 |
if (StringUtils.isEmpty(airwaybillNo)) {
|
64 |
if (StringUtils.isEmpty(airwaybillNo)) {
|
| 65 |
throw new ProfitMandiBusinessException("Uploaded File", "",
|
65 |
throw new ProfitMandiBusinessException("Uploaded File", "",
|