# BR-DE-10 Deliver-to city must be provided when a delivery address is used

A delivery address must contain the deliver-to city.

## Problem Description

A delivery address must contain the deliver-to city.

> **ERROR**: XRechnung 3.0

## Context and Significance

This entry follows the XRechnung 3.0.2 Schematron rule semantics used by KoSIT validation.

## Solution

Fill BT-77 deliver-to city or omit the delivery address group when it is not needed.

- validate
- convert

## Valid Examples

- BT-77 Deliver to city is present and valid.

## Invalid Examples

- BT-77 Deliver to city is missing or invalid.

## Code Examples

### Valid XML
```
<cac:Delivery>
  <cac:DeliveryLocation>
    <cac:Address>
      <cbc:CityName>München</cbc:CityName>
      <cbc:PostalZone>80331</cbc:PostalZone>
      <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>
    </cac:Address>
  </cac:DeliveryLocation>
</cac:Delivery>
```

### Invalid XML
```
<cac:Delivery>
  <cac:DeliveryLocation>
    <cac:Address>
      <!-- cbc:CityName (BT-77) missing while DELIVER TO ADDRESS is present -->
      <cbc:PostalZone>80331</cbc:PostalZone>
      <cac:Country><cbc:IdentificationCode>DE</cbc:IdentificationCode></cac:Country>
    </cac:Address>
  </cac:DeliveryLocation>
</cac:Delivery>
```

## Affected Fields

- [BT-77 Deliver to city](/resources/xrechnung/bt-77-deliver-to-city)

## Related Rules

- [BR-20](/resources/kosit-validator-errors/br-20-tax-representative-country-code-required)
- [BR-DE-11](/resources/kosit-validator-errors/br-de-11-deliver-to-post-code-required)

## Validation Tools

- [Official KoSIT Validator](https://erechnungsvalidator.service-bw.de/): Validate your XRechnung files against all BR-DE rules.
- [Convert PDF to XRechnung](/pdf-to-xrechnung): Automatic validation error fixes when converting.

## Related Resources

- [Official Specification](https://xeinkauf.de/xrechnung/)
- [Test Suite](https://github.com/itplr-kosit/xrechnung-testsuite)
- [Complete Error List](/resources/kosit-validator-errors): Overview of all German XRechnung validation rules.
