This commit is contained in:
Rene Molina
2019-09-25 07:12:18 -07:00
35 changed files with 12804 additions and 11710 deletions

View File

@@ -339,7 +339,8 @@ Partial Class AC_RepEstadoActividades
params.Add(New ReportParameter("pFirma1", "")) params.Add(New ReportParameter("pFirma1", ""))
params.Add(New ReportParameter("pFirma2", "")) params.Add(New ReportParameter("pFirma2", ""))
End If End If
params.Add(New ReportParameter("pFechaFin", String.Format("{0} al {1}", FechaI, FechaF))) params.Add(New ReportParameter("periodo", String.Format("de {0} {1}", DdlPeriodo.SelectedItem, DdlEjercicio.SelectedItem)))
params.Add(New ReportParameter("pFechaFin", FechaF))
ImprimirPDF("AC/Reportes/RepEstadoActividades.rdlc", lrds, params, "EstadoActividades", Formato) ImprimirPDF("AC/Reportes/RepEstadoActividades.rdlc", lrds, params, "EstadoActividades", Formato)
End Sub End Sub

View File

@@ -1325,6 +1325,12 @@
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="pFechaFin">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<rd:ReportUnitType>Cm</rd:ReportUnitType> <rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>163d4464-e41c-42b9-8827-487ff815b059</rd:ReportID> <rd:ReportID>163d4464-e41c-42b9-8827-487ff815b059</rd:ReportID>

View File

@@ -1300,7 +1300,8 @@ Public Class ClsBancos
Public Function AddBancos_IE(CveCuenta As Integer, CveTipoTransaccion As Integer, FechaDocumento As Date, Folio As String, PagueseA As String, Importe As Double, CveMoneda As Integer, TipoCambio As Double, Observaciones As String, Public Function AddBancos_IE(CveCuenta As Integer, CveTipoTransaccion As Integer, FechaDocumento As Date, Folio As String, PagueseA As String, Importe As Double, CveMoneda As Integer, TipoCambio As Double, Observaciones As String,
NotificarA As String, EsAbonoEnCuenta As Boolean, AplicaImpuestos As Boolean, IDPoliza As Integer, CvePrePoliza As Integer, Comprobante As String, CveUsuario As Integer, CveEmpresa As Integer, NotificarA As String, EsAbonoEnCuenta As Boolean, AplicaImpuestos As Boolean, IDPoliza As Integer, CvePrePoliza As Integer, Comprobante As String, CveUsuario As Integer, CveEmpresa As Integer,
Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1, Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1,
Optional Referencia As String = "-1", Optional CveIESustitucion As Integer = -1, Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False) As Integer Optional Referencia As String = "-1", Optional CveIESustitucion As Integer = -1, Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False,
Optional MesesSinIntereses As Integer = -1) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_Banc_IEAdd") DataAdapter("PA_Banc_IEAdd")
@@ -1334,6 +1335,7 @@ Public Class ClsBancos
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte .Add("@CveCorte", SqlDbType.Int).Value = CveCorte
.Add("@CveProveedorIntermediario", SqlDbType.Int).Value = CveProveedorIntermediario .Add("@CveProveedorIntermediario", SqlDbType.Int).Value = CveProveedorIntermediario
.Add("@FueConciliado", SqlDbType.Bit).Value = FueConciliado .Add("@FueConciliado", SqlDbType.Bit).Value = FueConciliado
.Add("@MesesSinIntereses", SqlDbType.Int).Value = MesesSinIntereses
.Add("@CveIE", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@CveIE", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@FolioRegistro", SqlDbType.VarChar, 50).Direction = ParameterDirection.Output .Add("@FolioRegistro", SqlDbType.VarChar, 50).Direction = ParameterDirection.Output

View File

@@ -1573,7 +1573,7 @@ Public Class ClsClientes
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@NumCuentaPago", SqlDbType.Int).Value = NumCuentaPago .Add("@NumCuentaPago", SqlDbType.VarChar).Value = NumCuentaPago
End With End With

View File

@@ -3741,7 +3741,7 @@ Public Class ClsContPAQi
StrSQL.Append(" ") StrSQL.Append(" ")
StrSQL.Append(" SELECT * ") StrSQL.Append(" SELECT * ")
StrSQL.Append(" FROM ( ") StrSQL.Append(" FROM ( ")
StrSQL.Append(" SELECT C.Id, C.Codigo, C.Nombre, C.Tipo, C.CtaMayor, '' AS Clasificacion, Ct.Nombre as Sup, Orden, D.Level, ") StrSQL.Append(" SELECT C.Id, C.Codigo, C.Nombre, C.Tipo, C.CtaMayor, '' AS Clasificacion, Ct.Nombre as Sup, Orden, D.Level, C.CtaMayor as TipoCuenta, ")
StrSQL.Append(" CASE WHEN C.Id = @IdCuentaAhorroDesahorro THEN @TotalActual ELSE ISNULL (dbo.FNC_TotalComplementaria(c.Id, @FechaI, @FechaF, @Tipo, @SegmentoNegocio), 0) END AS ImporteActual, ") StrSQL.Append(" CASE WHEN C.Id = @IdCuentaAhorroDesahorro THEN @TotalActual ELSE ISNULL (dbo.FNC_TotalComplementaria(c.Id, @FechaI, @FechaF, @Tipo, @SegmentoNegocio), 0) END AS ImporteActual, ")
StrSQL.Append(" CASE ") StrSQL.Append(" CASE ")
StrSQL.Append(" WHEN @Tipo < 0 THEN CASE WHEN C.Id = @IdCuentaAhorroDesahorro THEN @TotalAnterior ELSE ISNULL (dbo.FNC_TotalComplementaria(c.Id, @FechaI, DATEADD(yy,-1,@FechaF), @Tipo, @SegmentoNegocio), 0) END ") StrSQL.Append(" WHEN @Tipo < 0 THEN CASE WHEN C.Id = @IdCuentaAhorroDesahorro THEN @TotalAnterior ELSE ISNULL (dbo.FNC_TotalComplementaria(c.Id, @FechaI, DATEADD(yy,-1,@FechaF), @Tipo, @SegmentoNegocio), 0) END ")
@@ -3806,7 +3806,7 @@ Public Class ClsContPAQi
StrSQL.Append(" ") StrSQL.Append(" ")
StrSQL.Append(" SELECT * ") StrSQL.Append(" SELECT * ")
StrSQL.Append(" FROM ( ") StrSQL.Append(" FROM ( ")
StrSQL.Append(" SELECT C.Id, C.Codigo, C.Nombre, C.Tipo, C.CtaMayor, '' AS Clasificacion, Ct.Nombre as Sup, Orden, Level, ") StrSQL.Append(" SELECT C.Id, C.Codigo, C.Nombre, C.Tipo, C.CtaMayor, '' AS Clasificacion, Ct.Nombre as Sup, Orden, Level, C.CtaMayor as TipoCuenta, ")
StrSQL.Append(" CASE WHEN C.Id = @IdCuentaAhorroDesahorro THEN @TotalActual ELSE ISNULL (dbo.FNC_TotalComplementaria(c.Id, @FechaI, @FechaF, @Tipo, @SegmentoNegocio), 0) END AS ImporteActual, ") StrSQL.Append(" CASE WHEN C.Id = @IdCuentaAhorroDesahorro THEN @TotalActual ELSE ISNULL (dbo.FNC_TotalComplementaria(c.Id, @FechaI, @FechaF, @Tipo, @SegmentoNegocio), 0) END AS ImporteActual, ")
StrSQL.Append(" CASE ") StrSQL.Append(" CASE ")
StrSQL.Append(" WHEN @Tipo < 0 AND @UsaAnterior > 0 THEN CASE WHEN C.Id = @IdCuentaAhorroDesahorro THEN @TotalAnterior ELSE ISNULL (dbo.FNC_TotalComplementaria(c.Id, DATEADD(yyyy,-1,@FechaI), DATEADD(yyyy,-1,@FechaF), @Tipo, @SegmentoNegocio), 0) END ") StrSQL.Append(" WHEN @Tipo < 0 AND @UsaAnterior > 0 THEN CASE WHEN C.Id = @IdCuentaAhorroDesahorro THEN @TotalAnterior ELSE ISNULL (dbo.FNC_TotalComplementaria(c.Id, DATEADD(yyyy,-1,@FechaI), DATEADD(yyyy,-1,@FechaF), @Tipo, @SegmentoNegocio), 0) END ")

View File

@@ -1,5 +1,5 @@
<%@ WebHandler Language="VB" Class="SIGWeb" %> <%@ WebHandler Language="VB" Class="SIGWeb" %>
Imports System Imports System
Imports System.Web Imports System.Web
Imports System.Data Imports System.Data
@@ -79,10 +79,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If End If
End If End If
End Sub End Sub
#Region "File" #Region "File"
Private Sub Downfile(ByVal context As HttpContext) Private Sub Downfile(ByVal context As HttpContext)
Dim savepath As String = "" Dim savepath As String = ""
Dim tempPath As String = "" Dim tempPath As String = ""
@@ -133,9 +133,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If End If
context.Response.Write(tick) context.Response.Write(tick)
context.Response.StatusCode = 200 context.Response.StatusCode = 200
End Sub End Sub
#End Region #End Region
#Region "Get Cliente" #Region "Get Cliente"
Private Function GetClientes(ByVal context As HttpContext) As String Private Function GetClientes(ByVal context As HttpContext) As String
Dim retorno As String = "" Dim retorno As String = ""
@@ -164,9 +164,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If End If
Return retorno Return retorno
End Function End Function
#End Region #End Region
#Region "Get Proveedor" #Region "Get Proveedor"
Private Function GetProveedores(ByVal context As HttpContext) As String Private Function GetProveedores(ByVal context As HttpContext) As String
Dim retorno As String = "" Dim retorno As String = ""
@@ -195,10 +195,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If End If
Return retorno Return retorno
End Function End Function
#End Region #End Region
#Region " GET PS " #Region " GET PS "
Private Function getpsalmacen(ByVal context As HttpContext) As String Private Function getpsalmacen(ByVal context As HttpContext) As String
@@ -219,7 +219,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Dim CvePS = IfNull(context.Request("cveps"), "0").ToString.ToEntero Dim CvePS = IfNull(context.Request("cveps"), "0").ToString.ToEntero
Dim objInv As New ClsInventarios Dim objInv As New ClsInventarios
If objInv.GetExistenciasProducto(CvePS, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then If objInv.GetExistenciasPS(CvePS, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then
' limpio los almacenes donde no tiene ningun producto existencia ' limpio los almacenes donde no tiene ningun producto existencia
For i = objInv.DtResultados.Columns.Count - 1 To 1 Step -1 For i = objInv.DtResultados.Columns.Count - 1 To 1 Step -1
@@ -285,19 +285,28 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa) Then If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa) Then
' limpio los almacenes donde no tiene ningun producto existencia ' limpio los almacenes donde no tiene ningun producto existencia
For i = objInv.DtResultados.Columns.Count - 1 To 1 Step -1 For i = objInv.DtResultados.Columns.Count - 1 To 1 Step -1
If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CvePS", "PSCodigo", "PSCodigoClasificacion") AndAlso objInv.DtResultados.SUM(String.Format("[{0}]", objInv.DtResultados.Columns(i).ColumnName)) = 0 Then If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CvePS", "PSCodigo", "PSCodigoClasificacion") AndAlso objInv.DtResultados.SUM(String.Format("[{0}]", objInv.DtResultados.Columns(i).ColumnName)) = 0 Then
objInv.DtResultados.Columns.RemoveAt(i) objInv.DtResultados.Columns.RemoveAt(i)
End If End If
Next Next
DtPSRetorno = objInv.DtResultados DtPSRetorno = objInv.DtResultados
End If End If
objInv.Dispose() objInv.Dispose()
End If
If usuario.Empresa.Funcionalidad(558) = 1 Then
Try
Dim NobreFiltroColumna As String = DtPSRetorno.Columns(3).ColumnName
DtPSRetorno = DtPSRetorno.FiltraParametros($"{NobreFiltroColumna} > 0")
Catch ex As Exception
End Try
End If End If
If UsaGlobal Then If UsaGlobal Then
@@ -386,19 +395,19 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If End If
Return retorno Return retorno
End Function End Function
#End Region #End Region
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
Get Get
Return False Return False
End Get End Get
End Property End Property
#Region "Funciones" #Region "Funciones"
Public Function GetJson(ByVal dt As DataTable) As String Public Function GetJson(ByVal dt As DataTable) As String
@@ -419,10 +428,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Get Get
UsuarioActual = DirectCast(context.Session("UsuarioSIG"), Usuario) UsuarioActual = DirectCast(context.Session("UsuarioSIG"), Usuario)
End Get End Get
End Property End Property
#End Region #End Region
#Region " GET PS SAT " #Region " GET PS SAT "
Private Function GETPSSAT(ByVal context As HttpContext) As String Private Function GETPSSAT(ByVal context As HttpContext) As String
Dim retorno As String = "" Dim retorno As String = ""
@@ -448,10 +457,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If End If
DtPSRetorno.Dispose() DtPSRetorno.Dispose()
Return retorno Return retorno
End Function End Function
#End Region #End Region
#Region " GET UM SAT " #Region " GET UM SAT "
Private Function GETUMSAT(ByVal context As HttpContext) As String Private Function GETUMSAT(ByVal context As HttpContext) As String
Dim retorno As String = "" Dim retorno As String = ""
@@ -476,9 +485,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
context.Response.Write("[]") context.Response.Write("[]")
End If End If
Return retorno Return retorno
End Function End Function
#End Region #End Region
#Region " GET FRACCION ARANCELARIA " #Region " GET FRACCION ARANCELARIA "
Private Function GetFraccionArancelaria(ByVal context As HttpContext) As String Private Function GetFraccionArancelaria(ByVal context As HttpContext) As String
Dim retorno As String = "" Dim retorno As String = ""
@@ -504,12 +513,12 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If End If
DtRetorno.Dispose() DtRetorno.Dispose()
Return retorno Return retorno
End Function End Function
#End Region #End Region
#Region "USADOS" #Region "USADOS"
Private Function GETPSUSADOS(ByVal context As HttpContext) As String Private Function GETPSUSADOS(ByVal context As HttpContext) As String
Dim retorno As String = "" Dim retorno As String = ""
Dim DtPSRetorno As DataTable = Nothing Dim DtPSRetorno As DataTable = Nothing
@@ -599,9 +608,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If End If
Return retorno Return retorno
End Function End Function
#End Region #End Region
End Class End Class

View File

@@ -2294,7 +2294,7 @@
</asp:RadioButtonList></td> </asp:RadioButtonList></td>
</tr> </tr>
<tr id="TrRembolsoNumero" runat="server" visible="False"> <tr id="TrRembolsoNumero" runat="server" visible="False">
<td>#<asp:TextBox ID="TxtRembolsoNumero" Width="30px" runat="server"></asp:TextBox></td> <td>#<asp:TextBox ID="TxtRembolsoNumero" Width="80px" runat="server"></asp:TextBox></td>
</tr> </tr>
<tr id="TrRembolsoCajaChica" runat="server" visible="False"> <tr id="TrRembolsoCajaChica" runat="server" visible="False">
<td> <td>
@@ -5556,10 +5556,13 @@
function CalculaTotalOCEdit(PS, CantidadOriginal, TxtCantidad, TxtPU, TxtTotal, IEPSOriginal, HdnIEPS, IVAOriginal, HdnIVA, RetIVAOriginal, HdnRetIVA, RetISROriginal, HdnRetISR, IEPSIVAOriginal, HdnIEPSIVA, DescuentoOriginal, HdnDescuento, IVAPorcentaje, RetIVAPorcentaje, RetISRPorcentaje, IEPSPSPorcentaje, IEPSPSIVAPorcentaje) { function CalculaTotalOCEdit(PS, CantidadOriginal, TxtCantidad, TxtPU, TxtTotal, IEPSOriginal, HdnIEPS, IVAOriginal, HdnIVA, RetIVAOriginal, HdnRetIVA, RetISROriginal, HdnRetISR, IEPSIVAOriginal, HdnIEPSIVA, DescuentoOriginal, HdnDescuento, IVAPorcentaje, RetIVAPorcentaje, RetISRPorcentaje, IEPSPSPorcentaje, IEPSPSIVAPorcentaje) {
//var Proporcional = ((ToDouble(TxtCantidad.value) * 100) / CantidadOriginal) / 100; //var Proporcional = ((ToDouble(TxtCantidad.value) * 100) / CantidadOriginal) / 100;
HdnDescuento.value = ToDouble(DescuentoOriginal * ToDouble(TxtCantidad.value) / CantidadOriginal); HdnDescuento.value = ToDouble(DescuentoOriginal * ToDouble(TxtCantidad.value) / CantidadOriginal);
if (IEPSOriginal > 0) { if (true) {
HdnIEPS.value = ToDouble(IEPSPSPorcentaje * (ToDouble(TxtCantidad.value) * ToDouble(TxtPU.value) - ToDouble(HdnDescuento.value))); HdnIEPS.value = ToDouble(IEPSPSPorcentaje * (ToDouble(TxtCantidad.value) * ToDouble(TxtPU.value) - ToDouble(HdnDescuento.value)));
} }
if (IVAOriginal > 0) { if (IVAOriginal > 0) {
HdnIVA.value = ToDouble(IVAPorcentaje * (ToDouble(TxtCantidad.value) * ToDouble(TxtPU.value) - ToDouble(HdnDescuento.value))); HdnIVA.value = ToDouble(IVAPorcentaje * (ToDouble(TxtCantidad.value) * ToDouble(TxtPU.value) - ToDouble(HdnDescuento.value)));
} }

View File

@@ -416,6 +416,22 @@ Partial Class Compras_Compras
ViewState("CveCuentaBancaria") = value ViewState("CveCuentaBancaria") = value
End Set End Set
End Property End Property
Private Property IdCuentaBancariaComplementaria As Integer
Get
Return ViewState("IdCuentaBancariaComplementaria").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("IdCuentaBancariaComplementaria") = value
End Set
End Property
Private Property CveCuentaBancariaComplementaria As Integer
Get
Return ViewState("CveCuentaBancariaComplementaria").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveCuentaBancariaComplementaria") = value
End Set
End Property
Private Property IvaAcumulado As Double Private Property IvaAcumulado As Double
Get Get
Return ViewState("IvaAcumulado").ToString.ToDouble Return ViewState("IvaAcumulado").ToString.ToDouble
@@ -1126,6 +1142,9 @@ Partial Class Compras_Compras
CveCuentaBancaria = 0 CveCuentaBancaria = 0
End If End If
IdCuentaBancariaComplementaria = 0
CveCuentaBancariaComplementaria = 0
'If UsuarioActual.TienePermisoProceso(259) Then 'If UsuarioActual.TienePermisoProceso(259) Then
DivEsNoDeducible.Visible = True DivEsNoDeducible.Visible = True
'End If 'End If
@@ -4164,14 +4183,47 @@ Partial Class Compras_Compras
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
'seria de contado, solo cuando no tenga vinculado ningun anticipo 'seria de contado, solo cuando no tenga vinculado ningun anticipo
Dim ImportePago As Decimal = 0
Dim TCPago As Decimal = GlobalTipoCambio(TxtFechaPago.Text.ToDate).ToString.ToDecimal
Dim CveMonedaPago As Integer = DdlMoneda.SelectedValue.ToEntero
If RBLPago.SelectedValue.ToEntero = 2 AndAlso ArrAnticipos.Count = 0 Then 'Contado If RBLPago.SelectedValue.ToEntero = 2 AndAlso ArrAnticipos.Count = 0 Then 'Contado
If RBLContado.SelectedValue = "1" Then If RBLContado.SelectedValue = "1" Then
ImportePago = TxtDocumentoImporte.Text.Trim.ToDecimal
Dim Dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros($"CveCuenta = {DdlCuenta.SelectedValue}").Rows(0)
If Dr IsNot Nothing Then
CveMonedaPago = Dr("CveMoneda").ToString.ToEntero
End If
If CveMonedaPago = 1 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then
ImportePago = (ImportePago * TCPago).RoundSQL
ElseIf CveMonedaPago = 2 AndAlso DdlMoneda.SelectedValue.ToEntero = 1 Then
ImportePago = (ImportePago / TCPago).RoundSQL
ElseIf CveMonedaPago = 1 AndAlso DdlMoneda.SelectedValue.ToEntero = 1 Then
TCPago = 1
End If
'se registra primero el movimiento en bancos para luego vincularlo en la compra 'se registra primero el movimiento en bancos para luego vincularlo en la compra
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaPago.Text.Trim.ToDate, TxtDocumentoFolio.Text.Trim, DdlProveedor.SelectedItem.Text.Trim, TxtDocumentoImporte.Text.Trim.ToDouble, DdlMoneda.SelectedValue.ToEntero, 0.0, TxtDocumentoObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1)) CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaPago.Text.Trim.ToDate, TxtDocumentoFolio.Text.Trim, DdlProveedor.SelectedItem.Text.Trim, ImportePago, CveMonedaPago, TCPago, TxtDocumentoObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1))
ElseIf RBLContado.SelectedValue = "6" Then ElseIf RBLContado.SelectedValue = "6" Then
ImportePago = TxtDocumentoImporteCaja.Text.Trim.ToDecimal
Dim Dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros($"CveCuenta = {DdlCuentaCaja.SelectedValue}").Rows(0)
If Dr IsNot Nothing Then
CveMonedaPago = Dr("CveMoneda").ToString.ToEntero
End If
If CveMonedaPago = 1 AndAlso DdlMoneda.SelectedValue.ToEntero = 2 Then
ImportePago = (ImportePago * TCPago).RoundSQL
ElseIf CveMonedaPago = 2 AndAlso DdlMoneda.SelectedValue.ToEntero = 1 Then
ImportePago = (ImportePago / TCPago).RoundSQL
ElseIf CveMonedaPago = 1 AndAlso DdlMoneda.SelectedValue.ToEntero = 1 Then
TCPago = 1
End If
'se registra primero el movimiento en bancos para luego vincularlo en la compra 'se registra primero el movimiento en bancos para luego vincularlo en la compra
CveIE = ObjIE.AddBancos_IE(DdlCuentaCaja.SelectedValue.ToEntero, DdlTipoTransaccionCaja.SelectedValue.ToEntero, TxtFechaPago.Text.Trim.ToDate, TxtDocumentoFolioCaja.Text.Trim, DdlProveedor.SelectedItem.Text.Trim, TxtDocumentoImporteCaja.Text.Trim.ToDouble, DdlMoneda.SelectedValue.ToEntero, 0.0, TxtDocumentoObservacionesCaja.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) CveIE = ObjIE.AddBancos_IE(DdlCuentaCaja.SelectedValue.ToEntero, DdlTipoTransaccionCaja.SelectedValue.ToEntero, TxtFechaPago.Text.Trim.ToDate, TxtDocumentoFolioCaja.Text.Trim, DdlProveedor.SelectedItem.Text.Trim, ImportePago, CveMonedaPago, TCPago, TxtDocumentoObservacionesCaja.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
End If End If
If (RBLContado.SelectedValue = "1" OrElse RBLContado.SelectedValue = "6") AndAlso Not CveIE > 0 Then If (RBLContado.SelectedValue = "1" OrElse RBLContado.SelectedValue = "6") AndAlso Not CveIE > 0 Then
@@ -4225,6 +4277,9 @@ Partial Class Compras_Compras
If OCVinculada And Not (CveImportacion > 0 Or CveFlete > 0) Then If OCVinculada And Not (CveImportacion > 0 Or CveFlete > 0) Then
CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
End If End If
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
CveConceptoContableAlmacen = 205
End If
Else Else
CveConceptoContableAlmacen = 225 CveConceptoContableAlmacen = 225
End If End If
@@ -5212,7 +5267,6 @@ Partial Class Compras_Compras
Dim PorcentajePagos As Decimal = 0 Dim PorcentajePagos As Decimal = 0
Dim sumaPagos As Decimal = 0 Dim sumaPagos As Decimal = 0
Dim tipoCambioActual As Decimal Dim tipoCambioActual As Decimal
Dim tipoCambioPago As Decimal
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>" Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
Dim idCuentaContabilizacion As Long = 1 Dim idCuentaContabilizacion As Long = 1
Dim CveCuentaContabilizacion As Long = 1 Dim CveCuentaContabilizacion As Long = 1
@@ -5365,13 +5419,19 @@ Partial Class Compras_Compras
'************************************************************************************************************************** '**************************************************************************************************************************
Dim TipoCambioCompra As Decimal = 1
TipoCambioCompra = GlobalTipoCambio(FechaMovimiento).ToString.ToDecimal
TipoCambioCompra = If(DivTC.Visible, TipoCambio.ToDecimal, TipoCambioCompra)
If CveMonedaPago = 1 AndAlso DdlMoneda.SelectedValue.ToEntero = 1 Then
TipoCambioCompra = 1
End If
If DdlMoneda.SelectedValue.ToString.ToEntero = 2 Then If DdlMoneda.SelectedValue.ToString.ToEntero = 2 Then
tipoCambioActual = GlobalTipoCambio(FechaMovimiento).ToString.ToDecimal tipoCambioActual = GlobalTipoCambio(FechaMovimiento).ToString.ToDecimal
tipoCambioActual = If(DivTC.Visible, TipoCambio.ToDecimal, tipoCambioActual) tipoCambioActual = If(DivTC.Visible, TipoCambio.ToDecimal, tipoCambioActual)
tipoCambioPago = GlobalTipoCambio(TxtFechaPago.Text.ToDate).ToString.ToDecimal
Else Else
tipoCambioActual = 1 tipoCambioActual = 1
tipoCambioPago = 1
End If End If
'CASO ESPECIAL CREDITOS 'CASO ESPECIAL CREDITOS
@@ -5409,7 +5469,10 @@ Partial Class Compras_Compras
Case 17 'Pago Proveedores Case 17 'Pago Proveedores
importeMovimiento = importePagoProv importeMovimiento = importePagoProv
importeMN = importeMovimiento * tipoCambioActual * Multiplicador If CveMonedaPago = 2 AndAlso DdlMoneda.SelectedValue.ToEntero = 1 Then
importeMovimiento = importeMovimiento / TipoCambioCompra
End If
importeMN = importeMovimiento * TipoCambioCompra * Multiplicador
IdCtaContable = CtaProveedor IdCtaContable = CtaProveedor
CveCuenta = CveCuentaProveedor CveCuenta = CveCuentaProveedor
@@ -5506,9 +5569,9 @@ Partial Class Compras_Compras
End If End If
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" If TipoCambioCompra > 1 Then Concepto += $" TC:{TipoCambioCompra} ${importeMovimiento.FormatoNumero(2)}"
If tipoCambioActual = 1 Then If TipoCambioCompra = 1 Then
IdCtaContable = CtaProveedor IdCtaContable = CtaProveedor
CveCuenta = CveCuentaProveedor CveCuenta = CveCuentaProveedor
Else Else
@@ -5516,7 +5579,7 @@ Partial Class Compras_Compras
CveCuenta = CveCuentaProveedorComplementaria CveCuenta = CveCuentaProveedorComplementaria
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0) Then 'Cuando tiene complementaria lo dividimos en dos If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0) Then 'Cuando tiene complementaria lo dividimos en dos
importeMN = importeMovimiento importeMN = importeMovimiento
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, 201, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, 201, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * TipoCambioCompra - importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=TipoCambioCompra) Then
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
End If End If
@@ -5527,11 +5590,30 @@ Partial Class Compras_Compras
Case 30 'Bancos Case 30 'Bancos
importeMovimiento = importeBanco + importeCajaChica 'Uno de los dos debe ser 0 importeMovimiento = importeBanco + importeCajaChica 'Uno de los dos debe ser 0
importeMN = importeMovimiento * tipoCambioPago * Multiplicador If CveMonedaPago = 2 AndAlso DdlMoneda.SelectedValue.ToEntero = 1 Then
IdCtaContable = IdCuentaBancaria importeMovimiento = importeMovimiento / TCPago
CveCuenta = CveCuentaBancaria End If
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioPago} ${importeMovimiento.FormatoNumero(2)}" importeMN = importeMovimiento * TCPago * Multiplicador
'' falta complementaria
If TCPago > 1 Then Concepto += $" TC:{TCPago} ${importeMovimiento.FormatoNumero(2)}"
If TCPago = 1 Then
IdCtaContable = IdCuentaBancaria
CveCuenta = CveCuentaBancaria
Else
IdCtaContable = IdCuentaBancariaComplementaria
CveCuenta = CveCuentaBancariaComplementaria
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0) Then 'Cuando tiene complementaria lo dividimos en dos
importeMN = importeMovimiento
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, 201, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * TCPago - importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=TCPago) Then
ErrorPrepoliza = True
End If
End If
IdCtaContable = IdCuentaBancaria
CveCuenta = CveCuentaBancaria
End If
Case 19 'IVA Acreditable Case 19 'IVA Acreditable
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
@@ -5544,7 +5626,7 @@ Partial Class Compras_Compras
importeMovimiento = importeIVAAcreditable importeMovimiento = importeIVAAcreditable
End If End If
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
PorcentajeImpuesto = PorcentajeIVA PorcentajeImpuesto = PorcentajeIVA
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0) IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
@@ -5574,7 +5656,7 @@ Partial Class Compras_Compras
End If End If
End If End If
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioPago} ${importeMovimiento.FormatoNumero(2)}" If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
Case 14 'IVA X Acreditar Case 14 'IVA X Acreditar
importeMovimiento = importeIVAxAcreditar importeMovimiento = importeIVAxAcreditar
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
@@ -5611,7 +5693,7 @@ Partial Class Compras_Compras
Case 26 'IEPS Acreditable Case 26 'IEPS Acreditable
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
importeMovimiento = ImporteIEPSAcreditable importeMovimiento = ImporteIEPSAcreditable
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
@@ -5635,7 +5717,7 @@ Partial Class Compras_Compras
End If End If
End If End If
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioPago} ${importeMovimiento.FormatoNumero(2)}" If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
End If End If
Case 22 'RetIVA Acreditable Honorarios/Serv. Prof. Case 22 'RetIVA Acreditable Honorarios/Serv. Prof.
@@ -5643,7 +5725,7 @@ Partial Class Compras_Compras
If DdlRetIVAConcepto.Items.Count > 0 Then If DdlRetIVAConcepto.Items.Count > 0 Then
If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then
importeMovimiento = importeRetIVAAcreditable importeMovimiento = importeRetIVAAcreditable
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
If CtaProveedorRetIVA > 0 Then If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA IdCtaContable = CtaProveedorRetIVA
CveCuenta = CveCuentaProveedorRetIVA CveCuenta = CveCuentaProveedorRetIVA
@@ -5665,7 +5747,7 @@ Partial Class Compras_Compras
End If End If
End If End If
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioPago} ${importeMovimiento.FormatoNumero(2)}" If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
End If End If
End If End If
End If End If
@@ -5697,7 +5779,7 @@ Partial Class Compras_Compras
If DdlRetIVAConcepto.Items.Count > 0 Then If DdlRetIVAConcepto.Items.Count > 0 Then
If DdlRetIVAConcepto.SelectedValue.ToEntero = 2 Then If DdlRetIVAConcepto.SelectedValue.ToEntero = 2 Then
importeMovimiento = importeRetIVAAcreditable importeMovimiento = importeRetIVAAcreditable
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
If CtaProveedorRetIVA > 0 Then If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA IdCtaContable = CtaProveedorRetIVA
CveCuenta = CveCuentaProveedorRetIVA CveCuenta = CveCuentaProveedorRetIVA
@@ -5719,7 +5801,7 @@ Partial Class Compras_Compras
End If End If
End If End If
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioPago} ${importeMovimiento.FormatoNumero(2)}" If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
End If End If
End If End If
End If End If
@@ -5773,7 +5855,7 @@ Partial Class Compras_Compras
If DdlRetIVAConcepto.Items.Count > 0 Then If DdlRetIVAConcepto.Items.Count > 0 Then
If DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then If DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then
importeMovimiento = importeRetIVAAcreditable importeMovimiento = importeRetIVAAcreditable
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
If CtaProveedorRetIVA > 0 Then If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA IdCtaContable = CtaProveedorRetIVA
CveCuenta = CveCuentaProveedorRetIVA CveCuenta = CveCuentaProveedorRetIVA
@@ -5795,7 +5877,7 @@ Partial Class Compras_Compras
End If End If
End If End If
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioPago} ${importeMovimiento.FormatoNumero(2)}" If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
End If End If
End If End If
End If End If
@@ -5826,7 +5908,7 @@ Partial Class Compras_Compras
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then
importeMovimiento = importeRetIVAAcreditable importeMovimiento = importeRetIVAAcreditable
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
If CtaProveedorRetIVA > 0 Then If CtaProveedorRetIVA > 0 Then
IdCtaContable = CtaProveedorRetIVA IdCtaContable = CtaProveedorRetIVA
CveCuenta = CveCuentaProveedorRetIVA CveCuenta = CveCuentaProveedorRetIVA
@@ -5841,7 +5923,7 @@ Partial Class Compras_Compras
End If End If
End If End If
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioPago} ${importeMovimiento.FormatoNumero(2)}" If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
End If End If
End If End If
@@ -5849,7 +5931,7 @@ Partial Class Compras_Compras
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 1 Then If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 1 Then
importeMovimiento = importeRetISRAcreditable importeMovimiento = importeRetISRAcreditable
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
If CtaProveedorRetISR > 0 Then If CtaProveedorRetISR > 0 Then
IdCtaContable = CtaProveedorRetISR IdCtaContable = CtaProveedorRetISR
CveCuenta = CveCuentaProveedorRetISR CveCuenta = CveCuentaProveedorRetISR
@@ -5871,7 +5953,7 @@ Partial Class Compras_Compras
End If End If
End If End If
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioPago} ${importeMovimiento.FormatoNumero(2)}" If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
End If End If
End If End If
Case 16 'Ret ISR X Acreditar Case 16 'Ret ISR X Acreditar
@@ -5899,7 +5981,7 @@ Partial Class Compras_Compras
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then
importeMovimiento = importeRetISRxAcreditar importeMovimiento = importeRetISRxAcreditar
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
If CtaProveedorRetISR > 0 Then If CtaProveedorRetISR > 0 Then
IdCtaContable = CtaProveedorRetISR IdCtaContable = CtaProveedorRetISR
CveCuenta = CveCuentaProveedorRetISR CveCuenta = CveCuentaProveedorRetISR
@@ -5914,14 +5996,14 @@ Partial Class Compras_Compras
End If End If
End If End If
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioPago} ${importeMovimiento.FormatoNumero(2)}" If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
End If End If
End If End If
Case 244 'RetISR Acreditable Terceros y Arrendamiento Case 244 'RetISR Acreditable Terceros y Arrendamiento
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then
importeMovimiento = importeRetISRAcreditable importeMovimiento = importeRetISRAcreditable
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
If CtaProveedorRetISR > 0 Then If CtaProveedorRetISR > 0 Then
IdCtaContable = CtaProveedorRetISR IdCtaContable = CtaProveedorRetISR
CveCuenta = CveCuentaProveedorRetISR CveCuenta = CveCuentaProveedorRetISR
@@ -5941,18 +6023,18 @@ Partial Class Compras_Compras
ErrorPrepoliza = True ErrorPrepoliza = True
End If End If
End If End If
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioPago} ${importeMovimiento.FormatoNumero(2)}" If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
End If End If
End If End If
Case 64 'Ganancia Case 64 'Ganancia
If tipoCambioActual <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then If TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
If tipoCambioPago < tipoCambioActual Then If TCPago < TipoCambioCompra Then
importeMovimiento = Math.Abs(tipoCambioPago - tipoCambioActual) * importePagoProv importeMovimiento = Math.Abs(TCPago - TipoCambioCompra) * importePagoProv
importeMovimiento -= Math.Abs(tipoCambioPago - tipoCambioActual) * importeIVAAcreditable importeMovimiento -= Math.Abs(TCPago - TipoCambioCompra) * importeIVAAcreditable
importeMovimiento += Math.Abs(tipoCambioPago - tipoCambioActual) * importeRetIVAAcreditable importeMovimiento += Math.Abs(TCPago - TipoCambioCompra) * importeRetIVAAcreditable
importeMovimiento += Math.Abs(tipoCambioPago - tipoCambioActual) * importeRetISRAcreditable importeMovimiento += Math.Abs(TCPago - TipoCambioCompra) * importeRetISRAcreditable
importeMN = importeMovimiento importeMN = importeMovimiento
End If End If
Else Else
@@ -5960,14 +6042,14 @@ Partial Class Compras_Compras
End If End If
Case 65 'Perdida Case 65 'Perdida
If tipoCambioActual <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then If TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
If tipoCambioActual < tipoCambioPago Then If TCPago < TipoCambioCompra Then
importeMovimiento = Math.Abs(tipoCambioPago - tipoCambioActual) * importePagoProv importeMovimiento = Math.Abs(TCPago - TipoCambioCompra) * importePagoProv
importeMovimiento -= Math.Abs(tipoCambioPago - tipoCambioActual) * importeIVAAcreditable importeMovimiento -= Math.Abs(TCPago - TipoCambioCompra) * importeIVAAcreditable
importeMovimiento += Math.Abs(tipoCambioPago - tipoCambioActual) * importeRetIVAAcreditable importeMovimiento += Math.Abs(TCPago - TipoCambioCompra) * importeRetIVAAcreditable
importeMovimiento += Math.Abs(tipoCambioPago - tipoCambioActual) * importeRetISRAcreditable importeMovimiento += Math.Abs(TCPago - TipoCambioCompra) * importeRetISRAcreditable
importeMN = importeMovimiento importeMN = importeMovimiento
End If End If
Else Else
@@ -6196,6 +6278,7 @@ Partial Class Compras_Compras
End If End If
Dim RegistroCuentaPuente As Boolean = False
'NC CON PRODUCTOS - CUENTA PUENTE 'NC CON PRODUCTOS - CUENTA PUENTE
If UsuarioActual.CveEmpresa.Contiene(119) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then If UsuarioActual.CveEmpresa.Contiene(119) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
@@ -6213,6 +6296,7 @@ Partial Class Compras_Compras
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}" Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
If importeMovimiento > 0 Or TxtTotal.Text.ToDecimal = 0 Then If importeMovimiento > 0 Or TxtTotal.Text.ToDecimal = 0 Then
RegistroCuentaPuente = True
'Conta ContPAQ 'Conta ContPAQ
If IdCtaContable = 0 Then If IdCtaContable = 0 Then
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString) CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 68))("ConceptoContable").ToString)
@@ -6255,7 +6339,7 @@ Partial Class Compras_Compras
If Not ChkNCInvNC.Checked OrElse Not ListaDocumentos.Count > 0 Then If Not ChkNCInvNC.Checked OrElse Not RegistroCuentaPuente Then
'GASTO 'GASTO
If UsuarioActual.CveEmpresa = 119 Then If UsuarioActual.CveEmpresa = 119 Then
DT = TmpDT DT = TmpDT
@@ -6494,7 +6578,7 @@ Partial Class Compras_Compras
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
IdCtaContable = CtaProveedorComplementaria IdCtaContable = CtaProveedorComplementaria
CveCuenta = CveCuentaProveedorComplementaria CveCuenta = CveCuentaProveedorComplementaria
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMN - importeMovimiento, Referencia, 234, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMN - importeMovimiento, Referencia, 234, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then
ErrorPrepoliza = True ErrorPrepoliza = True
Exit Select Exit Select
End If End If
@@ -11097,12 +11181,12 @@ Partial Class Compras_Compras
Private Sub CargaCuentas() Private Sub CargaCuentas()
DdlCuenta.Items.Clear() DdlCuenta.Items.Clear()
DdlCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", DdlMoneda.SelectedValue)) DdlCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveTipoCuenta <> 1"))
DdlCuenta.DataBind() DdlCuenta.DataBind()
DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlCuentaCaja.Items.Clear() DdlCuentaCaja.Items.Clear()
DdlCuentaCaja.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", DdlMoneda.SelectedValue)) DdlCuentaCaja.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveTipoCuenta = 1"))
DdlCuentaCaja.DataBind() DdlCuentaCaja.DataBind()
DdlCuentaCaja.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlCuentaCaja.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub End Sub
@@ -11881,6 +11965,8 @@ Partial Class Compras_Compras
CveMoneda = dr("CveMoneda").ToString.ToEntero CveMoneda = dr("CveMoneda").ToString.ToEntero
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
IdCuentaBancariaComplementaria = dr("IdCtaContableComplementaria").ToString.ToEntero
CveCuentaBancariaComplementaria = dr("IdCtaContableSIGComplementaria").ToString.ToEntero
If dr("UsaTarjeta").ToString = "True" Then If dr("UsaTarjeta").ToString = "True" Then
CargaGridTarjetas() CargaGridTarjetas()
Else Else

View File

@@ -190,6 +190,7 @@ Partial Class Compras_RepRembolsoComprobaciones
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
If ObjMov.ValorPolizaDescuadre > 0 Then If ObjMov.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Compras/RepRembolsoComprobaciones - Unificar | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") GuardaLogAD($"Compras/RepRembolsoComprobaciones - Unificar | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
Alert(ObjMov.MensajePolizaDescuadre, TipoMensaje.MsgError)
TieneError = True TieneError = True
End If End If
End If End If

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -119,7 +119,7 @@ Partial Class Inventarios_KardexAlmacen
'End If 'End If
End Sub End Sub
Private Function CargarKardex(CvePS As Integer) As DataTable Private Sub CargarKardex(CvePS As Integer)
Dim dt As DataTable = Nothing Dim dt As DataTable = Nothing
Dim ObjMovimientos As New ClsInventarios Dim ObjMovimientos As New ClsInventarios
Dim FechaI As String = "-1" ' If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1") Dim FechaI As String = "-1" ' If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
@@ -132,7 +132,7 @@ Partial Class Inventarios_KardexAlmacen
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
dt = ObjMovimientos.DtResultados dt = ObjMovimientos.DtResultados
Dim ListaBorrar As New List(Of DataColumn) Dim ListaBorrar As New List(Of DataColumn)
For index = 2 To dt.Columns.Count - 1 For index = 3 To dt.Columns.Count - 1
Dim TotColumna As Double = 0 Dim TotColumna As Double = 0
For Each Dr As DataRow In dt.Rows For Each Dr As DataRow In dt.Rows
TotColumna += Dr.Item(index).ToString.ToDouble TotColumna += Dr.Item(index).ToString.ToDouble
@@ -149,25 +149,22 @@ Partial Class Inventarios_KardexAlmacen
Else Else
Alert("La búsqueda no contiene resultados.", TipoMensaje.MsgAdvertencia) Alert("La búsqueda no contiene resultados.", TipoMensaje.MsgAdvertencia)
GvDatos.Columns.Clear() GvDatos.Columns.Clear()
dt = Nothing dt = Nothing
Return dt Exit Sub
Exit Function
End If End If
Else Else
ObjMovimientos.Dispose() ObjMovimientos.Dispose()
Alert("Ocurrió un error al consultar el Kardex.", TipoMensaje.MsgError) Alert("Ocurrió un error al consultar el Kardex.", TipoMensaje.MsgError)
Exit Function Exit Sub
End If End If
GvDatos.DataBind() GvDatos.DataBind()
For index = 3 To GvDatos.Rows(0).Cells.Count - 1 For index = 4 To GvDatos.Rows(0).Cells.Count - 1
GvDatos.HeaderRow.Cells(index).Text = GvDatos.HeaderRow.Cells(index).Text.Split("|")(0) GvDatos.HeaderRow.Cells(index).Text = GvDatos.HeaderRow.Cells(index).Text.Split("|")(0)
Next Next
End Sub
Return dt
End Function
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
@@ -179,7 +176,8 @@ Partial Class Inventarios_KardexAlmacen
e.Row.CssClass = "Totales" e.Row.CssClass = "Totales"
End If End If
e.Row.HorizontalAlign = HorizontalAlign.Right e.Row.HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left
Dim Index As Integer = 0 Dim Index As Integer = 0
@@ -188,7 +186,7 @@ Partial Class Inventarios_KardexAlmacen
Dim Celda As String = Cells.Text Dim Celda As String = Cells.Text
If IsNumeric(Celda) Then If IsNumeric(Celda) Then
Dim CveAlmacen2 As Integer = -1 Dim CveAlmacen2 As Integer = -1
If Index >= 4 Then If Index >= 5 Then
Dim Array = GvDatos.HeaderRow.Cells(Index).Text.Split("|") Dim Array = GvDatos.HeaderRow.Cells(Index).Text.Split("|")
If Array.Length > 1 Then If Array.Length > 1 Then
CveAlmacen2 = Array(1) CveAlmacen2 = Array(1)
@@ -225,10 +223,10 @@ Partial Class Inventarios_KardexAlmacen
Private Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated Private Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated
'Escondo CvePS y CveAlmacén (Se generan por autogeneratecolumns por eso se borran por aqui). 'Escondo CvePS y CveAlmacén (Se generan por autogeneratecolumns por eso se borran por aqui).
' e.Row.Cells(0).Width = New Unit("200px") ' e.Row.Cells(0).Width = New Unit("200px")
e.Row.Cells(1).Visible = False
e.Row.Cells(2).Visible = False e.Row.Cells(2).Visible = False
e.Row.Cells(3).Visible = False
If e.Row.RowType = DataControlRowType.Header Then If e.Row.RowType = DataControlRowType.Header Then
e.Row.Cells(5).ToolTip = "Costo Promedio" e.Row.Cells(6).ToolTip = "Costo Promedio"
End If End If
End Sub End Sub

View File

@@ -2047,7 +2047,7 @@ Partial Class Inventarios_RecepcionEntrega
If TipoMovimiento = 1 Then If TipoMovimiento = 1 Then
ValorMultiplicador = 1 ValorMultiplicador = 1
ElseIf TipoMovimiento = 2 Then ElseIf TipoMovimiento = 2 Then
TipoMovimiento = -1 ValorMultiplicador = -1
ElseIf TipoMovimiento = 2 AndAlso TipoDocto.Contiene({"Dev"}) And (EsDevolucionVenta = 1) Then ElseIf TipoMovimiento = 2 AndAlso TipoDocto.Contiene({"Dev"}) And (EsDevolucionVenta = 1) Then
ValorMultiplicador = 1 ValorMultiplicador = 1
End If End If

View File

@@ -119,7 +119,9 @@ Partial Class Inventarios_ReporteEntradasSalidas
Dim CveAlmacen = Request("CveAlmacen").ToString Dim CveAlmacen = Request("CveAlmacen").ToString
Dim Almacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {Request("CveAlmacen").ToString}") Dim Almacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {Request("CveAlmacen").ToString}")
DdlAlmacen.Items.Insert(0, New ListItem(Almacen, CveAlmacen)) DdlAlmacen.Items.Insert(0, New ListItem(Almacen, CveAlmacen))
End If End If
Else
DdlAlmacen.SelectedValuesIfExistM("-1")
End If End If
'Llenar dropdownlist de monedas 'Llenar dropdownlist de monedas
@@ -345,7 +347,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
Dim FechaI As String = FechaInicial Dim FechaI As String = FechaInicial
Dim FechaF As String = FechaFinal Dim FechaF As String = FechaFinal
Dim Almacen = If(DdlAlmacen.SelectedValue = "-1", "", $"&emsp;<b>Almacén:</b>&nbsp;{DdlAlmacen.SelectedItem.Text}") Dim Almacen = If(DdlAlmacen.GetSelectedValuesM = "", "", $"&emsp;<b>Almacenes:</b>&nbsp;{DdlAlmacen.GetSelectedText()}")
Dim TipoMov = If(DdlTipoMovimiento.SelectedValue = "-1", "", $"&emsp;<b>Tipo&nbsp;Movimiento:</b>&nbsp;{DdlTipoMovimiento.SelectedItem.Text}") Dim TipoMov = If(DdlTipoMovimiento.SelectedValue = "-1", "", $"&emsp;<b>Tipo&nbsp;Movimiento:</b>&nbsp;{DdlTipoMovimiento.SelectedItem.Text}")
Dim Moneda = If(DdlMoneda.SelectedValue = "-1", "", $"&emsp;<b>Moneda:</b>&nbsp;{DdlMoneda.SelectedItem.Text}") Dim Moneda = If(DdlMoneda.SelectedValue = "-1", "", $"&emsp;<b>Moneda:</b>&nbsp;{DdlMoneda.SelectedItem.Text}")
Dim SoloConMov = If(DdlMovs.SelectedValue = "-1", "", $"&emsp;<b>Solo&nbsp;Movimientos:</b>&nbsp;{DdlMovs.SelectedItem.Text}") Dim SoloConMov = If(DdlMovs.SelectedValue = "-1", "", $"&emsp;<b>Solo&nbsp;Movimientos:</b>&nbsp;{DdlMovs.SelectedItem.Text}")

View File

@@ -4,4 +4,4 @@
28/08/2019:05:48 p. m. No se especifico a remitente - SIG - Se Genero una Recepción de Usados con el folio: 80 28/08/2019:05:48 p. m. No se especifico a remitente - SIG - Se Genero una Recepción de Usados con el folio: 80
02/09/2019:11:00 a. m. From:'signotificaciones@adssistemas.mx' - Para:'x@x.com' - Asunto:'Entrega de Factura SUCURSAL NARANJO SN-22' - CCP: '' - Adjuntos: 1 02/09/2019:11:00 a. m. From:'signotificaciones@adssistemas.mx' - Para:'x@x.com' - Asunto:'Entrega de Factura SUCURSAL NARANJO SN-22' - CCP: '' - Adjuntos: 1

View File

@@ -10,3 +10,5 @@
.. PAC: 3 - Verificado : (37) 37 Armado: (43) 80 Genera: (0) 80 Timbrado: (7893) 7973 Actualizado: (19) 7992 ..05/09/2019:11:02 a. m. .. PAC: 3 - Verificado : (37) 37 Armado: (43) 80 Genera: (0) 80 Timbrado: (7893) 7973 Actualizado: (19) 7992 ..05/09/2019:11:02 a. m.
.. PAC: 3 - Verificado : (36) 36 Armado: (32) 68 Genera: (0) 68 Timbrado: (10604) 10672 Actualizado: (16) 10688 ..05/09/2019:12:31 p. m. .. PAC: 3 - Verificado : (36) 36 Armado: (32) 68 Genera: (0) 68 Timbrado: (10604) 10672 Actualizado: (16) 10688 ..05/09/2019:12:31 p. m.
.. PAC: 4 - Verificado : (12) 12 Certificado : (209) 221 Armado: (35) 256 Genera: (306) 562 Timbrado: (918) 1480 ..20/09/2019:05:37 p. m.

View File

@@ -233,7 +233,7 @@
<ContentTemplate> <ContentTemplate>
<ajax:TabContainer ID="TabsFormulas" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0" AutoPostBack="true"> <ajax:TabContainer ID="TabsFormulas" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0" AutoPostBack="true">
<ajax:TabPanel ID="tabFormulaImporte" runat="server" HeaderText="Importe"> <ajax:TabPanel ID="tabFormulaImporte" runat="server" HeaderText="Valor">
<ContentTemplate> <ContentTemplate>
<asp:TextBox ID="TxtFormulaImporte" runat="server" MaxLength="70" CssClass="codeeditor " Enabled="false"></asp:TextBox> <asp:TextBox ID="TxtFormulaImporte" runat="server" MaxLength="70" CssClass="codeeditor " Enabled="false"></asp:TextBox>
</ContentTemplate> </ContentTemplate>

View File

@@ -54,10 +54,10 @@ public partial class Nomina_CatConcepto : ClsPaginas
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
if (UsuarioActual.CveEmpresa ==72 || UsuarioActual.CveEmpresa== 80) //if (UsuarioActual.CveEmpresa ==72 || UsuarioActual.CveEmpresa== 80)
{ //{
tabFormulaImporte.Visible = false; // tabFormulaImporte.Visible = false;
} //}
if (Request["CveConcepto"] != null && !Request["CveConcepto"].ToString().Equals("") && Request["CveConcepto"].ToEntero() > 0) if (Request["CveConcepto"] != null && !Request["CveConcepto"].ToString().Equals("") && Request["CveConcepto"].ToEntero() > 0)
{ {
ViewState["CveConcepto"] = Request["CveConcepto"]; ViewState["CveConcepto"] = Request["CveConcepto"];

View File

@@ -229,6 +229,9 @@ Partial Class Nomina_Nomina
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
If UsuarioActual.CveEmpresa = 80 OrElse UsuarioActual.CveEmpresa = 72 Then
Response.Redirect("/Nomina/Nomina2.aspx")
End If
CargaTiposPeriodo() CargaTiposPeriodo()
CargaProyecto() CargaProyecto()
CargaTurnos() CargaTurnos()

View File

@@ -3,6 +3,52 @@
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.GvConceptos {
border: 1px solid #E87E04;
}
table.GvConceptos td {
white-space: nowrap;
}
.GvConceptos.table > tbody > tr > th {
border-top: 1px solid #E87E04;
color: #fff;
font-size: 15px;
background-color: #E87E04;
}
.GvConceptos.table > tbody > tr.thTituloConcepto > th:nth-child(1),
.GvConceptos.table > tbody > tr:not(.thTituloConcepto) > th:nth-child(3),
.GvConceptos.table > tbody > tr > td:nth-child(3) {
border-right: 1px solid #E87E04;
}
.dtosEmpleado {
font-size: 15px;
font-weight: 600;
}
.dtosEmpleado a {
color: #2196f3;
}
.dtosEmpleado .row {
padding-top: 10px;
padding-bottom: 10px;
}
.GvConceptos.table > tbody > tr > td span {
display: block;
min-height: 12px;
}
.GvConceptos.table > tbody > tr.ConceptosTotales {
font-weight: bold;
font-size: 15px;
}
</style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Nominas Nominas
@@ -129,331 +175,331 @@
</div> </div>
</div> </div>
<div style="float: right;"> <div style="float: right;">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="FiltrarTabla('TxtBusqueda','GvNominas')" style="display: inline-block; margin-right: -20px; width: 150px;"> <input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="FiltrarTabla('#TxtBusqueda','.GvNominas')" style="display: inline-block; margin-right: -20px; width: 150px;">
<a href="javascript:;" onclick="FiltrarTabla('TxtBusqueda','GvNominas')" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold yellow-gold"><i class="icon-magnifier" style="font-weight: bold;"></i></a> <a href="javascript:;" onclick="FiltrarTabla('#TxtBusqueda','.GvNominas')" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold yellow-gold"><i class="icon-magnifier" style="font-weight: bold;"></i></a>
</div> </div>
</div> </div>
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom "> <div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
<asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SerieFolio,Nombre,Correo,Turno,SubProyecto" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound" <asp:GridView ID="GvNominas" runat="server" DataKeyNames="CvePeriodo,CvePersonal,CveNomina,SeTimbro,SerieFolio,Nombre,Correo,Turno,SubProyecto" AutoGenerateColumns="False" OnRowDataBound="GvNominas_RowDataBound"
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" Style="text-align: center;" GridLines="None" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvNominas" Style="text-align: center;" GridLines="None"
data-rows="2"> data-rows="2">
<Columns> <Columns>
<asp:TemplateField > <asp:TemplateField>
<HeaderTemplate></HeaderTemplate> <HeaderTemplate></HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="LnkSobreRecibo" OnClick="LnkSobreRecibo_Click" runat="server"><i class='fa fa-list-alt'></i></asp:LinkButton> <asp:LinkButton ID="LnkSobreRecibo" OnClick="LnkSobreRecibo_Click" runat="server"><i class='fa fa-list-alt'></i></asp:LinkButton>
</ItemTemplate> </ItemTemplate>
<ItemStyle Width="20px" HorizontalAlign="Left" /> <ItemStyle Width="20px" HorizontalAlign="Left" />
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField > <asp:TemplateField>
<HeaderTemplate>Nombre</HeaderTemplate> <HeaderTemplate>Nombre</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal> <asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
</ItemTemplate> </ItemTemplate>
<ItemStyle Width="350px" HorizontalAlign="Left" /> <ItemStyle Width="350px" HorizontalAlign="Left" />
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:BoundField Visible="false" DataFormatString="{0:N2}"> <asp:BoundField Visible="false" DataFormatString="{0:N2}">
<ItemStyle Width="80px" HorizontalAlign="Right" /> <ItemStyle Width="80px" HorizontalAlign="Right" />
</asp:BoundField> </asp:BoundField>
<asp:TemplateField> <asp:TemplateField>
<ItemTemplate> <ItemTemplate>
@@ -474,11 +520,102 @@
</div> </div>
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
<ajax:TabPanel ID="TabAsistencia" runat="server" HeaderText="Asistencia">
<ContentTemplate>
<asp:Literal ID="ltlGvAsistencia" runat="server"></asp:Literal>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer> </ajax:TabContainer>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div id="ModalConceptos" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpModalConceptos" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header ">
<h4 class="modal-title">
<asp:Label ID="LblEmpleado" runat="server" Text="Label"></asp:Label></h4>
</div>
<div class="modal-body">
<div class="portlet light xspadding bordered " id="pnlConceptos">
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Sobre Recibo</span>
</div>
<div class="portlet-body " style="padding: 0px;">
<asp:GridView ID="GvConceptos" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-hover Widthall GvConceptos"
Style="text-align: center;" GridLines="None" OnRowDataBound="GvConceptos_RowDataBound"
DataKeyNames="ConceptoP,CveConceptoP,ImporteP,ValorP,EstatusP,ConceptoD,CveConceptoD,ImporteD,EstatusD,ValorD">
<Columns>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConcepto" runat="server" Text='<%# Eval("ConceptoP") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConcepto" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoP") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor">
<ItemTemplate>
<asp:Label ID="LtlValorP" runat="server" Text='<%# Eval("ValorP", "{0:##,###.##}") %>' Style="word-break: break-all;"></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporte" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkImporte" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ImporteP", "${0:N}") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor">
<ItemTemplate>
<asp:Label ID="LtlValorD" runat="server" Text='<%# Eval("ValorD", "{0:##,###.##}") %>' Style="word-break: break-all;"></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe">
<ItemTemplate>
<asp:Label ID="LtlImporteD" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkImporteD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ImporteD", "${0:N}") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="13%" />
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="SearchADHeader" />
</asp:GridView>
</div>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="DModalNominas" class="modal ADS fade" role="dialog"> <div id="DModalNominas" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpCargarNomina" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpCargarNomina" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
@@ -518,5 +655,21 @@
</div> </div>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script>
function ADSBegin() {
if ($('.thTituloConcepto').length == 0) {
$('.GvConceptos').prepend("<tr class=\"thTituloConcepto\"> <th scope=\"col\" colspan=\"3\">Percepciones</th><th scope=\"col\" colspan=\"3\">Deducciones</th> </tr>");
}
}
function FiltrarTabla(idtxt, idtable, idcontador) {
if ($('' + idtxt).val() == '') { $('table' + idtable + ' tr').css('display', ''); }
else { $('table' + idtable + ' tr:not(.ADtr):not(.SearchADHeader)').css('display', 'none'); $('table' + idtable + ' tr:contains("' + $('' + idtxt).val() + '")').css('display', ''); }
if ($('' + idcontador).length > 0) {
$('' + idcontador).html('(' + $('' + idtable + ' tr:not(.ADtr):not(.SearchADHeader):visible').length + '/' + $('' + idtable + ' tr:not(.ADtr):not(.SearchADHeader)').length + ')');
}
}
</script>
</asp:Content> </asp:Content>

View File

@@ -220,12 +220,16 @@ public partial class Nomina_Nomina2 : ClsPaginas
CvePeriodoSeleccionado = 0; CvePeriodoSeleccionado = 0;
dtempleados = null; dtempleados = null;
dtConceptos = null; dtConceptos = null;
DataTable dtPeriodo = new DataTable();
DataTable dtasistencia = new DataTable();
using (ClsNominas objnom = new ClsNominas()) using (ClsNominas objnom = new ClsNominas())
{ {
if (objnom.GetNominaEmpleado(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, CveEmpresa, Agrupador) && objnom.DTSetResultados.Tables.Count > 1) if (objnom.GetNominaEmpleado(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, CveEmpresa, Agrupador) && objnom.DTSetResultados.Tables.Count > 1)
{ {
dtempleados = objnom.DTSetResultados.Tables[0]; dtempleados = objnom.DTSetResultados.Tables[0];
dtConceptos = objnom.DTSetResultados.Tables[1]; dtConceptos = objnom.DTSetResultados.Tables[1];
dtPeriodo = objnom.DTSetResultados.Tables[2];
dtasistencia = objnom.DTSetResultados.Tables[3];
CvePeriodoSeleccionado = CvePeriodo; CvePeriodoSeleccionado = CvePeriodo;
continuar = true; continuar = true;
} }
@@ -512,6 +516,57 @@ public partial class Nomina_Nomina2 : ClsPaginas
GvNominas.DataBind(); GvNominas.DataBind();
} }
try
{
DateTime FechaInicio = (DateTime)dtPeriodo.Rows[0]["FechaInicio"];
DateTime FechaFin = (DateTime)dtPeriodo.Rows[0]["FechaFin"];
StringBuilder gvasistencia = new StringBuilder();
gvasistencia.Append("<table class=\"table table-striped table-hover mysmallbtn Widthall ScrollAD\">");
if (true)
{
DateTime fecha = FechaInicio;
gvasistencia.Append("<tr class=\"Titulos\">");
gvasistencia.Append("<td>Nombre</td>");
while (fecha <= FechaFin)
{
gvasistencia.AppendFormat("<td>{0:dd/MM/yyyy}</td>", fecha);
fecha = fecha.AddDays(1);
}
gvasistencia.Append("</tr>");
}
string tipo = "";
foreach (DataRow rempl in dtempleados.Rows)
{
int CvePersonal = rempl["CvePersonal"].ToString().ToEntero();
string nombre = rempl["Nombre"].ToString();
DateTime fecha = FechaInicio;
gvasistencia.Append("<tr>");
gvasistencia.AppendFormat("<td>{0}</td>", nombre);
while (fecha <= FechaFin)
{
DataRow drow = dtasistencia.FiltroPrimero(string.Format("Fecha='{0:yyyy/MM/dd}' AND CvePersonal={1}", fecha, CvePersonal));
fecha = fecha.AddDays(1);
tipo = "-";
if (drow != null)
{
tipo = string.Format("{0} ({1}%)", drow["Tipo"], drow["PorcentajePago"]);
drow.Delete();
}
gvasistencia.AppendFormat("<td>{0}</td>", tipo);
}
gvasistencia.Append("</tr>");
}
gvasistencia.Append("</table>");
ltlGvAsistencia.Text = gvasistencia.ToString();
}
catch (Exception)
{
throw;
}
#endregion #endregion
UpDatos.Update(); UpDatos.Update();
} }
@@ -573,13 +628,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
#endregion #endregion
#region SobreRecibo
protected void LnkSobreRecibo_Click(object sender, EventArgs e)
{
}
#endregion
protected void LnkTimbrar_Click(object sender, EventArgs e) protected void LnkTimbrar_Click(object sender, EventArgs e)
@@ -770,6 +818,137 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
#region SobreRecibo
protected void LnkSobreRecibo_Click(object sender, EventArgs e)
{
GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer);
string Nombre = gvrow.DataKey("Nombre").ToString();
int cvePersonal = gvrow.DataKey("CvePersonal").ToEntero();
int CvePeriodo = gvrow.DataKey("CvePeriodo").ToEntero();
int CveNomina = gvrow.DataKey("CveNomina").ToEntero();
LblEmpleado.Text = Nombre;
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ");
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 ");
dtper.Columns.Add("BorradoLogico", typeof(int));
dtded.Columns.Add("BorradoLogico", typeof(int));
foreach (DataRow row in dtper.Rows)
{
int BorradoLogico = 0;
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0))
{
BorradoLogico = 1;
}
row["BorradoLogico"] = BorradoLogico;
}
dtper.AcceptChanges();
foreach (DataRow row in dtded.Rows)
{
int BorradoLogico = 0;
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0))
{
BorradoLogico = 1;
}
row["BorradoLogico"] = BorradoLogico;
}
dtded.AcceptChanges();
dtper = dtper.FiltraParametros("BorradoLogico=0");
dtded = dtded.FiltraParametros("BorradoLogico=0");
int maxper = dtper.Rows.Count;
int maxded = dtded.Rows.Count;
int i = 0;
List<NConcepto> lconc = new List<NConcepto>();
for (i = 0; i < maxper || i < maxded; i++)
{
NConcepto nConcepto = new NConcepto();
DataRow row;
if (maxper > i)
{
row = dtper.Rows[i];
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", cvePersonal));
nConcepto.CveConceptoP = CveConcepto;
nConcepto.ConceptoP = Concepto;
nConcepto.ImporteP = Importe;
nConcepto.ValorP = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", cvePersonal));
}
if (maxded > i)
{
row = dtded.Rows[i];
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", cvePersonal));
nConcepto.CveConceptoD = CveConcepto;
nConcepto.ConceptoD = Concepto;
nConcepto.ImporteD = Importe;
nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", cvePersonal));
}
lconc.Add(nConcepto);
}
lconc.Add(new NConcepto());
NConcepto SubTotales = new NConcepto();
SubTotales.CveConceptoP = 0;
SubTotales.ConceptoP = "Total Percepciones";
SubTotales.EstatusP = -2;
SubTotales.ImporteP = dtempleados.SUM("SumaPercepciones", string.Format("CvePersonal = {0}", cvePersonal));
///Alert(SubTotales.ImporteP.ToString());
SubTotales.CveConceptoD = 0;
SubTotales.ConceptoD = "Total Deducciones";
SubTotales.EstatusD = -2;
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", cvePersonal));
NConcepto Totales = new NConcepto();
Totales.CveConceptoD = 0;
Totales.ConceptoD = "Total";
Totales.EstatusD = -3;
Totales.ImporteD = dtempleados.SUM("Total", string.Format("CvePersonal = {0}", cvePersonal));
lconc.Add(SubTotales);
lconc.Add(Totales);
GvConceptos.DataSource = lconc;
GvConceptos.DataBind();
UpModalConceptos.Update();
RegistraScript("$('#ModalConceptos').modal();");
//if (true)
//{
// BoundField field = (BoundField)GvNominas.Columns[CurrentColumn];
// field.HeaderText = "Percepciones";
// field.DataField = "SumaPercepciones";
// field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
// GvNominas.Columns[CurrentColumn].Visible = true;
// CurrentColumn++;
//}
//if (true)
//{
// BoundField field = (BoundField)GvNominas.Columns[CurrentColumn];
// field.HeaderText = "Deducciones";
// field.DataField = "SumaDeducciones";
// field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
// GvNominas.Columns[CurrentColumn].Visible = true;
// CurrentColumn++;
// field = (BoundField)GvNominas.Columns[CurrentColumn];
// field.HeaderText = "Total";
// field.DataField = "Total";
// field.ItemStyle.BackColor = System.Drawing.Color.LightGray;
// GvNominas.Columns[CurrentColumn].Visible = true;
// CurrentColumn++;
//}
}
protected void LnkFormato_Click(object sender, EventArgs e) protected void LnkFormato_Click(object sender, EventArgs e)
{ {
try try
@@ -852,4 +1031,80 @@ public partial class Nomina_Nomina2 : ClsPaginas
Alert("Ocurrio un error al generar el Formato de nominas" + ex.ToString()); Alert("Ocurrio un error al generar el Formato de nominas" + ex.ToString());
} }
} }
private class NConcepto
{
public string ConceptoP { get; set; }
public int CveConceptoP { get; set; }
public double ImporteP { get; set; }
public double ValorP { get; set; }
public int EstatusP { get; set; }
public string ConceptoD { get; set; }
public int CveConceptoD { get; set; }
public double ImporteD { get; set; }
public double ValorD { get; set; }
public int EstatusD { get; set; }
}
protected void GvConceptos_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
// Datakeys
// Concepto,CveConcepto,Importe,Estatus,ConceptoD,CveConceptoD,ImporteD,EstatusD
int CveConcepto = e.Row.DataKey("CveConceptoP").ToEntero();
int CveConceptoD = e.Row.DataKey("CveConceptoD").ToEntero();
// Dim Importe As Decimal = e.Row.DataKey("Importe").ToDecimal()
// Dim ImporteD As Decimal = e.Row.DataKey("ImporteD").ToDecimal()
int Estatus = e.Row.DataKey("EstatusP").ToEntero();
int EstatusD = e.Row.DataKey("EstatusD").ToEntero();
// Controles
Label LtlConcepto = e.Row.FCLabel("LtlConcepto");
LinkButton LnkConcepto = e.Row.FCLinkButton("LnkConcepto");
Label LtlConceptoD = e.Row.FCLabel("LtlConceptoD");
LinkButton LnkConceptoD = e.Row.FCLinkButton("LnkConceptod");
Label LtlImporte = e.Row.FCLabel("LtlImporte");
LinkButton LnkImporte = e.Row.FCLinkButton("LnkImporte");
Label LtlImporteD = e.Row.FCLabel("LtlImporteD");
LinkButton LnkImporteD = e.Row.FCLinkButton("LnkImporteD");
if (Estatus < -1 | EstatusD < -1)
e.Row.CssClass = "ConceptosTotales";
if (CveConcepto == 0 && (Estatus == 0 || Estatus == -1 || Estatus == -3))
LtlImporte.Text = "";
if (CveConceptoD == 0 && (EstatusD == 0 || EstatusD == -1))
LtlImporteD.Text = "";
if (Estatus == -1)
LtlConcepto.Visible = false;
else if (Estatus > 0)
LtlImporte.Visible = false;
if (EstatusD == -1)
LtlConceptoD.Visible = false;
else if (EstatusD > 0)
LtlImporteD.Visible = false;
LnkConcepto.Visible = !LtlConcepto.Visible;
LnkConceptoD.Visible = !LtlConceptoD.Visible;
LnkImporte.Visible = !LtlImporte.Visible;
LnkImporteD.Visible = !LtlImporteD.Visible;
}
}
#endregion
protected void LnkConcepto_Click(object sender, EventArgs e)
{
}
protected void LnkConceptoD_Click(object sender, EventArgs e)
{
}
} }

View File

@@ -4794,7 +4794,7 @@ Partial Class OC
Dim DtPara As DataTable = GlobalDTUsuarios(DdlSAUsuario.SelectedValue.ToString.ToEntero, CveEmpresaActual) Dim DtPara As DataTable = GlobalDTUsuarios(DdlSAUsuario.SelectedValue.ToString.ToEntero, CveEmpresaActual)
Param.Add(DtPara.Rows(0)("Correo").ToString()) 'Para Param.Add(DtPara.Rows(0)("Correo").ToString()) 'Para
Param.Add("Solicitud de anticipo de Orden de Compra") 'Asunto Param.Add("Solicitud de anticipo de Orden de Compra") 'Asunto
Param.Add(GeneraCorreoAnticipo(lblFolio.Text, DtPara.Rows(0)("Nombre").ToString(), String.Format("http://sig.adssistemas.mx/OI/EventoDetalle.aspx?CveTipoEvento=1&CveEvento={0}", CveEvento), TxtSAImporte.Text)) Param.Add(GeneraCorreoAnticipo(lblFolio.Text, DtPara.Rows(0)("Nombre").ToString(), String.Format("http://sig.adssistemas.mx/OI/EventoDetalle.aspx?CveTipoEvento=1&CveEvento={0}", CveEvento), TxtSAImporte.Text, DdlProveedores.SelectedItem.Text))
Param.Add(String.Format("{0}PDF\OC-{1}.pdf", UsuarioActual.Empresa.Ruta, CveOrdenCompra)) Param.Add(String.Format("{0}PDF\OC-{1}.pdf", UsuarioActual.Empresa.Ruta, CveOrdenCompra))
Dim Hilo As New Threading.Thread(AddressOf MandaCorreoAnticipo) Dim Hilo As New Threading.Thread(AddressOf MandaCorreoAnticipo)
Hilo.Start(Param) Hilo.Start(Param)
@@ -4808,7 +4808,7 @@ Partial Class OC
Dim DtPara As DataTable = GlobalDTUsuarios(Dr("CveUsuarioPara").ToString.ToEntero, CveEmpresaActual) Dim DtPara As DataTable = GlobalDTUsuarios(Dr("CveUsuarioPara").ToString.ToEntero, CveEmpresaActual)
Param.Add(DtPara.Rows(0)("Correo").ToString()) 'Para Param.Add(DtPara.Rows(0)("Correo").ToString()) 'Para
Param.Add("Solicitud de anticipo de Orden de Compra Cancelada") 'Asunto Param.Add("Solicitud de anticipo de Orden de Compra Cancelada") 'Asunto
Param.Add(GeneraCorreoAnticipo(lblFolio.Text, DtPara.Rows(0)("Nombre").ToString(), String.Format("http://sig.s/OI/EventoDetalle.aspx?CveTipoEvento=1&CveEvento={0}", Dr("CveEvento").ToString.ToEntero), "")) Param.Add(GeneraCorreoAnticipo(lblFolio.Text, DtPara.Rows(0)("Nombre").ToString(), String.Format("http://sig.s/OI/EventoDetalle.aspx?CveTipoEvento=1&CveEvento={0}", Dr("CveEvento").ToString.ToEntero), "", DdlProveedores.SelectedItem.Text))
Param.Add(String.Format("{0}PDF\OC-{1}.pdf", UsuarioActual.Empresa.Ruta, CveOrdenCompra)) Param.Add(String.Format("{0}PDF\OC-{1}.pdf", UsuarioActual.Empresa.Ruta, CveOrdenCompra))
Dim Hilo As New Threading.Thread(AddressOf MandaCorreoAnticipo) Dim Hilo As New Threading.Thread(AddressOf MandaCorreoAnticipo)
Hilo.Start(Param) Hilo.Start(Param)
@@ -4839,8 +4839,9 @@ Partial Class OC
End If End If
End Sub End Sub
Private Function GeneraCorreoAnticipo(folio As String, para As String, link As String, importe As String) As String Private Function GeneraCorreoAnticipo(folio As String, para As String, link As String, importe As String, Proveedor As String) As String
'NOTA: CUANDO EL IMPORTE SEA "" QUIERE DECIR QUE ES EL CORREO DE CANCELACIÓN 'NOTA: CUANDO EL IMPORTE SEA "" QUIERE DECIR QUE ES EL CORREO DE CANCELACIÓN
Dim Abreviatura As String = GlobalDTMonedas().FiltroPrimeroValor("Abreviatura", $"CveMoneda={DdlMoneda.SelectedValue}")
Dim strBody As New StringBuilder Dim strBody As New StringBuilder
strBody.Append("<!DOCTYPE html>") strBody.Append("<!DOCTYPE html>")
@@ -4868,6 +4869,18 @@ Partial Class OC
strBody.Append(" <div class=""portlet-body "">") strBody.Append(" <div class=""portlet-body "">")
strBody.Append(" <table class=""mitablita"">") strBody.Append(" <table class=""mitablita"">")
strBody.Append(" <tr>") strBody.Append(" <tr>")
strBody.Append(" <td>Empresa</td>")
strBody.Append(" <td>")
strBody.Append(UsuarioActual.Empresa.Empresa)
strBody.Append("</td> </tr>")
strBody.Append(" <tr>")
strBody.Append(" <tr>")
strBody.Append(" <td>Proveedor</td>")
strBody.Append(" <td>")
strBody.Append(Proveedor)
strBody.Append("</td> </tr>")
strBody.Append(" <tr>")
strBody.Append(" <tr>")
strBody.Append(" <td>Fecha</td>") strBody.Append(" <td>Fecha</td>")
strBody.Append(" <td>") strBody.Append(" <td>")
strBody.Append(DateTime.Now.ToString("dd/MM/yy")) strBody.Append(DateTime.Now.ToString("dd/MM/yy"))
@@ -4888,9 +4901,15 @@ Partial Class OC
strBody.Append(folio) strBody.Append(folio)
strBody.Append("</td> </tr>") strBody.Append("</td> </tr>")
If importe.ToDouble > 0 Then If importe.ToDouble > 0 Then
strBody.Append(" <td>Importe:</td>") strBody.Append(" <td>Importe Anticipo:</td>")
strBody.Append(" <td>") strBody.Append(" <td>")
strBody.Append(importe) strBody.AppendFormat("{0} {1}", importe, Abreviatura)
strBody.Append("</td> </tr>")
End If
If LblTotal.Text.Trim.ToDouble > 0 Then
strBody.Append(" <td>Importe OC:</td>")
strBody.Append(" <td>")
strBody.AppendFormat("{0} {1}", LblTotal.Text, Abreviatura)
strBody.Append("</td> </tr>") strBody.Append("</td> </tr>")
End If End If
strBody.Append("<tr><td colspan=""4"" ><a href=""") strBody.Append("<tr><td colspan=""4"" ><a href=""")

View File

@@ -38,6 +38,16 @@ Partial Class OS_Asignaciones
DivAsignacionPersona.Visible = False DivAsignacionPersona.Visible = False
'CargaOrdenesServiciosAsignadas() 'CargaOrdenesServiciosAsignadas()
End If End If
Dim ObjEstatusPermisos As New ClsOS
If ObjEstatusPermisos.GetEstatusUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
Dim Permisos As New DataTable
Permisos = ObjEstatusPermisos.DtResultados.FiltraParametros("TipoEstatus = 2")
If Permisos.Rows.Count = 0 Then
DdlTecnico.Visible = False
BtnAsignar.Visible = False
End If
End If
End If End If
End Sub End Sub

View File

@@ -26,6 +26,14 @@ Partial Class OS_CatEstatusOrdenServicio
ViewState("CveEstatuOS") = value ViewState("CveEstatuOS") = value
End Set End Set
End Property End Property
Private Property Orden As String
Get
Return ViewState("Orden").ToString
End Get
Set(value As String)
ViewState("Orden") = value
End Set
End Property
Private Property DTEstatusUsuarios As DataTable Private Property DTEstatusUsuarios As DataTable
Get Get
Return CType(ViewState("DTEstatusUsuarios"), DataTable) Return CType(ViewState("DTEstatusUsuarios"), DataTable)
@@ -50,26 +58,23 @@ Partial Class OS_CatEstatusOrdenServicio
End Sub End Sub
Public Sub CargaDatos() Public Sub CargaDatos()
Dim ObjEstatusOrdenServicios As New ClsOS Using ObjEstatusOrdenServicios As New ClsOS
If ObjEstatusOrdenServicios.GetEstatusOrdenServicio() Then
If ObjEstatusOrdenServicios.GetEstatusOrdenServicio() Then DtEstatusOS = ObjEstatusOrdenServicios.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
GvDatos.DataSource = DtEstatusOS
DtEstatusOS = ObjEstatusOrdenServicios.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa) = ObjEstatusOrdenServicios.DtResultados
GvDatos.DataSource = DtEstatusOS
GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa) = ObjEstatusOrdenServicios.DtResultados End If
Else
Me.GvDatos.DataSource = Nothing
End If
If ObjEstatusOrdenServicios.GetEstatusUsuarios(-1, -1) Then If ObjEstatusOrdenServicios.GetEstatusUsuarios(-1, -1) Then
DTEstatusUsuarios = ObjEstatusOrdenServicios.DtResultados DTEstatusUsuarios = ObjEstatusOrdenServicios.DtResultados
Dim PermisosDeUsuario As DataTable = DTEstatusUsuarios End If
End If
OrdenaDatos() End Using
ObjEstatusOrdenServicios.Dispose()
GvDatos.DataBind() GvDatos.DataBind()
OrdenaDatos()
End Sub End Sub
Private Sub BtnAgregarEstatus_Click(sender As Object, e As EventArgs) Handles BtnAgregarEstatus.Click Private Sub BtnAgregarEstatus_Click(sender As Object, e As EventArgs) Handles BtnAgregarEstatus.Click

View File

@@ -323,6 +323,16 @@ Partial Class OS_OrdenesServicios
hdnEsThickbox.Value = "S" hdnEsThickbox.Value = "S"
hdnClientIDLink.Value = "NoDefinido" hdnClientIDLink.Value = "NoDefinido"
Dim ObjEstatusPermisos As New ClsOS
If ObjEstatusPermisos.GetEstatusUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
Dim PermisoEstatus As New DataTable
PermisoEstatus = ObjEstatusPermisos.DtResultados.FiltraParametros("TipoEstatus = 1")
If PermisoEstatus.Rows.Count = 0 Then
UpGuardar.Visible = False
End If
End If
ObjEstatusPermisos.Dispose()
End If End If
End Sub End Sub

View File

@@ -613,7 +613,7 @@
</td> </td>
<td> <td>
<asp:LinkButton ID="ImgDescargaFormato" runat="server" OnClick="DownLoad_ClickSolicitudPermiso" AlternateText="Editar" CausesValidation="False" <asp:LinkButton ID="ImgDescargaFormato" runat="server" OnClick="DownLoad_ClickSolicitudPermiso" AlternateText="Editar" CausesValidation="False"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-download ' title='Descarga Solicitud' ></i>" /> CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-download ' title='Descarga Solicitud' ></i>" />
</td> </td>
</tr> </tr>
</table> </table>
@@ -992,12 +992,12 @@
<div class="col-md-6"></div> <div class="col-md-6"></div>
<div class="col-md-6"> <div class="col-md-6">
<label class="col-md-8" id="LblFecha" runat="server" style="margin-top: 5px; text-align: right;width:50%"></label> <label class="col-md-8" id="LblFecha" runat="server" style="margin-top: 5px; text-align: right; width: 50%"></label>
<label class="col-md-1 " id="LblFolio" runat="server" style="margin-top: 5px; text-align: right;"><b>Folio:</b></label> <label class="col-md-1 " id="LblFolio" runat="server" style="margin-top: 5px; text-align: right;"><b>Folio:</b></label>
<div class="col-md-2" id="DivFolio" runat="server"> <div class="col-md-2" id="DivFolio" runat="server">
<asp:TextBox ID="TxtFolio" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Style="text-align: right;"></asp:TextBox> <asp:TextBox ID="TxtFolio" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Style="text-align: right;"></asp:TextBox>
</div> </div>
<asp:LinkButton ID="LnkImprimirPDF" runat="server" OnClick="LnkImprimirPDF_Click" Visible="true" Style="float:right;width:19%;background:#3379b5;color:white"> <i class="fa fa-ad-pdf"></i> <span style="padding-left:5px;">Generar PDF</span></asp:LinkButton> <asp:LinkButton ID="LnkImprimirPDF" runat="server" OnClick="LnkImprimirPDF_Click" Visible="true" Style="float: right; width: 19%; background: #3379b5; color: white"> <i class="fa fa-ad-pdf"></i> <span style="padding-left:5px;">Generar PDF</span></asp:LinkButton>
</div> </div>
</div> </div>
</div> </div>
@@ -1027,7 +1027,7 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPersonal" runat="server" Enabled="false" Style="width:100%" AppendDataBoundItems="true" DataTextField="CodigoNombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" Class="table-group-action-input form-control input-inline input-small input-sm" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlPersonal" runat="server" Enabled="false" Style="width: 100%" AppendDataBoundItems="true" DataTextField="CodigoNombreCompleto" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" Class="table-group-action-input form-control input-inline input-small input-sm" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlPersonal.ClientID.ToString()%>">Nombre: </label> <label for="<%= DdlPersonal.ClientID.ToString()%>">Nombre: </label>
@@ -1038,7 +1038,7 @@
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlDepartamento" CssClass="form-control input-sm select2me" runat="server" Style="width:100%" AppendDataBoundItems="true" DataTextField="Departamento" DataValueField="CveDepartamento" Class="table-group-action-input form-control input-inline input-small input-sm" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlDepartamento" CssClass="form-control input-sm select2me" runat="server" Style="width: 100%" AppendDataBoundItems="true" DataTextField="Departamento" DataValueField="CveDepartamento" Class="table-group-action-input form-control input-inline input-small input-sm" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlDepartamento.ClientID.ToString()%>">Área: </label> <label for="<%= DdlDepartamento.ClientID.ToString()%>">Área: </label>
@@ -1051,7 +1051,7 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSupervisor" CssClass="form-control input-sm select2me" runat="server" Style="width:100%" AppendDataBoundItems="true" DataTextField="CodigoNombreCompleto" DataValueField="CvePersonal" Class="table-group-action-input form-control input-inline input-small input-sm" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlSupervisor" CssClass="form-control input-sm select2me" runat="server" Style="width: 100%" AppendDataBoundItems="true" DataTextField="CodigoNombreCompleto" DataValueField="CvePersonal" Class="table-group-action-input form-control input-inline input-small input-sm" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlSupervisor.ClientID.ToString()%>">Jefe Directo: </label> <label for="<%= DdlSupervisor.ClientID.ToString()%>">Jefe Directo: </label>
@@ -1120,7 +1120,7 @@
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="col-md-2" style="margin-right: 30px;width:18%"> <div class="col-md-2" style="margin-right: 30px; width: 18%">
<div class=" form-group form-md-line-input input-iconright" style="padding-left: 0px; height: 70px"> <div class=" form-group form-md-line-input input-iconright" style="padding-left: 0px; height: 70px">
<label for="<%= TxtFechaRegreso.ClientID.ToString()%>">Fecha de Regreso: </label> <label for="<%= TxtFechaRegreso.ClientID.ToString()%>">Fecha de Regreso: </label>
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="padding: 5px 0px;"> <div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="padding: 5px 0px;">
@@ -1650,60 +1650,73 @@
<label for="<%= TxtPermisoDescripcion.ClientID.ToString()%>">Descripcion</label> <label for="<%= TxtPermisoDescripcion.ClientID.ToString()%>">Descripcion</label>
<i></i> <i></i>
</div> </div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 160px!important">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy">
<asp:TextBox ID="TxtFechaInicioPer" runat="server" CausesValidation="true" CssClass="form-control input-sm" ValidationGroup="GrpPermisos"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaInicioPer" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEETxtFechaInicioPer" runat="server" TargetControlID="TxtFechaInicioPer" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CELnkFechaFinPer" TargetControlID="TxtFechaInicioPer" PopupButtonID="LnkFechaInicioPer" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:Label AssociatedControlID="TxtFechaInicioPer" runat="server" Text="Fecha Inicial"></asp:Label>
<i></i>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright " style="width: 160px!important">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy">
<asp:TextBox ID="TxtFechaFinPer" runat="server" CausesValidation="true" CssClass="form-control input-sm" ValidationGroup=" GrpPermisos"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaFinPer" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEETxtFechaFinPer" runat="server" TargetControlID="TxtFechaFinPer" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaFinPer" PopupButtonID="LnkFechaFinPer" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:Label AssociatedControlID="TxtFechaFinPer" runat="server" Text="Fecha Final"></asp:Label>
<i></i>
</div>
</div>
<div class="form-group form-md-line-input input-iconright calendarlinealinput" style="width: 160px!important">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy">
<asp:TextBox ID="TxtFechaInicioPer" runat="server" CausesValidation="true" CssClass="form-control input-sm" ValidationGroup="GrpPermisos"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaInicioPer" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEETxtFechaInicioPer" runat="server" TargetControlID="TxtFechaInicioPer" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CELnkFechaFinPer" TargetControlID="TxtFechaInicioPer" PopupButtonID="LnkFechaInicioPer" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<label>Fecha Inicial</label>
<i></i>
</div> </div>
</div> </div>
<div class="form-group form-md-line-input input-iconright " style="width: 160px!important"> <div class="row">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy"> <div class="col-md-6">
<asp:TextBox ID="TxtFechaFinPer" runat="server" CausesValidation="true" CssClass="form-control input-sm" ValidationGroup=" GrpPermisos"></asp:TextBox>
<span class="input-group-btn "> <div runat="server" visible="false" class="form-group form-md-line-input input-iconright" style="width: 160px!important">
<asp:LinkButton ID="LnkFechaFinPer" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:TextBox ID="TxtHoraEntrada" runat="server" CausesValidation="true" MaxLength="10" Width="160px" CssClass="form-control " ValidationGroup="GrpPermisos"></asp:TextBox>
</span> <ajax:MaskedEditExtender ID="MEETxtHoraEntrada" runat="server" TargetControlID="TxtHoraEntrada" Mask="99:99:99" MaskType="Time" InputDirection="RightToLeft"></ajax:MaskedEditExtender>
<ajax:MaskedEditExtender ID="MEETxtFechaFinPer" runat="server" TargetControlID="TxtFechaFinPer" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditValidator InvalidValueMessage="Valores incorrectos(23:11:59 valor maximo)" ID="MEVTxtHoraEntrada" runat="server" ControlExtender="MEETxtHoraEntrada" ValidationGroup="GrpPermisos" ControlToValidate="TxtHoraEntrada" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo no tiene el formato correcto, por favor corrija (Formato 24 Horas)." IsValidEmpty="true" MaximumValue="23:59:59" MinimumValue="00:00:00" ToolTip="Formato 24 Horas"></ajax:MaskedEditValidator>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaFinPer" PopupButtonID="LnkFechaFinPer" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <asp:Label AssociatedControlID="TxtHoraEntrada" runat="server" Text="Hora Entrada"></asp:Label>
<label>Fecha Final</label> <i></i>
<i></i> </div>
</div>
<div class="col-md-6">
<div runat="server" visible="false" class="form-group form-md-line-input input-iconright" style="width: 160px!important">
<asp:TextBox ID="TxtHoraSalida" runat="server" CausesValidation="true" MaxLength="10" Width="160px" CssClass="form-control " ValidationGroup="GrpPermisos"></asp:TextBox>
<ajax:MaskedEditExtender ID="MEETxtHoraSalida" runat="server" TargetControlID="TxtHoraSalida" Mask="99:99:99" MaskType="Time" InputDirection="RightToLeft"></ajax:MaskedEditExtender>
<ajax:MaskedEditValidator InvalidValueMessage="Valores incorrectos(23:11:59 valor maximo)" ID="MEVTTxtHoraSalida" runat="server" ControlExtender="MEETxtHoraEntrada" ControlToValidate="TxtHoraSalida" Display="None" ValidationGroup="GrpPermisos" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo no tiene el formato correcto, por favor corrija (Formato 24 Horas)." IsValidEmpty="true" MaximumValue="23:59:59" MinimumValue="00:00:00" ToolTip="Formato 24 Horas"></ajax:MaskedEditValidator>
<asp:Label AssociatedControlID="TxtHoraSalida" runat="server" Text="Hora Salida"></asp:Label>
<i></i>
</div>
</div> </div>
</div> </div>
<div class="form-group form-md-line-input input-iconright ">
<div runat="server" visible="false" class="form-group form-md-line-input input-iconright" style="width: 160px!important"> <asp:CheckBox ID="ChkGoceSueldo" runat="server" Text="Goce de sueldo" Checked="false" Visible="false" />
<asp:TextBox ID="TxtHoraEntrada" runat="server" CausesValidation="true" MaxLength="10" Width="160px" CssClass="form-control " ValidationGroup="GrpPermisos"></asp:TextBox>
<ajax:MaskedEditExtender ID="MEETxtHoraEntrada" runat="server" TargetControlID="TxtHoraEntrada" Mask="99:99:99" MaskType="Time" InputDirection="RightToLeft"></ajax:MaskedEditExtender>
<ajax:MaskedEditValidator InvalidValueMessage="Valores incorrectos(23:11:59 valor maximo)" ID="MEVTxtHoraEntrada" runat="server" ControlExtender="MEETxtHoraEntrada" ValidationGroup="GrpPermisos" ControlToValidate="TxtHoraEntrada" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo no tiene el formato correcto, por favor corrija (Formato 24 Horas)." IsValidEmpty="true" MaximumValue="23:59:59" MinimumValue="00:00:00" ToolTip="Formato 24 Horas"></ajax:MaskedEditValidator>
<label for="<%= TxtHoraEntrada.ClientID.ToString()%>">Hora Entrada</label>
<i></i>
</div>
<div runat="server" visible="false" class="form-group form-md-line-input input-iconright" style="width: 160px!important">
<asp:TextBox ID="TxtHoraSalida" runat="server" CausesValidation="true" MaxLength="10" Width="160px" CssClass="form-control " ValidationGroup="GrpPermisos"></asp:TextBox>
<ajax:MaskedEditExtender ID="MEETxtHoraSalida" runat="server" TargetControlID="TxtHoraSalida" Mask="99:99:99" MaskType="Time" InputDirection="RightToLeft"></ajax:MaskedEditExtender>
<ajax:MaskedEditValidator InvalidValueMessage="Valores incorrectos(23:11:59 valor maximo)" ID="MEVTTxtHoraSalida" runat="server" ControlExtender="MEETxtHoraEntrada" ControlToValidate="TxtHoraSalida" Display="None" ValidationGroup="GrpPermisos" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo no tiene el formato correcto, por favor corrija (Formato 24 Horas)." IsValidEmpty="true" MaximumValue="23:59:59" MinimumValue="00:00:00" ToolTip="Formato 24 Horas"></ajax:MaskedEditValidator>
<label for="<%= TxtHoraSalida.ClientID.ToString()%>">Hora Salida</label>
<i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright "> <div class="form-group form-md-line-input input-iconright ">
<asp:CheckBox ID="ChkGoceSueldo" runat="server" Text="Goce de sueldo" /> <asp:CheckBox ID="ChkEstatusPermiso" CssClass="chksino" runat="server" Checked="true" Text="Activo" />
</div>
<div class="form-group form-md-line-input input-iconright ">
<asp:CheckBox ID="ChkEstatusPermiso" runat="server" Checked="true" Text="Activo" />
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtMotivoPermiso" runat="server" CausesValidation="true" MaxLength="250" Visible="true" CssClass="form-control" ></asp:TextBox> <asp:Label AssociatedControlID="TxtPermisoDescripcion" runat="server" Text="Motivo para permiso"></asp:Label>
<label for="<%= TxtPermisoDescripcion.ClientID.ToString()%>">Motivo para permiso</label> <asp:TextBox ID="TxtMotivoPermiso" runat="server" CausesValidation="true" Rows="4" TextMode="MultiLine" Visible="true" CssClass="form-control"></asp:TextBox>
<i></i> <i></i>
</div> </div>

View File

@@ -78,7 +78,6 @@
<!-- BEGIN LOGO --> <!-- BEGIN LOGO -->
<div class="page-logo"> <div class="page-logo">
<asp:Literal ID="LitTit" runat="server"></asp:Literal> <asp:Literal ID="LitTit" runat="server"></asp:Literal>
<asp:TextBox ID="TxtTit" BorderStyle="None" runat="server" Visible="false" Width="500px"></asp:TextBox>
<%--<a href="/Inicio.aspx"> <%--<a href="/Inicio.aspx">
<asp:Image ID="IMGLogo" runat="server" alt="logo" class="logo-default" style="height:40px; margin: 3px 0 0 0;"/> <asp:Image ID="IMGLogo" runat="server" alt="logo" class="logo-default" style="height:40px; margin: 3px 0 0 0;"/>
<asp:Label ID="LblEmpresa" runat="server" CssClass="EmpresaName"></asp:Label> <asp:Label ID="LblEmpresa" runat="server" CssClass="EmpresaName"></asp:Label>
@@ -368,16 +367,21 @@
<div class='page-content <%=If(EsPopup, "mpoup", "") %>' style=''> <div class='page-content <%=If(EsPopup, "mpoup", "") %>' style=''>
<div class="row"> <div class="row">
<div class="col-sm-9"> <div class="col-sm-7">
<h3 class="page-title" runat="server" id="headertitleh3"> <h3 class="page-title" runat="server" id="headertitleh3">
<asp:ContentPlaceHolder ID="E" runat="server"> <asp:ContentPlaceHolder ID="E" runat="server">
</asp:ContentPlaceHolder> </asp:ContentPlaceHolder>
</h3> </h3>
</div> </div>
<div class="col-sm-3 text-right" style="padding-top: 8px; white-space: nowrap;"> <div class="col-sm-2">
<i class="icon-calendar"></i> <asp:TextBox ID="TxtTit" BorderStyle="None" CssClass="form-control input-sm" runat="server" Visible="false" Width="100%"></asp:TextBox>
<asp:Label ID="lblFecha" CssClass="thin uppercase hidden-xs" runat="server"></asp:Label> </div>
<asp:Label ID="lblTipoCambio" CssClass="thin uppercase hidden-xs" runat="server"></asp:Label> <div class="col-sm-3 text-right" style="padding-top: 8px; white-space: nowrap; direction: rtl;">
<div style="direction: ltr">
<i class="icon-calendar"></i>
<asp:Label ID="lblFecha" CssClass="thin uppercase hidden-xs" runat="server"></asp:Label>
<asp:Label ID="lblTipoCambio" CssClass="thin uppercase hidden-xs" runat="server"></asp:Label>
</div>
</div> </div>
</div> </div>
<div class='page-bar' id="barradenavegacion"> <div class='page-bar' id="barradenavegacion">
@@ -691,9 +695,9 @@
<script type="text/javascript" src="/signalr/signalr/hubs"></script> <script type="text/javascript" src="/signalr/signalr/hubs"></script>
<%: Scripts.Render("~/Metronic/assets/global/scripts/JS") %> <%: Scripts.Render("~/Metronic/assets/global/scripts/JS") %>
<script type="text/javascript" src="/Scripts/Notificaciones.js"></script> <script type="text/javascript" src="/Scripts/Notificaciones.js"></script>
<script type="text/javascript"> <script type="text/javascript">
NotificacionesADS.init(); NotificacionesADS.init();
</script> </script>
<script src="/Metronic/assets/global/plugins/bootstrap-toastr/toastr.js"></script> <script src="/Metronic/assets/global/plugins/bootstrap-toastr/toastr.js"></script>
<asp:ContentPlaceHolder ID="JS" runat="server"> <asp:ContentPlaceHolder ID="JS" runat="server">

View File

@@ -1,498 +1,497 @@
Option Explicit On Option Explicit On
Option Strict On Option Strict On
Imports System.Data Imports System.Data
Imports System.IO Imports System.IO
Imports System.Security.Cryptography.X509Certificates Imports System.Security.Cryptography.X509Certificates
Imports Extensiones Imports Extensiones
'Imports Microsoft.AspNet.SignalR.Client 'Imports Microsoft.AspNet.SignalR.Client
'Imports ChatHub 'Imports ChatHub
Partial Class Site Partial Class Site
Inherits BaseMasterPage Inherits BaseMasterPage
#Region "Propiedades" #Region "Propiedades"
Public Overrides Property EsPopup() As Boolean Public Overrides Property EsPopup() As Boolean
Get Get
Return Convert.ToBoolean(HdnEsPopup.Value) Return Convert.ToBoolean(HdnEsPopup.Value)
End Get End Get
Set(value As Boolean) Set(value As Boolean)
HdnEsPopup.Value = value.ToString HdnEsPopup.Value = value.ToString
End Set End Set
End Property End Property
Public Overrides Property PopupWidth() As Integer Public Overrides Property PopupWidth() As Integer
Get Get
Return HdnPopUpWidth.Value.ToEntero Return HdnPopUpWidth.Value.ToEntero
End Get End Get
Set(value As Integer) Set(value As Integer)
HdnPopUpWidth.Value = value.ToString HdnPopUpWidth.Value = value.ToString
End Set End Set
End Property End Property
Public Property userx As Usuario Public Property userx As Usuario
Get Get
userx = DirectCast(ViewState("userx"), Usuario) userx = DirectCast(ViewState("userx"), Usuario)
End Get End Get
Set(value As Usuario) Set(value As Usuario)
ViewState("userx") = value ViewState("userx") = value
End Set End Set
End Property End Property
Public Property countNotificaciones As Integer Public Property countNotificaciones As Integer
Get Get
countNotificaciones = If(IsNothing(ViewState("countNotificaciones")), 0, ViewState("countNotificaciones").ToString.ToEntero) countNotificaciones = If(IsNothing(ViewState("countNotificaciones")), 0, ViewState("countNotificaciones").ToString.ToEntero)
End Get End Get
Set(value As Integer) Set(value As Integer)
ViewState("countNotificaciones") = value ViewState("countNotificaciones") = value
End Set End Set
End Property End Property
Public Property UsuarioCve As Integer Public Property UsuarioCve As Integer
Get Get
Return 15 Return 15
End Get End Get
Set(value As Integer) Set(value As Integer)
End Set End Set
End Property End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
lblFecha.Text = DateTime.Now.ToString("dd.MMMyyyy HH:mm tt") lblFecha.Text = DateTime.Now.ToString("dd.MMMyyyy HH:mm tt")
MasterChat.Visible = False MasterChat.Visible = False
If UsuarioActual.CveUsuario = 100 Then
TxtTit.Visible = True If Request("Masterimpoup") IsNot Nothing AndAlso Request("Masterimpoup").ToString = "true" Then EsPopup = True
End If If UsuarioActual IsNot Nothing Then
If Request("Masterimpoup") IsNot Nothing AndAlso Request("Masterimpoup").ToString = "true" Then EsPopup = True HdnCveE.Value = UsuarioActual.CveEmpresa.ToString
If UsuarioActual IsNot Nothing Then HdnCveU.Value = UsuarioActual.CveUsuario.ToString
HdnCveE.Value = UsuarioActual.CveEmpresa.ToString LitTit.Text = UsuarioActual.Empresa.EmpresaEncabezado
HdnCveU.Value = UsuarioActual.CveUsuario.ToString If UsuarioActual.CveUsuario = 100 Then
LitTit.Text = UsuarioActual.Empresa.EmpresaEncabezado LitTit.Text = String.Format("<span style='color:white; font-size:x-large'></span>&nbsp;<span style='color: #32A1CF; font-size:x-large'>Mi Empresa de Ventas ({0})</span> ", UsuarioActual.CveEmpresa)
If UsuarioActual.CveUsuario = 100 Then TxtTit.Visible = True
LitTit.Text = String.Format("<span style='color:white; font-size:x-large'></span>&nbsp;<span style='color: #32A1CF; font-size:x-large'>Mi Empresa de Ventas ({0})</span> ", UsuarioActual.CveEmpresa) End If
End If
Dim thisURL As String = Request.Url.Segments(Request.Url.Segments.Count - 1)
Dim thisURL As String = Request.Url.Segments(Request.Url.Segments.Count - 1) If thisURL.Equals("WizardRegistro.aspx") OrElse thisURL.Equals("Registro.aspx") Then
If thisURL.Equals("WizardRegistro.aspx") OrElse thisURL.Equals("Registro.aspx") Then LitTit.Text = "<span style='color:white; font-size:x-large'>AD</span>&nbsp;<span style='color: #32A1CF; font-size:x-large'> Soluciones en TI</span> "
LitTit.Text = "<span style='color:white; font-size:x-large'>AD</span>&nbsp;<span style='color: #32A1CF; font-size:x-large'> Soluciones en TI</span> " End If
End If
userx = New Usuario
userx = New Usuario userx.Empresa = New Empresa
userx.Empresa = New Empresa userx.Referencia = Encripta(UsuarioActual.CveUsuario.ToString)
userx.Referencia = Encripta(UsuarioActual.CveUsuario.ToString) userx.Usuario = Encripta(UsuarioActual.Usuario)
userx.Usuario = Encripta(UsuarioActual.Usuario) userx.Liga = Encripta(UsuarioActual.Rol)
userx.Liga = Encripta(UsuarioActual.Rol)
If UsuarioActual.CvePersonal > 0 Then
If UsuarioActual.CvePersonal > 0 Then DivPerfil.Visible = True
DivPerfil.Visible = True End If
End If
If UsuarioActual.CveRol = 1 Then
If UsuarioActual.CveRol = 1 Then userx.Empresa.Direccion = Encripta("-999")
userx.Empresa.Direccion = Encripta("-999") userx.Empresa.Empresa = Encripta("ADSistemas")
userx.Empresa.Empresa = Encripta("ADSistemas") Else
Else '.Empresa.Direccion = Encripta(UsuarioActual.Empresa.CveEmpresa)
'.Empresa.Direccion = Encripta(UsuarioActual.Empresa.CveEmpresa) 'userx.Empresa.Empresa = Encripta(UsuarioActual.Empresa.Empresa)
'userx.Empresa.Empresa = Encripta(UsuarioActual.Empresa.Empresa) End If
End If
If UsuarioActual.CveRol = 1200 Then
If UsuarioActual.CveRol = 1200 Then dashboard.Visible = True
dashboard.Visible = True End If
End If
If UsuarioActual.CvePlataforma = 6 Or UsuarioActual.CvePlataforma = 7 Then
If UsuarioActual.CvePlataforma = 6 Or UsuarioActual.CvePlataforma = 7 Then header_search_bar.Visible = False
header_search_bar.Visible = False header_notification_bar.Visible = False
header_notification_bar.Visible = False End If
End If
If EsPopup Then
If EsPopup Then
scriptoppner.Visible = True
scriptoppner.Visible = True divMenu.Visible = False
divMenu.Visible = False RegistraScript("$('#barradenavegacion').css({'display':'none'})")
RegistraScript("$('#barradenavegacion').css({'display':'none'})") divContenido.Attributes.CssStyle("background") = "white"
divContenido.Attributes.CssStyle("background") = "white" divpagecontainer.Attributes.CssStyle("margin") = "0px !important"
divpagecontainer.Attributes.CssStyle("margin") = "0px !important" headertitleh3.Attributes.CssStyle("margin") = "0px !important"
headertitleh3.Attributes.CssStyle("margin") = "0px !important" divtopmenu.Visible = False
divtopmenu.Visible = False Else
Else 'MyChat_Init(Nothing, Nothing)
'MyChat_Init(Nothing, Nothing)
'19/05/2018 - CARGA TIPO DE CAMBIO
'19/05/2018 - CARGA TIPO DE CAMBIO '2018.08.14, se movió de la linea 59 a la actual
'2018.08.14, se movió de la linea 59 a la actual CargaTipoCambio()
CargaTipoCambio()
If UsuarioActual.Portal = False Then
If UsuarioActual.Portal = False Then CreaMenu()
CreaMenu() 'Configuracion()
'Configuracion() CargaUsuario()
CargaUsuario() CargaBuscadores()
CargaBuscadores() Else
Else LtMasterPerfil.Text = UsuarioActual.Rol
LtMasterPerfil.Text = UsuarioActual.Rol LtMasterUsuario.Text = UsuarioActual.Usuario
LtMasterUsuario.Text = UsuarioActual.Usuario End If
End If
End If
End If CargarNotificaciones()
CargarNotificaciones() Else
Else
Dim thisURL As String = Request.Url.Segments(Request.Url.Segments.Count - 1)
Dim thisURL As String = Request.Url.Segments(Request.Url.Segments.Count - 1) If thisURL.Equals("WizardRegistro.aspx") OrElse thisURL.Equals("Registro.aspx") Then
If thisURL.Equals("WizardRegistro.aspx") OrElse thisURL.Equals("Registro.aspx") Then LitTit.Text = "<span style='color:white; font-size:x-large'>AD</span>&nbsp;<span style='color: #32A1CF; font-size:x-large'> Soluciones en TI</span> "
LitTit.Text = "<span style='color:white; font-size:x-large'>AD</span>&nbsp;<span style='color: #32A1CF; font-size:x-large'> Soluciones en TI</span> "
End If
End If
End If
End If Else
Else 'VALIDACION DE SEGURIDAD, EN LA QUE SE VALIDA QUE LA EMPRESA EN LA QUE SE GENERO LA PAGINA SEA LA MISMA A LA DE LA SESION,
'VALIDACION DE SEGURIDAD, EN LA QUE SE VALIDA QUE LA EMPRESA EN LA QUE SE GENERO LA PAGINA SEA LA MISMA A LA DE LA SESION, 'DE NO SER ASI, SE REDIRECCIONA A INICIO.
'DE NO SER ASI, SE REDIRECCIONA A INICIO. If UsuarioActual IsNot Nothing AndAlso (HdnCveE.Value <> UsuarioActual.CveEmpresa.ToString OrElse HdnCveU.Value <> UsuarioActual.CveUsuario.ToString) Then
If UsuarioActual IsNot Nothing AndAlso (HdnCveE.Value <> UsuarioActual.CveEmpresa.ToString OrElse HdnCveU.Value <> UsuarioActual.CveUsuario.ToString) Then Response.Redirect(FormsAuthentication.DefaultUrl)
Response.Redirect(FormsAuthentication.DefaultUrl) End If
End If End If
End If End Sub
End Sub Private Sub CargaUsuario()
Private Sub CargaUsuario() If UsuarioActual IsNot Nothing Then
If UsuarioActual IsNot Nothing Then 'LtMasterNombre.Text = UsuarioActual.Nombre
'LtMasterNombre.Text = UsuarioActual.Nombre LtMasterPerfil.Text = UsuarioActual.Rol
LtMasterPerfil.Text = UsuarioActual.Rol LtMasterUsuario.Text = UsuarioActual.Usuario
LtMasterUsuario.Text = UsuarioActual.Usuario
'DivConfiguracionEmpresa.Visible = True
'DivConfiguracionEmpresa.Visible = True ' BtnConfiguracionEmpresa.Attributes.Add("onclick", String.Format("javascript:document.location.href='/Sistemas/Empresa.aspx?CveEmpresa={0}'", UsuarioActual.CveEmpresa))
' BtnConfiguracionEmpresa.Attributes.Add("onclick", String.Format("javascript:document.location.href='/Sistemas/Empresa.aspx?CveEmpresa={0}'", UsuarioActual.CveEmpresa)) BtnConfiguracionEmpresa.Visible = False
BtnConfiguracionEmpresa.Visible = False DivConfiguracionEmpresa.Visible = False
DivConfiguracionEmpresa.Visible = False 'loadchat()
'loadchat() If UsuarioActual.CveRol = 1 OrElse UsuarioActual.ModoSimulacion Then
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.ModoSimulacion Then DivCambiarUsuario.Visible = True
DivCambiarUsuario.Visible = True BtnCambiarUsuario.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpCambiaUsuario.aspx');")
BtnCambiarUsuario.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpCambiaUsuario.aspx');") End If
End If If UsuarioActual.MultipleEmpresa Then
If UsuarioActual.MultipleEmpresa Then BtnCambiarEmpresa.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpSeleccionarEmpresa.aspx');")
BtnCambiarEmpresa.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpSeleccionarEmpresa.aspx');") DivCambiarEmpresa.Visible = True
DivCambiarEmpresa.Visible = True End If
End If
End If
End If End Sub
End Sub 'Private Sub loadchat()
'Private Sub loadchat()
' If UsuarioActual.CveRol = 1 OrElse UsuarioActual.ModoSimulacion Then
' If UsuarioActual.CveRol = 1 OrElse UsuarioActual.ModoSimulacion Then ' Dim GlobalDTUsuarios As DataTable = DirectCast(Application("GlobalDTUsuarios"), DataTable)
' Dim GlobalDTUsuarios As DataTable = DirectCast(Application("GlobalDTUsuarios"), DataTable) ' Dim userconectedlist As List(Of Integer) = (From c In MyHub.usuarios Select c.CveUsuario Distinct).ToList
' Dim userconectedlist As List(Of Integer) = (From c In MyHub.usuarios Select c.CveUsuario Distinct).ToList ' Dim prefix As String = ""
' Dim prefix As String = "" ' Dim userstring As New StringBuilder
' Dim userstring As New StringBuilder ' For Each item As Integer In userconectedlist
' For Each item As Integer In userconectedlist ' userstring.AppendFormat("{0}{1} ", prefix, item)
' userstring.AppendFormat("{0}{1} ", prefix, item) ' prefix = ","
' prefix = "," ' Next
' Next ' stringusers = userstring.ToString
' stringusers = userstring.ToString ' If userconectedlist.Count > 0 Then
' If userconectedlist.Count > 0 Then ' GlobalDTUsuarios = GlobalDTUsuarios.FiltraParametros(String.Format("CveUsuario in ({0})", userstring))
' GlobalDTUsuarios = GlobalDTUsuarios.FiltraParametros(String.Format("CveUsuario in ({0})", userstring)) ' RptChatEmpresa.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa >1", "", {"CveEmpresa", "Empresa"})
' RptChatEmpresa.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa >1", "", {"CveEmpresa", "Empresa"}) ' RptChatEmpresa.DataBind()
' RptChatEmpresa.DataBind() ' End If
' End If ' MasterChat.Visible = True
' MasterChat.Visible = True
' End If
' End If 'End Sub
'End Sub 'Private stringusers As String = "0"
'Private stringusers As String = "0" 'Private Sub RptChatEmpresa_ItemDataBound(sender As Object, e As RepeaterItemEventArgs) Handles RptChatEmpresa.ItemDataBound
'Private Sub RptChatEmpresa_ItemDataBound(sender As Object, e As RepeaterItemEventArgs) Handles RptChatEmpresa.ItemDataBound ' Dim CveEmpresa As Integer = e.Item.DataItem("CveEmpresa").ToString.ToEntero
' Dim CveEmpresa As Integer = e.Item.DataItem("CveEmpresa").ToString.ToEntero ' Dim GlobalDTUsuarios As DataTable = DirectCast(Application("GlobalDTUsuarios"), DataTable).FiltraParametros(String.Format("CveUsuario in ({0}) AND CveEmpresa ={1}", stringusers, CveEmpresa))
' Dim GlobalDTUsuarios As DataTable = DirectCast(Application("GlobalDTUsuarios"), DataTable).FiltraParametros(String.Format("CveUsuario in ({0}) AND CveEmpresa ={1}", stringusers, CveEmpresa))
' Dim rpthijo As Repeater = DirectCast(e.Item.FindControl("RPTChatuser"), Repeater)
' Dim rpthijo As Repeater = DirectCast(e.Item.FindControl("RPTChatuser"), Repeater) ' rpthijo.DataSource = GlobalDTUsuarios
' rpthijo.DataSource = GlobalDTUsuarios ' rpthijo.DataBind()
' rpthijo.DataBind() 'End Sub
'End Sub Private Sub CargaBuscadores()
Private Sub CargaBuscadores() 'Proveedores
'Proveedores If UsuarioActual.TienePermisoPagina(37) Then tdProv.Visible = True
If UsuarioActual.TienePermisoPagina(37) Then tdProv.Visible = True
'Clientes
'Clientes If UsuarioActual.TienePermisoPagina(26) Then tdCliente.Visible = True
If UsuarioActual.TienePermisoPagina(26) Then tdCliente.Visible = True
'Factura de Ventas
'Factura de Ventas If UsuarioActual.TienePermisoPagina(6) Then tdVentas.Visible = True
If UsuarioActual.TienePermisoPagina(6) Then tdVentas.Visible = True
'Personal
'Personal If UsuarioActual.TienePermisoPagina(46) Then tdPersonal.Visible = True
If UsuarioActual.TienePermisoPagina(46) Then tdPersonal.Visible = True
'Buscar Productos servicios
'Buscar Productos servicios If UsuarioActual.TienePermisoPagina(13) Then tdBuscarPs.Visible = True
If UsuarioActual.TienePermisoPagina(13) Then tdBuscarPs.Visible = True
'Compras
'Compras If UsuarioActual.TienePermisoPagina(38) Then tdCompras.Visible = True
If UsuarioActual.TienePermisoPagina(38) Then tdCompras.Visible = True
'Ordenes Servicio
'Ordenes Servicio If UsuarioActual.TienePermisoPagina(135) Then tdOS.Visible = True
If UsuarioActual.TienePermisoPagina(135) Then tdOS.Visible = True
'Ingresos / Egresos
'Ingresos / Egresos If UsuarioActual.TienePermisoPagina(153) Then tdCheques.Visible = True
If UsuarioActual.TienePermisoPagina(153) Then tdCheques.Visible = True
'Órdenes de Compra
'Órdenes de Compra If UsuarioActual.TienePermisoPagina(103) Then tdOC.Visible = True
If UsuarioActual.TienePermisoPagina(103) Then tdOC.Visible = True
'Cuando es Requisición
'Cuando es Requisición If UsuarioActual.TienePermisoPagina(250) Then tdOC.Visible = True
If UsuarioActual.TienePermisoPagina(250) Then tdOC.Visible = True
'Inventarios Movimientos
'Inventarios Movimientos If UsuarioActual.TienePermisoPagina(219) Then TdMovInv.Visible = True
If UsuarioActual.TienePermisoPagina(219) Then TdMovInv.Visible = True
'Prospectos
'Prospectos If UsuarioActual.TienePermisoPagina(181) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx',980,547,'popBuscarProspectos');")
If UsuarioActual.TienePermisoPagina(181) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx',980,547,'popBuscarProspectos');") 'ProspectosRedes
'ProspectosRedes If UsuarioActual.TienePermisoPagina(183) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx?Opt=Redes',980,547,'popBuscarProspectos');")
If UsuarioActual.TienePermisoPagina(183) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx?Opt=Redes',980,547,'popBuscarProspectos');") 'ProspectosG15
'ProspectosG15 If UsuarioActual.TienePermisoPagina(187) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx?Opt=Atn',980,547,'popBuscarProspectos');")
If UsuarioActual.TienePermisoPagina(187) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx?Opt=Atn',980,547,'popBuscarProspectos');") 'ProspectosSIP
'ProspectosSIP If UsuarioActual.TienePermisoPagina(207) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx?Opt=SIP',980,547,'popBuscarProspectos');")
If UsuarioActual.TienePermisoPagina(207) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx?Opt=SIP',980,547,'popBuscarProspectos');")
If UsuarioActual.TienePermisoPagina(392) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospeccion/PopUpBuscarProspectos.aspx',980,547,'popBuscarProspectos');")
If UsuarioActual.TienePermisoPagina(392) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospeccion/PopUpBuscarProspectos.aspx',980,547,'popBuscarProspectos');")
If UsuarioActual.TienePermisoPagina(228) Then tdBExi.Visible = True
If UsuarioActual.TienePermisoPagina(228) Then tdBExi.Visible = True
'Contratos
'Contratos If UsuarioActual.TienePermisoPagina(313) Then TdContratos.Visible = True
If UsuarioActual.TienePermisoPagina(313) Then TdContratos.Visible = True
'BUSCAR MILITANTE
'BUSCAR MILITANTE If UsuarioActual.TienePermisoPagina(1001) Then tdBuscarMilitante.Visible = True
If UsuarioActual.TienePermisoPagina(1001) Then tdBuscarMilitante.Visible = True
'Orden Produccion'
'Orden Produccion' If UsuarioActual.TienePermisoPagina(816) Then tdOP.Visible = True
If UsuarioActual.TienePermisoPagina(816) Then tdOP.Visible = True
'Produccion'
'Produccion' If UsuarioActual.TienePermisoPagina(823) Then tdP.Visible = True
If UsuarioActual.TienePermisoPagina(823) Then tdP.Visible = True
'BUSCAR ACERCAMIENTO CRM'
'BUSCAR ACERCAMIENTO CRM' If UsuarioActual.TienePermisoProceso(251) Then TdCRMAcercamientos.Visible = True
If UsuarioActual.TienePermisoProceso(251) Then TdCRMAcercamientos.Visible = True
End Sub
End Sub
Protected Sub CerrarSesion_Click(sender As Object, e As EventArgs) Handles BtnCerrarSesion.ServerClick
Protected Sub CerrarSesion_Click(sender As Object, e As EventArgs) Handles BtnCerrarSesion.ServerClick
'If Request.ServerVariables("URL").ToUpper.Contiene("/PortalCliente/PortalCliente.aspx".ToUpper) Then
'If Request.ServerVariables("URL").ToUpper.Contiene("/PortalCliente/PortalCliente.aspx".ToUpper) Then ' UsuarioActual.CerrarSession(1)
' UsuarioActual.CerrarSession(1) 'ElseIf Request.ServerVariables("URL").ToUpper.Contiene("/PortalProveedores/PortalProveedor.aspx".ToUpper) Then
'ElseIf Request.ServerVariables("URL").ToUpper.Contiene("/PortalProveedores/PortalProveedor.aspx".ToUpper) Then ' UsuarioActual.CerrarSession(2)
' UsuarioActual.CerrarSession(2) 'Else
'Else 'MyHub.RemoveConexiones(UsuarioActual.CveUsuario)
'MyHub.RemoveConexiones(UsuarioActual.CveUsuario) Usuario.CerrarSession()
Usuario.CerrarSession() 'End If
'End If
'UsuarioActual.Dispose()
'UsuarioActual.Dispose() End Sub
End Sub
'Private Sub Configuracion()
'Private Sub Configuracion() ' Dim dt As New DataTable
' Dim dt As New DataTable ' dt.ReadXml(String.Format("{0}\Menu\ERP\{1}_Conf.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveUsuario))
' dt.ReadXml(String.Format("{0}\Menu\ERP\{1}_Conf.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveUsuario))
'End Sub
'End Sub
Private Sub CreaMenu()
Private Sub CreaMenu() Dim dt As New DataTable
Dim dt As New DataTable
If UsuarioActual.CveRol = 1200 Then
If UsuarioActual.CveRol = 1200 Then dt.ReadXml(String.Format("{0}\Menu\GPS\{1}.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveUsuario))
dt.ReadXml(String.Format("{0}\Menu\GPS\{1}.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveUsuario)) Else
Else dt.ReadXml(String.Format("{0}\Menu\ERP\{1}.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveUsuario))
dt.ReadXml(String.Format("{0}\Menu\ERP\{1}.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveUsuario)) End If
End If
Dim Inicio = From i In dt.AsEnumerable Where i!CvePadre.Equals(0) Order By i!Orden
Dim Inicio = From i In dt.AsEnumerable Where i!CvePadre.Equals(0) Order By i!Orden Dim CveModuloPadre, CveModuloPadreSeleccionado, CveModuloHijoSeleccionado, CveModuloNietoSeleccionado As Integer
Dim CveModuloPadre, CveModuloPadreSeleccionado, CveModuloHijoSeleccionado, CveModuloNietoSeleccionado As Integer Dim CveModulo As Integer = CveModulomasterpage.Text.ToEntero
Dim CveModulo As Integer = CveModulomasterpage.Text.ToEntero Dim ScriptColorGrupoModulo As String = ""
Dim ScriptColorGrupoModulo As String = "" Dim LinkBase = "javascript:;"
Dim LinkBase = "javascript:;" Dim HeaderBar As New StringBuilder("<li><i class='fa fa-home'></i><a href='/Inicio.aspx'>Inicio</a>")
Dim HeaderBar As New StringBuilder("<li><i class='fa fa-home'></i><a href='/Inicio.aspx'>Inicio</a>") Dim LinkPadre = ""
Dim LinkPadre = "" Dim Linkpapa As String = ""
Dim Linkpapa As String = "" Dim LinkHijo = ""
Dim LinkHijo = "" Dim Linkson As String = ""
Dim Linkson As String = "" Dim LinkNieto = ""
Dim LinkNieto = "" Dim ClassActive As String
Dim ClassActive As String CveModuloPadreSeleccionado = 0 : CveModuloHijoSeleccionado = 0 : CveModuloNietoSeleccionado = 0
CveModuloPadreSeleccionado = 0 : CveModuloHijoSeleccionado = 0 : CveModuloNietoSeleccionado = 0 Dim MenuHTML As New StringBuilder
Dim MenuHTML As New StringBuilder For Each drP As DataRow In Inicio
For Each drP As DataRow In Inicio CveModuloPadre = drP("CveModulo").ToString.ToEntero
CveModuloPadre = drP("CveModulo").ToString.ToEntero LinkPadre = drP("LIGA").ToString
LinkPadre = drP("LIGA").ToString If drP("PopUp").ToString = "S" Then LinkPadre = String.Format("javascript:AbrirVentana('{0}',{1},{2},'N');", drP("LIGA"), drP("ANCHO"), drP("ALTO"))
If drP("PopUp").ToString = "S" Then LinkPadre = String.Format("javascript:AbrirVentana('{0}',{1},{2},'N');", drP("LIGA"), drP("ANCHO"), drP("ALTO"))
Dim Hijos = From h In dt.AsEnumerable Where h!CvePadre.Equals(CveModuloPadre) Order By h!Orden
Dim Hijos = From h In dt.AsEnumerable Where h!CvePadre.Equals(CveModuloPadre) Order By h!Orden If CveModulo = drP("CveModulo").ToString.ToEntero Then
If CveModulo = drP("CveModulo").ToString.ToEntero Then HeaderBar.AppendFormat("<i class='fa fa-angle-right'></i></li> <li><a href='{0}'>{1}</a>", LinkPadre, drP("Modulo").ToString)
HeaderBar.AppendFormat("<i class='fa fa-angle-right'></i></li> <li><a href='{0}'>{1}</a>", LinkPadre, drP("Modulo").ToString) ScriptColorGrupoModulo = ColorPage(drP("CveGrupoModulo").ToString.ToEntero)
ScriptColorGrupoModulo = ColorPage(drP("CveGrupoModulo").ToString.ToEntero) End If
End If If Hijos.Count > 0 Then
If Hijos.Count > 0 Then Linkpapa = LinkPadre
Linkpapa = LinkPadre LinkPadre = LinkBase
LinkPadre = LinkBase MenuHTML.AppendFormat("<li id='m{3}'><a href='{0}'>{2}<span class='title'>{1}</span><span id='j{3}' ></span><span class='arrow '></span></a><ul class='sub-menu'>", LinkPadre, drP("Modulo"), If(drP("Estilo").ToString <> "", String.Format("<i class='{0}'></i>", drP("Estilo")), ""), drP("CveModulo"))
MenuHTML.AppendFormat("<li id='m{3}'><a href='{0}'>{2}<span class='title'>{1}</span><span id='j{3}' ></span><span class='arrow '></span></a><ul class='sub-menu'>", LinkPadre, drP("Modulo"), If(drP("Estilo").ToString <> "", String.Format("<i class='{0}'></i>", drP("Estilo")), ""), drP("CveModulo")) For Each drH As DataRow In Hijos
For Each drH As DataRow In Hijos Dim CveModuloHijo As Integer = drH("CveModulo").ToString.ToEntero
Dim CveModuloHijo As Integer = drH("CveModulo").ToString.ToEntero LinkHijo = drH("LIGA").ToString
LinkHijo = drH("LIGA").ToString If CveModulo = drH("CveModulo").ToString.ToEntero Then
If CveModulo = drH("CveModulo").ToString.ToEntero Then CveModuloPadreSeleccionado = CveModuloPadre
CveModuloPadreSeleccionado = CveModuloPadre ClassActive = "class='active'"
ClassActive = "class='active'" HeaderBar.AppendFormat("<i class='fa fa-angle-right'></i> </li><li><a href='{0}'>{1}</a> <i class='fa fa-angle-right'></i> </li><li><a href='{2}'>{3}</a>", Linkpapa, drP("Modulo").ToString, LinkHijo, drH("Modulo").ToString)
HeaderBar.AppendFormat("<i class='fa fa-angle-right'></i> </li><li><a href='{0}'>{1}</a> <i class='fa fa-angle-right'></i> </li><li><a href='{2}'>{3}</a>", Linkpapa, drP("Modulo").ToString, LinkHijo, drH("Modulo").ToString) ScriptColorGrupoModulo = ColorPage(drH("CveGrupoModulo").ToString.ToEntero)
ScriptColorGrupoModulo = ColorPage(drH("CveGrupoModulo").ToString.ToEntero) Else
Else
ClassActive = ""
ClassActive = "" End If
End If If drH("PopUp").ToString = "S" Then LinkHijo = String.Format("javascript:AbrirVentana('{0}',{1},{2},'N');", drH("LIGA"), drH("ANCHO"), drH("ALTO"))
If drH("PopUp").ToString = "S" Then LinkHijo = String.Format("javascript:AbrirVentana('{0}',{1},{2},'N');", drH("LIGA"), drH("ANCHO"), drH("ALTO"))
Dim Nietos = From h In dt.AsEnumerable Where h!CvePadre.Equals(CveModuloHijo) Order By h!Orden
Dim Nietos = From h In dt.AsEnumerable Where h!CvePadre.Equals(CveModuloHijo) Order By h!Orden If Nietos.Count > 0 Then
If Nietos.Count > 0 Then Linkson = LinkHijo
Linkson = LinkHijo LinkHijo = LinkBase
LinkHijo = LinkBase MenuHTML.AppendFormat("<li id='m{3}'><a href='{0}'>{2}{1}<span class='arrow '></span> </a><ul class='sub-menu'>", LinkHijo, drH("Modulo"), If(drP("Estilo").ToString <> "", String.Format("<i class='{0}'></i>", drH("Estilo")), ""), drH("CveModulo"))
MenuHTML.AppendFormat("<li id='m{3}'><a href='{0}'>{2}{1}<span class='arrow '></span> </a><ul class='sub-menu'>", LinkHijo, drH("Modulo"), If(drP("Estilo").ToString <> "", String.Format("<i class='{0}'></i>", drH("Estilo")), ""), drH("CveModulo")) For Each drN As DataRow In Nietos
For Each drN As DataRow In Nietos LinkNieto = drN("LIGA").ToString
LinkNieto = drN("LIGA").ToString If CveModulo = drN("CveModulo").ToString.ToEntero Then
If CveModulo = drN("CveModulo").ToString.ToEntero Then CveModuloPadreSeleccionado = CveModuloPadre : CveModuloHijoSeleccionado = CveModuloHijo
CveModuloPadreSeleccionado = CveModuloPadre : CveModuloHijoSeleccionado = CveModuloHijo ClassActive = "class='active'"
ClassActive = "class='active'" HeaderBar.AppendFormat("<i class='fa fa-angle-right'></i> </li><li><a href='{0}'>{1}</a> <i class='fa fa-angle-right'></i> </li><li><a href='{2}'>{3}</a> <i class='fa fa-angle-right'></i> </li><li><a href='{4}'>{5}</a>", Linkpapa, drP("Modulo").ToString, Linkson, drH("Modulo").ToString, LinkNieto, drN("Modulo"))
HeaderBar.AppendFormat("<i class='fa fa-angle-right'></i> </li><li><a href='{0}'>{1}</a> <i class='fa fa-angle-right'></i> </li><li><a href='{2}'>{3}</a> <i class='fa fa-angle-right'></i> </li><li><a href='{4}'>{5}</a>", Linkpapa, drP("Modulo").ToString, Linkson, drH("Modulo").ToString, LinkNieto, drN("Modulo")) ScriptColorGrupoModulo = ColorPage(drN("CveGrupoModulo").ToString.ToEntero)
ScriptColorGrupoModulo = ColorPage(drN("CveGrupoModulo").ToString.ToEntero) Else
Else ClassActive = ""
ClassActive = "" End If
End If If drN("PopUp").ToString = "S" Then LinkNieto = String.Format("javascript:AbrirVentana('{0}',{1},{2},'N');", drN("LIGA"), drN("ANCHO"), drN("ALTO"))
If drN("PopUp").ToString = "S" Then LinkNieto = String.Format("javascript:AbrirVentana('{0}',{1},{2},'N');", drN("LIGA"), drN("ANCHO"), drN("ALTO")) MenuHTML.AppendFormat("<li {3}><a href=""{0}"">{2}{1}</a></li>", LinkNieto, drN("Modulo"), If(drP("Estilo").ToString <> "", String.Format("<i class='{0}'></i>", drN("Estilo")), ""), ClassActive)
MenuHTML.AppendFormat("<li {3}><a href=""{0}"">{2}{1}</a></li>", LinkNieto, drN("Modulo"), If(drP("Estilo").ToString <> "", String.Format("<i class='{0}'></i>", drN("Estilo")), ""), ClassActive) Next
Next MenuHTML.AppendFormat("</ul></li>")
MenuHTML.AppendFormat("</ul></li>") Else
Else MenuHTML.AppendFormat("<li {3}><a href=""{0}"">{2}{1}</a></li>", LinkHijo, drH("Modulo"), If(drP("Estilo").ToString <> "", String.Format("<i class='{0}'></i>", drH("Estilo")), ""), ClassActive)
MenuHTML.AppendFormat("<li {3}><a href=""{0}"">{2}{1}</a></li>", LinkHijo, drH("Modulo"), If(drP("Estilo").ToString <> "", String.Format("<i class='{0}'></i>", drH("Estilo")), ""), ClassActive) End If
End If Next
Next MenuHTML.AppendFormat("</ul></li>")
MenuHTML.AppendFormat("</ul></li>") Else
Else MenuHTML.AppendFormat("<li><a href=""{0}"">{2}<span class='title'>{1}</span></a></li>", LinkPadre, drP("Modulo"), If(drP("Estilo").ToString <> "", String.Format("<i class='{0}'></i>", drP("Estilo")), ""))
MenuHTML.AppendFormat("<li><a href=""{0}"">{2}<span class='title'>{1}</span></a></li>", LinkPadre, drP("Modulo"), If(drP("Estilo").ToString <> "", String.Format("<i class='{0}'></i>", drP("Estilo")), "")) End If
End If Next
Next
If CveModuloPadreSeleccionado > 0 Then
If CveModuloPadreSeleccionado > 0 Then MenuHTML = MenuHTML.Replace(String.Format("id='m{0}'", CveModuloPadreSeleccionado), String.Format("id='m{0}' class='active open'", CveModuloPadreSeleccionado))
MenuHTML = MenuHTML.Replace(String.Format("id='m{0}'", CveModuloPadreSeleccionado), String.Format("id='m{0}' class='active open'", CveModuloPadreSeleccionado)) MenuHTML = MenuHTML.Replace(String.Format("id='j{0}'", CveModuloPadreSeleccionado), String.Format("id='j{0}' class='selected'", CveModuloPadreSeleccionado))
MenuHTML = MenuHTML.Replace(String.Format("id='j{0}'", CveModuloPadreSeleccionado), String.Format("id='j{0}' class='selected'", CveModuloPadreSeleccionado)) Else
Else End If
End If If CveModuloHijoSeleccionado > 0 Then
If CveModuloHijoSeleccionado > 0 Then MenuHTML = MenuHTML.Replace(String.Format("id='m{0}'", CveModuloHijoSeleccionado), String.Format("id='m{0}' class='open'", CveModuloHijoSeleccionado))
MenuHTML = MenuHTML.Replace(String.Format("id='m{0}'", CveModuloHijoSeleccionado), String.Format("id='m{0}' class='open'", CveModuloHijoSeleccionado)) MenuHTML = MenuHTML.Replace(String.Format("id='j{0}'", CveModuloHijoSeleccionado), String.Format("id='j{0}' class='selected'", CveModuloHijoSeleccionado))
MenuHTML = MenuHTML.Replace(String.Format("id='j{0}'", CveModuloHijoSeleccionado), String.Format("id='j{0}' class='selected'", CveModuloHijoSeleccionado)) End If
End If HeaderBar.AppendFormat("</li>{0}", ScriptColorGrupoModulo)
HeaderBar.AppendFormat("</li>{0}", ScriptColorGrupoModulo) BarraNavegacion.Text = HeaderBar.ToString
BarraNavegacion.Text = HeaderBar.ToString CargaMenu(MenuHTML)
CargaMenu(MenuHTML) End Sub
End Sub
Private Function ColorPage(value As Integer) As String
Private Function ColorPage(value As Integer) As String
Select Case value
Select Case value Case 1
Case 1 Return "<script>$('body').addClass('ventasbody')</script>"
Return "<script>$('body').addClass('ventasbody')</script>" Case 2
Case 2 Return "<script>$('body').addClass('comprasbody')</script>"
Return "<script>$('body').addClass('comprasbody')</script>" Case 3
Case 3 Return "<script>$('body').addClass('bancosbody')</script>"
Return "<script>$('body').addClass('bancosbody')</script>" Case 4
Case 4 Return "<script>$('body').addClass('ocomprabody')</script>"
Return "<script>$('body').addClass('ocomprabody')</script>" Case 5
Case 5 Return "<script>$('body').addClass('inventariosbody')</script>"
Return "<script>$('body').addClass('inventariosbody')</script>" Case 6
Case 6 Return "<script>$('body').addClass('oserviciobody')</script>"
Return "<script>$('body').addClass('oserviciobody')</script>" Case 7
Case 7 Return "<script>$('body').addClass('oibody')</script>"
Return "<script>$('body').addClass('oibody')</script>" Case 8
Case 8 Return "<script>$('body').addClass('contabilidadbody')</script>"
Return "<script>$('body').addClass('contabilidadbody')</script>" Case 9
Case 9 Return "<script>$('body').addClass('rhumanosbody')</script>"
Return "<script>$('body').addClass('rhumanosbody')</script>" Case 10
Case 10 Return "<script>$('body').addClass('afijosbody')</script>"
Return "<script>$('body').addClass('afijosbody')</script>" Case Else
Case Else Return ""
Return "" End Select
End Select End Function
End Function
Private Sub CargaMenu(Texto As StringBuilder)
Private Sub CargaMenu(Texto As StringBuilder) Menu.Text = Texto.ToString
Menu.Text = Texto.ToString End Sub
End Sub
#Region "Notificaciones"
#Region "Notificaciones"
Private Sub CargarNotificaciones()
Private Sub CargarNotificaciones() Dim Notificaciones As New StringBuilder
Dim Notificaciones As New StringBuilder
'Bienvenida
'Bienvenida Notificaciones.Append(ItemNotificaciones("Bienvenido a SIG ", "Hoy", "fa fa-bullhorn"))
Notificaciones.Append(ItemNotificaciones("Bienvenido a SIG ", "Hoy", "fa fa-bullhorn"))
'Certificado
'Certificado Dim fechacer As String = ConvertCER()
Dim fechacer As String = ConvertCER() If fechacer = "" OrElse (((DateTime.Parse(fechacer).Month - Now.Month) < 2) AndAlso ((DateTime.Parse(fechacer).Year - Now.Year) < 1)) Then
If fechacer = "" OrElse (((DateTime.Parse(fechacer).Month - Now.Month) < 2) AndAlso ((DateTime.Parse(fechacer).Year - Now.Year) < 1)) Then Notificaciones.Append(ItemNotificaciones("Su certificado expira en: ", fechacer, Tipo:="warning"))
Notificaciones.Append(ItemNotificaciones("Su certificado expira en: ", fechacer, Tipo:="warning")) countNotificaciones = countNotificaciones + 1
countNotificaciones = countNotificaciones + 1 Else
Else Notificaciones.Append(ItemNotificaciones("Su certificado expira en: ", fechacer))
Notificaciones.Append(ItemNotificaciones("Su certificado expira en: ", fechacer)) End If
End If
'C A R G A - A L E R T A S - O R D E N E S D E C O M P R A
'C A R G A - A L E R T A S - O R D E N E S D E C O M P R A If UsuarioActual.CveUsuario = 1459 Then
If UsuarioActual.CveUsuario = 1459 Then Dim OC As New ClsOC
Dim OC As New ClsOC If OC.GetOrdenesPendientes("-1", 0, UsuarioActual.CveEmpresa, -1, -1, -1, UsuarioActual.CveUsuario, -1) Then
If OC.GetOrdenesPendientes("-1", 0, UsuarioActual.CveEmpresa, -1, -1, -1, UsuarioActual.CveUsuario, -1) Then If (OC.DtResultados.Rows.Count > 0) Then
If (OC.DtResultados.Rows.Count > 0) Then Notificaciones.Append(ItemNotificaciones(String.Format("Orden de Compra por atender {0}", OC.DtResultados.Rows.Count), Ico:="fa fa-tags", Tipo:="warning", Link:="/OC/RepOC.aspx"))
Notificaciones.Append(ItemNotificaciones(String.Format("Orden de Compra por atender {0}", OC.DtResultados.Rows.Count), Ico:="fa fa-tags", Tipo:="warning", Link:="/OC/RepOC.aspx")) countNotificaciones = countNotificaciones + 1
countNotificaciones = countNotificaciones + 1 End If
End If End If
End If OC.Dispose()
OC.Dispose() End If
End If
''OC Pendientes por atender
''OC Pendientes por atender 'Dim OC As New ClsOC
'Dim OC As New ClsOC 'If OC.GetOrdenesPendientes("-1", 0, UsuarioActual.CveEmpresa, -1, -1, -1, UsuarioActual.CveUsuario, -1) Then
'If OC.GetOrdenesPendientes("-1", 0, UsuarioActual.CveEmpresa, -1, -1, -1, UsuarioActual.CveUsuario, -1) Then ' Notificaciones.Append(ItemNotificaciones(String.Format("REQ/OC por atender: <b>{0}</b>", OC.DtResultados.Rows.Count), Tipo:=If(OC.DtResultados.Rows.Count > 3, "warning", "info"), Link:="/OC/RepOC.aspx"))
' Notificaciones.Append(ItemNotificaciones(String.Format("REQ/OC por atender: <b>{0}</b>", OC.DtResultados.Rows.Count), Tipo:=If(OC.DtResultados.Rows.Count > 3, "warning", "info"), Link:="/OC/RepOC.aspx")) ' If OC.DtResultados.Rows.Count > 0 Then
' If OC.DtResultados.Rows.Count > 0 Then ' countNotificaciones = countNotificaciones + 1
' countNotificaciones = countNotificaciones + 1 ' End If
' End If 'End If
'End If 'OC.Dispose()
'OC.Dispose()
LtlMNotificaciones.Text = LtlMNotificaciones.Text & Notificaciones.ToString
LtlMNotificaciones.Text = LtlMNotificaciones.Text & Notificaciones.ToString End Sub
End Sub
Private Function ConvertCER() As String
Private Function ConvertCER() As String Try
Try Dim Archivo As String = String.Format("{0}Empresas\{1}\Certificados\{2}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.ArchivoCer)
Dim Archivo As String = String.Format("{0}Empresas\{1}\Certificados\{2}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.ArchivoCer) If File.Exists(Archivo) Then
If File.Exists(Archivo) Then Dim CerFile As New FileStream(Archivo, FileMode.Open, FileAccess.Read)
Dim CerFile As New FileStream(Archivo, FileMode.Open, FileAccess.Read) Dim Size As Integer = CerFile.Length.ToString.ToEntero()
Dim Size As Integer = CerFile.Length.ToString.ToEntero() Dim Data As Byte() = New Byte(Size - 1) {}
Dim Data As Byte() = New Byte(Size - 1) {} Size = CerFile.Read(Data, 0, Size)
Size = CerFile.Read(Data, 0, Size) CerFile.Close()
CerFile.Close() CerFile.Dispose()
CerFile.Dispose()
Dim x509 As New X509Certificate2()
Dim x509 As New X509Certificate2() x509.Import(Data)
x509.Import(Data) Return x509.NotAfter.ToShortDateString()
Return x509.NotAfter.ToShortDateString() End If
End If
Catch ex As Exception
Catch ex As Exception Return ""
Return "" End Try
End Try Return ""
Return "" End Function
End Function
#End Region
#End Region
#Region "TIPO DE CAMBIO"
#Region "TIPO DE CAMBIO" Private Sub CargaTipoCambio()
Private Sub CargaTipoCambio() Dim ObjGenerales As ClsGenerales = New ClsGenerales
Dim ObjGenerales As ClsGenerales = New ClsGenerales If ObjGenerales.GetTipoCambio(-1, DateTime.Now) And ObjGenerales.DtResultados.Rows.Count > 0 Then
If ObjGenerales.GetTipoCambio(-1, DateTime.Now) And ObjGenerales.DtResultados.Rows.Count > 0 Then lblTipoCambio.Text = String.Format(" | TC {0:C4}", ObjGenerales.DtResultados(0)("TipoCambio").ToString().ToDecimal())
lblTipoCambio.Text = String.Format(" | TC {0:C4}", ObjGenerales.DtResultados(0)("TipoCambio").ToString().ToDecimal()) End If
End If ObjGenerales.Dispose()
ObjGenerales.Dispose() End Sub
End Sub #End Region
#End Region
End Class End Class

View File

@@ -1291,8 +1291,10 @@ Partial Class Clientes
'CargaFormaPago33() 'CargaFormaPago33()
'CargaComboCFDI() 'CargaComboCFDI()
LnkPorcentajeMarcas.Visible = True If UsuarioActual.TienePermisoProceso(279) Then
LnkPorcentajePrecios.Visible = True LnkPorcentajeMarcas.Visible = True
LnkPorcentajePrecios.Visible = True
End If
If UsuarioActual.TienePermisoProceso(261) Then LnkVerGrafica.Visible = True If UsuarioActual.TienePermisoProceso(261) Then LnkVerGrafica.Visible = True
@@ -2787,7 +2789,8 @@ Partial Class Clientes
TxtNumeroCuenta.Text = "" TxtNumeroCuenta.Text = ""
DdlMetodoPagoSucursal.SelectedIndex = 0 DdlMetodoPagoSucursal.SelectedIndex = 0
UpAgregarSucursal.Update() UpAgregarSucursal.Update()
Me.CveClienteSuc = -1
Me.Actualizar = False
txtLg.Text = "" txtLg.Text = ""
txtLt.Text = "" txtLt.Text = ""
HDMAPOP.Value = "2" HDMAPOP.Value = "2"
@@ -2896,11 +2899,11 @@ Partial Class Clientes
UpAgregarSucursal.Update() UpAgregarSucursal.Update()
CargaDdlSucursalCliente() CargaDdlSucursalCliente()
ObjCliente.Dispose() ObjCliente.Dispose()
RegistraScript("hideDivEC();")
Actualizar = False
Me.Actualizar = False
Me.CveClienteSuc = -1
RegistraScript("hideDivEC();")
End Sub End Sub
Protected Sub LnkAgragarDireccion_Click(sender As Object, e As EventArgs) Protected Sub LnkAgragarDireccion_Click(sender As Object, e As EventArgs)
@@ -2971,8 +2974,8 @@ Partial Class Clientes
End Sub End Sub
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GVSucursales.RowEditing Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GVSucursales.RowEditing
Actualizar = True Me.Actualizar = True
CveClienteSuc = GVSucursales.DataKeys(e.NewEditIndex).Value.ToString.ToEntero Me.CveClienteSuc = GVSucursales.DataKeys(e.NewEditIndex).Value.ToString.ToEntero
Dim ObjCliente As New ClsClientes Dim ObjCliente As New ClsClientes

View File

@@ -2321,7 +2321,7 @@
</div> </div>
<div id="DivDireccionCliente" runat="server" visible="false" class="form-group form-md-line-input input-iconright"> <div id="DivDireccionCliente" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDireccionCliente" CssClass="form-control " runat="server" MaxLength="90" CausesValidation="true"></asp:TextBox> <asp:TextBox ID="TxtDireccionCliente" CssClass="form-control " runat="server" MaxLength="90" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TxtDireccionCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Direccion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVDireccionC" runat="server" ControlToValidate="TxtDireccionCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Direccion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtDireccionCliente.ClientID.ToString()%>">Dirección:</label> <label for="<%= TxtDireccionCliente.ClientID.ToString()%>">Dirección:</label>
</div> </div>
<div id="DivNumeroCPCliente" runat="server" visible="false" class="row" style="padding-left: 16px;"> <div id="DivNumeroCPCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
@@ -2332,7 +2332,7 @@
</div> </div>
<div class="form-group form-md-line-input input-iconright col-xs-4"> <div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtNumExtCliente" CssClass="form-control " runat="server" MaxLength="20" CausesValidation="true"></asp:TextBox> <asp:TextBox ID="TxtNumExtCliente" CssClass="form-control " runat="server" MaxLength="20" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtNumExtCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Número Exterior''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVNoEC" runat="server" ControlToValidate="TxtNumExtCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Número Exterior''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtNumExtCliente.ClientID.ToString()%>">Número Exterior:</label> <label for="<%= TxtNumExtCliente.ClientID.ToString()%>">Número Exterior:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright col-xs-4"> <div class="form-group form-md-line-input input-iconright col-xs-4">
@@ -2343,7 +2343,7 @@
<div id="DivColoniaTelefonoCliente" runat="server" visible="false" class="row" style="padding-left: 16px;"> <div id="DivColoniaTelefonoCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtColoniaCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox> <asp:TextBox ID="TxtColoniaCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="TxtColoniaCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVColoniaC" runat="server" ControlToValidate="TxtColoniaCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtColoniaCliente.ClientID.ToString()%>">Colonia:</label> <label for="<%= TxtColoniaCliente.ClientID.ToString()%>">Colonia:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
@@ -2354,24 +2354,24 @@
<div id="DivCiudadLocalidadCliente" runat="server" visible="false" class="row" style="padding-left: 16px;"> <div id="DivCiudadLocalidadCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtCiudadCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox> <asp:TextBox ID="TxtCiudadCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="TxtCiudadCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ciudad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVCiudadC" runat="server" ControlToValidate="TxtCiudadCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ciudad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtCiudadCliente.ClientID.ToString()%>">Ciudad:</label> <label for="<%= TxtCiudadCliente.ClientID.ToString()%>">Ciudad:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtLocalidadCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox> <asp:TextBox ID="TxtLocalidadCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="TxtLocalidadCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVLocalidadC" runat="server" ControlToValidate="TxtLocalidadCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtLocalidadCliente.ClientID.ToString()%>">Localidad:</label> <label for="<%= TxtLocalidadCliente.ClientID.ToString()%>">Localidad:</label>
</div> </div>
</div> </div>
<div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;"> <div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtEstadoCliente" CssClass="form-control " runat="server" MaxLength="35" CausesValidation="true"></asp:TextBox> <asp:TextBox ID="TxtEstadoCliente" CssClass="form-control " runat="server" MaxLength="35" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="TxtEstadoCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVEstadoC" runat="server" ControlToValidate="TxtEstadoCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtEstadoCliente.ClientID.ToString()%>">Estado:</label> <label for="<%= TxtEstadoCliente.ClientID.ToString()%>">Estado:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtPaisCliente" CssClass="form-control " Text="Mexico" runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox> <asp:TextBox ID="TxtPaisCliente" CssClass="form-control " Text="Mexico" runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="TxtPaisCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''País''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVPaisC" runat="server" ControlToValidate="TxtPaisCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''País''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtPaisCliente.ClientID.ToString()%>">País:</label> <label for="<%= TxtPaisCliente.ClientID.ToString()%>">País:</label>
</div> </div>
</div> </div>
@@ -2387,15 +2387,17 @@
</div> </div>
<div id="DivFormaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;"> <div id="DivFormaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlMetodoCliente" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPago" DataValueField="CveMetodoPago" Width="200px"> <asp:DropDownList ID="DdlMetodoCliente" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPagoSAT" DataValueField="CveMetodoPago" Width="200px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DdlMetodoCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Método Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlMetodoCliente.ClientID.ToString()%>">Método Pago:</label> <label for="<%= DdlMetodoCliente.ClientID.ToString()%>">Método Pago:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright col-xs-6"> <div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlFormaCliente" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="FormaPagoSAT" DataValueField="CveFormaPago" Width="200px"> <asp:DropDownList ID="DdlFormaCliente" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="FormaPagoSAT" DataValueField="CveFormaPago" Width="200px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="DdlMetodoCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Forma Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlFormaCliente.ClientID.ToString()%>">Forma Pago: </label> <label for="<%= DdlFormaCliente.ClientID.ToString()%>">Forma Pago: </label>
<i></i> <i></i>
</div> </div>

View File

@@ -4592,6 +4592,17 @@ Partial Class PV
DivCorreoCuentaCliente.Visible = True DivCorreoCuentaCliente.Visible = True
DivBotonesAgregarCliente.Visible = True DivBotonesAgregarCliente.Visible = True
DivFormaCliente.Visible = True DivFormaCliente.Visible = True
RFVDireccionC.Visible = False
RFVNoEC.Visible = False
RFVColoniaC.Visible = False
RFVCiudadC.Visible = False
RFVLocalidadC.Visible = False
RFVEstadoC.Visible = False
RFVPaisC.Visible = False
DdlMetodoCliente.SelectedValueExist(1)
DdlFormaCliente.SelectedValueExist(1)
Else Else
Dim ObjCliente As New ClsClientes Dim ObjCliente As New ClsClientes
If ObjCliente.ValidaClienteRFC(TxtRFCCliente.Text, UsuarioActual.CveEmpresa) Then If ObjCliente.ValidaClienteRFC(TxtRFCCliente.Text, UsuarioActual.CveEmpresa) Then
@@ -4614,6 +4625,17 @@ Partial Class PV
End If End If
End If End If
ObjCliente.Dispose() ObjCliente.Dispose()
RFVDireccionC.Visible = True
RFVNoEC.Visible = True
RFVColoniaC.Visible = True
RFVCiudadC.Visible = True
RFVLocalidadC.Visible = True
RFVEstadoC.Visible = True
RFVPaisC.Visible = True
DdlMetodoCliente.SelectedValueExist(-1)
DdlFormaCliente.SelectedValueExist(-1)
End If End If
End Sub End Sub

View File

@@ -103,7 +103,7 @@
<asp:BoundField HeaderText="Estatus" DataField="EstatusFactura" ItemStyle-Width="160px" /> <asp:BoundField HeaderText="Estatus" DataField="EstatusFactura" ItemStyle-Width="160px" />
<asp:TemplateField ItemStyle-Width="35px" HeaderText="Verificar"> <asp:TemplateField ItemStyle-Width="35px" HeaderText="Verificar">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton runat="server" OnClick="BtnValidar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea verificar la cancelación?" data-btn-ok-label="si"></asp:LinkButton> <asp:LinkButton runat="server" OnClick="BtnValidarRefacturacion_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea verificar la cancelación?" data-btn-ok-label="si"></asp:LinkButton>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:HyperLinkField HeaderText="Refacturación" Text="Refacturar" DataNavigateUrlFields="CveVenta" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveDevolucion={0}&NuevaFactura=1" /> <asp:HyperLinkField HeaderText="Refacturación" Text="Refacturar" DataNavigateUrlFields="CveVenta" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveDevolucion={0}&NuevaFactura=1" />

View File

@@ -78,6 +78,25 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
Alert(VerificarVigenciaSAT(CveVenta, CveCliente, Folio, TipoDocto, Uuid, UsuarioActual.Empresa.RFC, RFCCliente, Total)); Alert(VerificarVigenciaSAT(CveVenta, CveCliente, Folio, TipoDocto, Uuid, UsuarioActual.Empresa.RFC, RFCCliente, Total));
} }
CargaDatos(); CargaDatos();
}
protected void BtnValidarRefacturacion_Click(object sender, EventArgs e)
{
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
int CveVenta = GvRow.DataKey("CveVenta").ToEntero();
int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
string Total = GvRow.DataKey("Total");
string SubTotal = GvRow.DataKey("SubTotal");
string Uuid = GvRow.DataKey("FolioFiscal");
string RFCCliente = GvRow.DataKey("RFCCliente");
string Folio = GvRow.DataKey("Folio");
string TipoDocto = GvRow.DataKey("TipoDocto");
string Nombre = GvRow.DataKey("Nombre");
if (CveVenta > 0)
{
Alert(VerificarVigenciaSAT(CveVenta, CveCliente, Folio, TipoDocto, Uuid, UsuarioActual.Empresa.RFC, RFCCliente, Total, true));
}
CargaDatos();
} }
private string VerificarVigenciaSAT(int CveVenta, int CveCliente, string Folio, string TipoDocto, string uuid, string emisor, string receptor, string total, bool EsRefacturacion = false) private string VerificarVigenciaSAT(int CveVenta, int CveCliente, string Folio, string TipoDocto, string uuid, string emisor, string receptor, string total, bool EsRefacturacion = false)
{ {
@@ -132,7 +151,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes["Fecha"].Value.ToDate(); CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes["Fecha"].Value.ToDate();
} }
var FueCancelado = CancelarDocumento(CveVenta, CveEstatus, CveCliente, Folio, uuid, CancelacionAcuse, CancelacionFecha, TipoDocto, total.ToDouble(), UsuarioActual.Empresa.CvePAC).Mensaje; var FueCancelado = CancelarDocumento(CveVenta, CveEstatus, CveCliente, Folio, uuid, CancelacionAcuse, CancelacionFecha, TipoDocto, total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: EsRefacturacion).Mensaje;
sb.AppendFormat("{0} <br/>", FueCancelado); sb.AppendFormat("{0} <br/>", FueCancelado);
if (CveEstatus.Contiene(4, 5) && EsRefacturacion) if (CveEstatus.Contiene(4, 5) && EsRefacturacion)
@@ -170,10 +189,19 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
return sb.ToString(); return sb.ToString();
} }
private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion) private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion, bool EsRefacturacion = false)
{ {
Modelos.Factura.MCancelacionVentaMensaje retorno = null;
var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa); var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa);
var retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse); if (EsRefacturacion)
{
retorno = factura.CancelarPorRefacturacion();
}
else
{
retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse);
}
return retorno; return retorno;
} }

View File

@@ -381,6 +381,7 @@
<i class="icon-pin font-green"></i> <i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase"><a id="HlCliente" href="javascript:void(0);" runat="server" class="Texto" onclick="javascript:AbrirVentana('/Ventas/PopUpBuscarClientes.aspx?Opt=Fact', 800, 547, 'N', 'PopUpBuscar')">Cliente: </a></span> <span class="caption-subject bold uppercase"><a id="HlCliente" href="javascript:void(0);" runat="server" class="Texto" onclick="javascript:AbrirVentana('/Ventas/PopUpBuscarClientes.aspx?Opt=Fact', 800, 547, 'N', 'PopUpBuscar')">Cliente: </a></span>
<asp:LinkButton ID="LnkAgregarCliente" runat="server" AlternateText="Agregar Cliente" Text="<i class='fa fa-plus-square'></i>" />
<asp:TextBox ID="TxtCodigo" runat="server" AutoPostBack="true" BorderStyle="None" Width="65px"></asp:TextBox> <asp:TextBox ID="TxtCodigo" runat="server" AutoPostBack="true" BorderStyle="None" Width="65px"></asp:TextBox>
<asp:HiddenField ID="HdnCveCliente" runat="server" ClientIDMode="Static" Value="-1" /> <asp:HiddenField ID="HdnCveCliente" runat="server" ClientIDMode="Static" Value="-1" />
<asp:HiddenField ID="HdnIndices" runat="server" ClientIDMode="Static" Value="-1" /> <asp:HiddenField ID="HdnIndices" runat="server" ClientIDMode="Static" Value="-1" />
@@ -2951,13 +2952,28 @@
<asp:TextBox ID="TxtImporteCredito" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox> <asp:TextBox ID="TxtImporteCredito" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtImporteCredito" FilterType="Custom, Numbers" ValidChars=".," /> <ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtImporteCredito" FilterType="Custom, Numbers" ValidChars=".," />
</div> </div>
<div class="col-md-6"> <div class="col-md-6" runat="server" id="DivDdlCuentaTarjetaCredito" >
<asp:DropDownList ID="DdlCuentaTarjetaCredito" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList> <asp:DropDownList ID="DdlCuentaTarjetaCredito" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DdlCuentaTarjetaCredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DdlCuentaTarjetaCredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
<div class="col-md-3" runat="server" id="DivMesesSinIntereses" visible="false">
<asp:DropDownList ID="DDlMesesSinIntereses" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%">
<asp:ListItem Value="-1">Meses</asp:ListItem>
<asp:ListItem Value="3">3M</asp:ListItem>
<asp:ListItem Value="6">6M</asp:ListItem>
<asp:ListItem Value="9">9M</asp:ListItem>
<asp:ListItem Value="12">12M</asp:ListItem>
</asp:DropDownList>
<%--<asp:RequiredFieldValidator ID="RFVDDlMesesSinIntereses" runat="server" ControlToValidate="DDlMesesSinIntereses" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />campo <b>''Meses sin intereses''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CEDDlMesesSinIntereses" runat="server" HighlightCssClass="vco" TargetControlID="RFVDDlMesesSinIntereses" Width="300px"></ajax:ValidatorCalloutExtender>--%>
</div>
</div> </div>
</div> </div>
<div class="chequesie1"> <div class="chequesie1">
<div class="row"> <div class="row">
<label class="col-md-2">Debito:</label> <label class="col-md-2">Debito:</label>
@@ -2988,7 +3004,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="chequesie1">
<div class="chequesie1">
<div class="row"> <div class="row">
<label class="col-md-2">Transf.:</label> <label class="col-md-2">Transf.:</label>
<div class="col-md-4 input-icon"> <div class="col-md-4 input-icon">
@@ -3003,6 +3020,47 @@
</div> </div>
</div> </div>
</div> </div>
<div class="chequesie1" runat="server" id ="DivContadoOtros" visible="false">
<div class="row">
<div class="col-md-2">
<asp:DropDownList runat="server" ID="DdlOtroFormaPago" ClientIDMode="Static" AutoPostBack="true" OnSelectedIndexChanged="DdlOtroFormaPago_SelectedIndexChanged">
<asp:ListItem Value="-1">Otros</asp:ListItem>
<asp:ListItem Value="1">Credito</asp:ListItem>
<asp:ListItem Value="2">Debito</asp:ListItem>
<asp:ListItem Value="3">Cheque</asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-4 input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtImporteOtrosContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FETxtImporteOtrosContado" runat="server" TargetControlID="TxtImporteOtrosContado" FilterType="Custom, Numbers" ValidChars=".," />
</div>
<div class="col-md-6" runat="server" id="DivContadoOtrosCuenta" >
<asp:DropDownList ID="DdlCuentaOtrosContado" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ControlToValidate="DdlCuentaTarjetaCredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender24" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-3" runat="server" id="DivMesesSinIntereses2" visible="false">
<asp:DropDownList ID="DdlMesesSinIntereses2" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%">
<asp:ListItem Value="-1">Meses</asp:ListItem>
<asp:ListItem Value="3">3M</asp:ListItem>
<asp:ListItem Value="6">6M</asp:ListItem>
<asp:ListItem Value="9">9M</asp:ListItem>
<asp:ListItem Value="12">12M</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
<div class="chequesie2"> <div class="chequesie2">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
@@ -3020,6 +3078,12 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -6044,6 +6108,139 @@
</div> </div>
</div> </div>
</div> </div>
<%-- Agregar un Nuevo CLiente --%>
<div id="divAgregarCliente" class="modal fade">
<div class="modal-dialog" style="max-height: 500px; max-width: 500px;">
<asp:UpdatePanel ID="UpAgregarCliente" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<fieldset>
<%--<legend><b>Descripción</b></legend>--%>
<table border="0" class="portlet light bordered">
<tr>
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-users font-green"></i>
<span class="caption-subject bold uppercase">Datos del Cliente</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
</div>
</tr>
<tr>
<div class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-9">
<asp:TextBox ID="TxtRFCCliente" Style="text-transform: uppercase;" placeholder="Ingrese el RFC para su validación" runat="server" CssClass="form-control" MaxLength="13" CausesValidation="true"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVRFCCliente" runat="server" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es incorrecto, por favor ingréselo." ValidationGroup="GrpGuardarCliente" ControlToValidate="TxtRFCCliente" ValidationExpression="^[a-zA-Z.)(/\\&-]{3,4}(\d{6})((\D|\d){2})((\D|\d){1})$"></asp:RegularExpressionValidator>
<label for="<%= TxtRFCCliente.ClientID.ToString()%>">RFC:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-3">
<asp:Button ID="BtnValidarRFC" runat="server" CssClass="btn btn-success" Text="Validar" />
</div>
</div>
<div id="DivNombreCliente" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNombreCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNombreCliente" runat="server" ControlToValidate="TxtNombreCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtNombreCliente.ClientID.ToString()%>">Razón Social:</label>
</div>
<div id="DivDireccionCliente" runat="server" visible="false" class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtDireccionCliente" CssClass="form-control " runat="server" MaxLength="90" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVDireccionC" runat="server" ControlToValidate="TxtDireccionCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Direccion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtDireccionCliente.ClientID.ToString()%>">Dirección:</label>
</div>
<div id="DivNumeroCPCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtCPCliente" CssClass="form-control " runat="server" MaxLength="5" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="TxtCPCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código Postal''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtCPCliente.ClientID.ToString()%>">Código Postal:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtNumExtCliente" CssClass="form-control " runat="server" MaxLength="20" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNoEC" runat="server" ControlToValidate="TxtNumExtCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Número Exterior''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtNumExtCliente.ClientID.ToString()%>">Número Exterior:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtNumIntCliente" CssClass="form-control " runat="server" MaxLength="20" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtNumIntCliente.ClientID.ToString()%>">Número Interior:</label>
</div>
</div>
<div id="DivColoniaTelefonoCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtColoniaCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVColoniaC" runat="server" ControlToValidate="TxtColoniaCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtColoniaCliente.ClientID.ToString()%>">Colonia:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtTelefonoCliente" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtTelefonoCliente.ClientID.ToString()%>">Teléfono:</label>
</div>
</div>
<div id="DivCiudadLocalidadCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtCiudadCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCiudadC" runat="server" ControlToValidate="TxtCiudadCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ciudad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtCiudadCliente.ClientID.ToString()%>">Ciudad:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtLocalidadCliente" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVLocalidadC" runat="server" ControlToValidate="TxtLocalidadCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtLocalidadCliente.ClientID.ToString()%>">Localidad:</label>
</div>
</div>
<div id="DivEstadoPaisCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtEstadoCliente" CssClass="form-control " runat="server" MaxLength="35" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVEstadoC" runat="server" ControlToValidate="TxtEstadoCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtEstadoCliente.ClientID.ToString()%>">Estado:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtPaisCliente" CssClass="form-control " Text="Mexico" runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVPaisC" runat="server" ControlToValidate="TxtPaisCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''País''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= TxtPaisCliente.ClientID.ToString()%>">País:</label>
</div>
</div>
<div id="DivCorreoCuentaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:TextBox ID="TxtCorreoCliente" CssClass="form-control" runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" CssClass="help-block errorimput" ValidationExpression="(([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*" ControlToValidate="TxtCorreoCliente" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Email''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardarCliente"></asp:RegularExpressionValidator>
<label for="<%= TxtCorreoCliente.ClientID.ToString()%>">Email: </label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
</div>
</div>
<div id="DivFormaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlMetodoCliente" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPagoSAT" DataValueField="CveMetodoPago" Width="200px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="DdlMetodoCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Método Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlMetodoCliente.ClientID.ToString()%>">Método Pago:</label>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-6">
<asp:DropDownList ID="DdlFormaCliente" CssClass=" form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="FormaPagoSAT" DataValueField="CveFormaPago" Width="200px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="DdlMetodoCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Forma Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
<label for="<%= DdlFormaCliente.ClientID.ToString()%>">Forma Pago: </label>
<i></i>
</div>
</div>
</tr>
</table>
</fieldset>
<div id="DivBotonesAgregarCliente" runat="server" visible="false" class="modal-footer">
<asp:Button ID="BtnAgregarCliente" runat="server" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpGuardarCliente" />
<button id="BtnCancelarCliente" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script> <script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
@@ -6486,7 +6683,18 @@
var totalDebito = ToDouble($get("TxtImporteDebito").value); var totalDebito = ToDouble($get("TxtImporteDebito").value);
var totalCheque = ToDouble($get("TxtImporteCheque").value); var totalCheque = ToDouble($get("TxtImporteCheque").value);
var totalTransferencia = ToDouble($get("TxtImporteTransferencia").value); var totalTransferencia = ToDouble($get("TxtImporteTransferencia").value);
var total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia;
var TotalOtrosContado = 0;
try{
if ($('#DdlOtroFormaPago').val() != "-1") {
TotalOtrosContado = ToDouble($get("TxtImporteOtrosContado").value);
}
} catch (e) {}
var total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia + TotalOtrosContado;
$get("TxtImporteContado").value = total; $get("TxtImporteContado").value = total;
} }
@@ -6894,7 +7102,7 @@
indexd += 1; indexd += 1;
}); });
} }
function CargaExistenciasSucursales(id,ps) { function CargaExistenciasSucursales(id, ps) {
$.ajax({ $.ajax({
url: '/Ashx/SIGWeb.ashx?metodo=getpsalmacen&cveps=' + id, url: '/Ashx/SIGWeb.ashx?metodo=getpsalmacen&cveps=' + id,
type: 'get', type: 'get',
@@ -7097,7 +7305,28 @@
} }
} }
function showDivEC() {
$('#<%= TxtRFCCliente.ClientID %>').val('');
$('#<%= TxtNombreCliente.ClientID %>').val('');
$('#<%= TxtDireccionCliente.ClientID %>').val('');
$('#<%= TxtNumExtCliente.ClientID %>').val('');
$('#<%= TxtNumIntCliente.ClientID %>').val('');
$('#<%= TxtCPCliente.ClientID %>').val('');
$('#<%= TxtColoniaCliente.ClientID %>').val('');
$('#<%= TxtTelefonoCliente.ClientID %>').val('');
$('#<%= TxtCiudadCliente.ClientID %>').val('');
$('#<%= TxtLocalidadCliente.ClientID %>').val('');
$('#<%= TxtEstadoCliente.ClientID %>').val('');
$('#<%= TxtPaisCliente.ClientID %>').val('');
$('#<%= TxtCorreoCliente.ClientID %>').val('');
$('#divAgregarCliente').modal();
}
function hideDivEC() {
$('#divAgregarCliente').modal('hide');
}
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -1725,6 +1725,10 @@ Partial Class Ventas
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Autorización", "PA")) DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Autorización", "PA"))
End If End If
If UsuarioActual.CveEmpresa <> 141 Then
LnkAgregarCliente.Visible = False
End If
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Pd2")) DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Pd2"))
If UsuarioActual.Empresa.Funcionalidad(344).ToString = "1" Then If UsuarioActual.Empresa.Funcionalidad(344).ToString = "1" Then
@@ -1802,7 +1806,10 @@ Partial Class Ventas
TxtImporteDebito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();") TxtImporteDebito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteCheque.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();") TxtImporteCheque.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteTransferencia.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();") TxtImporteTransferencia.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteOtrosContado.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtEfectivoEnCaja.Attributes.Add("onKeyUp", "CalculaDiferencia();") TxtEfectivoEnCaja.Attributes.Add("onKeyUp", "CalculaDiferencia();")
'ImgCerrarTerminoCorte.Attributes.Add("OnClick", "$('#DivTerminarCorte').hide();") 'ImgCerrarTerminoCorte.Attributes.Add("OnClick", "$('#DivTerminarCorte').hide();")
'ImgCerrarIE.Attributes.Add("OnClick", "$('#DivIngresoEgreso').hide();")DdlTipoComprobante 'ImgCerrarIE.Attributes.Add("OnClick", "$('#DivIngresoEgreso').hide();")DdlTipoComprobante
'ImgCerrarEstadoCaja.Attributes.Add("OnClick", "$('#DivEstadoCaja').hide();") 'ImgCerrarEstadoCaja.Attributes.Add("OnClick", "$('#DivEstadoCaja').hide();")
@@ -1907,6 +1914,8 @@ Partial Class Ventas
CargaOrdenProduccion() CargaOrdenProduccion()
End If End If
'Carga Venta 'Carga Venta
If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero > 0 Then If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero > 0 Then
ViewState("CveVenta") = Request("CveVenta") ViewState("CveVenta") = Request("CveVenta")
@@ -2422,6 +2431,16 @@ Partial Class Ventas
End If End If
End If End If
If UsuarioActual.Empresa.Funcionalidad(558).ToEntero = 1 Then
DivMesesSinIntereses.Visible = True
DivDdlCuentaTarjetaCredito.Attributes.Add("class", "col-md-3")
DivContadoOtros.Visible = True
End If
End If End If
''EN REALIDAD SE OCUPAN ESTAS COSAS DENTRO DEL POSTABCK ??? ''EN REALIDAD SE OCUPAN ESTAS COSAS DENTRO DEL POSTABCK ???
@@ -4345,6 +4364,11 @@ Partial Class Ventas
DdlFormaPago33.DataSource = dtt DdlFormaPago33.DataSource = dtt
DdlFormaPago33.SelectedValue = dtt.FiltroPrimeroValor("CveFormaPago", "") DdlFormaPago33.SelectedValue = dtt.FiltroPrimeroValor("CveFormaPago", "")
DdlFormaPago33.DataBind() DdlFormaPago33.DataBind()
DdlFormaCliente.DataSource = GlobalDTVtaFormaPago
DdlFormaCliente.DataBind()
DdlMetodoCliente.DataSource = GlobalDTVtaMetodoPago
DdlMetodoCliente.DataBind()
'End If 'End If
End Sub End Sub
Private Sub CargaUsoCFDI() Private Sub CargaUsoCFDI()
@@ -4500,6 +4524,8 @@ Partial Class Ventas
EnviarCorreoCliente = ObjCliente.EnviarFactura EnviarCorreoCliente = ObjCliente.EnviarFactura
EstatusCliente = ObjCliente.Estatus EstatusCliente = ObjCliente.Estatus
LnkAgregarCliente.Visible = False
ClienteEsDistribuidor = Boolean.Parse(ObjCliente.DtResultados.Rows(0)("EsDistribuidor").ToString) ClienteEsDistribuidor = Boolean.Parse(ObjCliente.DtResultados.Rows(0)("EsDistribuidor").ToString)
If EstatusCliente = False And Not DdlTipoComprobante.SelectedValue.Contiene("Cot", "DPe") And (CveVenta <= 0 Or EsCreaApartirDe) Then If EstatusCliente = False And Not DdlTipoComprobante.SelectedValue.Contiene("Cot", "DPe") And (CveVenta <= 0 Or EsCreaApartirDe) Then
@@ -7267,7 +7293,7 @@ Partial Class Ventas
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False) Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False)
If Me.CveVenta > 0 Then If Me.CveVenta > 0 AndAlso NuevaFactura <> 1 Then
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa) ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa)
Else Else
ObjFactura = New Modelos.Factura ObjFactura = New Modelos.Factura
@@ -10083,7 +10109,7 @@ Partial Class Ventas
Exit For Exit For
End If End If
CveIEPago = ObjBancos.AddBancos_IE(DrPago("CveCuenta").ToString.ToEntero, DrPago("CveTipoMovimiento").ToString.ToEntero, Fecha, FolioIE.ToString, String.Format("PAGO: {0}", TxtFolio.Text), DrPago("Importe").ToString.ToDouble, DdlMoneda.SelectedValue.ToEntero, tipoCambio, DrPago("Observaciones").ToString, "", False, False, -1, ObjFactura.CvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte) CveIEPago = ObjBancos.AddBancos_IE(DrPago("CveCuenta").ToString.ToEntero, DrPago("CveTipoMovimiento").ToString.ToEntero, Fecha, FolioIE.ToString, String.Format("PAGO: {0}", TxtFolio.Text), DrPago("Importe").ToString.ToDouble, DdlMoneda.SelectedValue.ToEntero, tipoCambio, DrPago("Observaciones").ToString, "", False, False, -1, ObjFactura.CvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte, MesesSinIntereses:=DrPago("MesesSinIntereses").ToString.ToEntero)
If CveIEPago > 0 Then If CveIEPago > 0 Then
@@ -15234,7 +15260,7 @@ Partial Class Ventas
Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
Asunto = Asunto.Replace("{""Sucursal""}", DdlSubProyectoDatos.SelectedItem.Text) Asunto = Asunto.Replace("{""Sucursal""}", DdlSubProyectoDatos.SelectedItem.Text)
Asunto = Asunto.Replace("{""SerieFolio""}", $"{LblSerie.Text} - {TxtFolio.Text}") Asunto = Asunto.Replace("{""SerieFolio""}", ObjFactura.SerieFolio)
End If End If
If Not EnviarFactura Then If Not EnviarFactura Then
@@ -16088,6 +16114,7 @@ Partial Class Ventas
DtPagos.Columns.Add("Observaciones", GetType(String)) DtPagos.Columns.Add("Observaciones", GetType(String))
DtPagos.Columns.Add("Tipo", GetType(String)) DtPagos.Columns.Add("Tipo", GetType(String))
DtPagos.Columns.Add("CveMetodoPago", GetType(Integer)) DtPagos.Columns.Add("CveMetodoPago", GetType(Integer))
DtPagos.Columns.Add("MesesSinIntereses", GetType(Integer))
CargaCuentas() CargaCuentas()
@@ -16101,6 +16128,8 @@ Partial Class Ventas
TxtImporteCheque.Text = "0.00" TxtImporteCheque.Text = "0.00"
TxtImporteTransferencia.Text = "0.00" TxtImporteTransferencia.Text = "0.00"
TxtImporteContado.Text = "0.00" TxtImporteContado.Text = "0.00"
TxtImporteOtrosContado.Text = "0.00"
End Sub End Sub
Private Sub LimpiaEscondeContado() Private Sub LimpiaEscondeContado()
'LIMPIA 'LIMPIA
@@ -16149,6 +16178,39 @@ Partial Class Ventas
DdlCuentaTransferencia.DataBind() DdlCuentaTransferencia.DataBind()
End Sub End Sub
Protected Sub DdlOtroFormaPago_SelectedIndexChanged(sender As Object, e As EventArgs)
DivContadoOtrosCuenta.Attributes.Add("class", "col-md-6")
DivMesesSinIntereses2.Visible = False
Select Case DdlOtroFormaPago.SelectedValue.ToEntero
Case 1
DivContadoOtrosCuenta.Attributes.Add("class", "col-md-3")
DivMesesSinIntereses2.Visible = True
DdlCuentaOtrosContado.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero <= 0, 1, DdlMoneda.SelectedValue.ToEntero)))
Exit Select
Case 2
DdlCuentaOtrosContado.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero <= 0, 1, DdlMoneda.SelectedValue.ToEntero)))
Exit Select
Case 3
DdlCuentaOtrosContado.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero <= 0, 1, DdlMoneda.SelectedValue.ToEntero)))
Exit Select
Case -1
DdlCuentaOtrosContado.DataSource = Nothing
Exit Select
End Select
DdlCuentaOtrosContado.DataBind()
UpContado.Update()
End Sub
'DdlOtroFormaPago
Private Function CargaFolioContado(CveCuenta As Integer, TipoTransaccion As Integer) As Long Private Function CargaFolioContado(CveCuenta As Integer, TipoTransaccion As Integer) As Long
Dim Folio As Long Dim Folio As Long
@@ -16204,6 +16266,8 @@ Partial Class Ventas
DrEfectivo("Observaciones") = "" DrEfectivo("Observaciones") = ""
DrEfectivo("Tipo") = "Caja Chica" DrEfectivo("Tipo") = "Caja Chica"
DrEfectivo("CveMetodoPago") = 1 DrEfectivo("CveMetodoPago") = 1
DrEfectivo("MesesSinIntereses") = -1
DtPagos.Rows.Add(DrEfectivo) DtPagos.Rows.Add(DrEfectivo)
Else Else
Alert("Debe seleccionar una cuenta válida de caja", TipoMensaje.MsgAdvertencia) Alert("Debe seleccionar una cuenta válida de caja", TipoMensaje.MsgAdvertencia)
@@ -16212,6 +16276,7 @@ Partial Class Ventas
'Pago Tarjeta Credito 'Pago Tarjeta Credito
If TxtImporteCredito.Text.ToDecimal > 0 Then If TxtImporteCredito.Text.ToDecimal > 0 Then
If DdlCuentaTarjetaCredito.Items.Count > 0 Then If DdlCuentaTarjetaCredito.Items.Count > 0 Then
Dim DrCredito = DtPagos.NewRow Dim DrCredito = DtPagos.NewRow
DrCredito("CveTipoMovimiento") = 12 DrCredito("CveTipoMovimiento") = 12
@@ -16223,10 +16288,20 @@ Partial Class Ventas
DrCredito("Observaciones") = "" DrCredito("Observaciones") = ""
DrCredito("Tipo") = "Tarjeta de Crédito" DrCredito("Tipo") = "Tarjeta de Crédito"
DrCredito("CveMetodoPago") = 4 DrCredito("CveMetodoPago") = 4
If UsuarioActual.Empresa.Funcionalidad(558).ToEntero = 1 Then
DrCredito("MesesSinIntereses") = DDlMesesSinIntereses.SelectedValue.ToEntero
Else
DrCredito("MesesSinIntereses") = -1
End If
DtPagos.Rows.Add(DrCredito) DtPagos.Rows.Add(DrCredito)
Else Else
Alert("Debe seleccionar una cuenta válida de crédito", TipoMensaje.MsgAdvertencia) Alert("Debe seleccionar una cuenta válida de crédito", TipoMensaje.MsgAdvertencia)
End If End If
End If End If
'Pago Tarjeta Debito 'Pago Tarjeta Debito
@@ -16242,6 +16317,7 @@ Partial Class Ventas
DrDebito("Observaciones") = "" DrDebito("Observaciones") = ""
DrDebito("Tipo") = "Tarjeta de Débito" DrDebito("Tipo") = "Tarjeta de Débito"
DrDebito("CveMetodoPago") = 5 DrDebito("CveMetodoPago") = 5
DrDebito("MesesSinIntereses") = -1
DtPagos.Rows.Add(DrDebito) DtPagos.Rows.Add(DrDebito)
Else Else
@@ -16262,6 +16338,7 @@ Partial Class Ventas
DrCheque("Observaciones") = "" DrCheque("Observaciones") = ""
DrCheque("Tipo") = "Cheque" DrCheque("Tipo") = "Cheque"
DrCheque("CveMetodoPago") = 2 DrCheque("CveMetodoPago") = 2
DrCheque("MesesSinIntereses") = -1
DtPagos.Rows.Add(DrCheque) DtPagos.Rows.Add(DrCheque)
Else Else
@@ -16282,6 +16359,7 @@ Partial Class Ventas
DrCheque("Observaciones") = "" DrCheque("Observaciones") = ""
DrCheque("Tipo") = "Transferencia" DrCheque("Tipo") = "Transferencia"
DrCheque("CveMetodoPago") = 3 DrCheque("CveMetodoPago") = 3
DrCheque("MesesSinIntereses") = -1
DtPagos.Rows.Add(DrCheque) DtPagos.Rows.Add(DrCheque)
Else Else
@@ -16289,6 +16367,82 @@ Partial Class Ventas
End If End If
End If End If
'Otro Metodo de pago
Select Case DdlOtroFormaPago.SelectedValue.ToEntero
Case -1
Exit Select
Case 1
If TxtImporteOtrosContado.Text.ToDecimal > 0 Then
If DdlCuentaOtrosContado.Items.Count > 0 Then
Dim DrCredito = DtPagos.NewRow
DrCredito("CveTipoMovimiento") = 12
DrCredito("TipoMovimiento") = "Tarjeta de Crédito"
DrCredito("CveCuenta") = DdlCuentaOtrosContado.SelectedValue
DrCredito("Cuenta") = DdlCuentaOtrosContado.SelectedItem.Text
DrCredito("Importe") = TxtImporteOtrosContado.Text
DrCredito("Folio") = CargaFolioContado(DdlCuentaOtrosContado.SelectedValue.ToEntero, 12)
DrCredito("Observaciones") = ""
DrCredito("Tipo") = "Tarjeta de Crédito"
DrCredito("CveMetodoPago") = 4
If UsuarioActual.Empresa.Funcionalidad(558).ToEntero = 1 Then
DrCredito("MesesSinIntereses") = DdlMesesSinIntereses2.SelectedValue.ToEntero
Else
DrCredito("MesesSinIntereses") = -1
End If
DtPagos.Rows.Add(DrCredito)
Else
Alert("Debe seleccionar una cuenta válida de crédito( Otra condición de pago)", TipoMensaje.MsgAdvertencia)
End If
End If
Exit Select
Case 2
If TxtImporteOtrosContado.Text.ToDecimal > 0 Then
If DdlCuentaOtrosContado.Items.Count > 0 Then
Dim DrDebito = DtPagos.NewRow
DrDebito("CveTipoMovimiento") = 11
DrDebito("TipoMovimiento") = "Tarjeta de Debito"
DrDebito("CveCuenta") = DdlCuentaOtrosContado.SelectedValue
DrDebito("Cuenta") = DdlCuentaOtrosContado.SelectedItem.Text
DrDebito("Importe") = TxtImporteOtrosContado.Text
DrDebito("Folio") = CargaFolioContado(DdlCuentaOtrosContado.SelectedValue.ToEntero, 11)
DrDebito("Observaciones") = ""
DrDebito("Tipo") = "Tarjeta de Débito"
DrDebito("CveMetodoPago") = 5
DrDebito("MesesSinIntereses") = -1
DtPagos.Rows.Add(DrDebito)
Else
Alert("Debe seleccionar una cuenta válida de débito( Otra condición de pago)", TipoMensaje.MsgAdvertencia)
End If
End If
Exit Select
Case 3
If TxtImporteOtrosContado.Text.ToDecimal > 0 Then
If DdlCuentaOtrosContado.Items.Count > 0 Then
Dim DrCheque = DtPagos.NewRow
DrCheque("CveTipoMovimiento") = 3
DrCheque("TipoMovimiento") = "Cheque"
DrCheque("CveCuenta") = DdlCuentaOtrosContado.SelectedValue
DrCheque("Cuenta") = DdlCuentaOtrosContado.SelectedItem.Text
DrCheque("Importe") = TxtImporteOtrosContado.Text
DrCheque("Folio") = CargaFolioContado(DdlCuentaOtrosContado.SelectedValue.ToEntero, 3)
DrCheque("Observaciones") = ""
DrCheque("Tipo") = "Cheque"
DrCheque("CveMetodoPago") = 2
DrCheque("MesesSinIntereses") = -1
DtPagos.Rows.Add(DrCheque)
Else
Alert("Debe seleccionar una cuenta de cheque( Otra condición de pago)", TipoMensaje.MsgAdvertencia)
End If
End If
Exit Select
End Select
'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P. 'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P.
abonado = DtPagos.SUM("Importe") abonado = DtPagos.SUM("Importe")
saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado
@@ -16398,6 +16552,97 @@ Partial Class Ventas
VerificarContrato() VerificarContrato()
End Sub End Sub
Private Sub LnkAgregarCliente_Click(sender As Object, e As EventArgs) Handles LnkAgregarCliente.Click
DivNombreCliente.Visible = False
DivDireccionCliente.Visible = False
DivNumeroCPCliente.Visible = False
DivColoniaTelefonoCliente.Visible = False
DivCiudadLocalidadCliente.Visible = False
DivEstadoPaisCliente.Visible = False
DivCorreoCuentaCliente.Visible = False
DivBotonesAgregarCliente.Visible = False
DivFormaCliente.Visible = False
UpAgregarCliente.Update()
RegistraScript("showDivEC();")
End Sub
Private Sub BtnValidarRFC_Click(sender As Object, e As EventArgs) Handles BtnValidarRFC.Click
If TxtRFCCliente.Text.ToUpper = "XAXX010101000" Then
DivNombreCliente.Visible = True
DivDireccionCliente.Visible = True
DivNumeroCPCliente.Visible = True
DivColoniaTelefonoCliente.Visible = True
DivCiudadLocalidadCliente.Visible = True
DivEstadoPaisCliente.Visible = True
DivCorreoCuentaCliente.Visible = True
DivBotonesAgregarCliente.Visible = True
DivFormaCliente.Visible = True
RFVDireccionC.Visible = False
RFVNoEC.Visible = False
RFVColoniaC.Visible = False
RFVCiudadC.Visible = False
RFVLocalidadC.Visible = False
RFVEstadoC.Visible = False
RFVPaisC.Visible = False
DdlMetodoCliente.SelectedValueExist(1)
DdlFormaCliente.SelectedValueExist(1)
Else
Dim ObjCliente As New ClsClientes
If ObjCliente.ValidaClienteRFC(TxtRFCCliente.Text, UsuarioActual.CveEmpresa) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
RegistraScript("hideDivEC();")
ViewState("CveCliente") = ObjCliente.DtResultados(0)("CveCliente").ToString.ToEntero
HdnCveCliente.Value = ObjCliente.DtResultados(0)("CveCliente").ToString
CargaCliente(CveCliente)
UpCliente.Update()
Else
DivNombreCliente.Visible = True
DivDireccionCliente.Visible = True
DivNumeroCPCliente.Visible = True
DivColoniaTelefonoCliente.Visible = True
DivCiudadLocalidadCliente.Visible = True
DivEstadoPaisCliente.Visible = True
DivCorreoCuentaCliente.Visible = True
DivBotonesAgregarCliente.Visible = True
DivFormaCliente.Visible = True
End If
End If
ObjCliente.Dispose()
RFVDireccionC.Visible = True
RFVNoEC.Visible = True
RFVColoniaC.Visible = True
RFVCiudadC.Visible = True
RFVLocalidadC.Visible = True
RFVEstadoC.Visible = True
RFVPaisC.Visible = True
DdlMetodoCliente.SelectedValueExist(-1)
DdlFormaCliente.SelectedValueExist(-1)
End If
End Sub
Private Sub BtnAgregarCliente_Click(sender As Object, e As EventArgs) Handles BtnAgregarCliente.Click
Dim ObjCliente As New ClsClientes
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim, TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, TxtEstadoCliente.Text.Trim, TxtPaisCliente.Text.Trim, TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "") Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
RegistraScript("hideDivEC();")
ViewState("CveCliente") = ObjCliente.DtResultados(0)("CveCliente").ToString.ToEntero
HdnCveCliente.Value = ObjCliente.DtResultados(0)("CveCliente").ToString
CargaCliente(CveCliente)
UpCliente.Update()
End If
End If
ObjCliente.Dispose()
End Sub
#End Region #End Region
@@ -22665,4 +22910,5 @@ Partial Class Ventas
#End Region #End Region
End Class End Class