diff --git a/app/src/main/java/org/openimis/imispolicies/Enquire.java b/app/src/main/java/org/openimis/imispolicies/Enquire.java index 3e95a671..99ecaa3a 100644 --- a/app/src/main/java/org/openimis/imispolicies/Enquire.java +++ b/app/src/main/java/org/openimis/imispolicies/Enquire.java @@ -325,12 +325,16 @@ private void getInsureeInfo() { } - - Policy.put("Heading", jsonObject.getString("productCode")); - Policy.put("Heading1", jsonObject.getString("expiryDate") + " " + jsonObject.getString("status")); - Policy.put("SubItem1", jsonObject.getString("productName")); - Policy.put("SubItem2", Ded); - Policy.put("SubItem3", Ceiling); + if (jsonObject.getString("expiryDate").equals("null")){ + Policy.put("Heading", getResources().getString(R.string.EnquireNoPolicies)); + } + else{ + Policy.put("Heading", jsonObject.getString("productCode")); + Policy.put("Heading1", jsonObject.getString("expiryDate") + " " + jsonObject.getString("status")); + Policy.put("SubItem1", jsonObject.getString("productName")); + Policy.put("SubItem2", Ded); + Policy.put("SubItem3", Ceiling); + } String TotalAdmissionsLeft = buildEnquireValue(jsonObject, "totalAdmissionsLeft", R.string.totalAdmissionsLeft); String TotalVisitsLeft = buildEnquireValue(jsonObject, "totalVisitsLeft", R.string.totalVisitsLeft); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 591e7fe2..b320369c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -459,4 +459,5 @@ without a policy without a premium HTTP response: %1$d — %2$s + No policies registered.