diff --git a/App_Code/DtDatos.xsd b/App_Code/DtDatos.xsd index f354dcef4..7192eab3b 100644 --- a/App_Code/DtDatos.xsd +++ b/App_Code/DtDatos.xsd @@ -1,289 +1,296 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_Code/DtDatos.xss b/App_Code/DtDatos.xss index 6f4a11dac..4c9cb879f 100644 --- a/App_Code/DtDatos.xss +++ b/App_Code/DtDatos.xss @@ -1,24 +1,24 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index e929eccf0..4cacca5f8 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -385,12 +385,21 @@
+ -
- +
+
+ + +
+ + <%-- + --%> +
+
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index cfb1e58c4..a1fff0611 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -496,6 +496,39 @@ Partial Class Bancos_IE #End Region +#Region " R E F E R E N C I A C O N C E P T O O R I G I N A L E S" + + + Private Property OriReferenciaCIE As String + Get + If ViewState("OriReferenciaCIE") Is Nothing Then + Return "" + Else + Return ViewState("OriReferenciaCIE").ToString + End If + + + End Get + Set(value As String) + ViewState("OriReferenciaCIE") = value + End Set + End Property + + Private Property OriConceptoCIE As String + Get + If ViewState("OriConceptoCIE") Is Nothing Then + Return "" + Else + Return ViewState("OriConceptoCIE").ToString + End If + + End Get + Set(value As String) + ViewState("OriConceptoCIE") = value + End Set + End Property + +#End Region #End Region @@ -2471,10 +2504,29 @@ Partial Class Bancos_IE CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, PagueseA, TxtImporte.Text.Trim.ToDouble, DdlMoneda.SelectedValue.ToEntero, - TxtTipoCambio.Text.Trim.ToDouble, TxtObservaciones.Text.Trim, TxtNotificarA.Text.Trim, ChkAbonoCuenta.Checked, ChkAplicaImpuestos.Checked, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveEstatusIE:=DdlEstatusIE.SelectedValue.ToString.ToEntero, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1)) + TxtTipoCambio.Text.Trim.ToDouble, TxtObservaciones.Text.Trim, TxtNotificarA.Text.Trim, ChkAbonoCuenta.Checked, ChkAplicaImpuestos.Checked, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, + CveCuentaDeposito:=CveCuentaDeposito, CveEstatusIE:=DdlEstatusIE.SelectedValue.ToString.ToEntero, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), + ConceptoCIE:=If(TxtConceptoCIE.Text.Trim.Length > 0, TxtConceptoCIE.Text, "-1")) If CveIE > 0 Then + + + If DdlCuentaDeposito.SelectedValue.ToEntero > 0 And DdlTipoTransaccion.SelectedValue = "17" Then + + If TxtReferenciaCIE.Text <> OriReferenciaCIE Or TxtConceptoCIE.Text <> OriConceptoCIE Then + + Dim ObjGrales As New ClsGenerales(ObjIE.IniciaTransacSQL) + + If Not ObjGrales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(DdlCuentaDeposito.SelectedValue.ToEntero, -1, -1, "-1", TxtReferenciaCIE.Text.Trim, TxtConceptoCIE.Text.Trim) Then + + MsgError = "Error al actualziar Cuanta Referencia y Concepto Deposito." + End If + + End If + + End If + If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa <> 119 Then FolioFijo = ObjIE.Folio.ToEntero 'cheque CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE " + If(Request("Opcion") IsNot Nothing, Request("Opcion").ToString, "") + " " + RBL.SelectedValue, CvePlantillaPoliza, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, tCveMoneda, TxtFechaDocumento.Text.ToDate, PagueseA, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa)) @@ -4653,7 +4705,7 @@ Partial Class Bancos_IE Else Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia) End If - + DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then @@ -4670,7 +4722,7 @@ Partial Class Bancos_IE BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito" End If - + DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) UpGuardar.Update() @@ -4750,17 +4802,59 @@ Partial Class Bancos_IE End If End Sub Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs) + Dim Dep As New ClsGenerales - If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) AndAlso Dep.DtResultados.Rows.Count = 1 Then - If Dep.DtResultados.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then - TrReferenciaCIE.Visible = True - TxtReferenciaCIE.Text = Dep.DtResultados.Rows(0)("Referencia").ToString + + If DdlCuentaDeposito.SelectedValue.ToEntero > 0 Then + + If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) AndAlso Dep.DtResultados.Rows.Count = 1 Then + + + If Dep.DtResultados.Rows.Count > 0 Then + + If Dep.DtResultados.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then + TrReferenciaCIE.Visible = True + + TxtReferenciaCIE.Text = Dep.DtResultados.Rows(0)("Referencia").ToString + TxtConceptoCIE.Text = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString + + OriReferenciaCIE = Dep.DtResultados.Rows(0)("Referencia").ToString + OriConceptoCIE = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString + + + Else + TrReferenciaCIE.Visible = False + End If + + + + If Boolean.Parse(Dep.DtResultados.Rows(0)("EstatusPagoElectronicoGrupos").ToString) AndAlso Dep.DtResultados.Rows(0)("CveSATBanco").ToString.ToEntero <= 0 Then + Alert("Es necesario establecer el banco de la cuenta deposito", TipoMensaje.MsgAdvertencia) + BtnGuardar.Enabled = False + Else + BtnGuardar.Enabled = True + End If + + Else + TrReferenciaCIE.Visible = False + End If + Else TrReferenciaCIE.Visible = False End If + + + Else + TrReferenciaCIE.Visible = False End If + + + Dep.Dispose() UpCuentaDeposito.Update() + UpGuardar.Update() + + End Sub #End Region diff --git a/Bancos/PagoElectronicoGrupos.aspx.vb b/Bancos/PagoElectronicoGrupos.aspx.vb index d8e72ec53..70707b8f5 100644 --- a/Bancos/PagoElectronicoGrupos.aspx.vb +++ b/Bancos/PagoElectronicoGrupos.aspx.vb @@ -1355,7 +1355,7 @@ Partial Class Bancos_PagoElectronicoGrupos RegistrosPago.Append(drow("CveBanco").ToString.Trim) Else ErrorLayout = True - MENSAJEError.AppendLine("Error tamaño clave banco") + MENSAJEError.AppendLine("Es necesario establecer el banco de la cuenta deposito.") End If 'Motivo de pago diff --git a/Bancos/PopIECompras.aspx b/Bancos/PopIECompras.aspx index f2f318896..a8073a7e8 100644 --- a/Bancos/PopIECompras.aspx +++ b/Bancos/PopIECompras.aspx @@ -156,19 +156,36 @@ :
- +
- -
- +
+ +
+ - + +
+ + + +
+ +
+ + <%-- + --%> +
+
+ + + +
diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 69fa5cd29..7dd634876 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -377,7 +377,11 @@ Partial Class Bancos_PopIECompras Private Property CveCuentaCliente As Integer Get - Return ViewState("CveCuentaCliente").ToString.ToEntero + If ViewState("CveCuentaCliente") Is Nothing Then + Return -1 + Else + Return ViewState("CveCuentaCliente").ToString.ToEntero + End If End Get Set(value As Integer) ViewState("CveCuentaCliente") = value @@ -402,10 +406,39 @@ Partial Class Bancos_PopIECompras Get Return ViewState("CveCuentaMonedaExtranjeraCliente").ToString.ToEntero End Get - End Property - + End Property + + Private Property OriReferenciaCIE As String + Get + If ViewState("OriReferenciaCIE") Is Nothing Then + Return "" + Else + Return ViewState("OriReferenciaCIE").ToString + End If + + + End Get + Set(value As String) + ViewState("OriReferenciaCIE") = value + End Set + End Property + + Private Property OriConceptoCIE As String + Get + If ViewState("OriConceptoCIE") Is Nothing Then + Return "" + Else + Return ViewState("OriConceptoCIE").ToString + End If + + End Get + Set(value As String) + ViewState("OriConceptoCIE") = value + End Set + End Property + #End Region - + Private Sub Bancos_PopIECompras_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then @@ -926,7 +959,7 @@ Partial Class Bancos_PopIECompras Private Sub CargaCuentasDepositos() DdlCuentaDeposito.Items.Clear() - If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout + If DdlTipoTransaccion.SelectedValue.Contiene("2", "9", "17") Then ' transferencias y layout trCuentaDeposito.Visible = False @@ -944,7 +977,7 @@ Partial Class Bancos_PopIECompras BtnGuardar.Enabled = False Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia) End If - + DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) ElseIf DdlTipoTransaccion.SelectedValue = "17" Then @@ -960,9 +993,9 @@ Partial Class Bancos_PopIECompras End If - UpGuardar.Update() - - + UpGuardar.Update() + + DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) Else DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'") If Dep.DtResultados.Rows.Count > 0 Then @@ -992,9 +1025,11 @@ Partial Class Bancos_PopIECompras Else trCuentaDeposito.Visible = False DdlCuentaDeposito.Items.Clear() + 'TrReferenciaCIE.Visible = False End If 'RecargaGlobalCuentasBancarias() - UpCuentaDeposito.Update() + UpCuentaDeposito.Update() + End Sub #End Region @@ -1452,7 +1487,7 @@ Partial Class Bancos_PopIECompras Select Case RBLContado.SelectedValue Case "1" ' Banco - CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1")) + CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), ConceptoCIE:=If(TxtConceptoCIE.Text.Trim.Length > 0, TxtConceptoCIE.Text, "-1")) If CveIE > 0 Then CveConcepto = 17 Else @@ -2371,6 +2406,7 @@ Partial Class Bancos_PopIECompras End If Case 19 'Iva Acreditable + If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then 'funcionalidad que toma el 100% del pago para acreditamiento de iva Dim TotalImporte As Decimal @@ -3408,7 +3444,54 @@ Partial Class Bancos_PopIECompras End If - End Sub + End Sub #End Region - + + + + Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs) + + Dim Dep As New ClsGenerales + + If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) AndAlso Dep.DtResultados.Rows.Count = 1 Then + + If Dep.DtResultados.Rows.Count > 0 Then + + If Dep.DtResultados.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then + + TrReferenciaCIE.Visible = True + + TxtReferenciaCIE.Text = Dep.DtResultados.Rows(0)("Referencia").ToString + TxtConceptoCIE.Text = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString + + OriReferenciaCIE = Dep.DtResultados.Rows(0)("Referencia").ToString + OriConceptoCIE = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString + + Else + TrReferenciaCIE.Visible = False + End If + + + If Boolean.Parse(Dep.DtResultados.Rows(0)("EstatusPagoElectronicoGrupos").ToString) = True AndAlso Dep.DtResultados.Rows(0)("CveSATBanco").ToString.ToEntero <= 0 Then + + Alert("Es necesario establecer el banco de la cuenta deposito", TipoMensaje.MsgAdvertencia) + BtnGuardar.Enabled = False + + Else + BtnGuardar.Enabled = True + End If + + Else + TrReferenciaCIE.Visible = False + End If + + Else + TrReferenciaCIE.Visible = False + End If + + Dep.Dispose() + UpCuentaDeposito.Update() + UpGuardar.Update() + End Sub + End Class \ No newline at end of file diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx index 577cf4377..a6c1f586b 100644 --- a/Bancos/ProveedoresAbonar.aspx +++ b/Bancos/ProveedoresAbonar.aspx @@ -199,8 +199,8 @@
- - + <%-- + --%>
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index b87311be9..5ce744e3b 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -311,7 +311,7 @@ Partial Class Bancos_ProveedoresAbonar Private Property OriConceptoCIE As String Get - If ViewState("OriReferenciaCIE") Is Nothing Then + If ViewState("OriConceptoCIE") Is Nothing Then Return "" Else Return ViewState("OriConceptoCIE").ToString @@ -875,7 +875,7 @@ Partial Class Bancos_ProveedoresAbonar ComprobanteIE = $"{CveIE}.{Comprobante}" - If DdlCuentaDeposito.SelectedValue.ToEntero > 0 Then + If DdlCuentaDeposito.SelectedValue.ToEntero > 0 And DdlTipoTransaccion.SelectedValue = "17" Then If TxtReferenciaCIE.Text <> OriReferenciaCIE Or TxtConceptoCIE.Text <> OriConceptoCIE Then @@ -1853,7 +1853,7 @@ Partial Class Bancos_ProveedoresAbonar 'CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria 'Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion) 'TipoCambioGeneral = TCImpuestos - ''' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra + '''' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra 'If TipoCambioPago < tipoCambioCompra AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then ' ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TipoCambioPago) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioCompra) 'Añadimos la diferencia de ganancia en la venta ' ImporteMovimiento -= (IVA * TCImpuestos) - (IVA * tipoCambioCompra) 'Añadimos la diferencia de ganancia en el IVA @@ -2660,28 +2660,50 @@ Partial Class Bancos_ProveedoresAbonar 'cuando es transferencia bancaria, debe de solicitar a que cuenta se va a depositar CargaCuentasDepositos() End Sub + Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs) Dim Dep As New ClsGenerales If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) AndAlso Dep.DtResultados.Rows.Count = 1 Then - If Dep.DtResultados.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then - TrReferenciaCIE.Visible = True - TxtReferenciaCIE.Text = Dep.DtResultados.Rows(0)("Referencia").ToString - TxtConceptoCIE.Text = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString + If Dep.DtResultados.Rows.Count > 0 Then - OriReferenciaCIE = Dep.DtResultados.Rows(0)("Referencia").ToString - OriConceptoCIE = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString + If Dep.DtResultados.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then + + TrReferenciaCIE.Visible = True + + TxtReferenciaCIE.Text = Dep.DtResultados.Rows(0)("Referencia").ToString + TxtConceptoCIE.Text = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString + + OriReferenciaCIE = Dep.DtResultados.Rows(0)("Referencia").ToString + OriConceptoCIE = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString + + Else + TrReferenciaCIE.Visible = False + End If + + + If Boolean.Parse(Dep.DtResultados.Rows(0)("EstatusPagoElectronicoGrupos").ToString) = True AndAlso Dep.DtResultados.Rows(0)("CveSATBanco").ToString.ToEntero <= 0 Then + + Alert("Es necesario establecer el banco de la cuenta deposito", TipoMensaje.MsgAdvertencia) + BtnIEGuardar.Enabled = False + + Else + BtnIEGuardar.Enabled = True + End If Else TrReferenciaCIE.Visible = False End If + + Else + TrReferenciaCIE.Visible = False End If Dep.Dispose() UpCuentaDeposito.Update() - + UpGuardar.Update() End Sub #End Region diff --git a/Empresas/Grales/Formatos/RepIVA.rpt b/Empresas/Grales/Formatos/RepIVA.rpt index 5b20e8876..6052ad0c0 100644 Binary files a/Empresas/Grales/Formatos/RepIVA.rpt and b/Empresas/Grales/Formatos/RepIVA.rpt differ diff --git a/Empresas/Grales/Formatos/RepIVAAcreditable.rpt b/Empresas/Grales/Formatos/RepIVAAcreditable.rpt index dcaac6f14..9d2cf8b80 100644 Binary files a/Empresas/Grales/Formatos/RepIVAAcreditable.rpt and b/Empresas/Grales/Formatos/RepIVAAcreditable.rpt differ diff --git a/Empresas/Grales/Formatos/RepIVAAcreditable2.rpt b/Empresas/Grales/Formatos/RepIVAAcreditable2.rpt deleted file mode 100644 index 76a5aadc4..000000000 Binary files a/Empresas/Grales/Formatos/RepIVAAcreditable2.rpt and /dev/null differ