This commit is contained in:
Antonio Gonzalez
2019-11-27 11:03:05 -07:00
10 changed files with 1079 additions and 1009 deletions

View File

@@ -168,7 +168,7 @@ Public Class ClsGralFolios
Retorno = True
Catch Ex1 As SqlException
If Ex1.Message.Contains("Número: 2627;") Then
'Alert("Ya existe una Aprobación de Folios con el mismo número: " & Aprobacion & ".", TipoMensaje.MsgAdvertencia)
Me.OnError("Ocurrió un error al guardar el folio.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Else
Me.OnError("Ocurrió un error al guardar la nueva Aprobación de Folios.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
@@ -201,9 +201,9 @@ Public Class ClsGralFolios
Retorno = True
Catch Ex1 As SqlException
If Ex1.Message.Contains("Número: 2627;") Then
'Alert("Ya existe una Aprobación de Folios con el mismo número: " & Aprobacion & ".", TipoMensaje.MsgAdvertencia)
Me.OnError("Ocurrió un error al actualizar los folios..", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Else
Me.OnError("Ocurrió un error al guardar los cambios en la Aprobación de Folios.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Me.OnError("Ocurrió un error al actualizar los folios.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
Catch ex As Exception
OnError("Ocurrió un error al guardar los cambios en la Aprobación de Folios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)

View File

@@ -1485,7 +1485,7 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function GetKardex(Entrada As Boolean, Salida As Boolean, CvePS As Integer, FechaI As String, FechaF As String, CveAlmacen As Integer, CveTiposAlmacen As String, CveUnidadMedida As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional AgruparAlmacen As Boolean = False) As Boolean
Public Function GetKardex(Entrada As Boolean, Salida As Boolean, CvePS As Integer, FechaI As String, FechaF As String, CveAlmacen As Integer, CveTiposAlmacen As String, CveUnidadMedida As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional AgruparAlmacen As Boolean = False, Optional Serie As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_KardexGet")
@@ -1502,6 +1502,7 @@ Public Class ClsInventarios
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@AgruparAlmacen", SqlDbType.Bit).Value = AgruparAlmacen
.Add("@Serie", SqlDbType.VarChar).Value = Serie
End With
Try

View File

@@ -1547,7 +1547,10 @@
//VALIDA QUE LA CANTIDAD DE T (TXT) NO SEA MAYOR A C
function ValidarCantidad(t, c) {
t.value = (ToDouble(t.value) > ToDouble(c) ? c : t.value)
var Ot = 0.00;
// considera importe de OT ingresos, para que se peuda exceder
if ($get('TxtOtrosIngresosEgresos')) { Ot = -ToDouble($get('TxtOtrosIngresosEgresos').value);}
t.value = (ToDouble(t.value) > ToDouble(c) + Ot ? c : t.value)
}
var TipoCambioActual = 0.0;

View File

@@ -1180,6 +1180,7 @@ Partial Class Bancos_IE
DdlProveedores.SelectedText = ObjProveedor.NombreComercial
DdlProveedores.SelectedValue = ObjProveedor.CveProveedor.ToString
DivOtrosIngresosEgresos.Visible = True
End If
@@ -1262,6 +1263,7 @@ Partial Class Bancos_IE
IDCtaBeneficiarioComplementaria = ObjCliente.IdCtaContCompClientes
DdlCliente.SelectedText = ObjCliente.NombreComercial
DdlCliente.SelectedValue = ObjCliente.CveCliente.ToString
DivOtrosIngresosEgresos.Visible = True
End If
If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
@@ -2266,11 +2268,16 @@ Partial Class Bancos_IE
Exit Sub
End If
Dim ObjIE As New ClsBancos()
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
Dim ObjComp As New ClsCompras(ObjIE.IniciaTransacSQL)
Dim ObjOC As New ClsOC(ObjIE.IniciaTransacSQL)
' Dim ObjContabilidad As New ClsContabilidad(ObjIE.IniciaTransacSQL)
Dim MsgError As String = ""
Dim CveConceptoContable As Integer = 30
Dim CveConceptoCompra As Integer = 10
@@ -2281,7 +2288,6 @@ Partial Class Bancos_IE
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
Dim Msg As New StringBuilder
Try
If CveIE = -1 Then
Dim CveCuentaDeposito As Integer = 0
@@ -2457,8 +2463,6 @@ Partial Class Bancos_IE
If CveIE > 0 Then
If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = ObjIE.Folio.ToEntero 'cheque
If UsuarioActual.CveEmpresa = 119 Then FolioFijo = 0
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))
'valida prepoliza
@@ -2676,8 +2680,30 @@ Partial Class Bancos_IE
End If
End If
'OTROS INGRESOS/EGRESOS
Dim Impo As Decimal = TxtOtrosIngresosEgresos.Text.ToDecimal
If TxtOtrosIngresosEgresos.Text.ToDecimal <> 0 Then
Dim TipoMovtoIE As Boolean = False
Dim CveConcIE As Integer = 78
If Impo > 0 Then
TipoMovtoIE = True
Impo = Math.Abs(Impo)
CveConcIE = 78
Else
TipoMovtoIE = False
Impo = Math.Abs(Impo)
CveConcIE = 211
End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=Impo, ImporteME:=0) Then
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
Exit Select
End If
End If
'CANCELA NC
IdCtaContableAplicar = IDCtaBeneficiario
ImporteAplicar = ImporteAplicar + Impo
ImporteAplicarMN = (ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL()
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(ImporteAplicar), ReferenciaAplicar, 12, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=-(ImporteAplicarMN), ImporteME:=ImporteAplicarME) Then
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
@@ -2780,11 +2806,33 @@ Partial Class Bancos_IE
End If
End If
'OTROS INGRESOS/EGRESOS
If TxtOtrosIngresosEgresos.Text.ToDecimal <> 0 Then
Dim Impo As Decimal = TxtOtrosIngresosEgresos.Text.ToDecimal
Dim TipoMovtoIE As Boolean = False
Dim CveConcIE As Integer = 78
If Impo > 0 Then
TipoMovtoIE = True
Impo = Math.Abs(Impo)
CveConcIE = 78
Else
TipoMovtoIE = False
Impo = Math.Abs(Impo)
CveConcIE = 211
End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=Impo, ImporteME:=0, CveCuenta:=CveCuentaConta, TipoCambio:=TCDocumento) Then
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
Exit Select
End If
End If
'CANCELA NC
IdCtaContableAplicar = IDCtaBeneficiario
ImporteAplicar = ImporteAplicar - TxtOtrosIngresosEgresos.Text.ToDecimal
ImporteAplicarMN = ImporteAplicar ' (ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL()
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, (ImporteAplicar), ReferenciaAplicar, 18, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=(ImporteAplicarMN), ImporteME:=ImporteAplicarME, TipoCambio:=TCCompra) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(ImporteAplicar), ReferenciaAplicar, 18, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=(ImporteAplicarMN), ImporteME:=ImporteAplicarME, TipoCambio:=TCCompra) Then
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
Exit Select
End If
@@ -2823,6 +2871,8 @@ Partial Class Bancos_IE
End If
End If
'IMPUESTOS
@@ -2848,18 +2898,14 @@ Partial Class Bancos_IE
Dim DTCuentas As DataTable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeCompraDevDinC)
Dim CveCuentaIVAxAcreditarDevDinC = 0
Dim CveCuentaIVAAcreditableDevDinC = 0
Dim IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
Dim IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
Dim IdCtaIVAXAcreditarDevDinC = 0
Dim IdCtaIVAAcreditableDevDinC = 0
If DTCuentas IsNot Nothing AndAlso DTCuentas.Rows.Count > 0 Then
IdCtaIVAXAcreditarDevDinC = DTCuentas.Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero
IdCtaIVAAcreditableDevDinC = DTCuentas.Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero
End If
Dim IVADevMN As Decimal = 0
Dim IEPSDevMN As Decimal = 0
Dim PorcentajeDevolucion As Decimal = ((TxtImporte.Text.ToDecimal * 100D / TotalCompraDev) / 100).RoundSQL(2)
IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2)
@@ -2868,6 +2914,7 @@ Partial Class Bancos_IE
Dim CveCuentaDevolucionIMPUESTOS As Integer = -1
Dim IdCtaIVADevolucionIMPUESTOS As Integer = -1
If DdlMoneda.SelectedValue.ToEntero > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119) Then
IVADevMN = IVADev
IEPSDevMN = IEPSDev
@@ -2876,6 +2923,7 @@ Partial Class Bancos_IE
IEPSDevMN = (IEPSDev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2)
End If
Dim ErrorDevolucionImpuestos As Boolean = False
If IVADev > 0 Then
@@ -2947,6 +2995,8 @@ Partial Class Bancos_IE
End If
End If
Case "EGSCREDITO"
Dim ConceptoContable As Integer
@@ -2987,6 +3037,8 @@ Partial Class Bancos_IE
importeMovimiento = TxtImporte.Text.ToDecimal
importeMX = importeMovimiento
Case 46
If TxtInteresMoratorio.Text.ToDecimal > 0 Then
importeMovimiento = TxtInteresMoratorio.Text.ToDecimal
@@ -3058,6 +3110,8 @@ Partial Class Bancos_IE
End If
If Opcion.Contiene("EGSSINFACT") AndAlso CveSolicitudViatico > 0 AndAlso MsgError = "" Then
If Not ObjIE.UpdateSolicitudesViaticosIE(CveSolicitudViatico, CveIE) Then
MsgError = "Ocurrió un error al vincular el egreso con la solicitud de viatico."
@@ -3230,19 +3284,10 @@ Partial Class Bancos_IE
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=IE&CVEIE={0}", CveIE))}'", String.Format("Imprimir {0}", DdlTipoTransaccion.SelectedItem))
End If
End If
End If
Catch ex As Exception
MsgError = "Ocurrió un error al guardar el IE"
ex.ToString().GuardaLog()
End Try
If MsgError = "" Then
ObjIE.Commit()
Else
ObjIE.RollBack()
Alert(MsgError, TipoMensaje.MsgError)
End If
If Msg.ToString <> "" Then
@@ -3265,6 +3310,7 @@ Partial Class Bancos_IE
AccionJS = String.Format("document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery)
End If
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSCREDITO") Then
AccionJS = $"document.location.href=""/Bancos/Creditos.aspx?CveCredito={Request("CveCredito")}"";"
Alert(Msg.ToString, TipoMensaje.MsgInformacion, AccionJS)
@@ -3272,15 +3318,18 @@ Partial Class Bancos_IE
Alert(Msg.ToString, TipoMensaje.MsgInformacion, String.Format("document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery))
End If
End If
End If
ObjIE.Dispose()
ObjMov.Dispose()
ObjOC.Dispose()
If ObjComp IsNot Nothing Then ObjComp.Dispose()
End If
End If
RecargaGlobalCuentasBancarias()
ObjIE.Dispose()
ObjMov.Dispose()
If ObjComp IsNot Nothing Then ObjComp.Dispose()
End Sub
#Region " NOTIFICACION PAGO "

View File

@@ -233,7 +233,7 @@ Partial Class GPS_Rastreo
For Each Row As DataRow In DtDatos.Rows
Try
request = WebRequest.Create(String.Format("{0}nominatim/reverse.php?format=jsonv2&lat={1}&lon={2}", ClsPaginas.UrlDirecciones, Row("Lat"), Row("Lon")))
request = WebRequest.Create(String.Format("{0}nominatim/reverse.php?format=jsonv2&lat={1}&lon={2}", ClsPaginas.UrlDirecciones, Row("Lat"), Row("Lng")))
request.Method = "GET" ' set default credentials
Dim response As WebResponse = Request.GetResponse() ' fire this puppy off
Dim inputstream1 As Stream = response.GetResponseStream() ' define the stream(must be stream

View File

@@ -296,6 +296,18 @@ Partial Class General_SaldosIniciales
Exit Sub
End If
If RblFormato.SelectedValue = "4" Then
If Not dt.Columns(15).ColumnName = "ImpuestoLocal" Then
Alert("El nombre de la diesciseisava columna debe ser 'ImpuestoLocal'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
If Not dt.Columns(16).ColumnName = "Amort.Ant" Then
Alert("El nombre de la diescisieteava columna debe ser 'Amort.Ant'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub
End If
End If
ElseIf RblFormato.SelectedValue = "5" Then
@@ -1309,23 +1321,25 @@ Partial Class General_SaldosIniciales
Dim Folio As Integer = Row("Folio").ToString.ToEntero
Dim Fecha As Date = Row("Fecha").ToString.ToDate
Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString.ToDate
Dim ImpuestoLocal As Double = Row("ImpuestoLocal").ToString.ToDouble
Dim Amortizacion As Double = Row("Amort.Ant").ToString.ToDouble
Dim SubTotal As Decimal = Row("SubTotal").ToString.ToDecimal
Dim IVA As Decimal = Row("IVA").ToString.ToDecimal
Dim Total As Decimal = Row("Total").ToString.ToDecimal
Dim Saldo As Decimal = Row("Saldo").ToString.ToDecimal
Dim CveCliente As Integer = DtClientes.FiltroPrimeroValor("CveCliente", $"Codigo = '{RFC}'").ToString.ToEntero
Dim CveCliente As Integer = DtClientes.FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString.ToEntero
Dim RetIVA As Double = Row("Ret IVA").ToString.ToDouble
Dim RetISR As Double = Row("Ret ISR").ToString.ToDouble
Dim Moneda As String = Row("Moneda").ToString
Dim TipoCambio As String = Row("Tipo Cambio").ToString
Dim CveMoneda As Integer = 1
Dim Vendedor As String = Row("Vendedor").ToString
Dim Vendedor As String = "" 'Row("Vendedor").ToString
Dim CveVendedor As Integer = 0
Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal
Dim CveClienteSucursal As Integer = Row("CveClienteSucursal").ToString.ToEntero
Dim IEPS As Decimal = 0 'Row("IEPS").ToString.ToDecimal
Dim CveClienteSucursal As Integer = 0 'Row("CveClienteSucursal").ToString.ToEntero
Dim ImpuestosLocales As Decimal = Row("ImpuestoLocal").ToString.ToDecimal
GuardaLog(Sucursal + "-" + Row("Sucursal").ToString)
GuardaLog(Sucursal + "-" + Row("Folio").ToString)
'Temporalmente SE BORRARA
Dim Transaccion As String = "" ' Row("Transaccion2").ToString
Dim Folio2 As String = "" ' Row("Folio2").ToString
@@ -1333,7 +1347,7 @@ Partial Class General_SaldosIniciales
'If Not CveCliente > 0 Then Alert(String.Format("No se encontró el cliente con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorVentas = True : RFC.GuardaLog : Exit For
TipoDocto = IIf(TipoDocto = "Ingresos", "Ing", IIf(TipoDocto = "Egresos", "Egs", "Rem")).ToString
TipoDocto = IIf(TipoDocto = "INGRESO", "Ing", IIf(TipoDocto = "EGRESO", "Egs", "Rem")).ToString
'PrePóliza
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Venta/SaldoInicial", 1, Total, Total, 1, Fecha, String.Format("{0}-{1}", Serie, Folio), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
@@ -1367,11 +1381,11 @@ Partial Class General_SaldosIniciales
If TipoDocto.Contiene("Ing", "Egs", "Rem") Then
GuardaLog(Serie & "-" & Folio)
If Not ObjVentas.AddVenta(TipoDocto, Folio, CveCliente.ToEntero, CveClienteSucursal, SubTotal, 0, 0, IVA, RetIVA, RetISR, Total, CveMoneda, TipoCambio.ToDouble,
If Not ObjVentas.AddVenta(TipoDocto, Folio, CveCliente.ToEntero, CveClienteSucursal, SubTotal, 0, Amortizacion, IVA, RetIVA, RetISR, Total, CveMoneda, TipoCambio.ToDouble,
0, 0, 0, FechaVencimiento, Fecha, "", "", Fecha, CveVendedor, Folio2, "", "", 0, 0, 0, "-1".ToDate, "-1".ToDate, "-1".ToDate, -1, -1, 0, CvePrePoliza,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Serie:=Serie, CveSubProyecto:=Sucursal.ToEntero, CveSubProyectoEjecucion:=Sucursal.ToEntero,
CveSubProyectoCobranza:=Sucursal.ToEntero, IEPS:=IEPS, ImpuestoLocal:=ImpuestosLocales,
ObservacionesAlmacen:=Transaccion, Entrega:=CodCliente) Then
CveSubProyectoCobranza:=Sucursal.ToEntero, IEPS:=IEPS,
ObservacionesAlmacen:=Transaccion, Entrega:=CodCliente, ImpuestoLocal:=ImpuestosLocales) Then
ErrorVentas = True
Exit For
End If
@@ -1398,7 +1412,7 @@ Partial Class General_SaldosIniciales
'Saldo
If Saldo < Total Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total - Saldo, Folio.ToString, ConceptoContablePago, Folio.ToString, Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total - Saldo) Then ErrorVentas = True : Exit For
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total - Saldo, Folio.ToString, ConceptoContablePago, Folio.ToString, Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total - Saldo, CveVentaAmortizacion:=CveVenta) Then ErrorVentas = True : Exit For
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total - Saldo, Folio.ToString, 95, Folio.ToString, Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total - Saldo) Then ErrorVentas = True : Exit For
End If

View File

@@ -2253,6 +2253,14 @@ Partial Class OC
End If
End If
'VALIDAR PORCENTAJES DE IVA
Dim PorcentajeIVA As Decimal = DdlIVA.SelectedValue.ToDecimal() - 1
Dim PorcentajeIVADetalle As Decimal = Me.DtDetalle.MAX("IVAPorcentaje", "IVAPorcentaje > 0").ToDecimal()
If PorcentajeIVA > 0 AndAlso (PorcentajeIVA <> PorcentajeIVADetalle) Then
Alert("El IVA de los conceptos no coincide con el IVA a facturar.", TipoMensaje.MsgAdvertencia)
TieneError = True
End If
Return TieneError
End Function

View File

@@ -104,7 +104,7 @@
</table--%>
<div style="">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFolio,FInicial,FActual,FFinal,Estado,TipoDocto,CveSubProyecto,Serie" EmptyDataText="No se encontraron Folios registrados" TShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveFolio,FInicial,FActual,FFinal,Estado,TipoDocto,CveSubProyecto" EmptyDataText="No se encontraron Folios registrados" TShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None">
<Columns>
<%-- <asp:BoundField DataField="Sucursal" HeaderText="Sucursal" />--%>
<asp:BoundField DataField="SubProyecto" HeaderText="Centro Costo" ItemStyle-HorizontalAlign="Left"/>
@@ -183,11 +183,6 @@
<label for="<%= DdlTipoDocto.ClientID.ToString()%>">Tipo Docto:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtSerie" runat="server" CausesValidation="true" MaxLength="10" CssClass="form-control"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVSerie" runat="server" CssClass="help-block errorimput miclase" ControlToValidate="TxtSerie" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<label for="<%= TxtSerie.ClientID.ToString()%>">Serie:</label>
</div>
<%-- <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtAprobacion" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVAprobacion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAprobacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Aprobación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>

View File

@@ -110,6 +110,7 @@ Partial Class CatFolios
TxtFolioInicial.Text = ""
TxtFolioFinal.Text = ""
TxtFolioActual.Text = ""
txtserie.text = ""
DivFactual.Visible = False
CargaSubProyectos()
@@ -124,7 +125,6 @@ Partial Class CatFolios
HdnModalidad.Value = "U"
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
DdlTipoDocto.SelectedValueExist(GvRow.DataKey("TipoDocto"))
TxtSerie.Text = (GvRow.DataKey("Serie"))
ChkEstatus.Checked = If(GvRow.DataKey("Estado").ToString = "Activo", True, False)
TxtFolioInicial.Text = (GvRow.DataKey("FInicial"))
TxtFolioFinal.Text = (GvRow.DataKey("FFinal"))
@@ -169,12 +169,12 @@ Partial Class CatFolios
If HdnModalidad.Value = "I" Then
If Not ObjFolios.AddFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtSerie.Text, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioInicial.Text.Trim.ToEntero,
If Not ObjFolios.AddFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioInicial.Text.Trim.ToEntero,
TxtFolioFinal.Text.Trim.Trim.ToEntero, Session("FileUpload").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
TieneError = True
End If
Else
If Not ObjFolios.UpdateFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtSerie.Text, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioActual.Text.Trim.ToEntero, TxtFolioFinal.Text.Trim.ToEntero,
If Not ObjFolios.UpdateFolios(DdlSubProyecto.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue, TxtFolioInicial.Text.Trim.ToEntero, TxtFolioActual.Text.Trim.ToEntero, TxtFolioFinal.Text.Trim.ToEntero,
"", If(ChkEstatus.Checked, True, False), UsuarioActual.CveUsuario, CveFolio) Then
TieneError = True
End If
@@ -193,7 +193,7 @@ Partial Class CatFolios
Session("FileUpload") = ""
Alert("La nueva Aprobación de Folios se guardó/editó correctamente.", TipoMensaje.MsgInformacion)
Alert("El nuevo Folio se guardó/editó correctamente.", TipoMensaje.MsgInformacion)
GlobalDTFolios = ObjFolios.DtResultados
ViewState("DTFolios") = ObjFolios.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)

View File

@@ -128,7 +128,7 @@ Public Class WSGPSApp
DtModulos = Nothing
End If
UsuarioRetorno.Modulos = UsuariosModulos
Dim DtClientes As DataTable = GlobalDTUsuarios(UsuarioActual.CveUsuario).FiltraParametros("CvePlataforma = 3 AND CveCliente > 0", "Empresa")
Dim DtClientes As DataTable = GlobalDTUsuarios(UsuarioActual.CveUsuario).FiltraParametros("CvePlataforma = 3 AND CveCliente IS NOT NULL", "Empresa")
If DtClientes IsNot Nothing Then
If DtClientes.Rows.Count > 0 Then
For Each Row As DataRow In DtClientes.Rows