added check to verify not to add void APC
This commit is contained in:
parent
2c209e1140
commit
0421f5e1d8
|
@ -427,10 +427,15 @@ public class ResultMapper implements Serializable {
|
||||||
Optional<Field<String>> oPca = Optional.ofNullable(i.getProcessingchargeamount());
|
Optional<Field<String>> oPca = Optional.ofNullable(i.getProcessingchargeamount());
|
||||||
Optional<Field<String>> oPcc = Optional.ofNullable(i.getProcessingchargecurrency());
|
Optional<Field<String>> oPcc = Optional.ofNullable(i.getProcessingchargecurrency());
|
||||||
if (oPca.isPresent() && oPcc.isPresent()) {
|
if (oPca.isPresent() && oPcc.isPresent()) {
|
||||||
APC apc = new APC();
|
Field<String> pca = oPca.get();
|
||||||
apc.setCurrency(oPcc.get().getValue());
|
Field<String> pcc = oPcc.get();
|
||||||
apc.setAmount(oPca.get().getValue());
|
if(pca.getValue().trim() != "" && pcc.getValue().trim() != ""){
|
||||||
instance.setArticleprocessingcharge(apc);
|
APC apc = new APC();
|
||||||
|
apc.setCurrency(oPcc.get().getValue());
|
||||||
|
apc.setAmount(oPca.get().getValue());
|
||||||
|
instance.setArticleprocessingcharge(apc);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue