Skip to content

Commit

Permalink
SapienzaTaxHandler: Fix tax amount equals to zero when 'impoVers' is …
Browse files Browse the repository at this point in the history
…empty
  • Loading branch information
leosarra committed Nov 1, 2019
1 parent 257b854 commit 06e9f64
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ private List<Tax> _getTaxes(boolean paid) throws OpenstudConnectionException, Op
case "impoVers":
try {
String content = obj.getString(element);
if (content.isEmpty()) tax.setAmount(0);
else tax.setAmount(Double.parseDouble(obj.getString(element)));
if (!content.isEmpty()) tax.setAmount(Double.parseDouble(obj.getString(element)));
} catch (NumberFormatException e) {
e.printStackTrace();
os.log(Level.SEVERE, e);
Expand Down

0 comments on commit 06e9f64

Please sign in to comment.