| Line 86... |
Line 86... |
| 86 |
if(!isAutorizedToAccessWarehouse(warehouseId)){
|
86 |
if(!isAutorizedToAccessWarehouse(warehouseId)){
|
| 87 |
logger.error("Unauthorized Access for WarehouseId " + warehouseId + " by " + SecurityUtils.getSubject().getPrincipal().toString());
|
87 |
logger.error("Unauthorized Access for WarehouseId " + warehouseId + " by " + SecurityUtils.getSubject().getPrincipal().toString());
|
| 88 |
addActionError("Unauthorized Access for WarehouseId " + warehouseId);
|
88 |
addActionError("Unauthorized Access for WarehouseId " + warehouseId);
|
| 89 |
return EDIT_NEW;
|
89 |
return EDIT_NEW;
|
| 90 |
}
|
90 |
}
|
| 91 |
long currentTime = sdf.parse(sdf.format(new Date())).getTime();
|
91 |
/*long currentTime = sdf.parse(sdf.format(new Date())).getTime();
|
| 92 |
if(currentTime !=sdf.parse(date).getTime()){
|
92 |
if(currentTime !=sdf.parse(date).getTime()){
|
| 93 |
logger.error("Invoice Receive Date Must be equal to Today's Date");
|
93 |
logger.error("Invoice Receive Date Must be equal to Today's Date");
|
| 94 |
addActionError("Invoice Receive Date Must be equal to Today's Date");
|
94 |
addActionError("Invoice Receive Date Must be equal to Today's Date");
|
| 95 |
return EDIT_NEW;
|
95 |
return EDIT_NEW;
|
| 96 |
}
|
96 |
}*/
|
| 97 |
Client purchaseClient = new PurchaseClient().getClient();
|
97 |
Client purchaseClient = new PurchaseClient().getClient();
|
| 98 |
if(!purchaseClient.isInvoiceReceived(invoiceNumber, Long.parseLong(supplierId))) {
|
98 |
if(!purchaseClient.isInvoiceReceived(invoiceNumber, Long.parseLong(supplierId))) {
|
| 99 |
Invoice invoice = new Invoice();
|
99 |
Invoice invoice = new Invoice();
|
| 100 |
invoice.setInvoiceNumber(invoiceNumber);
|
100 |
invoice.setInvoiceNumber(invoiceNumber);
|
| 101 |
invoice.setDate(sdf.parse(date).getTime());
|
101 |
invoice.setDate(sdf.parse(date).getTime());
|