CreditNote: Add footer text
This commit is contained in:
@ -119,6 +119,11 @@ main h1 {
|
|||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.main-wrapper p.custom {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
break-inside: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
.main-wrapper .hidden {
|
.main-wrapper .hidden {
|
||||||
break-before: avoid;
|
break-before: avoid;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ namespace Elwig.Documents {
|
|||||||
$"<tr><th>Überw. am</th><td>{p.Variant.TransferDate:dd.MM.yyyy}</td></tr>" +
|
$"<tr><th>Überw. am</th><td>{p.Variant.TransferDate:dd.MM.yyyy}</td></tr>" +
|
||||||
$"<tr><th>Datum/Zeit</th><td>{p.Credit?.ModifiedTimestamp:dd.MM.yyyy} / {p.Credit?.ModifiedTimestamp:HH:mm}</td></tr>" +
|
$"<tr><th>Datum/Zeit</th><td>{p.Credit?.ModifiedTimestamp:dd.MM.yyyy} / {p.Credit?.ModifiedTimestamp:HH:mm}</td></tr>" +
|
||||||
$"</tbody></table>";
|
$"</tbody></table>";
|
||||||
Text = App.Client.TextDeliveryNote;
|
Text = App.Client.TextCreditNote;
|
||||||
DocumentId = $"Tr.-Gutschr. " + (p.Credit != null ? $"{p.Credit.Year}/{p.Credit.TgNr:000}" : p.MgNr);
|
DocumentId = $"Tr.-Gutschr. " + (p.Credit != null ? $"{p.Credit.Year}/{p.Credit.TgNr:000}" : p.MgNr);
|
||||||
CurrencySymbol = season.Currency.Symbol ?? season.Currency.Code;
|
CurrencySymbol = season.Currency.Symbol ?? season.Currency.Code;
|
||||||
Precision = season.Precision;
|
Precision = season.Precision;
|
||||||
|
@ -158,4 +158,10 @@
|
|||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<p>Überweisung erfolgt auf Konto @(Elwig.Helpers.Utils.FormatIban(Model.Member.Iban ?? "-")).</p>
|
||||||
|
<div style="margin-top: 1em;">
|
||||||
|
@if (Model.Text != null) {
|
||||||
|
<p class="custom">@Model.Text</p>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
@ -92,9 +92,9 @@
|
|||||||
</table>
|
</table>
|
||||||
@Raw(BusinessDocument.PrintSortenaufteilung(Model.MemberBuckets))
|
@Raw(BusinessDocument.PrintSortenaufteilung(Model.MemberBuckets))
|
||||||
@Raw(Model.PrintBucketTable(Model.Season, Model.MemberBuckets, includePayment: true))
|
@Raw(Model.PrintBucketTable(Model.Season, Model.MemberBuckets, includePayment: true))
|
||||||
<div class="text" style="margin-top: 2em;">
|
<div style="margin-top: 2em;">
|
||||||
@if (Model.Text != null) {
|
@if (Model.Text != null) {
|
||||||
<p class="comment" style="white-space: pre-wrap; break-inside: avoid;">@Model.Text</p>
|
<p class="custom comment">@Model.Text</p>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
@ -60,6 +60,7 @@ namespace Elwig.Helpers {
|
|||||||
|
|
||||||
public string? TextDeliveryNote;
|
public string? TextDeliveryNote;
|
||||||
public string? TextDeliveryConfirmation;
|
public string? TextDeliveryConfirmation;
|
||||||
|
public string? TextCreditNote;
|
||||||
|
|
||||||
public ClientParameters(AppDbContext ctx) : this(ctx.ClientParameters.ToDictionary(e => e.Param, e => e.Value)) { }
|
public ClientParameters(AppDbContext ctx) : this(ctx.ClientParameters.ToDictionary(e => e.Param, e => e.Value)) { }
|
||||||
|
|
||||||
@ -99,6 +100,8 @@ namespace Elwig.Helpers {
|
|||||||
if (TextDeliveryNote == "") TextDeliveryNote = null;
|
if (TextDeliveryNote == "") TextDeliveryNote = null;
|
||||||
TextDeliveryConfirmation = parameters.GetValueOrDefault("TEXT_DELIVERYCONFIRMATION");
|
TextDeliveryConfirmation = parameters.GetValueOrDefault("TEXT_DELIVERYCONFIRMATION");
|
||||||
if (TextDeliveryConfirmation == "") TextDeliveryConfirmation = null;
|
if (TextDeliveryConfirmation == "") TextDeliveryConfirmation = null;
|
||||||
|
TextCreditNote = parameters.GetValueOrDefault("TEXT_CREDITNOTE");
|
||||||
|
if (TextCreditNote == "") TextCreditNote = null;
|
||||||
} catch {
|
} catch {
|
||||||
throw new KeyNotFoundException();
|
throw new KeyNotFoundException();
|
||||||
}
|
}
|
||||||
@ -133,6 +136,7 @@ namespace Elwig.Helpers {
|
|||||||
("DOCUMENT_SENDER", Sender2),
|
("DOCUMENT_SENDER", Sender2),
|
||||||
("TEXT_DELIVERYNOTE", TextDeliveryNote),
|
("TEXT_DELIVERYNOTE", TextDeliveryNote),
|
||||||
("TEXT_DELIVERYCONFIRMATION", TextDeliveryConfirmation),
|
("TEXT_DELIVERYCONFIRMATION", TextDeliveryConfirmation),
|
||||||
|
("TEXT_CREDITNOTE", TextCreditNote),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ namespace Elwig.Helpers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static string FormatIban(string iban) {
|
public static string FormatIban(string iban) {
|
||||||
return Regex.Replace(iban, ".{4}", "$0 ");
|
return Regex.Replace(iban.Trim(), ".{4}", "$0 ").Trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void RunBackground(string title, Func<Task> a) {
|
public static void RunBackground(string title, Func<Task> a) {
|
||||||
|
@ -535,15 +535,18 @@
|
|||||||
</GroupBox>
|
</GroupBox>
|
||||||
<GroupBox Header="Anlieferungsbestätigung" Margin="10,10,10,10" Height="250">
|
<GroupBox Header="Anlieferungsbestätigung" Margin="10,10,10,10" Height="250">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<TextBox x:Name="TextElementDeliveryConfirmation" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" AcceptsReturn="True"
|
<TextBox x:Name="TextElementDeliveryConfirmation" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" AcceptsReturn="True"
|
||||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10,10,10,10" Height="Auto"
|
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10,10,10,10" Height="Auto"
|
||||||
TextChanged="TextBox_TextChanged"/>
|
TextChanged="TextBox_TextChanged"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
<GroupBox Header="Traubengutschrift" Margin="10,10,10,10" Height="250">
|
||||||
|
<Grid>
|
||||||
|
<TextBox x:Name="TextElementCreditNote" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" AcceptsReturn="True"
|
||||||
|
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10,10,10,10" Height="Auto"
|
||||||
|
TextChanged="TextBox_TextChanged"/>
|
||||||
|
</Grid>
|
||||||
|
</GroupBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
@ -12,11 +12,11 @@ namespace Elwig.Windows {
|
|||||||
|
|
||||||
public BaseDataWindow() {
|
public BaseDataWindow() {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
RequiredInputs = new Control[] {
|
RequiredInputs = [
|
||||||
ClientNameInput, ClientNameTypeInput, ClientNameTokenInput, ClientNameShortInput,
|
ClientNameInput, ClientNameTypeInput, ClientNameTokenInput, ClientNameShortInput,
|
||||||
ClientAddressInput, ClientPlzInput, ClientOrtInput,
|
ClientAddressInput, ClientPlzInput, ClientOrtInput,
|
||||||
};
|
];
|
||||||
ExemptInputs = new Control[] {
|
ExemptInputs = [
|
||||||
ClientNameFull,
|
ClientNameFull,
|
||||||
BranchIdInput, BranchNameInput, BranchPlzInput, BranchOrtInput,
|
BranchIdInput, BranchNameInput, BranchPlzInput, BranchOrtInput,
|
||||||
BranchAddressInput, BranchPhoneNrInput, BranchFaxNrInput, BranchMobileNrInput,
|
BranchAddressInput, BranchPhoneNrInput, BranchFaxNrInput, BranchMobileNrInput,
|
||||||
@ -30,7 +30,7 @@ namespace Elwig.Windows {
|
|||||||
SeasonMinKgPerBsInput.TextBox, SeasonMaxKgPerBsInput.TextBox, SeasonBsValueInput.TextBox,
|
SeasonMinKgPerBsInput.TextBox, SeasonMaxKgPerBsInput.TextBox, SeasonBsValueInput.TextBox,
|
||||||
SeasonPenaltyPerKgInput.TextBox, SeasonPenaltyInput.TextBox, SeasonPenaltyNoneInput.TextBox,
|
SeasonPenaltyPerKgInput.TextBox, SeasonPenaltyInput.TextBox, SeasonPenaltyNoneInput.TextBox,
|
||||||
SeasonModifierIdInput, SeasonModifierNameInput, SeasonModifierRelInput.TextBox, SeasonModifierAbsInput.TextBox,
|
SeasonModifierIdInput, SeasonModifierNameInput, SeasonModifierRelInput.TextBox, SeasonModifierAbsInput.TextBox,
|
||||||
};
|
];
|
||||||
WineAttributeFillLowerInput.Visibility = Visibility.Hidden;
|
WineAttributeFillLowerInput.Visibility = Visibility.Hidden;
|
||||||
WineAttributeFillLowerLabel.Visibility = Visibility.Hidden;
|
WineAttributeFillLowerLabel.Visibility = Visibility.Hidden;
|
||||||
}
|
}
|
||||||
@ -297,6 +297,7 @@ namespace Elwig.Windows {
|
|||||||
case 3: ModeDeliveryNoteFull.IsChecked = true; break;
|
case 3: ModeDeliveryNoteFull.IsChecked = true; break;
|
||||||
}
|
}
|
||||||
TextElementDeliveryConfirmation.Text = p.TextDeliveryConfirmation;
|
TextElementDeliveryConfirmation.Text = p.TextDeliveryConfirmation;
|
||||||
|
TextElementCreditNote.Text = p.TextCreditNote;
|
||||||
|
|
||||||
FinishInputFilling();
|
FinishInputFilling();
|
||||||
}
|
}
|
||||||
@ -322,6 +323,7 @@ namespace Elwig.Windows {
|
|||||||
p.TextDeliveryNote = TextElementDeliveryNote.Text.Length > 0 ? TextElementDeliveryNote.Text : null;
|
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.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.TextDeliveryConfirmation = TextElementDeliveryConfirmation.Text.Length > 0 ? TextElementDeliveryConfirmation.Text : null;
|
||||||
|
p.TextCreditNote = TextElementCreditNote.Text.Length > 0 ? TextElementCreditNote.Text : null;
|
||||||
|
|
||||||
await p.UpdateValues();
|
await p.UpdateValues();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user