diff --git a/Bancos/PopIECompras.aspx b/Bancos/PopIECompras.aspx index 80d0624c6..9b31ac375 100644 --- a/Bancos/PopIECompras.aspx +++ b/Bancos/PopIECompras.aspx @@ -524,7 +524,7 @@
- +
diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index cdda5974c..43e4d2d87 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -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 \ No newline at end of file diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx index fe63b8585..cdadcb7d9 100644 --- a/Bancos/ProveedoresAbonar.aspx +++ b/Bancos/ProveedoresAbonar.aspx @@ -99,14 +99,15 @@ - + - + diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 562c77be4..8e8952fee 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -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 = "ERROR:
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 = "ERROR:
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) diff --git a/Bancos/RepCortes.aspx b/Bancos/RepCortes.aspx index f64558ce2..56fb9e7b4 100644 --- a/Bancos/RepCortes.aspx +++ b/Bancos/RepCortes.aspx @@ -315,7 +315,7 @@ - <%----%> + <%----%> @@ -364,7 +364,7 @@
Detalles del Corte - + @@ -407,7 +407,7 @@ - + diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index 0c345af30..399bfd788 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -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 diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 24c5d6b73..5c1359c8a 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -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