Nullpointer when determining the default payment days

Description

Class: SwicoS1v12
Method: getDefaultPaymentPeriodDays()

A nullpointer occurs for the payment conditions if all discounts in the bill information contain decimal places. E.g.
//S1/10/100000/11/200114/40/5.00:10;2.00:20;0.0:30

The method getDefaultPaymentPeriodDays() uses BigDecimal.ZERO.equals(DISCOUNT) which does not consider the discount precision since its BigDecimal value is created using a String.
> Class: SwicoS1v12Type
> Method: parsePaymentConditions(...)

So 0 equals 0.0 (discount) would be false. This could be fixed using compareTo() == 0.

Environment

None

Activity

Show:
Claude Gex
May 7, 2020, 9:58 AM

Thank you for reporting. We will check this as soon as possible.

Christian Studer
May 11, 2020, 9:43 AM

Fix proposed in PR 42.

Assignee

Christian Studer

Reporter

Anonymous

Labels

None

Components

Fix versions

Affects versions

Priority

High
Configure