CreditNote: Add footer text

This commit is contained in:
2024-01-28 22:15:30 +01:00
parent 62496a0770
commit 8665c93702
8 changed files with 32 additions and 12 deletions

View File

@ -12,11 +12,11 @@ namespace Elwig.Windows {
public BaseDataWindow() {
InitializeComponent();
RequiredInputs = new Control[] {
RequiredInputs = [
ClientNameInput, ClientNameTypeInput, ClientNameTokenInput, ClientNameShortInput,
ClientAddressInput, ClientPlzInput, ClientOrtInput,
};
ExemptInputs = new Control[] {
];
ExemptInputs = [
ClientNameFull,
BranchIdInput, BranchNameInput, BranchPlzInput, BranchOrtInput,
BranchAddressInput, BranchPhoneNrInput, BranchFaxNrInput, BranchMobileNrInput,
@ -30,7 +30,7 @@ namespace Elwig.Windows {
SeasonMinKgPerBsInput.TextBox, SeasonMaxKgPerBsInput.TextBox, SeasonBsValueInput.TextBox,
SeasonPenaltyPerKgInput.TextBox, SeasonPenaltyInput.TextBox, SeasonPenaltyNoneInput.TextBox,
SeasonModifierIdInput, SeasonModifierNameInput, SeasonModifierRelInput.TextBox, SeasonModifierAbsInput.TextBox,
};
];
WineAttributeFillLowerInput.Visibility = Visibility.Hidden;
WineAttributeFillLowerLabel.Visibility = Visibility.Hidden;
}
@ -297,6 +297,7 @@ namespace Elwig.Windows {
case 3: ModeDeliveryNoteFull.IsChecked = true; break;
}
TextElementDeliveryConfirmation.Text = p.TextDeliveryConfirmation;
TextElementCreditNote.Text = p.TextCreditNote;
FinishInputFilling();
}
@ -322,6 +323,7 @@ namespace Elwig.Windows {
p.TextDeliveryNote = TextElementDeliveryNote.Text.Length > 0 ? TextElementDeliveryNote.Text : null;
p.ModeDeliveryNoteStats = (ModeDeliveryNoteNone.IsChecked == true) ? 0 : (ModeDeliveryNoteGaOnly.IsChecked == true) ? 1 : (ModeDeliveryNoteShort.IsChecked == true) ? 2 : (ModeDeliveryNoteFull.IsChecked == true) ? 3 : 2;
p.TextDeliveryConfirmation = TextElementDeliveryConfirmation.Text.Length > 0 ? TextElementDeliveryConfirmation.Text : null;
p.TextCreditNote = TextElementCreditNote.Text.Length > 0 ? TextElementCreditNote.Text : null;
await p.UpdateValues();
}