Subversion Repositories SmartDukaan

Rev

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

Rev 4265 Rev 4309
Line 426... Line 426...
426
		case VERIFICATION_PENDING:
426
		case VERIFICATION_PENDING:
427
        case NEW:
427
        case NEW:
428
        case NO_STOCK:
428
        case NO_STOCK:
429
        case ACCEPT:
429
        case ACCEPT:
430
        case BILL:
430
        case BILL:
431
			maskButtonsForAdmin(false, false, false, false, true); //Allow the OM to refund a COD order or an order with low inventory or when a customer calls or writes to cancel an order.
431
			maskButtonsForAdmin(false, false, false, false, true, true); //Allow the OM to refund a COD order or an order with low inventory or when a customer calls or writes to cancel an order.
432
			break;
432
			break;
433
		case DELIVERED:
433
		case DELIVERED:
434
			maskButtonsForAdmin(true, true, false, false, false);	//Allow the OM to flag and request pickup.
434
			maskButtonsForAdmin(true, true, false, false, false, true);	//Allow the OM to flag and request pickup.
435
			break;
435
			break;
436
		case DOA_PICKUP_REQUESTED:
436
		case DOA_PICKUP_REQUESTED:
437
			maskButtonsForAdmin(true, true, true, false, false);	//Allow the OM to either re-request a pickup no. or authorize pickup by entering one
437
			maskButtonsForAdmin(true, true, true, false, false, true);	//Allow the OM to either re-request a pickup no. or authorize pickup by entering one
438
			break;
438
			break;
439
		case DOA_RETURNED:
439
		case DOA_RETURNED:
440
		case SALES_RETURNED:
440
		case SALES_RETURNED:
441
			maskButtonsForAdmin(false, false, false, true, true);	//Allow the OM to either reship the order or refund it
441
			maskButtonsForAdmin(false, false, false, true, true, true);	//Allow the OM to either reship the order or refund it
442
			break;
442
			break;
443
		default:
443
		default:
444
			maskButtonsForAdmin(false, false, false, false, false);	//Unknown state. Let's not allow any untoward actions.
444
			maskButtonsForAdmin(false, false, false, false, false, true);	//Unknown state. Let's not allow any untoward actions.
445
			break;
445
			break;
446
		}
446
		}
447
	}
447
	}
448
	
448
	
449
	private void maskButtonsForAdmin(boolean flag, boolean reqPickup, boolean authPickup, boolean reship, boolean refund){
449
	private void maskButtonsForAdmin(boolean flag, boolean reqPickup, boolean authPickup, boolean reship, boolean refund, boolean printInv){
450
		flagOrder.setEnabled(flag);
450
		flagOrder.setEnabled(flag);
451
		requestPickup.setEnabled(reqPickup);
451
		requestPickup.setEnabled(reqPickup);
452
		authorizePickup.setEnabled(authPickup);
452
		authorizePickup.setEnabled(authPickup);
453
		reshipOrder.setEnabled(reship);
453
		reshipOrder.setEnabled(reship);
454
		refundOrder.setEnabled(refund);
454
		refundOrder.setEnabled(refund);
-
 
455
		printInvoice.setEnabled(printInv);
455
	}
456
	}
456
	
457
	
457
	private void loadOrderDetails(){
458
	private void loadOrderDetails(){
458
		orderDetails1.add(getHorizontalPanel("FREE ITEM:    ", transaction.getDealText()));
459
		orderDetails1.add(getHorizontalPanel("FREE ITEM:    ", transaction.getDealText()));
459
		orderDetails1.add(getHorizontalPanel("PRODUCT GROUP: ", transaction.getProductGroup()));
460
		orderDetails1.add(getHorizontalPanel("PRODUCT GROUP: ", transaction.getProductGroup()));