|
|
|
|
@ -31,55 +31,88 @@
|
|
|
|
|
Responsive>
|
|
|
|
|
<DataGridCommandColumn />
|
|
|
|
|
<DataGridColumn Field="@nameof(Contact.ContactId)" Caption="ContactId" Filterable/>
|
|
|
|
|
<DataGridColumn Field="@nameof(Contact.FirstName)" Caption="FirstName" Filterable/>
|
|
|
|
|
<DataGridColumn Field="@nameof(Contact.AccountId)" Caption="AccountId" Filterable />
|
|
|
|
|
<DataGridColumn Field="@nameof(Contact.FirstName)" Caption="FirstName" Filterable />
|
|
|
|
|
<DataGridColumn Field="@nameof(Contact.LastName)" Caption="LastName" Filterable/>
|
|
|
|
|
<DataGridColumn Field="@nameof(Contact.Gender)" Caption="Gender" Filterable/>
|
|
|
|
|
<DataGridColumn Field="@nameof(Contact.EMail)" Caption="EMail" Filterable/>
|
|
|
|
|
<DataGridColumn Field="@nameof(Contact.SAPContactNumber)" Caption="SAPContactNumber" Filterable/>
|
|
|
|
|
<DataGridColumn Field="@nameof(Contact.PhoneNumber)" Caption="PhoneNumber" Filterable />
|
|
|
|
|
<DataGridColumn Field="@nameof(Contact.SAPContactNumber)" Caption="SAPContactNumber" Filterable />
|
|
|
|
|
</DataGrid>
|
|
|
|
|
|
|
|
|
|
<Divider DividerType="DividerType.TextContent" Text="Quote Details"/>
|
|
|
|
|
<Fields>
|
|
|
|
|
<Field>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is2">SalesRep:</FieldLabel>
|
|
|
|
|
<FieldBody>@quote.SalesRep.LastName</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is2">QuotationDate:</FieldLabel>
|
|
|
|
|
<FieldBody>@quote.QuotationDate</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field Horizontal>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is2">QuotationNumber:</FieldLabel>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is10">
|
|
|
|
|
<TextEdit Text="@quote.QuotationNumber"/>
|
|
|
|
|
</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field Horizontal>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is2">ValidFor:</FieldLabel>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is10">
|
|
|
|
|
<TextEdit Text="@quote.ValidFor.ToString()"/>
|
|
|
|
|
</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is2">Recipient:</FieldLabel>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is10">@selectedRecipient.FirstName @selectedRecipient.LastName</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is10">@correspondingAccount.AccountName</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is10">@correspondingAccount.Street</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is10">@correspondingAccount.ZIP @correspondingAccount.City</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field Horizontal>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is2">Description:</FieldLabel>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is10">
|
|
|
|
|
<TextEdit Text="@quote.Description" />
|
|
|
|
|
</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
</Fields>
|
|
|
|
|
|
|
|
|
|
<Row>
|
|
|
|
|
<Column ColumnSize="ColumnSize.Is6">
|
|
|
|
|
<Fields>
|
|
|
|
|
@* <Field>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is2">SalesRep:</FieldLabel>
|
|
|
|
|
<FieldBody>@quote.SalesRep.LastName</FieldBody>
|
|
|
|
|
</Field>*@
|
|
|
|
|
<Field Horizontal>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is4">Angebotsname:</FieldLabel>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is6">
|
|
|
|
|
<TextEdit Text="@quote.Description" TextChanged="@OnDescriptionChanged" />
|
|
|
|
|
</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
@*<Field>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is2">QuotationDate:</FieldLabel>
|
|
|
|
|
<FieldBody>@quote.QuotationDate</FieldBody>
|
|
|
|
|
</Field> *@
|
|
|
|
|
<Field Horizontal>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is4">Angebotsnummer:</FieldLabel>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is6">
|
|
|
|
|
<TextEdit Text="@quote.QuotationNumber" TextChanged="@OnQuotationNumberChanged" />
|
|
|
|
|
</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field Horizontal>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is4">Angebotspfad:</FieldLabel>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is6">@quote.Path</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field Horizontal>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is4">Gewährleistung (Monate):</FieldLabel>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is6">@quote.Warranty</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field Horizontal>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is4">Angebotsgültigkeit (Tage):</FieldLabel>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is6">
|
|
|
|
|
<TextEdit Text="@quote.ValidFor.ToString()" TextChanged="@OnValidForChanged" />
|
|
|
|
|
</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field Horizontal>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is4">Mehrwertsteuer (%):</FieldLabel>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is6">
|
|
|
|
|
<TextEdit Text="@quote.VAT.ToString()" TextChanged="@OnVATChanged" />
|
|
|
|
|
</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field Horizontal>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is4">Versandkosten (%):</FieldLabel>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is6">
|
|
|
|
|
<TextEdit Text="@quote.Freight.ToString()" />
|
|
|
|
|
</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
@* <Field>
|
|
|
|
|
<FieldLabel ColumnSize="ColumnSize.Is2">Recipient:</FieldLabel>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is10">@selectedRecipient.FirstName @selectedRecipient.LastName</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is10">@correspondingAccount.AccountName</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is10">@correspondingAccount.Street</FieldBody>
|
|
|
|
|
</Field>
|
|
|
|
|
<Field>
|
|
|
|
|
<FieldBody ColumnSize="ColumnSize.Is10">@correspondingAccount.ZIP @correspondingAccount.City</FieldBody>
|
|
|
|
|
</Field>*@
|
|
|
|
|
</Fields>
|
|
|
|
|
</Column>
|
|
|
|
|
<Column ColumnSize="ColumnSize.Is4">
|
|
|
|
|
<Check TValue="bool" Checked="@quote.IsPriceInformation" CheckedChanged="@OnIsPriceInformationChanged">Preisinformation</Check>
|
|
|
|
|
<Check TValue="bool" Checked="@quote.ShowBrutto" CheckedChanged="@OnShowBruttoChanged">Bruttopreise anzeigen</Check>
|
|
|
|
|
<Check TValue="bool" Checked="@quote.ShowSinglePrices" CheckedChanged="@OnShowSinglePricesChanged">Einzelpreise ausweisen</Check>
|
|
|
|
|
<Check TValue="bool" Checked="@quote.ShowDiscounts" CheckedChanged="@OnShowDiscountsChanged">Discounts ausweisen</Check>
|
|
|
|
|
</Column>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
@if (quote.LineItems.Count != 0)
|
|
|
|
|
{
|
|
|
|
|
@ -90,6 +123,7 @@
|
|
|
|
|
Bordered
|
|
|
|
|
Hoverable
|
|
|
|
|
Striped
|
|
|
|
|
ShowPager
|
|
|
|
|
Responsive>
|
|
|
|
|
<DataGridCommandColumn />
|
|
|
|
|
<DataGridColumn Field="@nameof(LineItem.Amount)" Caption="Amount" />
|
|
|
|
|
@ -111,21 +145,12 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<Divider DividerType="DividerType.TextContent" Text="Create Quote" />
|
|
|
|
|
<Button Color="Color.Success" Clicked="@OnCreateTex">Create Tex from Quote</Button>
|
|
|
|
|
<Button Color="Color.Success" Clicked="@OnCreatePdf">Create PDF from Tex</Button>
|
|
|
|
|
<Button Color="Color.Success" Clicked="@OnOpenPdf">Open PDF</Button>
|
|
|
|
|
<Button Color="Color.Primary" Clicked="@OnCreateTex">Create Tex from Quote</Button>
|
|
|
|
|
<Button Color="Color.Secondary" Clicked="@OnCreatePdf">Create PDF from Tex</Button>
|
|
|
|
|
<Button Color="Color.Secondary" Clicked="@OnOpenPdf">Open PDF</Button>
|
|
|
|
|
<Button Color="Color.Success" Clicked="@OnSave">Save</Button>
|
|
|
|
|
<Button Color="Color.Danger" Clicked="@OnCancel">Cancel</Button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Divider DividerType="DividerType.TextContent" Text="TexFile" />
|
|
|
|
|
<MemoEdit
|
|
|
|
|
Text="@quote.Tex"
|
|
|
|
|
TextChanged="@OnTexChanged"
|
|
|
|
|
Rows="100"
|
|
|
|
|
AutoSize
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
@code {
|
|
|
|
|
IEnumerable<Contact> contacts = new List<Contact>();
|
|
|
|
|
Quote quote = new();
|
|
|
|
|
@ -201,9 +226,51 @@
|
|
|
|
|
|
|
|
|
|
protected void OnOpenPdf() => PdfService.OpenPDF(quote);
|
|
|
|
|
|
|
|
|
|
private Task OnTexChanged(string value)
|
|
|
|
|
private Task OnDescriptionChanged(string value)
|
|
|
|
|
{
|
|
|
|
|
quote.Description = value;
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Task OnQuotationNumberChanged(string value)
|
|
|
|
|
{
|
|
|
|
|
quote.QuotationNumber = value;
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Task OnValidForChanged(string value)
|
|
|
|
|
{
|
|
|
|
|
quote.ValidFor = byte.Parse(value);
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Task OnVATChanged(string value)
|
|
|
|
|
{
|
|
|
|
|
quote.VAT = float.Parse(value);
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Task OnIsPriceInformationChanged(bool value)
|
|
|
|
|
{
|
|
|
|
|
quote.IsPriceInformation = value;
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Task OnShowBruttoChanged(bool value)
|
|
|
|
|
{
|
|
|
|
|
quote.ShowBrutto = value;
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Task OnShowDiscountsChanged(bool value)
|
|
|
|
|
{
|
|
|
|
|
quote.ShowDiscounts = value;
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Task OnShowSinglePricesChanged(bool value)
|
|
|
|
|
{
|
|
|
|
|
quote.Tex = value;
|
|
|
|
|
quote.ShowSinglePrices = value;
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|