manuelbl/SwissQRBill

Qrbill data is invalid

Surya-0173 opened this issue · 1 comments

Fields for either structured address or combined element address may be filled but not both (address_type_confict).

This error occured when debtor.setaddressline1("") Or debtor.setaddressline1(null) in null condition sometimes works.

Please explain conditions for which this error can happen.

The Swiss Qr-bill standard lets you specify an address in one of two ways: either as a structured address nor as a combined address elements. If you mix them up, you get the mentioned error.

This is documented in the description of the Address class.

So if you use setAddressLine1() and setAddressLine2(), you may not use setStreet(), setHouseNo(), setPostalCode() and setTown(). Or if you use any of those four, you may not use setAddressLine1() and setAddressLine2().