-
This commit is contained in:
@@ -524,7 +524,7 @@
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 133px !important; margin-top: -5px; margin-left: -10px;">
|
||||
<asp:TextBox ID="TxtFechaDocumento" runat="server" CssClass="form-control" Width="99%"></asp:TextBox>
|
||||
<span class="input-group-btn">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendario" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="ImgCalendario" class="btn default" ><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaDocumento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
|
||||
@@ -861,6 +861,9 @@ Partial Class Bancos_PopIECompras
|
||||
|
||||
CargaCuentas()
|
||||
CargaCuentasDepositos()
|
||||
|
||||
ValidaFechaDocumentoDiasPosteriores()
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
@@ -1718,4 +1721,21 @@ Partial Class Bancos_PopIECompras
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ValidaFechaDocumentoDiasPosteriores()
|
||||
|
||||
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString
|
||||
Calendario.EndDate = NowADS().AddDays(2)
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(1, 16) Then
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(30).ToShortDateString
|
||||
Calendario.EndDate = NowADS().AddDays(30)
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
UpGuardar.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -99,14 +99,15 @@
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" UserDateFormat="DayMonthYear" TargetControlID="TxtFechaDocumento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFechaDocumento" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFechaDocumento" PopupButtonID="ImgCalendario" PopupPosition="BottomLeft" Enabled="True"></ajax:CalendarExtender>
|
||||
<ajax:MaskedEditValidator ID="MEVCalendario" runat="server" ControlExtender="MEEFecha" ControlToValidate="TxtFechaDocumento" Display="None" IsValidEmpty="False" MaximumValueMessage="Fecha Excedida" ErrorMessage="*" InvalidValueMessage="Fecha Invalida" InvalidValueBlurredMessage="b" MinimumValueMessage="Fecha Menor a la permitida" Enabled="False" ValidationGroup="GrpGuardar"></ajax:MaskedEditValidator>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''Fecha Documento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''Fecha Documento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendario" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a la fecha actual" ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 días de la fecha actual"
|
||||
ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVTxtFechaDocumentoMenor" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento está fuera de lo permitido" ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento4" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumentoMenor" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
@@ -1074,6 +1074,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||
RecargaCuentasDepositos()
|
||||
|
||||
ValidaFechaDocumentoDiasPosteriores()
|
||||
|
||||
UpGuardar.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -1612,6 +1614,29 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ValidaFechaDocumentoDiasPosteriores()
|
||||
|
||||
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString
|
||||
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(2).ToShortDateString
|
||||
|
||||
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 días de la fecha actual"
|
||||
|
||||
Calendario.EndDate = NowADS().AddDays(2)
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(1, 16) Then
|
||||
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(30).ToShortDateString
|
||||
RVTxtFechaDocumentoMenor.MaximumValue = NowADS().AddDays(30).ToShortDateString
|
||||
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 30 días de la fecha actual"
|
||||
|
||||
Calendario.EndDate = NowADS().AddDays(30)
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
UpGuardar.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub chkaplicaDescuento_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -315,7 +315,7 @@
|
||||
<asp:Literal ID="LtlTotalCorte" runat="server" Text='<%# Eval("TotalCorte", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField HeaderText="CveCorte" DataField="CveCorte" />--%>
|
||||
<%--<asp:BoundField HeaderText="CveCorte" DataField="CveCorte" />--%>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" Font-Size="9pt" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
@@ -364,7 +364,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<b>Detalles del Corte</b>
|
||||
<asp:GridView ID="GvP" runat="server" AutoGenerateColumns="False" GridLines="None" CssClass="table table-striped table-advance table-hover">
|
||||
<asp:GridView ID="GvP" runat="server" AutoGenerateColumns="False" GridLines="None" CssClass="table table-striped table-advance table-hover" Width="100%">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Método Pago" DataField="MetodoPago" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Importe" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
@@ -407,7 +407,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="NombreComercial" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Fac.Rem.Anterior" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" >
|
||||
<asp:TemplateField HeaderText="Fac.Rem.Anterior" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFacRemisionAnterior" runat="server" Text='<%# Eval("FacturaRemisionAnteriorTexto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -174,6 +174,7 @@ Partial Class Bancos_RepCortes
|
||||
DtCortesVentasResumen = Vn.DtResultados
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa.Contiene(190, 192) Then
|
||||
DivIVA.Visible = True
|
||||
If Vn.GetCortesDetalleVentasResumenIVA(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvPorIVA.DataSource = Vn.DtResultados
|
||||
End If
|
||||
@@ -181,6 +182,9 @@ Partial Class Bancos_RepCortes
|
||||
|
||||
If Vn.GetCortesDetalleDepositosCaja(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDep.DataSource = Vn.DtResultados
|
||||
If Vn.DtResultados.Rows.Count > 0 Then
|
||||
DivDep.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Vent.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 2) Then
|
||||
@@ -199,10 +203,26 @@ Partial Class Bancos_RepCortes
|
||||
End If
|
||||
Vn.Dispose()
|
||||
Vent.Dispose()
|
||||
|
||||
|
||||
GvD.DataBind()
|
||||
GvP.DataBind()
|
||||
GvDep.DataBind()
|
||||
GvPorIVA.DataBind()
|
||||
|
||||
If UsuarioActual.CveEmpresa = 193 AndAlso UsuarioActual.CveRol = 1 Then
|
||||
DivAnexo.Visible = True
|
||||
|
||||
Dim CveCuenta As Integer = 186367
|
||||
Using ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetAnexoCatalogo(CveCuenta, Fecha.ToDate(), Fecha.ToDate(), -1, -1, -1, UsuarioActual.CveEmpresa, 1) Then
|
||||
GvAnexo.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
End Using
|
||||
|
||||
GvAnexo.DataBind()
|
||||
End If
|
||||
|
||||
UPPDetalle.Update()
|
||||
UpAcciones.Update()
|
||||
End Sub
|
||||
|
||||
@@ -16374,7 +16374,7 @@ Partial Class Ventas
|
||||
Else
|
||||
Try
|
||||
If CveVenta > 0 Then
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False)
|
||||
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False, VerificaAlmacen:=False)
|
||||
End If
|
||||
|
||||
pdf = PdfFactura(ObjFactura)
|
||||
@@ -31451,7 +31451,13 @@ Partial Class Ventas
|
||||
Alert($"{MensajeError}. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
Else
|
||||
ObjVentas.Commit()
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
ObjConta.Dispose()
|
||||
ObjCGame.Dispose()
|
||||
|
||||
If Not OcurrioError Then
|
||||
'ELIMINA PDF VIEJO
|
||||
Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}-{3}.pdf", UsuarioActual.Empresa.Ruta, DdlTipoComprobante.SelectedValue, Serie, Folio))
|
||||
If ArchivoPDF.Exists Then
|
||||
@@ -31465,12 +31471,7 @@ Partial Class Ventas
|
||||
Else
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=" & CveVenta & "&&Tipo=Cot"";")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
ObjConta.Dispose()
|
||||
ObjCGame.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Reference in New Issue
Block a user