This commit is contained in:
@@ -291,7 +291,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2 truncate">No. Contrato:</label>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtNumeroContrato" runat="server" Width="200px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtNumeroContrato" runat="server" Width="200px" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNumeroContrato" runat="server" ControlToValidate="TxtNumeroContrato" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''No. Contrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCENumeroContrato" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroContrato" Width="300px" BehaviorID="_content_VCENumeroContrato"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
@@ -741,16 +741,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="vertical-align: middle;" align="center">
|
||||
<div style="z-index: 5; position: relative;">
|
||||
<div id="DivAdvertencia" clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
|
||||
<asp:Literal Text="En las observaciones se puede generar una plantilla a partir de diferentes etiquetas: {DIA},{MES},{AÑO},{TC}" runat="server" ID="LtlAdvertencia"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="DivImpuestosLocales">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
@@ -1972,8 +1963,21 @@
|
||||
<br />
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate ">Observación de Facturación:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" Width="400px" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
||||
<div class="col-md-7">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" Width="100%" TextMode="MultiLine" Rows="2"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:Button ID="BtnVerPlantilla" runat="server" Text="Ver Plantilla" CssClass="btn btn-sm btn-primary" Width="100%" OnClick="BtnVerPlantilla_Click"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="vertical-align: middle;" align="center">
|
||||
<div style="z-index: 5; position: relative;">
|
||||
<div id="DivAdvertencia" clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<button type="button" class="close" data-dismiss="alert" style="margin-top: 5px;" aria-hidden="true"></button>
|
||||
<asp:Literal Text="En las observaciones se puede generar una plantilla a partir de diferentes etiquetas:<br/> {DIA},{MES},{AÑO},{TC},{MESANTERIOR},{INICIOMESANTERIOR},{FINMESANTERIOR}" runat="server" ID="LtlAdvertencia"></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2003,11 +2007,11 @@
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fecha Vencimiento" DataField="FechaVenc" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Fue Facturado" DataField="FueFacturadoTexto" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
|
||||
<%-- <asp:BoundField HeaderText="Periodo" DataField="Periodo" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />--%>
|
||||
<%-- <asp:BoundField HeaderText="Periodo" DataField="Periodo" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />--%>
|
||||
<asp:HyperLinkField HeaderText="Serie-Folio" DataTextField="VentaFacturada" Target="_blank" ItemStyle-Width="10%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVentaFacturada" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:BoundField HeaderText="Moneda" DataField="MonedaVenta" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha Facturación" DataField="FechaIngVenta" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<%-- <asp:BoundField HeaderText="SubTotal" DataField="SubTotalVenta" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<%-- <asp:BoundField HeaderText="SubTotal" DataField="SubTotalVenta" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVAVenta" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IVAVenta" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />--%>
|
||||
<asp:BoundField HeaderText="Total" DataField="TotalVenta" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
|
||||
@@ -4450,15 +4450,17 @@ Partial Class Contratos_Default
|
||||
|
||||
Select Case TipoContrato
|
||||
Case 7 'Contrato Comodato
|
||||
SufijoContrato = "COM"
|
||||
SufijoContrato = "COMODATO"
|
||||
Case 8 'Contrato Consignacion
|
||||
SufijoContrato = "CONSIG"
|
||||
SufijoContrato = "CONSIGNACION"
|
||||
Case 9 'Contrato de Arrendamiento
|
||||
SufijoContrato = "ARRENDAMIENTO"
|
||||
Case 10 'Contrato de Financiamiento
|
||||
SufijoContrato = "FIN"
|
||||
SufijoContrato = "FINANCIAMIENTO"
|
||||
Case 13 'Contrato Servicio Administrado de Impresion (?)
|
||||
SufijoContrato = "MPS"
|
||||
Case 28 'Convenio Precio Fijo
|
||||
SufijoContrato = "CON"
|
||||
SufijoContrato = "CONVENIO"
|
||||
End Select
|
||||
|
||||
Dim Serie As String = String.Format("-{0}-{1}", DateTime.Today.Year, SufijoContrato)
|
||||
@@ -4504,6 +4506,61 @@ Partial Class Contratos_Default
|
||||
UpFacCiclica.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnVerPlantilla_Click(sender As Object, e As EventArgs)
|
||||
Dim Plantilla As String = TxtObservaciones.Text
|
||||
|
||||
If Plantilla.Contains("{DIA}") Then
|
||||
Plantilla = Plantilla.Replace("{DIA}", DateTime.Now.Day.ToString())
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{MES}") Then
|
||||
Dim fecha As DateTime = DateTime.Now
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{MES}", nombreMes)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{AÑO}") Then
|
||||
Plantilla = Plantilla.Replace("{AÑO}", DateTime.Now.Year.ToString())
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{TC}") Then
|
||||
Plantilla = Plantilla.Replace("{TC}", GlobalTipoCambio(Now).FormatoNumero)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{MESANTERIOR}") Then
|
||||
Dim fecha As DateTime = DateTime.Now.AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{MESANTERIOR}", nombreMes)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{INICIOMESANTERIOR}") Then
|
||||
Dim fecha As DateTime = DateTime.Now.AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Dim mesAnterior As String = String.Format("01 {0} {1}", nombreMes, fecha.Year)
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{INICIOMESANTERIOR}", mesAnterior)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{FINMESANTERIOR}") Then
|
||||
Dim fecha As DateTime = DateTime.Now.AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
Dim LastDayOfMonth = DateTime.DaysInMonth(fecha.Year, fecha.Month)
|
||||
|
||||
Dim mesAnterior As String = String.Format("{0} {1} {2}", LastDayOfMonth, nombreMes, fecha.Year)
|
||||
|
||||
Plantilla = Plantilla.ToString().Replace("{FINMESANTERIOR}", mesAnterior)
|
||||
End If
|
||||
|
||||
Alert(Plantilla)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user