| Line 134... |
Line 134... |
| 134 |
|
134 |
|
| 135 |
//verifyOrder.setText("Verify");
|
135 |
//verifyOrder.setText("Verify");
|
| 136 |
acceptOrder.setText("Accept");
|
136 |
acceptOrder.setText("Accept");
|
| 137 |
notAvailable.setText("Out Of Stock");
|
137 |
notAvailable.setText("Out Of Stock");
|
| 138 |
addBillingInfo.setText("Bill");
|
138 |
addBillingInfo.setText("Bill");
|
| 139 |
if(billingType == BillingType.OURS)
|
139 |
if(billingType == BillingType.OURS || billingType == BillingType.OURS_EXTERNAL)
|
| 140 |
addBillingInfo.setVisible(false);
|
140 |
addBillingInfo.setVisible(false);
|
| 141 |
printInvoice.setText("Print Invoice");
|
141 |
printInvoice.setText("Print Invoice");
|
| 142 |
receiveReturn.setText("Receive Return");
|
142 |
receiveReturn.setText("Receive Return");
|
| 143 |
validateDOA.setText("Validate DOA");
|
143 |
validateDOA.setText("Validate DOA");
|
| 144 |
validateReturnProduct.setText("Product Usable?");
|
144 |
validateReturnProduct.setText("Product Usable?");
|
| Line 224... |
Line 224... |
| 224 |
|
224 |
|
| 225 |
@Override
|
225 |
@Override
|
| 226 |
public void onClick(ClickEvent event) {
|
226 |
public void onClick(ClickEvent event) {
|
| 227 |
if(!printInvoice.isEnabled())
|
227 |
if(!printInvoice.isEnabled())
|
| 228 |
return;
|
228 |
return;
|
| 229 |
if(order.getJacketNumber()==0 && billingType == BillingType.OURS) {
|
229 |
if(order.getJacketNumber()==0 && (billingType == BillingType.OURS || billingType == BillingType.OURS_EXTERNAL)) {
|
| 230 |
JacketInfoBox box = new JacketInfoBox(eventbus, order, user, billingType, warehouses);
|
230 |
JacketInfoBox box = new JacketInfoBox(eventbus, order, user, billingType, warehouses);
|
| 231 |
//box.clean();
|
231 |
//box.clean();
|
| 232 |
box.center();
|
232 |
box.center();
|
| 233 |
} else{
|
233 |
} else{
|
| 234 |
String invoiceGenerationUrl = GWT.getHostPageBaseURL() + "invoice/?id=" + order.getOrderId() + "&warehouse=" + warehouseID;
|
234 |
String invoiceGenerationUrl = GWT.getHostPageBaseURL() + "invoice/?id=" + order.getOrderId() + "&warehouse=" + warehouseID;
|
| 235 |
if(billingType == BillingType.OURS)
|
235 |
if(billingType == BillingType.OURS || billingType == BillingType.OURS_EXTERNAL)
|
| 236 |
invoiceGenerationUrl += "&withBill=true";
|
236 |
invoiceGenerationUrl += "&withBill=true";
|
| 237 |
else
|
237 |
else
|
| 238 |
invoiceGenerationUrl += "&withBill=false";
|
238 |
invoiceGenerationUrl += "&withBill=false";
|
| 239 |
Window.open(invoiceGenerationUrl, "newWindowName", "window features.");
|
239 |
Window.open(invoiceGenerationUrl, "newWindowName", "window features.");
|
| 240 |
}
|
240 |
}
|
| Line 247... |
Line 247... |
| 247 |
public void onClick(ClickEvent event) {
|
247 |
public void onClick(ClickEvent event) {
|
| 248 |
if(!printAllInvoices.isEnabled()){
|
248 |
if(!printAllInvoices.isEnabled()){
|
| 249 |
return;
|
249 |
return;
|
| 250 |
}else{
|
250 |
}else{
|
| 251 |
String invoiceGenerationUrl = GWT.getHostPageBaseURL() + "invoice/?id=" + order.getOrderId() + "&printAll=true&warehouse=" + warehouseID;
|
251 |
String invoiceGenerationUrl = GWT.getHostPageBaseURL() + "invoice/?id=" + order.getOrderId() + "&printAll=true&warehouse=" + warehouseID;
|
| 252 |
if(billingType == BillingType.OURS)
|
252 |
if(billingType == BillingType.OURS || billingType == BillingType.OURS_EXTERNAL)
|
| 253 |
invoiceGenerationUrl += "&withBill=true";
|
253 |
invoiceGenerationUrl += "&withBill=true";
|
| 254 |
else
|
254 |
else
|
| 255 |
invoiceGenerationUrl += "&withBill=false";
|
255 |
invoiceGenerationUrl += "&withBill=false";
|
| 256 |
Window.open(invoiceGenerationUrl, "newWindowName", "window features.");
|
256 |
Window.open(invoiceGenerationUrl, "newWindowName", "window features.");
|
| 257 |
}
|
257 |
}
|
| Line 306... |
Line 306... |
| 306 |
maskButtonsForWE(true, false, true, false, false, false, false, false, false); //Allow the WE to either accept the order or mark it as out of stock.
|
306 |
maskButtonsForWE(true, false, true, false, false, false, false, false, false); //Allow the WE to either accept the order or mark it as out of stock.
|
| 307 |
break;
|
307 |
break;
|
| 308 |
case ACCEPT:
|
308 |
case ACCEPT:
|
| 309 |
//TODO: Mask buttons based on the billingType
|
309 |
//TODO: Mask buttons based on the billingType
|
| 310 |
if(billingType == BillingType.OURS)
|
310 |
if(billingType == BillingType.OURS)
|
| 311 |
maskButtonsForWE(false, false, false, true, true, false, false, true, false); // For our billing, allow the WE to directly print the invoive.
|
311 |
maskButtonsForWE(false, false, false, true, true, false, false, false, false); // For our billing, allow the WE to directly print the invoive.
|
| 312 |
else
|
312 |
else
|
| 313 |
maskButtonsForWE(false, false, false, true, true, false, false, true, false); //For external billing, allow the WE to feed the invoice info.
|
313 |
maskButtonsForWE(false, false, false, true, true, false, false, true, false); //For external billing, allow the WE to feed the invoice info.
|
| 314 |
break;
|
314 |
break;
|
| 315 |
case REJECT:
|
315 |
case REJECT:
|
| 316 |
maskButtonsForWE(false, false, false, false, false, false, false, false, false); //Can't do anything once the order has been rejected.
|
316 |
maskButtonsForWE(false, false, false, false, false, false, false, false, false); //Can't do anything once the order has been rejected.
|