Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model WerehouseProject.ViewModels.EventRealDataViewModel
- @{
- ViewBag.Title = "EventAdultRealData";
- Layout = "~/Views/Shared/_LayoutWindows.cshtml";
- }
- <h2>Rozliczenie podstawowe</h2>
- <br />
- <h4>Dla: @Model.DataDetails.Person</h4>
- <h4>Telefon: @Model.DataDetails.Phone</h4>
- <h4>Email: @Model.DataDetails.Email</h4>
- <h4>@Model.DataDetails.GetTimes</h4>
- <hr />
- <table border="1">
- <thead>
- <tr>
- <th width="60%">
- </th>
- <th width="20%">
- Paintball
- </th>
- <th width="20%">
- Catering
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td width="60%">
- Planowana liczba osób
- </td>
- <td width="20%">
- @Model.DataDetails.PlanPersonCount
- </td>
- <td width="20%">
- @Model.DataCatering.PlanPersonCount
- </td>
- </tr>
- </tbody>
- </table>
- <hr />
- @using (Html.BeginForm())
- {
- @Html.AntiForgeryToken()
- @Html.ValidationSummary(true, "", new { @class = "text-danger" })
- <div class="form-horizontal">
- <div name="EventDetails">
- @Html.HiddenFor(model => model.DataDetails.EventID)
- @Html.HiddenFor(model => model.DataDetails.Email)
- @Html.HiddenFor(model => model.DataDetails.End)
- @Html.HiddenFor(model => model.DataDetails.Person)
- @Html.HiddenFor(model => model.DataDetails.PlanPersonCount)
- @Html.HiddenFor(model => model.DataDetails.Phone)
- @Html.HiddenFor(model => model.DataDetails.Start)
- <div class="form-group">
- @Html.Label("Rodzaj dokumentu", htmlAttributes: new { @class = "control-label col-md-6" })
- <div class="col-md-3">
- @Html.DropDownListFor(model => model.DataDetails.PaymentType, new SelectList(ViewBag.PaymentType, "Value", "Text"), htmlAttributes: new { @class = "form-control" })
- @Html.ValidationMessageFor(model => model.DataDetails.PaymentType, "", new { @class = "text-danger" })
- </div>
- </div>
- <hr />
- </div>
- <div id="InvoiceDetails">
- <div class="form-group">
- @Html.LabelFor(model => model.DataInvoice.InvoiceOption, htmlAttributes: new { @class = "control-label col-md-6" })
- <div class="col-md-6">
- @Html.DropDownListFor(model => model.DataInvoice.InvoiceOption, new SelectList(ViewBag.InvoiceOption, "Value", "Text"), htmlAttributes: new { @class = "form-control" })
- @Html.ValidationMessageFor(model => model.DataInvoice.InvoiceOption, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.DataInvoice.NIP, htmlAttributes: new { @class = "control-label col-md-6" })
- <div class="col-md-3">
- @Html.EditorFor(model => model.DataInvoice.NIP, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.DataInvoice.NIP, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="col-md-3">
- <a class="btn btn-success" onclick="getCompanyData()"><span class="glyphicon glyphicon-search"></span> Sprawdź</a>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.DataInvoice.CompanyName, htmlAttributes: new { @class = "control-label col-md-6" })
- <div class="col-md-6">
- @Html.EditorFor(model => model.DataInvoice.CompanyName, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.DataInvoice.CompanyName, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.DataInvoice.Street, htmlAttributes: new { @class = "control-label col-md-6" })
- <div class="col-md-6">
- @Html.EditorFor(model => model.DataInvoice.Street, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.DataInvoice.Street, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.DataInvoice.City, htmlAttributes: new { @class = "control-label col-md-6" })
- <div class="col-md-6">
- @Html.EditorFor(model => model.DataInvoice.City, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.DataInvoice.City, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.DataInvoice.ZipCode, htmlAttributes: new { @class = "control-label col-md-6" })
- <div class="col-md-6">
- @Html.EditorFor(model => model.DataInvoice.ZipCode, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.DataInvoice.ZipCode, "", new { @class = "text-danger" })
- </div>
- </div>
- <div id="vatButtons">
- <div class="form-group">
- <div class="control-label col-md-6">
- @Html.Label("Stawka VAT")
- </div>
- @{
- foreach (var itm in ViewBag.VAT)
- {
- <div class="col-md-2">
- @Html.RadioButtonFor(model => model.DataInvoice.VAT, (int)itm, new { id = itm, @readonly = "readonly" })
- @Html.Label((int)itm + "%")
- </div>
- }
- }
- </div>
- </div>
- <div class="form-group">
- @Html.LabelFor(model => model.DataInvoice.InvoiceName, htmlAttributes: new { @class = "control-label col-md-6" })
- <div class="col-md-6">
- @Html.DropDownList("InvoiceNameSelect", new SelectList(ViewBag.InvoiceNames, "Value", "Text", ViewBag.InvoiceNames.SelectedValue), htmlAttributes: new { @class = "form-control" })
- </div>
- </div>
- @if (ViewBag.InvoiceNameReadonly == true)
- {
- <div class="form-group" id="invoiceNameDiv" hidden="hidden">
- <div class="col-md-6">
- @Html.EditorFor(model => model.DataInvoice.InvoiceName, new { htmlAttributes = new { @class = "form-control", @readonly = "readony" } })
- @Html.ValidationMessageFor(model => model.DataInvoice.InvoiceName, "", new { @class = "text-danger" })
- </div>
- </div>
- }
- else
- {
- <div class="form-group" id="invoiceNameDiv">
- <div class="col-md-6">
- @Html.EditorFor(model => model.DataInvoice.InvoiceName, new { htmlAttributes = new { @class = "form-control" } })
- @Html.ValidationMessageFor(model => model.DataInvoice.InvoiceName, "", new { @class = "text-danger" })
- </div>
- </div>
- }
- <hr />
- </div>
- <div name="PaintballBundles">
- <h3>Pakiety paintballowe <input type="button" class="btn btn-success" value="+" name="addPaintballBundle" onclick="addBundlePrompt()" /> || Vouchery <input type="button" class="btn btn-success" value="+" name="addVoucher" onclick="addVoucherPrompt()" /></h3>
- <hr />
- <table>
- <thead>
- <tr>
- <td width="36%">
- Nazwa pakietu
- </td>
- <td width="10%">
- Ilość osób
- </td>
- <td width="13%" hidden="hidden" id="pbNetPrice">
- Cena netto
- </td>
- <td width="13%">
- Cena brutto
- </td>
- <td width="13%" hidden="hidden" id="pbNetSum">
- Suma netto
- </td>
- <td width="13%">
- Suma brutto
- </td>
- <td width="2%"></td>
- </tr>
- </thead>
- <tbody id="paintballBundlesBody">
- @for (int i = 0; i < Model.DataBundles.SingleBundles.Count; i++)
- {
- if (Model.DataBundles.SingleBundles[i].Quantity > 0)
- {
- <tr id="pb_@Model.DataBundles.SingleBundles[i].BundleID">
- @Html.HiddenFor(model => model.DataBundles.SingleBundles[i].Active)
- @Html.HiddenFor(model => model.DataBundles.SingleBundles[i].BundleID)
- @Html.HiddenFor(model => model.DataBundles.SingleBundles[i].DefaultPrice)
- @Html.HiddenFor(model => model.DataBundles.SingleBundles[i].MinimumPrice8)
- @Html.HiddenFor(model => model.DataBundles.SingleBundles[i].MinimumPrice23)
- <td width="36%">
- @Html.EditorFor(model => model.DataBundles.SingleBundles[i].Name, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- <td width="10%">
- @Html.EditorFor(model => model.DataBundles.SingleBundles[i].Quantity, new { htmlAttributes = new { @class = "form-control", @onchange = "countSingleBundle(" + Model.DataBundles.SingleBundles[i].BundleID + ")" } })
- </td>
- <td width="13%" id="pbNetPrice_@i" hidden="hidden">
- @Html.EditorFor(model => model.DataBundles.SingleBundles[i].NetPrice, new { htmlAttributes = new { @class = "form-control", @onchange = "countSingleBundle(" + Model.DataBundles.SingleBundles[i].BundleID + ")" } })
- </td>
- <td width="13%">
- @Html.EditorFor(model => model.DataBundles.SingleBundles[i].GrossPrice, new { htmlAttributes = new { @class = "form-control", @onchange = "countSingleBundle(" + Model.DataBundles.SingleBundles[i].BundleID + ")" } })
- </td>
- <td width="13%" id="pbNetSum_@i" hidden="hidden">
- @Html.EditorFor(model => model.DataBundles.SingleBundles[i].NetSum, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- <td width="13%">
- @Html.EditorFor(model => model.DataBundles.SingleBundles[i].GrossSum, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- <td width="2%">
- <input type="button" class="btn btn-danger" value="-" onclick="deleteBundle(@Model.DataBundles.SingleBundles[i].BundleID)" />
- </td>
- </tr>
- }
- else
- {
- <tr id="pb_@Model.DataBundles.SingleBundles[i].BundleID" hidden="hidden">
- @Html.HiddenFor(model => model.DataBundles.SingleBundles[i].Active)
- @Html.HiddenFor(model => model.DataBundles.SingleBundles[i].BundleID)
- @Html.HiddenFor(model => model.DataBundles.SingleBundles[i].DefaultPrice)
- @Html.HiddenFor(model => model.DataBundles.SingleBundles[i].MinimumPrice8)
- @Html.HiddenFor(model => model.DataBundles.SingleBundles[i].MinimumPrice23)
- <td width="36%">
- @Html.EditorFor(model => model.DataBundles.SingleBundles[i].Name, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- <td width="10%">
- @Html.EditorFor(model => model.DataBundles.SingleBundles[i].Quantity, new { htmlAttributes = new { @class = "form-control", @onchange = "countSingleBundle(" + Model.DataBundles.SingleBundles[i].BundleID + ")" } })
- </td>
- <td width="13%" id="pbNetPrice_@i" hidden="hidden">
- @Html.EditorFor(model => model.DataBundles.SingleBundles[i].NetPrice, new { htmlAttributes = new { @class = "form-control", @onchange = "countSingleBundle(" + Model.DataBundles.SingleBundles[i].BundleID + ")" } })
- </td>
- <td width="13%">
- @Html.EditorFor(model => model.DataBundles.SingleBundles[i].GrossPrice, new { htmlAttributes = new { @class = "form-control", @onchange = "countSingleBundle(" + Model.DataBundles.SingleBundles[i].BundleID + ")" } })
- </td>
- <td width="13%" id="pbNetSum_@i" hidden="hidden">
- @Html.EditorFor(model => model.DataBundles.SingleBundles[i].NetSum, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- <td width="13%">
- @Html.EditorFor(model => model.DataBundles.SingleBundles[i].GrossSum, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- <td width="2%">
- <input type="button" class="btn btn-danger" value="-" onclick="deleteBundle(@Model.DataBundles.SingleBundles[i].BundleID)" />
- </td>
- </tr>
- }
- }
- </tbody>
- </table>
- <br />
- <table id="vouchersTable">
- <thead>
- <tr>
- <td width="40%">
- Voucher
- </td>
- <td width="40%">
- Pakiet
- </td>
- <td width="20%">
- Ilość osób
- </td>
- </tr>
- </thead>
- <tbody id="vouchersBody">
- @for (int i = 0; i < Model.DataVouchers.SingleVouchers.Count; i++)
- {
- <tr id="v_@i">
- <td width="40%">
- @Html.EditorFor(model => model.DataVouchers.SingleVouchers[i].VoucherCode, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- <td width="40%">
- @Html.EditorFor(model => model.DataVouchers.SingleVouchers[i].BundleName, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- <td width="20%">
- @Html.EditorFor(model => model.DataVouchers.SingleVouchers[i].PersonCount, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- </tr>
- }
- </tbody>
- </table>
- <br />
- <div class="form-group">
- @Html.LabelFor(model => model.DataDetails.PersonCount, htmlAttributes: new { @class = "control-label col-md-6" })
- <div class="col-md-3">
- @Html.EditorFor(model => model.DataDetails.PersonCount, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- @Html.ValidationMessageFor(model => model.DataDetails.PersonCount, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group" id="pbFullNetSum" hidden="hidden">
- @Html.Label("Suma netto", htmlAttributes: new { @class = "control-label col-md-6" })
- <div class="col-md-3">
- @Html.EditorFor(model => model.DataBundles.NetSum, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- @Html.ValidationMessageFor(model => model.DataBundles.NetSum, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group" id="pbFullGrossSum">
- @Html.Label("Suma brutto", htmlAttributes: new { @class = "control-label col-md-6" })
- <div class="col-md-3">
- @Html.EditorFor(model => model.DataBundles.GrossSum, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- @Html.ValidationMessageFor(model => model.DataBundles.GrossSum, "", new { @class = "text-danger" })
- </div>
- </div>
- <hr />
- </div>
- <div name="Catering">
- <h3>Catering</h3>
- <hr />
- <table>
- <thead>
- <tr>
- <td width="38%"></td>
- <td width="10%">
- Ilość osób
- </td>
- <td width="13%" hidden="hidden" id="cateringNetPriceHeader">
- Cena netto
- </td>
- <td width="13%">
- Cena brutto
- </td>
- <td width="13%" hidden="hidden" id="cateringNetSumHeader">
- Suma netto
- </td>
- <td width="13%">
- Suma brutto
- </td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td width="36%">
- @Html.DropDownListFor(model => model.DataCatering.CateringID, new SelectList(ViewBag.PO_ID, "Value", "Text"), htmlAttributes: new { @class = "form-control" })
- </td>
- <td width="10%">
- @Html.EditorFor(model => model.DataCatering.Price.Quantity, new { htmlAttributes = new { @class = "form-control", @onchange = "countCateringSums()" } })
- </td>
- <td width="13%" hidden="hidden" id="cateringNetPrice">
- @Html.EditorFor(model => model.DataCatering.Price.NetPrice, new { htmlAttributes = new { @class = "form-control", @onchange = "countCateringNetSum()" } })
- </td>
- <td width="13%">
- @Html.EditorFor(model => model.DataCatering.Price.GrossPrice, new { htmlAttributes = new { @class = "form-control", @onchange = "countCateringGrossSum()" } })
- </td>
- <td width="13%" hidden="hidden" id="cateringNetSum">
- @Html.EditorFor(model => model.DataCatering.Price.NetSum, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- <td width="13%">
- @Html.EditorFor(model => model.DataCatering.Price.GrossSum, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- </tr>
- </tbody>
- </table>
- <hr />
- </div>
- <div name="OtherOptions">
- <h3>
- Usługi dodatkowe <input type="button" class="btn btn-success" value="+" name="addOtherOption" onclick="addOptionPrompt()" />
- </h3>
- <hr />
- <table id="otherOptionsTable">
- <thead>
- <tr>
- <td width="38%">
- Nazwa usługi
- </td>
- <td width="10%">
- Ilość
- </td>
- <td width="13%" hidden="hidden" id="otherOptionsNetPrice">
- Cena netto
- </td>
- <td width="13%">
- Cena brutto
- </td>
- <td width="13%" hidden="hidden" id="otherOptionsNetSum">
- Suma netto
- </td>
- <td width="13%">
- Suma brutto
- </td>
- </tr>
- </thead>
- <tbody name="otherOptionsBody" id="otherOptionsBody">
- @for (int i = 0; i < Model.DataOtherOptions.Options.Count; i++)
- {
- <tr id="oo_@i">
- @Html.HiddenFor(model => model.DataOtherOptions.Options[i].ID)
- <td width="36%">
- @Html.EditorFor(model => model.DataOtherOptions.Options[i].Name, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- <td width="10%">
- @Html.EditorFor(model => model.DataOtherOptions.Options[i].Quantity, new { htmlAttributes = new { @class = "form-control", @onchange = "countSingleOption(" + i + ")" } })
- </td>
- <td width="13%" hidden="hidden" id="otherOptionsNetPrice_@i">
- @Html.EditorFor(model => model.DataOtherOptions.Options[i].NetPrice, new { htmlAttributes = new { @class = "form-control", @onchange = "countSingleOption(" + i + ")" } })
- </td>
- <td width="13%">
- @Html.EditorFor(model => model.DataOtherOptions.Options[i].GrossPrice, new { htmlAttributes = new { @class = "form-control", @onchange = "countSingleOption(" + i + ")" } })
- </td>
- <td width="13%" hidden="hidden" id="otherOptionsNetSum_@i">
- @Html.EditorFor(model => model.DataOtherOptions.Options[i].NetSum, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- <td width="13%">
- @Html.EditorFor(model => model.DataOtherOptions.Options[i].GrossSum, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- <td width="2%">
- <input type="button" class="btn btn-danger" value="-" onclick="deleteOption(@i)" />
- </td>
- </tr>
- }
- </tbody>
- </table>
- <div class="form-group" id="ooFullNetSum" hidden="hidden">
- @Html.Label("Suma netto", htmlAttributes: new { @class = "control-label col-md-6" })
- <div class="col-md-3">
- @Html.EditorFor(model => model.DataOtherOptions.NetSum, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- @Html.ValidationMessageFor(model => model.DataOtherOptions.NetSum, "", new { @class = "text-danger" })
- </div>
- </div>
- <div class="form-group" id="ooFullGrossSum">
- @Html.Label("Suma brutto", htmlAttributes: new { @class = "control-label col-md-6" })
- <div class="col-md-3">
- @Html.EditorFor(model => model.DataOtherOptions.GrossSum, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- @Html.ValidationMessageFor(model => model.DataOtherOptions.GrossSum, "", new { @class = "text-danger" })
- </div>
- </div>
- <hr />
- </div>
- <div name="Summary">
- <h3>Podsumowanie</h3>
- <hr />
- <table id="summaryTable">
- <thead>
- <tr>
- <td width="70%"></td>
- <td width="30%"></td>
- </tr>
- </thead>
- <tbody name="summaryTableBody" id="summaryTableBody">
- <tr id="fullNetSum">
- <td width="70%">
- Całkowita suma netto
- </td>
- <td width="30%">
- @Html.EditorFor(model => model.DataSummary.EventNetCost, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- </tr>
- <tr id="NetTax">
- <td width="70%">
- VAT
- </td>
- <td width="30%">
- @Html.EditorFor(model => model.DataSummary.ValueAddedTax, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- </tr>
- <tr>
- <td width="70%">
- Całkowita suma brutto
- </td>
- <td width="30%">
- @Html.EditorFor(model => model.DataSummary.EventGrossCost, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- </tr>
- <tr>
- <td width="70%" style="color:red">
- Zadatek / Faktura zaliczkowa
- </td>
- <td width="30%">
- @Html.EditorFor(model => model.DataSummary.Installment, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- </tr>
- <tr id="NetInvoice">
- <td width="70%">
- Faktura do wystawienia
- </td>
- <td width="30%">
- @Html.EditorFor(model => model.DataSummary.Invoice, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- </tr>
- <tr>
- <td width="70%">
- Pracownik otrzymał
- </td>
- <td width="30%">
- @Html.EditorFor(model => model.DataSummary.WorkerMoney, new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
- </td>
- </tr>
- </tbody>
- </table>
- <hr />
- </div>
- <br />
- <div class="form-group">
- <div class="col-md-offset-2 col-md-10">
- <input type="submit" value="Zapisz" class="btn btn-success" />
- <input type="button" value="Wyjdź" class="btn btn-danger" />
- </div>
- </div>
- </div>
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement