diff --git a/Bancos/CuentasBancariasDetalle.aspx b/Bancos/CuentasBancariasDetalle.aspx index 3862302b9..d2a0f9b05 100644 --- a/Bancos/CuentasBancariasDetalle.aspx +++ b/Bancos/CuentasBancariasDetalle.aspx @@ -61,6 +61,8 @@ CLABE: + + diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index 6bb72ae7d..4ba12dac4 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -145,7 +145,7 @@
- +
@@ -159,7 +159,7 @@
- +
@@ -202,9 +202,8 @@

- -
-
+ + diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 4b37f6583..fc3490d5a 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -1966,8 +1966,15 @@ Partial Class ContabilidadC_RegPrePolizaS Exit For End If - If Row("SubProyecto").ToString <> "" Then - CveSubProyecto = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", String.Format("SubProyecto = '{0}'", Row("SubProyecto"))) 'Row("CveSubProyecto").ToString.ToEntero + If Row("SubProyecto").ToString.Trim <> "" Then + CveSubProyecto = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=-1).FiltroPrimeroValor("CveSubProyecto", String.Format("SubProyecto = '{0}'", Row("SubProyecto").ToString.Trim)).ToEntero 'Row("CveSubProyecto").ToString.ToEntero + + If CveSubProyecto = 0 Then + Alert(String.Format("El subproyecto {0} no se reconoció, favor de verificar el archivo.", Row("SubProyecto"))) + DtMovimientos.Clear() + Exit For + End If + End If If CveConceptoContable = 69 Then @@ -1986,8 +1993,8 @@ Partial Class ContabilidadC_RegPrePolizaS dr("CveConcepto") = CveConceptoContable dr("CveConceptoContable") = CveConceptoContable dr("ConceptoContable") = Row("ConceptoAdministrativo").ToString - dr("Cargo") = Row("Cargo").ToString.ToDecimal - dr("Abono") = Row("Abono").ToString.ToDecimal + dr("Cargo") = Row("Cargo").ToString.ToDecimal.RoundSQL + dr("Abono") = Row("Abono").ToString.ToDecimal.RoundSQL dr("Descripcion") = Row("Concepto").ToString dr("CveSubProyecto") = CveSubProyecto dr("CveProveedor") = -1 @@ -1998,12 +2005,13 @@ Partial Class ContabilidadC_RegPrePolizaS dr("CveVenta") = -1 dr("CveCuenta") = CveCuenta - TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + TxtAbono.Text.ToDouble).ToString.FormatoNumero - TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + TxtCargo.Text.ToDouble).ToString.FormatoNumero + DtMovimientos.Rows.Add(dr) DtMovimientos.AcceptChanges() Next + TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero + TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero GvMov.DataSource = DtMovimientos GvMov.DataBind() diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 2590c9fb1..c6cce12bd 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1109,7 +1109,7 @@ Partial Class General_SaldosIniciales Dim CveMoneda As Integer = 1 Dim CveProveedorSucursal As Integer = Row("CveProveedorSucursal").ToString.ToEntero Dim PorcentajeIVA As String = Row("PorcentajeIVA").ToString - Dim ImpuestosLocales As Decimal = If(dt.Columns.Contains("ImpuestosLocalesl"), Row("ImpuestosLocales").ToString, "0").ToDecimal + Dim ImpuestosLocales As Decimal = If(dt.Columns.Contains("ImpuestosLocales"), Row("ImpuestosLocales").ToString, "0").ToDecimal If Not CvePS > 0 Then Alert(String.Format("No se encontró el Producto Servicio"), TipoMensaje.MsgError) : ErrorCompras = True diff --git a/OC/OC.aspx b/OC/OC.aspx index fd95b1c4d..b4968ba52 100644 --- a/OC/OC.aspx +++ b/OC/OC.aspx @@ -2545,7 +2545,7 @@
- +
diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 5d6ca8ded..95c8204f9 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -677,7 +677,7 @@ Partial Class OC TipoOS = True End If - BtnGeneraContrato.Visible = True : CargaClientes() + BtnGeneraContrato.Visible = True : CargaClientesContrato() CargaEstatusInicialFinal() CargaEstatusUsuarios() @@ -6770,7 +6770,7 @@ Partial Class OC BtnSolicitudAnticipo.Visible = False HlAgregarExcel.Visible = True LbDescargarExcel.Visible = True - BtnGeneraContrato.Visible = True : CargaClientes() + BtnGeneraContrato.Visible = True : CargaClientesContrato() LbVerificarExistencia.Visible = True LnkAgregarGuia.Visible = False @@ -7387,10 +7387,11 @@ Partial Class OC #Region "CONTRATOS" - Private Sub CargaClientes() - DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) - DdlClientes.DataBind() - DdlClientes.Items.Insert(0, New ListItem("Seleccione", "-1")) + Private Sub CargaClientesContrato() + 'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) + 'DdlClientes.DataBind() + 'DdlClientes.Items.Insert(0, New ListItem("Seleccione", "-1")) + 'DdlClienteContrato End Sub Private Sub CargaContratos() @@ -7403,20 +7404,20 @@ Partial Class OC UpContrato.Update() End Sub - Private Sub DdlClientes_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClientes.SelectedIndexChanged + Private Sub DdlClienteContrato_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClienteContrato.selectedindexchange DdlContratos.Items.Clear() ' DdlContratos.DataSource = GlobalDTContratos().FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCliente = {DdlClientes.SelectedValue.ToEntero} AND Estatus = True AND FechaFinal >= '{Now.ToShortDateString}' AND FechaInicial <= '{Now.ToShortDateString}'") Dim ObjContratos As New ClsContratos - If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, DdlClientes.SelectedValue.ToEntero, -1, 1) Then + If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, DdlClienteContrato.SelectedValue.ToEntero, -1, 1) Then If ObjContratos.DtResultados.FiltraParametros("Estatus = True").Rows.Count > 0 Then DdlContratos.DataSource = ObjContratos.DtResultados.FiltraParametros($"Estatus = True AND FechaFinal >= '{Now.ToShortDateString}' AND FechaInicial <= '{Now.ToShortDateString}'") - DdlContratos.DataBind() End If End If - + ObjContratos.Dispose() + DdlContratos.DataBind() DdlContratos.Items.Insert(0, New ListItem("Seleccione", "-1")) @@ -7492,7 +7493,7 @@ Partial Class OC End If Next TxtGrid.Text = If(DtDetalle.Rows.Count = 0, "", DtDetalle.Rows.Count.ToString) - Ddlcliente.txtValue.Value = DdlClientes.SelectedValue + Ddlcliente.txtValue.Value = DdlClienteContrato.SelectedValue CargaSuperior() CargaDatosDetalles() diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 4588b91b2..571e1b1b6 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -6826,10 +6826,12 @@ Partial Class Clientes UPGvDocumentosCliente.Update() 'UpGvDocumentosFirma2.Update() End Sub - Public Sub UploadModal_ClickDocumentacionFirmaContrato(sender As Object, e As EventArgs) + Public Sub UploadModal_ClickDocumentacionFirmaContrato(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim chkEstatus As CheckBox + CveDocumentacionElectronica = GvRow.DataKey("CveDocumentacionElectronica").ToString().ToEntero() CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToString().ToEntero() Documentacion = GvRow.DataKey("Documentacion") @@ -6849,7 +6851,29 @@ Partial Class Clientes UpTituloFirma.Update() RegistraScript("$('#ModalUploadFirmaContratoDocumento').modal({ backdrop: 'static', keyboard: false});") + + GvdocumentosEventosDescarga() + End Sub + + + Private Sub GvdocumentosEventosDescarga() + + For Each GvRow As GridViewRow In GvDocumentosCliente.Rows + + If GvRow.RowType = DataControlRowType.DataRow Then + + Dim LnkDownLoadDoc As LinkButton = GvRow.FCLinkButton("LnkDownLoadDoc") + Dim ImgDownLoadFormato As LinkButton = GvRow.FCLinkButton("ImgDownLoadFormato") + ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoadFormato) + ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkDownLoadDoc) + + End If + + Next + + End Sub + Private Sub GuardarDocumentosClientes(Optional _CveDocumentacionExcluir As Integer = -1) Dim hasError As Boolean = True