#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.17929
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Disco.Web.Views.Job.JobParts
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Net;
    using System.Text;
    using System.Web;
    using System.Web.Helpers;
    using System.Web.Mvc;
    using System.Web.Mvc.Ajax;
    using System.Web.Mvc.Html;
    using System.Web.Routing;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.WebPages;
    using Disco.BI.Extensions;
    using Disco.Models.Repository;
    using Disco.Web;
    using Disco.Web.Extensions;
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "1.5.4.0")]
    [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Job/JobParts/NonWarrantyFinance.cshtml")]
    public partial class NonWarrantyFinance : System.Web.Mvc.WebViewPage<Disco.Web.Models.Job.ShowModel>
    {
        public NonWarrantyFinance()
        {
        }
        public override void Execute()
        {
            
            #line 2 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
  
    Html.BundleDeferred("~/ClientScripts/Modules/Disco-PropertyChangeHelpers");

            
            #line default
            #line hidden
WriteLiteral("\r\n<table");

WriteLiteral(" id=\"jobNonWarrantyFinance\"");

WriteLiteral(">\r\n    <tr>\r\n        <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">Accounting Charge Required\r\n        </th>\r\n        <td>\r\n");

WriteLiteral("            ");

            
            #line 10 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.AccountingChargeRequiredDate, "Not Required", "Job_JobMetaNonWarranty_AccountingChargeRequiredDate"));

            
            #line default
            #line hidden
WriteLiteral("\r\n            <span");

WriteLiteral(" id=\"Job_JobMetaNonWarranty_AccountingChargeRequiredUser\"");

WriteLiteral(">");

            
            #line 11 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
                                                                       Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeRequiredUser.ToString()));

            
            #line default
            #line hidden
WriteLiteral("</span>\r\n");

WriteLiteral("            ");

            
            #line 12 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
WriteLiteral("\r\n        </td>\r\n    </tr>\r\n    <tr>\r\n        <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">Accounting Charge Added\r\n        </th>\r\n        <td>\r\n");

WriteLiteral("            ");

            
            #line 19 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.AccountingChargeAddedDate, "Not Added", "Job_JobMetaNonWarranty_AccountingChargeAddedDate"));

            
            #line default
            #line hidden
WriteLiteral("\r\n            <span");

WriteLiteral(" id=\"Job_JobMetaNonWarranty_AccountingChargeAddedUser\"");

WriteLiteral(">");

            
            #line 20 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
                                                                    Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargeAddedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargeAddedUser.ToString()));

            
            #line default
            #line hidden
WriteLiteral("</span>\r\n");

WriteLiteral("            ");

            
            #line 21 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
WriteLiteral("\r\n        </td>\r\n    </tr>\r\n    <tr>\r\n        <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">Accounting Charge Paid\r\n        </th>\r\n        <td>\r\n");

WriteLiteral("            ");

            
            #line 28 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.AccountingChargePaidDate, "Not Paid", "Job_JobMetaNonWarranty_AccountingChargePaidDate"));

            
            #line default
            #line hidden
WriteLiteral("\r\n            <span");

WriteLiteral(" id=\"Job_JobMetaNonWarranty_AccountingChargePaidUser\"");

WriteLiteral(">");

            
            #line 29 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
                                                                   Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.AccountingChargePaidUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.AccountingChargePaidUser.ToString()));

            
            #line default
            #line hidden
WriteLiteral("</span>\r\n");

WriteLiteral("            ");

            
            #line 30 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
WriteLiteral("\r\n        </td>\r\n    </tr>\r\n    <tr>\r\n        <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">Purchase Order Raised\r\n        </th>\r\n        <td>\r\n");

WriteLiteral("            ");

            
            #line 37 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedDate, "Not Raised", "Job_JobMetaNonWarranty_PurchaseOrderRaisedDate"));

            
            #line default
            #line hidden
WriteLiteral("\r\n            <span");

WriteLiteral(" id=\"Job_JobMetaNonWarranty_PurchaseOrderRaisedUser\"");

WriteLiteral(">");

            
            #line 38 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
                                                                  Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderRaisedUser.ToString()));

            
            #line default
            #line hidden
WriteLiteral("</span>\r\n");

WriteLiteral("            ");

            
            #line 39 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
WriteLiteral("\r\n        </td>\r\n    </tr>\r\n    <tr>\r\n        <th>Purchase Order Reference\r\n     " +
"   </th>\r\n        <td>\r\n");

WriteLiteral("            ");

            
            #line 46 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(Html.TextBoxFor(m => m.Job.JobMetaNonWarranty.PurchaseOrderReference));

            
            #line default
            #line hidden
WriteLiteral("\r\n");

WriteLiteral("            ");

            
            #line 47 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(AjaxHelpers.AjaxSave());

            
            #line default
            #line hidden
WriteLiteral("\r\n");

WriteLiteral("            ");

            
            #line 48 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
WriteLiteral("\r\n            <script");

WriteLiteral(" type=\"text/javascript\"");

WriteLiteral(@">
                $(function () {
                    var $purchaseOrderReference = $('#Job_JobMetaNonWarranty_PurchaseOrderReference');
                    var $ajaxSave = $purchaseOrderReference.next('.ajaxSave');
                    $purchaseOrderReference
                    .watermark('No Reference')
                    .focus(function () { $purchaseOrderReference.select() })
                    .keydown(function (e) {
                        $ajaxSave.show();
                        if (e.which == 13) {
                            $(this).blur();
                        }
                    }).blur(function () {
                        $ajaxSave.hide();
                    })
                    .change(function () {
                        $ajaxSave.hide();
                        $ajaxLoading = $ajaxSave.next('.ajaxLoading').show();
                        var data = { PurchaseOrderReference: $purchaseOrderReference.val() };
                        $.ajax({
                            url: '");

            
            #line 69 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
                             Write(Url.Action(MVC.API.Job.UpdateNonWarrantyPurchaseOrderReference(Model.Job.Id, null)));

            
            #line default
            #line hidden
WriteLiteral(@"',
                            dataType: 'json',
                            data: data,
                            success: function (d) {
                                if (d == 'OK') {
                                    $ajaxLoading.hide().next('.ajaxOk').show().delay('fast').fadeOut('slow');
                                } else {
                                    $ajaxLoading.hide();
                                    alert('Unable to update purchase order reference: ' + d);
                                }
                            },
                            error: function (jqXHR, textStatus, errorThrown) {
                                alert('Unable to update purchase order reference: ' + textStatus);
                                $ajaxLoading.hide();
                            }
                        });
                    });
                });
            </script>
        </td>
    </tr>
    <tr>
        <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">Purchase Order Sent\r\n        </th>\r\n        <td>\r\n");

WriteLiteral("            ");

            
            #line 94 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.PurchaseOrderSentDate, "Not Sent", "Job_JobMetaNonWarranty_PurchaseOrderSentDate"));

            
            #line default
            #line hidden
WriteLiteral("\r\n            <span");

WriteLiteral(" id=\"Job_JobMetaNonWarranty_PurchaseOrderSentUser\"");

WriteLiteral(">");

            
            #line 95 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
                                                                Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.PurchaseOrderSentUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.PurchaseOrderSentUser.ToString()));

            
            #line default
            #line hidden
WriteLiteral("</span>\r\n");

WriteLiteral("            ");

            
            #line 96 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
WriteLiteral("\r\n        </td>\r\n    </tr>\r\n    <tr>\r\n        <th");

WriteLiteral(" style=\"width: 200px;\"");

WriteLiteral(">Invoice Received\r\n        </th>\r\n        <td>\r\n");

WriteLiteral("            ");

            
            #line 103 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(CommonHelpers.FriendlyDate(Model.Job.JobMetaNonWarranty.InvoiceReceivedDate, "Not Received", "Job_JobMetaNonWarranty_InvoiceReceivedDate"));

            
            #line default
            #line hidden
WriteLiteral("\r\n            <span");

WriteLiteral(" id=\"Job_JobMetaNonWarranty_InvoiceReceivedUser\"");

WriteLiteral(">");

            
            #line 104 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
                                                              Write(string.IsNullOrEmpty(Model.Job.JobMetaNonWarranty.InvoiceReceivedUserId) ? string.Empty : string.Format("by {0}", Model.Job.JobMetaNonWarranty.InvoiceReceivedUser.ToString()));

            
            #line default
            #line hidden
WriteLiteral("</span>\r\n");

WriteLiteral("            ");

            
            #line 105 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
       Write(AjaxHelpers.AjaxLoader());

            
            #line default
            #line hidden
WriteLiteral("\r\n        </td>\r\n    </tr>\r\n</table>\r\n<script>\r\n    $(function(){\r\n        var up" +
"dateUrl = \'");

            
            #line 111 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
                     Write(Url.Action(MVC.API.Job.Update(Model.Job.Id, null)));

            
            #line default
            #line hidden
WriteLiteral("\';\r\n        var jobOpenDate = \'");

            
            #line 112 "..\..\Views\Job\JobParts\NonWarrantyFinance.cshtml"
                       Write(Model.Job.OpenedDate.ToJavascriptDateTime());

            
            #line default
            #line hidden
WriteLiteral("\';\r\n\r\n        document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, \'Account" +
"ing Charge Required\', \'Job_JobMetaNonWarranty_AccountingChargeRequiredDate\', \'Jo" +
"b_JobMetaNonWarranty_AccountingChargeRequiredUser\', \'NonWarrantyAccountingCharge" +
"Required\', \'Not Required\', jobOpenDate, false);\r\n        document.DiscoFunctions" +
".DateDialogCreateUpdater(updateUrl, \'Accounting Charge Added\', \'Job_JobMetaNonWa" +
"rranty_AccountingChargeAddedDate\', \'Job_JobMetaNonWarranty_AccountingChargeAdded" +
"User\', \'NonWarrantyAccountingChargeAdded\', \'Not Added\', jobOpenDate, false);\r\n  " +
"      document.DiscoFunctions.DateDialogCreateUpdater(updateUrl, \'Accounting Cha" +
"rge Paid\', \'Job_JobMetaNonWarranty_AccountingChargePaidDate\', \'Job_JobMetaNonWar" +
"ranty_AccountingChargePaidUser\', \'NonWarrantyAccountingChargePaid\', \'Not Paid\', " +
"jobOpenDate, false);\r\n        document.DiscoFunctions.DateDialogCreateUpdater(up" +
"dateUrl, \'Purchase Order Raised\', \'Job_JobMetaNonWarranty_PurchaseOrderRaisedDat" +
"e\', \'Job_JobMetaNonWarranty_PurchaseOrderRaisedUser\', \'NonWarrantyPurchaseOrderR" +
"aised\', \'Not Raised\', jobOpenDate, true);\r\n        document.DiscoFunctions.DateD" +
"ialogCreateUpdater(updateUrl, \'Purchase Order Sent\', \'Job_JobMetaNonWarranty_Pur" +
"chaseOrderSentDate\', \'Job_JobMetaNonWarranty_PurchaseOrderSentUser\', \'NonWarrant" +
"yPurchaseOrderSent\', \'Not Sent\', jobOpenDate, true);\r\n        document.DiscoFunc" +
"tions.DateDialogCreateUpdater(updateUrl, \'Invoice Received\', \'Job_JobMetaNonWarr" +
"anty_InvoiceReceivedDate\', \'Job_JobMetaNonWarranty_InvoiceReceivedUser\', \'NonWar" +
"rantyInvoiceReceived\', \'Not Received\', jobOpenDate, true);\r\n    });\r\n</script>\r\n" +
"");

        }
    }
}
#pragma warning restore 1591
