Add BillingAddress

This commit is contained in:
2023-03-18 11:40:37 +01:00
parent b637b756d6
commit 731df99c72
4 changed files with 53 additions and 1 deletions

View File

@ -390,7 +390,23 @@ namespace Elwig.Windows {
LfbisNrInput.Text = m.LfbisNr;
BuchführendInput.IsChecked = m.IsBuchführend;
// TODO Rechnungsadresse
var billingAddr = m.BillingAddress;
if (billingAddr != null) {
BillingName.Text = billingAddr.Name;
BillingAddressInput.Text = billingAddr.Address;
AT_PlzDest? b = billingAddr.PostalDest.AtPlz;
if (b != null) {
BillingPlzInput.Text = b.Plz.ToString();
BillingOrtInput.ItemsSource = b.AtPlz.Orte;
BillingOrtInput.SelectedItem = b;
}
} else {
BillingName.Text = "";
BillingAddressInput.Text = "";
BillingPlzInput.Text = "";
BillingOrtInput.ItemsSource = null;
BillingOrtInput.SelectedItem = null;
}
EntryDateInput.Text = (m.EntryDate != null) ? string.Join(".", m.EntryDate.Split("-").Reverse()) : null;
ExitDateInput.Text = (m.ExitDate != null) ? string.Join(".", m.ExitDate.Split("-").Reverse()) : null;