<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<InvoiceDetailsViewData>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
     <%
         var func = new PaymentsUtils();
         var str = func.SetTitle(); 
     %>
	 <%=str + HttpContext.GetGlobalResourceObject("tlumaczenia", "Szczegoly")%>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div class="SzczegolyZlecenia">
        <asp:Label ID="Szczegoly" runat="server" Text="<%$Resources:tlumaczenia,Szczegoly%>"></asp:Label>
    </div>
    
    <p class="bold"><asp:Label ID="SprDane" runat ="server" Text="<%$Resources:tlumaczenia,SprawdzDane%>"></asp:Label></p>  
    
    <% using (Html.BeginForm("Show", "Platnosc", FormMethod.Post, new { id = "myform" })){ %>
    
    <table cellpadding="0" cellspacing="0" border="0">
        <tr><td><%=Html.Hidden("Payer.Id_faktury", Model.Invoice.ID_faktury) %></td></tr>
              
        <%-- sekcja: szczegóły faktury --%> 
        <tr>
            <td colspan="2" class="naglowekTab">
               <%=HttpContext.GetGlobalResourceObject("tlumaczenia", "DaneFaktury").ToString()%>
            </td>                
        </tr>
        <tr>            
            <td class="col1">                
                <asp:Label ID="Label1" runat ="server" Text="<%$Resources:tlumaczenia,Status_faktury%>"></asp:Label>
            </td>
            <td class="textbox" id="unpaid"><%=HttpContext.GetGlobalResourceObject("tlumaczenia", "niezaplacona").ToString()%></td>
        </tr>                  
        <tr>            
            <td class="col1">                
                <asp:Label ID="nazwafirmy" runat ="server" Text="<%$Resources:tlumaczenia,Nazwa%>"></asp:Label>
            </td>
            <td class="textbox"><%=Model.Invoice.FullName%></td>
        </tr>
        <tr>
            <td class="col1"><asp:Label ID="adres" runat="server" Text="<%$Resources:tlumaczenia,Adres%>"></asp:Label></td>
            <td class="textbox"><%=Model.Invoice.Address + " " + Model.Invoice.PostalCode + ", " + Model.Invoice.City%></td>
        </tr>
        <tr>
            <td class="col1"><asp:Label ID="nip" runat ="server" Text="<%$Resources:tlumaczenia,Nip%>"></asp:Label></td>
            <td class="textbox"><%=Model.Invoice.Nabywca_nip%></td>
        </tr>
        <tr>
            <td class="col1"><asp:Label ID="NrFaktury" runat ="server" Text="<%$Resources:tlumaczenia,NumerFaktury%>"></asp:Label></td>
            <td class="textbox"><%=Model.Invoice.Faktura_Numer%></td>
        </tr>
        <tr>
            <td class="col1"><asp:Label ID="DataWystawienia" runat ="server" Text="<%$Resources:tlumaczenia,DataWystawienia%>"></asp:Label></td>
            <td class="textbox"><%=String.Format("{0:dd-MM-yyyy}", Model.Invoice.Data_Wystawienia)%></td>
        </tr>
        <tr>
            <td class="col1"><asp:Label ID="termin" runat ="server" Text="<%$Resources:tlumaczenia,TerminPlatnosci%>"></asp:Label></td>
            <td class="textbox"><%=String.Format("{0:dd-MM-yyyy}", Model.Invoice.Termin_zaplaty)%></td>
        </tr>
        <tr>
            <td class="col1"><asp:Label ID="brutto" runat ="server"  Text="<%$Resources:tlumaczenia,Brutto%>"></asp:Label></td>
            <td class="textbox"><%=Model.Brutto%></td>
        </tr>
        <tr>
            <td class="pustaLinia"></td>
        </tr>
        <%-- sekcja: kontakt do opiekuna handlowego--%>
        <tr>
            <td colspan="2" class="naglowekTab">
               <%=HttpContext.GetGlobalResourceObject("tlumaczenia", "Kontakt").ToString()%>
            </td>                
        </tr>    
        <tr>
            <td class="col1">  
                <%=HttpContext.GetGlobalResourceObject("tlumaczenia", "ImieNazwisko").ToString()%> 
            </td>    
            <td class="textbox">
                <%=Model.Invoice.Imie + " " + Model.Invoice.Nazwisko%>
            </td>
        </tr>
        <tr>
            <td class="col1"><asp:Label ID="Adres2" runat="server" Text="<%$Resources:tlumaczenia,ulica%>"></asp:Label></td>        
            <td class="textbox"><%=Model.Invoice.ulica%></td>
        </tr>
         <tr>
            <td class="col1"><asp:Label ID="Label2" runat="server" Text="<%$Resources:tlumaczenia,Miasto%>"></asp:Label></td>        
            <td class="textbox"><%=Model.Invoice.kod + " " + Model.Invoice.miasto%></td>
        </tr>
        <tr>
            <td class="col1"><asp:Label ID="Telefon" runat="server" Text="<%$Resources:tlumaczenia,Telefon%>"></asp:Label></td>
            <td class="textbox"><%=Model.Invoice.telefon%></td>            
        </tr> 
        <tr>
            <td class="pustaLinia"></td>
        </tr>
        <%-- sekcja: dane wlasciciela karty --%>
        <tr>
            <td colspan="2" class="naglowekTab">
                <%=HttpContext.GetGlobalResourceObject("tlumaczenia", "DaneWlasciciela").ToString()%>
            </td>                
        </tr>
        <tr>        
            <td colspan="2" class="col">
                <asp:Label ID="w_karty" runat ="server" Text="<%$Resources:tlumaczenia,WlascicielKarty%>"></asp:Label>
            </td>            
        </tr>
        <tr>
            <td class="col1"><asp:Label ID="imie" runat ="server" Text="<%$Resources:tlumaczenia,Imie%>"></asp:Label></td>
            <td class="textbox1">
                <%=Html.TextBox("Payer.FirstName", Model.Payer.FirstName)%>
                <%=Html.ValidationMessage("Payer.FirstName")%>
            </td>
        </tr>
        <tr>
            <td class="col1"><asp:Label ID="nazwisko" runat ="server" Text="<%$Resources:tlumaczenia,Nazwisko%>"></asp:Label></td>
            <td class="textbox1">
                <%=Html.TextBox("Payer.LastName", Model.Payer.LastName)%>
                <%=Html.ValidationMessage("Payer.LastName")%>
            </td>
        </tr>
        <tr>
            <td></td>
            <td class="but">
                <br />
                <input id="place" name="id" type="submit" value="<%=HttpContext.GetGlobalResourceObject("tlumaczenia","Place").ToString()%>"/>
            </td>
        </tr>         
    </table>
    <%}%>
</asp:Content>
