| Line 635... |
Line 635... |
| 635 |
ffdr.setFeature(null);
|
635 |
ffdr.setFeature(null);
|
| 636 |
logger.info("Could not find Feature_s for {}", ffdr.getCatalogId());
|
636 |
logger.info("Could not find Feature_s for {}", ffdr.getCatalogId());
|
| 637 |
}
|
637 |
}
|
| 638 |
ffdr.setBrand(doc.getJSONArray("brand_ss").getString(0));
|
638 |
ffdr.setBrand(doc.getJSONArray("brand_ss").getString(0));
|
| 639 |
if (doc.has("_childDocuments_")) {
|
639 |
if (doc.has("_childDocuments_")) {
|
| - |
|
640 |
String modelColorClass = "grey";
|
| 640 |
for (int j = 0; j < doc.getJSONArray("_childDocuments_").length(); j++) {
|
641 |
for (int j = 0; j < doc.getJSONArray("_childDocuments_").length(); j++) {
|
| 641 |
JSONObject childItem = doc.getJSONArray("_childDocuments_").getJSONObject(j);
|
642 |
JSONObject childItem = doc.getJSONArray("_childDocuments_").getJSONObject(j);
|
| 642 |
int itemId = childItem.getInt("itemId_i");
|
643 |
int itemId = childItem.getInt("itemId_i");
|
| 643 |
float sellingPrice = (float) childItem.getDouble("sellingPrice_f");
|
644 |
float sellingPrice = (float) childItem.getDouble("sellingPrice_f");
|
| 644 |
if (fofoAvailabilityInfoMap.containsKey(itemId)) {
|
645 |
if (fofoAvailabilityInfoMap.containsKey(itemId)) {
|
| Line 652... |
Line 653... |
| 652 |
SaholicPOItem poItemAvailability = poItemAvailabilityMap.get(itemId);
|
653 |
SaholicPOItem poItemAvailability = poItemAvailabilityMap.get(itemId);
|
| 653 |
String poColor = "grey";
|
654 |
String poColor = "grey";
|
| 654 |
boolean active = false;
|
655 |
boolean active = false;
|
| 655 |
if(currentAvailability != null && currentAvailability.getNetavailability() > 0) {
|
656 |
if(currentAvailability != null && currentAvailability.getNetavailability() > 0) {
|
| 656 |
poColor = "green";
|
657 |
poColor = "green";
|
| - |
|
658 |
modelColorClass = "green";
|
| 657 |
} else if (poItemAvailability != null && poItemAvailability.getUnfulfilledQty() > 0) {
|
659 |
} else if (poItemAvailability != null && poItemAvailability.getUnfulfilledQty() > 0) {
|
| 658 |
if(currentAvailability != null
|
660 |
if(currentAvailability != null
|
| 659 |
&& poItemAvailability.getUnfulfilledQty() + currentAvailability.getNetavailability() <= 0) {
|
661 |
&& poItemAvailability.getUnfulfilledQty() + currentAvailability.getNetavailability() <= 0) {
|
| 660 |
poColor = "red";
|
662 |
poColor = "grey";
|
| 661 |
} else {
|
663 |
} else {
|
| 662 |
poColor = "orange";
|
664 |
poColor = "orange";
|
| - |
|
665 |
if(modelColorClass!="green") {
|
| - |
|
666 |
modelColorClass = poColor;
|
| - |
|
667 |
}
|
| 663 |
}
|
668 |
}
|
| 664 |
}
|
669 |
}
|
| 665 |
fdi.setColorClass(poColor);
|
670 |
fdi.setColorClass(poColor);
|
| 666 |
fdi.setSellingPrice(sellingPrice);
|
671 |
fdi.setSellingPrice(sellingPrice);
|
| 667 |
fdi.setActive(active);
|
672 |
fdi.setActive(active);
|