164 lines
6.8 KiB
Plaintext
164 lines
6.8 KiB
Plaintext
@using Microsoft.AspNetCore.Mvc.Localization
|
|
@using gehGassi.Core.Services
|
|
@using gehGassi.Web.Models
|
|
@using System.Globalization
|
|
@using gehGassi.Web.Helper
|
|
@using Microsoft.Extensions.Localization
|
|
@using Microsoft.OpenApi.Extensions
|
|
@model gehGassi.Web.Models.OrderVm
|
|
@inject IViewLocalizer Localizer
|
|
@inject ICountryService countryService
|
|
@{
|
|
IStringLocalizer annotationsLocalizer = ViewBag.AnnotationsLocalizer;
|
|
|
|
OrderAddressVm deliveryAddress = Model.BillingAddress;
|
|
if (Model.DeliveryAddressIsBilling)
|
|
{
|
|
deliveryAddress = Model.DeliveryAddress;
|
|
}
|
|
}
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="@(CultureInfo.CurrentCulture.TwoLetterISOLanguageName)">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<title>gehgassi @Localizer["Mail_Order"]</title>
|
|
<style>
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
}
|
|
|
|
.card {
|
|
border: 1px solid #666666;
|
|
padding: 10px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.card-customer {
|
|
background-color: #efefef;
|
|
}
|
|
|
|
.label {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.nowrap {
|
|
white-space: nowrap;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<h3>@Localizer["Mail_Order"]: @Model.Number | @Model.Created.ToString()</h3>
|
|
@if (Model.OrderSource == OrderSourceVm.Customer)
|
|
{
|
|
<div id="customerInfo" class="card card-customer nowrap">
|
|
<div><span class="label">@Localizer["Mail_Name"]:</span> <span>@Model.CustomerName</span></div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div id="customerInfo" class="card card-customer nowrap">
|
|
<div><span class="label">@Localizer["Mail_Name"]:</span> <span>@Model.AppUserName</span></div>
|
|
</div>
|
|
}
|
|
<div id="address" style="margin-bottom: 10px;">
|
|
<table style="min-width: 50%">
|
|
<tr>
|
|
<td style="width: 50%"><h4>@Localizer["Mail_DeliveryAddress"]</h4></td>
|
|
<td style="width: 50%"><h4>@Localizer["Mail_BillingAddress"]</h4></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="width: 50%; vertical-align: top;">
|
|
@if (!string.IsNullOrWhiteSpace(deliveryAddress.Company))
|
|
{
|
|
<div class="nowrap">@deliveryAddress.Company</div>
|
|
<div class="nowrap">@deliveryAddress.FirstName @deliveryAddress.LastName</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="nowrap">@deliveryAddress.FirstName @deliveryAddress.LastName</div>
|
|
}
|
|
<div class="nowrap">@deliveryAddress.AddressLine1</div>
|
|
@if (!string.IsNullOrWhiteSpace(deliveryAddress.AddressLine2))
|
|
{
|
|
<div class="nowrap">@deliveryAddress.AddressLine2</div>
|
|
}
|
|
<div class="nowrap">@deliveryAddress.Zip @deliveryAddress.City</div>
|
|
<div class="nowrap">@countryService.GetCountry(deliveryAddress.CountryCode).Name</div>
|
|
</td>
|
|
<td style="width: 50%; vertical-align: top;">
|
|
@if (!string.IsNullOrWhiteSpace(Model.BillingAddress.Company))
|
|
{
|
|
<div class="nowrap">@Model.BillingAddress.Company</div>
|
|
<div class="nowrap">@Model.BillingAddress.FirstName @Model.BillingAddress.LastName</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="nowrap">@Model.BillingAddress.FirstName @Model.BillingAddress.LastName</div>
|
|
}
|
|
<div class="nowrap">@Model.BillingAddress.AddressLine1</div>
|
|
@if (!string.IsNullOrWhiteSpace(Model.BillingAddress.AddressLine2))
|
|
{
|
|
<div class="nowrap">@Model.BillingAddress.AddressLine2</div>
|
|
}
|
|
<div class="nowrap">@Model.BillingAddress.Zip @Model.BillingAddress.City</div>
|
|
<div class="nowrap">@countryService.GetCountry(Model.BillingAddress.CountryCode).Name</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="paymentInfo" class="card card-customer nowrap">
|
|
<div><span class="label">@annotationsLocalizer["Order_PaymentType"]:</span> <span>@Model.PaymentType.GetDisplayName(annotationsLocalizer)</span> <span class="label">@annotationsLocalizer["Order_PaymentStatus"]:</span> <span>@Model.PaymentStatus.GetDisplayName(annotationsLocalizer)</span></div>
|
|
</div>
|
|
<div id="orderDetails" style="margin-bottom: 10px;">
|
|
<table style="width: 100%; padding: 10px;">
|
|
<tr style="font-weight: bold;">
|
|
<td>@Localizer["Mail_Item_Number"]</td>
|
|
<td>@Localizer["Mail_Item_Name"]</td>
|
|
<td>@Localizer["Mail_Quantity"]</td>
|
|
<td style="text-align: right;">@Localizer["Mail_SinglePrice"] €</td>
|
|
<td style="text-align: right;">@Localizer["Mail_TotalPrice"] €</td>
|
|
</tr>
|
|
@foreach (var item in Model.Items)
|
|
{
|
|
<tr>
|
|
<td>@item.Sku</td>
|
|
<td>@item.Name</td>
|
|
<td>@item.Quantity</td>
|
|
<td style="text-align: right;">@item.PriceGross.ToString("n2")</td>
|
|
<td style="text-align: right;">@item.TotalGross.ToString("n2")</td>
|
|
</tr>
|
|
}
|
|
<tr>
|
|
<td colspan="5"><hr /></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4" class="" style="text-align: right;">@Localizer["Mail_Subtotal"] €</td>
|
|
<td style="text-align: right;">@Model.SubtotalGross.ToString("n2")</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4" class="" style="text-align: right;">@Localizer["Mail_ShipmentPrice"] €</td>
|
|
<td style="text-align: right;">@Model.ShipmentGross.ToString("n2")</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="5"><hr /></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4" class="label" style="text-align: right;">@Localizer["Mail_TotalSum"] €</td>
|
|
<td style="text-align: right;">@((Model.TotalGross).ToString("n2"))</td>
|
|
</tr>
|
|
@foreach (var tax in Model.TaxRates)
|
|
{
|
|
<tr>
|
|
<td colspan="4" class="" style="text-align: right;">@Localizer["Mail_Tax"] @tax.Key% €</td>
|
|
<td style="text-align: right;">@tax.Value.ToString("n2")</td>
|
|
</tr>
|
|
}
|
|
|
|
</table>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |