Set electronic receipt visibility

Add logic when a line item fails to validate to manually set the
visibility of the electronic receipts based on the receipt type setting.

Fixes issue where the electronic receipts area would disappear under
certain circumstances.