fix(compliance): improve compliance
This commit is contained in:
@ -75,12 +75,12 @@ export class EN16931Validator {
|
||||
}
|
||||
|
||||
// BR-08: Seller postal address is mandatory
|
||||
if (!invoice.from?.address?.city || !invoice.from?.address?.postalCode || !invoice.from?.address?.countryCode) {
|
||||
if (!invoice.from?.address?.city || !invoice.from?.address?.postalCode || (!invoice.from?.address?.countryCode && !invoice.from?.address?.country)) {
|
||||
errors.push('BR-08: Seller postal address (city, postal code, country) is mandatory');
|
||||
}
|
||||
|
||||
// BR-10: Buyer postal address is mandatory
|
||||
if (!invoice.to?.address?.city || !invoice.to?.address?.postalCode || !invoice.to?.address?.countryCode) {
|
||||
if (!invoice.to?.address?.city || !invoice.to?.address?.postalCode || (!invoice.to?.address?.countryCode && !invoice.to?.address?.country)) {
|
||||
errors.push('BR-10: Buyer postal address (city, postal code, country) is mandatory');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user