Subversion Repositories SmartDukaan

Rev

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

Rev 7399 Rev 7423
Line 76... Line 76...
76
    
76
    
77
    private StorePricing sp;
77
    private StorePricing sp;
78
    private double cardAmount;
78
    private double cardAmount;
79
    private double cashAmount;
79
    private double cashAmount;
80
    private String edc;
80
    private String edc;
-
 
81
    private String approvalCode;
81
    
82
    
82
    public String index() {
83
    public String index() {
83
        String loginStatus = (String) request.getSession().getAttribute("LOGGED_IN");
84
        String loginStatus = (String) request.getSession().getAttribute("LOGGED_IN");
84
        if(loginStatus == null || !loginStatus.equals("TRUE")){
85
        if(loginStatus == null || !loginStatus.equals("TRUE")){
85
            return "authfail";
86
            return "authfail";
Line 163... Line 164...
163
            if(cardAmount > 0) {
164
            if(cardAmount > 0) {
164
                storeOrderDetail.setEdcBank(edc);
165
                storeOrderDetail.setEdcBank(edc);
165
            }
166
            }
166
            storeOrderDetail.setCardRefundAmount(0);
167
            storeOrderDetail.setCardRefundAmount(0);
167
            storeOrderDetail.setCashRefundAmount(0);
168
            storeOrderDetail.setCashRefundAmount(0);
-
 
169
            storeOrderDetail.setApprovalCode(approvalCode);
168
            
170
            
169
            boolean saveSuccess = tcl.getClient().saveStoreOrderDetail(storeOrderDetail);
171
            boolean saveSuccess = tcl.getClient().saveStoreOrderDetail(storeOrderDetail);
170
            if(!saveSuccess) {
172
            if(!saveSuccess) {
171
                setErrorMsg("Unable to create order. Please try again.");
173
                setErrorMsg("Unable to create order. Please try again.");
172
                return "error-result";
174
                return "error-result";
Line 242... Line 244...
242
        order.setStatusDescription("In process");
244
        order.setStatusDescription("In process");
243
        order.setCreated_timestamp(Calendar.getInstance().getTimeInMillis());
245
        order.setCreated_timestamp(Calendar.getInstance().getTimeInMillis());
244
        order.setTotal_weight(lineObj.getTotal_weight());
246
        order.setTotal_weight(lineObj.getTotal_weight());
245
        
247
        
246
        order.setSource(2);
248
        order.setSource(2);
247
        order.setStoreId(1);
249
        order.setStoreId(Long.parseLong((String) request.getSession().getAttribute("STORE_ID")));
248
        
250
        
249
        order.setAdvanceAmount(advanceAmount);
251
        order.setAdvanceAmount(advanceAmount);
250
        order.setFreebieItemId(sp.getFreebieItemId());
252
        order.setFreebieItemId(sp.getFreebieItemId());
251
        
253
        
252
        List<LineItem> lines = new ArrayList<LineItem>();
254
        List<LineItem> lines = new ArrayList<LineItem>();
Line 534... Line 536...
534
    }
536
    }
535
 
537
 
536
    public void setEdc(String edc) {
538
    public void setEdc(String edc) {
537
        this.edc = edc;
539
        this.edc = edc;
538
    }
540
    }
-
 
541
 
-
 
542
    public String getApprovalCode() {
-
 
543
        return approvalCode;
-
 
544
    }
-
 
545
 
-
 
546
    public void setApprovalCode(String approvalCode) {
-
 
547
        this.approvalCode = approvalCode;
-
 
548
    }
539
}
549
}