Subversion Repositories SmartDukaan

Rev

Rev 14053 | Rev 20153 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14053 Rev 20151
Line 32... Line 32...
32
    private String receivedFrom;
32
    private String receivedFrom;
33
    private String supplierId;
33
    private String supplierId;
34
    private String numItems;
34
    private String numItems;
35
    private Long warehouseId;
35
    private Long warehouseId;
36
    private String invoiceDate;
36
    private String invoiceDate;
37
    private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
37
    private SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy");
38
    private Map<Long, Supplier> suppliers = new HashMap<Long, Supplier>();
38
    private Map<Long, Supplier> suppliers = new HashMap<Long, Supplier>();
39
 
39
 
40
    /*
40
    /*
41
     * (non-Javadoc)
41
     * (non-Javadoc)
42
     * 
42
     * 
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 = 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
        	}