Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -339,7 +339,8 @@ Partial Class AC_RepEstadoActividades
|
||||
params.Add(New ReportParameter("pFirma1", ""))
|
||||
params.Add(New ReportParameter("pFirma2", ""))
|
||||
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)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1325,6 +1325,12 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="pFechaFin">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>163d4464-e41c-42b9-8827-487ff815b059</rd:ReportID>
|
||||
|
||||
@@ -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,
|
||||
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 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
|
||||
|
||||
DataAdapter("PA_Banc_IEAdd")
|
||||
@@ -1334,6 +1335,7 @@ Public Class ClsBancos
|
||||
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
.Add("@CveProveedorIntermediario", SqlDbType.Int).Value = CveProveedorIntermediario
|
||||
.Add("@FueConciliado", SqlDbType.Bit).Value = FueConciliado
|
||||
.Add("@MesesSinIntereses", SqlDbType.Int).Value = MesesSinIntereses
|
||||
|
||||
.Add("@CveIE", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@FolioRegistro", SqlDbType.VarChar, 50).Direction = ParameterDirection.Output
|
||||
|
||||
@@ -1573,7 +1573,7 @@ Public Class ClsClientes
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@NumCuentaPago", SqlDbType.Int).Value = NumCuentaPago
|
||||
.Add("@NumCuentaPago", SqlDbType.VarChar).Value = NumCuentaPago
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -3741,7 +3741,7 @@ Public Class ClsContPAQi
|
||||
StrSQL.Append(" ")
|
||||
StrSQL.Append(" SELECT * ")
|
||||
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 ")
|
||||
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(" SELECT * ")
|
||||
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 ")
|
||||
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 ")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@ WebHandler Language="VB" Class="SIGWeb" %>
|
||||
|
||||
<%@ WebHandler Language="VB" Class="SIGWeb" %>
|
||||
|
||||
Imports System
|
||||
Imports System.Web
|
||||
Imports System.Data
|
||||
@@ -79,10 +79,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "File"
|
||||
|
||||
|
||||
Private Sub Downfile(ByVal context As HttpContext)
|
||||
Dim savepath As String = ""
|
||||
Dim tempPath As String = ""
|
||||
@@ -133,9 +133,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
context.Response.Write(tick)
|
||||
context.Response.StatusCode = 200
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Get Cliente"
|
||||
Private Function GetClientes(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
@@ -164,9 +164,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Get Proveedor"
|
||||
Private Function GetProveedores(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
@@ -195,10 +195,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GET PS "
|
||||
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 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
|
||||
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
|
||||
|
||||
' 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
|
||||
objInv.DtResultados.Columns.RemoveAt(i)
|
||||
End If
|
||||
Next
|
||||
|
||||
DtPSRetorno = objInv.DtResultados
|
||||
Next
|
||||
|
||||
DtPSRetorno = objInv.DtResultados
|
||||
|
||||
End If
|
||||
|
||||
|
||||
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
|
||||
|
||||
If UsaGlobal Then
|
||||
@@ -386,19 +395,19 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||
Get
|
||||
Return False
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#Region "Funciones"
|
||||
Public Function GetJson(ByVal dt As DataTable) As String
|
||||
|
||||
@@ -419,10 +428,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Get
|
||||
UsuarioActual = DirectCast(context.Session("UsuarioSIG"), Usuario)
|
||||
End Get
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GET PS SAT "
|
||||
Private Function GETPSSAT(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
@@ -448,10 +457,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
DtPSRetorno.Dispose()
|
||||
Return retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GET UM SAT "
|
||||
Private Function GETUMSAT(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
@@ -476,9 +485,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
context.Response.Write("[]")
|
||||
End If
|
||||
Return retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " GET FRACCION ARANCELARIA "
|
||||
Private Function GetFraccionArancelaria(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
@@ -504,12 +513,12 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
DtRetorno.Dispose()
|
||||
Return retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "USADOS"
|
||||
|
||||
|
||||
Private Function GETPSUSADOS(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
Dim DtPSRetorno As DataTable = Nothing
|
||||
@@ -599,9 +608,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
@@ -2294,7 +2294,7 @@
|
||||
</asp:RadioButtonList></td>
|
||||
</tr>
|
||||
<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 id="TrRembolsoCajaChica" runat="server" visible="False">
|
||||
<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) {
|
||||
//var Proporcional = ((ToDouble(TxtCantidad.value) * 100) / CantidadOriginal) / 100;
|
||||
|
||||
|
||||
|
||||
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)));
|
||||
}
|
||||
|
||||
if (IVAOriginal > 0) {
|
||||
HdnIVA.value = ToDouble(IVAPorcentaje * (ToDouble(TxtCantidad.value) * ToDouble(TxtPU.value) - ToDouble(HdnDescuento.value)));
|
||||
}
|
||||
|
||||
@@ -416,6 +416,22 @@ Partial Class Compras_Compras
|
||||
ViewState("CveCuentaBancaria") = value
|
||||
End Set
|
||||
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
|
||||
Get
|
||||
Return ViewState("IvaAcumulado").ToString.ToDouble
|
||||
@@ -1126,6 +1142,9 @@ Partial Class Compras_Compras
|
||||
CveCuentaBancaria = 0
|
||||
End If
|
||||
|
||||
IdCuentaBancariaComplementaria = 0
|
||||
CveCuentaBancariaComplementaria = 0
|
||||
|
||||
'If UsuarioActual.TienePermisoProceso(259) Then
|
||||
DivEsNoDeducible.Visible = True
|
||||
'End If
|
||||
@@ -4164,14 +4183,47 @@ Partial Class Compras_Compras
|
||||
If CvePrePoliza > 0 Then
|
||||
|
||||
'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 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
|
||||
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
|
||||
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
|
||||
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
|
||||
|
||||
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
|
||||
CveConceptoContableAlmacen = DdlOCVinculaInv.SelectedValue.ToEntero
|
||||
End If
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||
CveConceptoContableAlmacen = 205
|
||||
End If
|
||||
Else
|
||||
CveConceptoContableAlmacen = 225
|
||||
End If
|
||||
@@ -5212,7 +5267,6 @@ Partial Class Compras_Compras
|
||||
Dim PorcentajePagos As Decimal = 0
|
||||
Dim sumaPagos As Decimal = 0
|
||||
Dim tipoCambioActual As Decimal
|
||||
Dim tipoCambioPago As Decimal
|
||||
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
|
||||
Dim idCuentaContabilizacion 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
|
||||
tipoCambioActual = GlobalTipoCambio(FechaMovimiento).ToString.ToDecimal
|
||||
tipoCambioActual = If(DivTC.Visible, TipoCambio.ToDecimal, tipoCambioActual)
|
||||
tipoCambioPago = GlobalTipoCambio(TxtFechaPago.Text.ToDate).ToString.ToDecimal
|
||||
Else
|
||||
tipoCambioActual = 1
|
||||
tipoCambioPago = 1
|
||||
End If
|
||||
|
||||
'CASO ESPECIAL CREDITOS
|
||||
@@ -5409,7 +5469,10 @@ Partial Class Compras_Compras
|
||||
Case 17 'Pago Proveedores
|
||||
|
||||
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
|
||||
CveCuenta = CveCuentaProveedor
|
||||
|
||||
@@ -5506,9 +5569,9 @@ Partial Class Compras_Compras
|
||||
|
||||
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
|
||||
CveCuenta = CveCuentaProveedor
|
||||
Else
|
||||
@@ -5516,7 +5579,7 @@ Partial Class Compras_Compras
|
||||
CveCuenta = CveCuentaProveedorComplementaria
|
||||
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 * 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
|
||||
End If
|
||||
End If
|
||||
@@ -5527,11 +5590,30 @@ Partial Class Compras_Compras
|
||||
|
||||
Case 30 'Bancos
|
||||
importeMovimiento = importeBanco + importeCajaChica 'Uno de los dos debe ser 0
|
||||
importeMN = importeMovimiento * tipoCambioPago * Multiplicador
|
||||
IdCtaContable = IdCuentaBancaria
|
||||
CveCuenta = CveCuentaBancaria
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioPago} ${importeMovimiento.FormatoNumero(2)}"
|
||||
'' falta complementaria
|
||||
If CveMonedaPago = 2 AndAlso DdlMoneda.SelectedValue.ToEntero = 1 Then
|
||||
importeMovimiento = importeMovimiento / TCPago
|
||||
End If
|
||||
importeMN = importeMovimiento * TCPago * Multiplicador
|
||||
|
||||
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
|
||||
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
|
||||
@@ -5544,7 +5626,7 @@ Partial Class Compras_Compras
|
||||
importeMovimiento = importeIVAAcreditable
|
||||
End If
|
||||
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
|
||||
PorcentajeImpuesto = PorcentajeIVA
|
||||
IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0)
|
||||
@@ -5574,7 +5656,7 @@ Partial Class Compras_Compras
|
||||
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
|
||||
importeMovimiento = importeIVAxAcreditar
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
@@ -5611,7 +5693,7 @@ Partial Class Compras_Compras
|
||||
Case 26 'IEPS Acreditable
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
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.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||
@@ -5635,7 +5717,7 @@ Partial Class Compras_Compras
|
||||
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
|
||||
Case 22 'RetIVA Acreditable Honorarios/Serv. Prof.
|
||||
@@ -5643,7 +5725,7 @@ Partial Class Compras_Compras
|
||||
If DdlRetIVAConcepto.Items.Count > 0 Then
|
||||
If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then
|
||||
importeMovimiento = importeRetIVAAcreditable
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
If CtaProveedorRetIVA > 0 Then
|
||||
IdCtaContable = CtaProveedorRetIVA
|
||||
CveCuenta = CveCuentaProveedorRetIVA
|
||||
@@ -5665,7 +5747,7 @@ Partial Class Compras_Compras
|
||||
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
|
||||
@@ -5697,7 +5779,7 @@ Partial Class Compras_Compras
|
||||
If DdlRetIVAConcepto.Items.Count > 0 Then
|
||||
If DdlRetIVAConcepto.SelectedValue.ToEntero = 2 Then
|
||||
importeMovimiento = importeRetIVAAcreditable
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
If CtaProveedorRetIVA > 0 Then
|
||||
IdCtaContable = CtaProveedorRetIVA
|
||||
CveCuenta = CveCuentaProveedorRetIVA
|
||||
@@ -5719,7 +5801,7 @@ Partial Class Compras_Compras
|
||||
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
|
||||
@@ -5773,7 +5855,7 @@ Partial Class Compras_Compras
|
||||
If DdlRetIVAConcepto.Items.Count > 0 Then
|
||||
If DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then
|
||||
importeMovimiento = importeRetIVAAcreditable
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
If CtaProveedorRetIVA > 0 Then
|
||||
IdCtaContable = CtaProveedorRetIVA
|
||||
CveCuenta = CveCuentaProveedorRetIVA
|
||||
@@ -5795,7 +5877,7 @@ Partial Class Compras_Compras
|
||||
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
|
||||
@@ -5826,7 +5908,7 @@ Partial Class Compras_Compras
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then
|
||||
importeMovimiento = importeRetIVAAcreditable
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
If CtaProveedorRetIVA > 0 Then
|
||||
IdCtaContable = CtaProveedorRetIVA
|
||||
CveCuenta = CveCuentaProveedorRetIVA
|
||||
@@ -5841,7 +5923,7 @@ Partial Class Compras_Compras
|
||||
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
|
||||
@@ -5849,7 +5931,7 @@ Partial Class Compras_Compras
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 1 Then
|
||||
importeMovimiento = importeRetISRAcreditable
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
If CtaProveedorRetISR > 0 Then
|
||||
IdCtaContable = CtaProveedorRetISR
|
||||
CveCuenta = CveCuentaProveedorRetISR
|
||||
@@ -5871,7 +5953,7 @@ Partial Class Compras_Compras
|
||||
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 16 'Ret ISR X Acreditar
|
||||
@@ -5899,7 +5981,7 @@ Partial Class Compras_Compras
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then
|
||||
importeMovimiento = importeRetISRxAcreditar
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
If CtaProveedorRetISR > 0 Then
|
||||
IdCtaContable = CtaProveedorRetISR
|
||||
CveCuenta = CveCuentaProveedorRetISR
|
||||
@@ -5914,14 +5996,14 @@ Partial Class Compras_Compras
|
||||
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 244 'RetISR Acreditable Terceros y Arrendamiento
|
||||
If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then
|
||||
If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then
|
||||
importeMovimiento = importeRetISRAcreditable
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioPago * Multiplicador
|
||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||
If CtaProveedorRetISR > 0 Then
|
||||
IdCtaContable = CtaProveedorRetISR
|
||||
CveCuenta = CveCuentaProveedorRetISR
|
||||
@@ -5941,18 +6023,18 @@ Partial Class Compras_Compras
|
||||
ErrorPrepoliza = True
|
||||
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 64 'Ganancia
|
||||
If tipoCambioActual <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
|
||||
If TCPago <> 1 AndAlso TxtFechaPago.Text <> TxtFecha.Text Then
|
||||
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||
If tipoCambioPago < tipoCambioActual Then
|
||||
importeMovimiento = Math.Abs(tipoCambioPago - tipoCambioActual) * importePagoProv
|
||||
importeMovimiento -= Math.Abs(tipoCambioPago - tipoCambioActual) * importeIVAAcreditable
|
||||
importeMovimiento += Math.Abs(tipoCambioPago - tipoCambioActual) * importeRetIVAAcreditable
|
||||
importeMovimiento += Math.Abs(tipoCambioPago - tipoCambioActual) * importeRetISRAcreditable
|
||||
If TCPago < TipoCambioCompra Then
|
||||
importeMovimiento = Math.Abs(TCPago - TipoCambioCompra) * importePagoProv
|
||||
importeMovimiento -= Math.Abs(TCPago - TipoCambioCompra) * importeIVAAcreditable
|
||||
importeMovimiento += Math.Abs(TCPago - TipoCambioCompra) * importeRetIVAAcreditable
|
||||
importeMovimiento += Math.Abs(TCPago - TipoCambioCompra) * importeRetISRAcreditable
|
||||
importeMN = importeMovimiento
|
||||
End If
|
||||
Else
|
||||
@@ -5960,14 +6042,14 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
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
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
If tipoCambioActual < tipoCambioPago Then
|
||||
importeMovimiento = Math.Abs(tipoCambioPago - tipoCambioActual) * importePagoProv
|
||||
importeMovimiento -= Math.Abs(tipoCambioPago - tipoCambioActual) * importeIVAAcreditable
|
||||
importeMovimiento += Math.Abs(tipoCambioPago - tipoCambioActual) * importeRetIVAAcreditable
|
||||
importeMovimiento += Math.Abs(tipoCambioPago - tipoCambioActual) * importeRetISRAcreditable
|
||||
If TCPago < TipoCambioCompra Then
|
||||
importeMovimiento = Math.Abs(TCPago - TipoCambioCompra) * importePagoProv
|
||||
importeMovimiento -= Math.Abs(TCPago - TipoCambioCompra) * importeIVAAcreditable
|
||||
importeMovimiento += Math.Abs(TCPago - TipoCambioCompra) * importeRetIVAAcreditable
|
||||
importeMovimiento += Math.Abs(TCPago - TipoCambioCompra) * importeRetISRAcreditable
|
||||
importeMN = importeMovimiento
|
||||
End If
|
||||
Else
|
||||
@@ -6196,6 +6278,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
|
||||
Dim RegistroCuentaPuente As Boolean = False
|
||||
'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
|
||||
|
||||
@@ -6213,6 +6296,7 @@ Partial Class Compras_Compras
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
|
||||
If importeMovimiento > 0 Or TxtTotal.Text.ToDecimal = 0 Then
|
||||
RegistroCuentaPuente = True
|
||||
'Conta ContPAQ
|
||||
If IdCtaContable = 0 Then
|
||||
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
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
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
|
||||
IdCtaContable = CtaProveedorComplementaria
|
||||
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
|
||||
Exit Select
|
||||
End If
|
||||
@@ -11097,12 +11181,12 @@ Partial Class Compras_Compras
|
||||
|
||||
Private Sub CargaCuentas()
|
||||
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.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
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.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
@@ -11881,6 +11965,8 @@ Partial Class Compras_Compras
|
||||
CveMoneda = dr("CveMoneda").ToString.ToEntero
|
||||
IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero
|
||||
CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero
|
||||
IdCuentaBancariaComplementaria = dr("IdCtaContableComplementaria").ToString.ToEntero
|
||||
CveCuentaBancariaComplementaria = dr("IdCtaContableSIGComplementaria").ToString.ToEntero
|
||||
If dr("UsaTarjeta").ToString = "True" Then
|
||||
CargaGridTarjetas()
|
||||
Else
|
||||
|
||||
@@ -190,6 +190,7 @@ Partial Class Compras_RepRembolsoComprobaciones
|
||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Compras/RepRembolsoComprobaciones - Unificar | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
Alert(ObjMov.MensajePolizaDescuadre, TipoMensaje.MsgError)
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -119,7 +119,7 @@ Partial Class Inventarios_KardexAlmacen
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
Private Function CargarKardex(CvePS As Integer) As DataTable
|
||||
Private Sub CargarKardex(CvePS As Integer)
|
||||
Dim dt As DataTable = Nothing
|
||||
Dim ObjMovimientos As New ClsInventarios
|
||||
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
|
||||
dt = ObjMovimientos.DtResultados
|
||||
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
|
||||
For Each Dr As DataRow In dt.Rows
|
||||
TotColumna += Dr.Item(index).ToString.ToDouble
|
||||
@@ -149,25 +149,22 @@ Partial Class Inventarios_KardexAlmacen
|
||||
Else
|
||||
Alert("La búsqueda no contiene resultados.", TipoMensaje.MsgAdvertencia)
|
||||
GvDatos.Columns.Clear()
|
||||
dt = Nothing
|
||||
Return dt
|
||||
Exit Function
|
||||
dt = Nothing
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
ObjMovimientos.Dispose()
|
||||
Alert("Ocurrió un error al consultar el Kardex.", TipoMensaje.MsgError)
|
||||
Exit Function
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
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)
|
||||
Next
|
||||
|
||||
Return dt
|
||||
End Function
|
||||
End Sub
|
||||
|
||||
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"
|
||||
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(2).HorizontalAlign = HorizontalAlign.Left
|
||||
Dim Index As Integer = 0
|
||||
@@ -188,7 +186,7 @@ Partial Class Inventarios_KardexAlmacen
|
||||
Dim Celda As String = Cells.Text
|
||||
If IsNumeric(Celda) Then
|
||||
Dim CveAlmacen2 As Integer = -1
|
||||
If Index >= 4 Then
|
||||
If Index >= 5 Then
|
||||
Dim Array = GvDatos.HeaderRow.Cells(Index).Text.Split("|")
|
||||
If Array.Length > 1 Then
|
||||
CveAlmacen2 = Array(1)
|
||||
@@ -225,10 +223,10 @@ Partial Class Inventarios_KardexAlmacen
|
||||
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).
|
||||
' e.Row.Cells(0).Width = New Unit("200px")
|
||||
e.Row.Cells(1).Visible = False
|
||||
e.Row.Cells(2).Visible = False
|
||||
e.Row.Cells(3).Visible = False
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.Cells(5).ToolTip = "Costo Promedio"
|
||||
e.Row.Cells(6).ToolTip = "Costo Promedio"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -2047,7 +2047,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
If TipoMovimiento = 1 Then
|
||||
ValorMultiplicador = 1
|
||||
ElseIf TipoMovimiento = 2 Then
|
||||
TipoMovimiento = -1
|
||||
ValorMultiplicador = -1
|
||||
ElseIf TipoMovimiento = 2 AndAlso TipoDocto.Contiene({"Dev"}) And (EsDevolucionVenta = 1) Then
|
||||
ValorMultiplicador = 1
|
||||
End If
|
||||
|
||||
@@ -119,7 +119,9 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
Dim 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))
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
DdlAlmacen.SelectedValuesIfExistM("-1")
|
||||
End If
|
||||
|
||||
'Llenar dropdownlist de monedas
|
||||
@@ -345,7 +347,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
Dim FechaI As String = FechaInicial
|
||||
Dim FechaF As String = FechaFinal
|
||||
|
||||
Dim Almacen = If(DdlAlmacen.SelectedValue = "-1", "", $" <b>Almacén:</b> {DdlAlmacen.SelectedItem.Text}")
|
||||
Dim Almacen = If(DdlAlmacen.GetSelectedValuesM = "", "", $" <b>Almacenes:</b> {DdlAlmacen.GetSelectedText()}")
|
||||
Dim TipoMov = If(DdlTipoMovimiento.SelectedValue = "-1", "", $" <b>Tipo Movimiento:</b> {DdlTipoMovimiento.SelectedItem.Text}")
|
||||
Dim Moneda = If(DdlMoneda.SelectedValue = "-1", "", $" <b>Moneda:</b> {DdlMoneda.SelectedItem.Text}")
|
||||
Dim SoloConMov = If(DdlMovs.SelectedValue = "-1", "", $" <b>Solo Movimientos:</b> {DdlMovs.SelectedItem.Text}")
|
||||
|
||||
@@ -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
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -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 : (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.
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
<ContentTemplate>
|
||||
<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>
|
||||
<asp:TextBox ID="TxtFormulaImporte" runat="server" MaxLength="70" CssClass="codeeditor " Enabled="false"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -54,10 +54,10 @@ public partial class Nomina_CatConcepto : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
if (UsuarioActual.CveEmpresa ==72 || UsuarioActual.CveEmpresa== 80)
|
||||
{
|
||||
tabFormulaImporte.Visible = false;
|
||||
}
|
||||
//if (UsuarioActual.CveEmpresa ==72 || UsuarioActual.CveEmpresa== 80)
|
||||
//{
|
||||
// tabFormulaImporte.Visible = false;
|
||||
//}
|
||||
if (Request["CveConcepto"] != null && !Request["CveConcepto"].ToString().Equals("") && Request["CveConcepto"].ToEntero() > 0)
|
||||
{
|
||||
ViewState["CveConcepto"] = Request["CveConcepto"];
|
||||
|
||||
@@ -229,6 +229,9 @@ Partial Class Nomina_Nomina
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If UsuarioActual.CveEmpresa = 80 OrElse UsuarioActual.CveEmpresa = 72 Then
|
||||
Response.Redirect("/Nomina/Nomina2.aspx")
|
||||
End If
|
||||
CargaTiposPeriodo()
|
||||
CargaProyecto()
|
||||
CargaTurnos()
|
||||
|
||||
@@ -3,6 +3,52 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<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 ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Nominas
|
||||
@@ -129,331 +175,331 @@
|
||||
</div>
|
||||
</div>
|
||||
<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;">
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<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"
|
||||
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" Style="text-align: center;" GridLines="None"
|
||||
<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 GvNominas" Style="text-align: center;" GridLines="None"
|
||||
data-rows="2">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField >
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate></HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkSobreRecibo" OnClick="LnkSobreRecibo_Click" runat="server"><i class='fa fa-list-alt'></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="20px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Nombre</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="350px" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField Visible="false" DataFormatString="{0:N2}">
|
||||
<ItemStyle Width="80px" HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
@@ -474,11 +520,102 @@
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabAsistencia" runat="server" HeaderText="Asistencia">
|
||||
<ContentTemplate>
|
||||
<asp:Literal ID="ltlGvAsistencia" runat="server"></asp:Literal>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
|
||||
</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">
|
||||
<asp:UpdatePanel ID="UpCargarNomina" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -518,5 +655,21 @@
|
||||
</div>
|
||||
</asp:Content>
|
||||
<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>
|
||||
|
||||
|
||||
@@ -220,12 +220,16 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
CvePeriodoSeleccionado = 0;
|
||||
dtempleados = null;
|
||||
dtConceptos = null;
|
||||
DataTable dtPeriodo = new DataTable();
|
||||
DataTable dtasistencia = new DataTable();
|
||||
using (ClsNominas objnom = new ClsNominas())
|
||||
{
|
||||
if (objnom.GetNominaEmpleado(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, CveEmpresa, Agrupador) && objnom.DTSetResultados.Tables.Count > 1)
|
||||
{
|
||||
dtempleados = objnom.DTSetResultados.Tables[0];
|
||||
dtConceptos = objnom.DTSetResultados.Tables[1];
|
||||
dtPeriodo = objnom.DTSetResultados.Tables[2];
|
||||
dtasistencia = objnom.DTSetResultados.Tables[3];
|
||||
CvePeriodoSeleccionado = CvePeriodo;
|
||||
continuar = true;
|
||||
}
|
||||
@@ -512,6 +516,57 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
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
|
||||
UpDatos.Update();
|
||||
}
|
||||
@@ -573,13 +628,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region SobreRecibo
|
||||
|
||||
protected void LnkSobreRecibo_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
try
|
||||
@@ -852,4 +1031,80 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4794,7 +4794,7 @@ Partial Class OC
|
||||
Dim DtPara As DataTable = GlobalDTUsuarios(DdlSAUsuario.SelectedValue.ToString.ToEntero, CveEmpresaActual)
|
||||
Param.Add(DtPara.Rows(0)("Correo").ToString()) 'Para
|
||||
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))
|
||||
Dim Hilo As New Threading.Thread(AddressOf MandaCorreoAnticipo)
|
||||
Hilo.Start(Param)
|
||||
@@ -4808,7 +4808,7 @@ Partial Class OC
|
||||
Dim DtPara As DataTable = GlobalDTUsuarios(Dr("CveUsuarioPara").ToString.ToEntero, CveEmpresaActual)
|
||||
Param.Add(DtPara.Rows(0)("Correo").ToString()) 'Para
|
||||
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))
|
||||
Dim Hilo As New Threading.Thread(AddressOf MandaCorreoAnticipo)
|
||||
Hilo.Start(Param)
|
||||
@@ -4839,8 +4839,9 @@ Partial Class OC
|
||||
End If
|
||||
|
||||
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
|
||||
Dim Abreviatura As String = GlobalDTMonedas().FiltroPrimeroValor("Abreviatura", $"CveMoneda={DdlMoneda.SelectedValue}")
|
||||
|
||||
Dim strBody As New StringBuilder
|
||||
strBody.Append("<!DOCTYPE html>")
|
||||
@@ -4868,6 +4869,18 @@ Partial Class OC
|
||||
strBody.Append(" <div class=""portlet-body "">")
|
||||
strBody.Append(" <table class=""mitablita"">")
|
||||
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>")
|
||||
strBody.Append(DateTime.Now.ToString("dd/MM/yy"))
|
||||
@@ -4888,9 +4901,15 @@ Partial Class OC
|
||||
strBody.Append(folio)
|
||||
strBody.Append("</td> </tr>")
|
||||
If importe.ToDouble > 0 Then
|
||||
strBody.Append(" <td>Importe:</td>")
|
||||
strBody.Append(" <td>Importe Anticipo:</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>")
|
||||
End If
|
||||
strBody.Append("<tr><td colspan=""4"" ><a href=""")
|
||||
|
||||
@@ -38,6 +38,16 @@ Partial Class OS_Asignaciones
|
||||
DivAsignacionPersona.Visible = False
|
||||
'CargaOrdenesServiciosAsignadas()
|
||||
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 Sub
|
||||
|
||||
|
||||
@@ -26,6 +26,14 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
ViewState("CveEstatuOS") = value
|
||||
End Set
|
||||
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
|
||||
Get
|
||||
Return CType(ViewState("DTEstatusUsuarios"), DataTable)
|
||||
@@ -50,26 +58,23 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
End Sub
|
||||
|
||||
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))
|
||||
GvDatos.DataSource = DtEstatusOS
|
||||
GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa) = ObjEstatusOrdenServicios.DtResultados
|
||||
|
||||
GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa) = ObjEstatusOrdenServicios.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjEstatusOrdenServicios.GetEstatusUsuarios(-1, -1) Then
|
||||
DTEstatusUsuarios = ObjEstatusOrdenServicios.DtResultados
|
||||
Dim PermisosDeUsuario As DataTable = DTEstatusUsuarios
|
||||
End If
|
||||
If ObjEstatusOrdenServicios.GetEstatusUsuarios(-1, -1) Then
|
||||
DTEstatusUsuarios = ObjEstatusOrdenServicios.DtResultados
|
||||
End If
|
||||
|
||||
OrdenaDatos()
|
||||
ObjEstatusOrdenServicios.Dispose()
|
||||
End Using
|
||||
GvDatos.DataBind()
|
||||
OrdenaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnAgregarEstatus_Click(sender As Object, e As EventArgs) Handles BtnAgregarEstatus.Click
|
||||
|
||||
@@ -323,6 +323,16 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
hdnEsThickbox.Value = "S"
|
||||
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 Sub
|
||||
|
||||
111
RH/MiPerfil.aspx
111
RH/MiPerfil.aspx
@@ -613,7 +613,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -992,12 +992,12 @@
|
||||
|
||||
<div class="col-md-6"></div>
|
||||
<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>
|
||||
<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>
|
||||
</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>
|
||||
@@ -1027,7 +1027,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<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:DropDownList>
|
||||
<label for="<%= DdlPersonal.ClientID.ToString()%>">Nombre: </label>
|
||||
@@ -1038,7 +1038,7 @@
|
||||
<div class="col-md-6">
|
||||
|
||||
<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:DropDownList>
|
||||
<label for="<%= DdlDepartamento.ClientID.ToString()%>">Área: </label>
|
||||
@@ -1051,7 +1051,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<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:DropDownList>
|
||||
<label for="<%= DdlSupervisor.ClientID.ToString()%>">Jefe Directo: </label>
|
||||
@@ -1120,7 +1120,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
<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;">
|
||||
@@ -1650,60 +1650,73 @@
|
||||
<label for="<%= TxtPermisoDescripcion.ClientID.ToString()%>">Descripcion</label>
|
||||
<i></i>
|
||||
</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 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>
|
||||
<label>Fecha Final</label>
|
||||
<i></i>
|
||||
<div class="row">
|
||||
<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="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>
|
||||
<asp:Label AssociatedControlID="TxtHoraEntrada" runat="server" Text="Hora Entrada"></asp:Label>
|
||||
<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 runat="server" visible="false" class="form-group form-md-line-input input-iconright" style="width: 160px!important">
|
||||
<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 class="form-group form-md-line-input input-iconright ">
|
||||
<asp:CheckBox ID="ChkGoceSueldo" runat="server" Text="Goce de sueldo" Checked="false" Visible="false" />
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:CheckBox ID="ChkGoceSueldo" runat="server" Text="Goce de sueldo" />
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:CheckBox ID="ChkEstatusPermiso" runat="server" Checked="true" Text="Activo" />
|
||||
<asp:CheckBox ID="ChkEstatusPermiso" CssClass="chksino" runat="server" Checked="true" Text="Activo" />
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<label for="<%= TxtPermisoDescripcion.ClientID.ToString()%>">Motivo para permiso</label>
|
||||
<asp:Label AssociatedControlID="TxtPermisoDescripcion" runat="server" Text="Motivo para permiso"></asp:Label>
|
||||
<asp:TextBox ID="TxtMotivoPermiso" runat="server" CausesValidation="true" Rows="4" TextMode="MultiLine" Visible="true" CssClass="form-control"></asp:TextBox>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
20
Site.master
20
Site.master
@@ -78,7 +78,6 @@
|
||||
<!-- BEGIN LOGO -->
|
||||
<div class="page-logo">
|
||||
<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">
|
||||
<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>
|
||||
@@ -368,16 +367,21 @@
|
||||
<div class='page-content <%=If(EsPopup, "mpoup", "") %>' style=''>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-9">
|
||||
<div class="col-sm-7">
|
||||
<h3 class="page-title" runat="server" id="headertitleh3">
|
||||
<asp:ContentPlaceHolder ID="E" runat="server">
|
||||
</asp:ContentPlaceHolder>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="col-sm-3 text-right" style="padding-top: 8px; white-space: nowrap;">
|
||||
<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 class="col-sm-2">
|
||||
<asp:TextBox ID="TxtTit" BorderStyle="None" CssClass="form-control input-sm" runat="server" Visible="false" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
<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 class='page-bar' id="barradenavegacion">
|
||||
@@ -691,9 +695,9 @@
|
||||
<script type="text/javascript" src="/signalr/signalr/hubs"></script>
|
||||
<%: Scripts.Render("~/Metronic/assets/global/scripts/JS") %>
|
||||
<script type="text/javascript" src="/Scripts/Notificaciones.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
NotificacionesADS.init();
|
||||
NotificacionesADS.init();
|
||||
</script>
|
||||
<script src="/Metronic/assets/global/plugins/bootstrap-toastr/toastr.js"></script>
|
||||
<asp:ContentPlaceHolder ID="JS" runat="server">
|
||||
|
||||
993
Site.master.vb
993
Site.master.vb
@@ -1,498 +1,497 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.Security.Cryptography.X509Certificates
|
||||
Imports Extensiones
|
||||
'Imports Microsoft.AspNet.SignalR.Client
|
||||
'Imports ChatHub
|
||||
|
||||
Partial Class Site
|
||||
Inherits BaseMasterPage
|
||||
#Region "Propiedades"
|
||||
|
||||
Public Overrides Property EsPopup() As Boolean
|
||||
Get
|
||||
Return Convert.ToBoolean(HdnEsPopup.Value)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
HdnEsPopup.Value = value.ToString
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overrides Property PopupWidth() As Integer
|
||||
Get
|
||||
Return HdnPopUpWidth.Value.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
HdnPopUpWidth.Value = value.ToString
|
||||
End Set
|
||||
End Property
|
||||
Public Property userx As Usuario
|
||||
Get
|
||||
userx = DirectCast(ViewState("userx"), Usuario)
|
||||
End Get
|
||||
Set(value As Usuario)
|
||||
ViewState("userx") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property countNotificaciones As Integer
|
||||
Get
|
||||
countNotificaciones = If(IsNothing(ViewState("countNotificaciones")), 0, ViewState("countNotificaciones").ToString.ToEntero)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("countNotificaciones") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property UsuarioCve As Integer
|
||||
Get
|
||||
Return 15
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
lblFecha.Text = DateTime.Now.ToString("dd.MMMyyyy HH:mm tt")
|
||||
MasterChat.Visible = False
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
TxtTit.Visible = True
|
||||
End If
|
||||
If Request("Masterimpoup") IsNot Nothing AndAlso Request("Masterimpoup").ToString = "true" Then EsPopup = True
|
||||
If UsuarioActual IsNot Nothing Then
|
||||
HdnCveE.Value = UsuarioActual.CveEmpresa.ToString
|
||||
HdnCveU.Value = UsuarioActual.CveUsuario.ToString
|
||||
LitTit.Text = UsuarioActual.Empresa.EmpresaEncabezado
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
LitTit.Text = String.Format("<span style='color:white; font-size:x-large'></span> <span style='color: #32A1CF; font-size:x-large'>Mi Empresa de Ventas ({0})</span> ", UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
|
||||
Dim thisURL As String = Request.Url.Segments(Request.Url.Segments.Count - 1)
|
||||
If thisURL.Equals("WizardRegistro.aspx") OrElse thisURL.Equals("Registro.aspx") Then
|
||||
LitTit.Text = "<span style='color:white; font-size:x-large'>AD</span> <span style='color: #32A1CF; font-size:x-large'> Soluciones en TI</span> "
|
||||
End If
|
||||
|
||||
userx = New Usuario
|
||||
userx.Empresa = New Empresa
|
||||
userx.Referencia = Encripta(UsuarioActual.CveUsuario.ToString)
|
||||
userx.Usuario = Encripta(UsuarioActual.Usuario)
|
||||
userx.Liga = Encripta(UsuarioActual.Rol)
|
||||
|
||||
If UsuarioActual.CvePersonal > 0 Then
|
||||
DivPerfil.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
userx.Empresa.Direccion = Encripta("-999")
|
||||
userx.Empresa.Empresa = Encripta("ADSistemas")
|
||||
Else
|
||||
'.Empresa.Direccion = Encripta(UsuarioActual.Empresa.CveEmpresa)
|
||||
'userx.Empresa.Empresa = Encripta(UsuarioActual.Empresa.Empresa)
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveRol = 1200 Then
|
||||
dashboard.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CvePlataforma = 6 Or UsuarioActual.CvePlataforma = 7 Then
|
||||
header_search_bar.Visible = False
|
||||
header_notification_bar.Visible = False
|
||||
End If
|
||||
|
||||
If EsPopup Then
|
||||
|
||||
scriptoppner.Visible = True
|
||||
divMenu.Visible = False
|
||||
RegistraScript("$('#barradenavegacion').css({'display':'none'})")
|
||||
divContenido.Attributes.CssStyle("background") = "white"
|
||||
divpagecontainer.Attributes.CssStyle("margin") = "0px !important"
|
||||
headertitleh3.Attributes.CssStyle("margin") = "0px !important"
|
||||
divtopmenu.Visible = False
|
||||
Else
|
||||
'MyChat_Init(Nothing, Nothing)
|
||||
|
||||
'19/05/2018 - CARGA TIPO DE CAMBIO
|
||||
'2018.08.14, se movió de la linea 59 a la actual
|
||||
CargaTipoCambio()
|
||||
|
||||
|
||||
If UsuarioActual.Portal = False Then
|
||||
CreaMenu()
|
||||
'Configuracion()
|
||||
CargaUsuario()
|
||||
CargaBuscadores()
|
||||
Else
|
||||
LtMasterPerfil.Text = UsuarioActual.Rol
|
||||
LtMasterUsuario.Text = UsuarioActual.Usuario
|
||||
End If
|
||||
|
||||
End If
|
||||
CargarNotificaciones()
|
||||
Else
|
||||
|
||||
Dim thisURL As String = Request.Url.Segments(Request.Url.Segments.Count - 1)
|
||||
If thisURL.Equals("WizardRegistro.aspx") OrElse thisURL.Equals("Registro.aspx") Then
|
||||
LitTit.Text = "<span style='color:white; font-size:x-large'>AD</span> <span style='color: #32A1CF; font-size:x-large'> Soluciones en TI</span> "
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
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,
|
||||
'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
|
||||
Response.Redirect(FormsAuthentication.DefaultUrl)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaUsuario()
|
||||
If UsuarioActual IsNot Nothing Then
|
||||
'LtMasterNombre.Text = UsuarioActual.Nombre
|
||||
LtMasterPerfil.Text = UsuarioActual.Rol
|
||||
LtMasterUsuario.Text = UsuarioActual.Usuario
|
||||
|
||||
|
||||
'DivConfiguracionEmpresa.Visible = True
|
||||
' BtnConfiguracionEmpresa.Attributes.Add("onclick", String.Format("javascript:document.location.href='/Sistemas/Empresa.aspx?CveEmpresa={0}'", UsuarioActual.CveEmpresa))
|
||||
BtnConfiguracionEmpresa.Visible = False
|
||||
DivConfiguracionEmpresa.Visible = False
|
||||
'loadchat()
|
||||
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.ModoSimulacion Then
|
||||
DivCambiarUsuario.Visible = True
|
||||
BtnCambiarUsuario.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpCambiaUsuario.aspx');")
|
||||
End If
|
||||
If UsuarioActual.MultipleEmpresa Then
|
||||
BtnCambiarEmpresa.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpSeleccionarEmpresa.aspx');")
|
||||
DivCambiarEmpresa.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
'Private Sub loadchat()
|
||||
|
||||
' If UsuarioActual.CveRol = 1 OrElse UsuarioActual.ModoSimulacion Then
|
||||
' 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 prefix As String = ""
|
||||
' Dim userstring As New StringBuilder
|
||||
' For Each item As Integer In userconectedlist
|
||||
' userstring.AppendFormat("{0}{1} ", prefix, item)
|
||||
' prefix = ","
|
||||
' Next
|
||||
' stringusers = userstring.ToString
|
||||
' If userconectedlist.Count > 0 Then
|
||||
' GlobalDTUsuarios = GlobalDTUsuarios.FiltraParametros(String.Format("CveUsuario in ({0})", userstring))
|
||||
' RptChatEmpresa.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa >1", "", {"CveEmpresa", "Empresa"})
|
||||
' RptChatEmpresa.DataBind()
|
||||
' End If
|
||||
' MasterChat.Visible = True
|
||||
|
||||
' End If
|
||||
'End Sub
|
||||
'Private stringusers As String = "0"
|
||||
'Private Sub RptChatEmpresa_ItemDataBound(sender As Object, e As RepeaterItemEventArgs) Handles RptChatEmpresa.ItemDataBound
|
||||
' 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 rpthijo As Repeater = DirectCast(e.Item.FindControl("RPTChatuser"), Repeater)
|
||||
' rpthijo.DataSource = GlobalDTUsuarios
|
||||
' rpthijo.DataBind()
|
||||
'End Sub
|
||||
Private Sub CargaBuscadores()
|
||||
'Proveedores
|
||||
If UsuarioActual.TienePermisoPagina(37) Then tdProv.Visible = True
|
||||
|
||||
'Clientes
|
||||
If UsuarioActual.TienePermisoPagina(26) Then tdCliente.Visible = True
|
||||
|
||||
'Factura de Ventas
|
||||
If UsuarioActual.TienePermisoPagina(6) Then tdVentas.Visible = True
|
||||
|
||||
'Personal
|
||||
If UsuarioActual.TienePermisoPagina(46) Then tdPersonal.Visible = True
|
||||
|
||||
'Buscar Productos servicios
|
||||
If UsuarioActual.TienePermisoPagina(13) Then tdBuscarPs.Visible = True
|
||||
|
||||
'Compras
|
||||
If UsuarioActual.TienePermisoPagina(38) Then tdCompras.Visible = True
|
||||
|
||||
'Ordenes Servicio
|
||||
If UsuarioActual.TienePermisoPagina(135) Then tdOS.Visible = True
|
||||
|
||||
'Ingresos / Egresos
|
||||
If UsuarioActual.TienePermisoPagina(153) Then tdCheques.Visible = True
|
||||
|
||||
'Órdenes de Compra
|
||||
If UsuarioActual.TienePermisoPagina(103) Then tdOC.Visible = True
|
||||
|
||||
'Cuando es Requisición
|
||||
If UsuarioActual.TienePermisoPagina(250) Then tdOC.Visible = True
|
||||
|
||||
'Inventarios Movimientos
|
||||
If UsuarioActual.TienePermisoPagina(219) Then TdMovInv.Visible = True
|
||||
|
||||
'Prospectos
|
||||
If UsuarioActual.TienePermisoPagina(181) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx',980,547,'popBuscarProspectos');")
|
||||
'ProspectosRedes
|
||||
If UsuarioActual.TienePermisoPagina(183) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx?Opt=Redes',980,547,'popBuscarProspectos');")
|
||||
'ProspectosG15
|
||||
If UsuarioActual.TienePermisoPagina(187) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx?Opt=Atn',980,547,'popBuscarProspectos');")
|
||||
'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(392) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospeccion/PopUpBuscarProspectos.aspx',980,547,'popBuscarProspectos');")
|
||||
|
||||
If UsuarioActual.TienePermisoPagina(228) Then tdBExi.Visible = True
|
||||
|
||||
'Contratos
|
||||
If UsuarioActual.TienePermisoPagina(313) Then TdContratos.Visible = True
|
||||
|
||||
|
||||
'BUSCAR MILITANTE
|
||||
If UsuarioActual.TienePermisoPagina(1001) Then tdBuscarMilitante.Visible = True
|
||||
|
||||
'Orden Produccion'
|
||||
If UsuarioActual.TienePermisoPagina(816) Then tdOP.Visible = True
|
||||
|
||||
'Produccion'
|
||||
If UsuarioActual.TienePermisoPagina(823) Then tdP.Visible = True
|
||||
|
||||
'BUSCAR ACERCAMIENTO CRM'
|
||||
If UsuarioActual.TienePermisoProceso(251) Then TdCRMAcercamientos.Visible = True
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub CerrarSesion_Click(sender As Object, e As EventArgs) Handles BtnCerrarSesion.ServerClick
|
||||
|
||||
'If Request.ServerVariables("URL").ToUpper.Contiene("/PortalCliente/PortalCliente.aspx".ToUpper) Then
|
||||
' UsuarioActual.CerrarSession(1)
|
||||
'ElseIf Request.ServerVariables("URL").ToUpper.Contiene("/PortalProveedores/PortalProveedor.aspx".ToUpper) Then
|
||||
' UsuarioActual.CerrarSession(2)
|
||||
'Else
|
||||
'MyHub.RemoveConexiones(UsuarioActual.CveUsuario)
|
||||
Usuario.CerrarSession()
|
||||
'End If
|
||||
|
||||
'UsuarioActual.Dispose()
|
||||
End Sub
|
||||
|
||||
'Private Sub Configuracion()
|
||||
' Dim dt As New DataTable
|
||||
' dt.ReadXml(String.Format("{0}\Menu\ERP\{1}_Conf.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveUsuario))
|
||||
|
||||
'End Sub
|
||||
|
||||
Private Sub CreaMenu()
|
||||
Dim dt As New DataTable
|
||||
|
||||
If UsuarioActual.CveRol = 1200 Then
|
||||
dt.ReadXml(String.Format("{0}\Menu\GPS\{1}.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveUsuario))
|
||||
Else
|
||||
dt.ReadXml(String.Format("{0}\Menu\ERP\{1}.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveUsuario))
|
||||
End If
|
||||
|
||||
Dim Inicio = From i In dt.AsEnumerable Where i!CvePadre.Equals(0) Order By i!Orden
|
||||
Dim CveModuloPadre, CveModuloPadreSeleccionado, CveModuloHijoSeleccionado, CveModuloNietoSeleccionado As Integer
|
||||
Dim CveModulo As Integer = CveModulomasterpage.Text.ToEntero
|
||||
Dim ScriptColorGrupoModulo As String = ""
|
||||
Dim LinkBase = "javascript:;"
|
||||
Dim HeaderBar As New StringBuilder("<li><i class='fa fa-home'></i><a href='/Inicio.aspx'>Inicio</a>")
|
||||
Dim LinkPadre = ""
|
||||
Dim Linkpapa As String = ""
|
||||
Dim LinkHijo = ""
|
||||
Dim Linkson As String = ""
|
||||
Dim LinkNieto = ""
|
||||
Dim ClassActive As String
|
||||
CveModuloPadreSeleccionado = 0 : CveModuloHijoSeleccionado = 0 : CveModuloNietoSeleccionado = 0
|
||||
Dim MenuHTML As New StringBuilder
|
||||
For Each drP As DataRow In Inicio
|
||||
CveModuloPadre = drP("CveModulo").ToString.ToEntero
|
||||
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"))
|
||||
|
||||
Dim Hijos = From h In dt.AsEnumerable Where h!CvePadre.Equals(CveModuloPadre) Order By h!Orden
|
||||
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)
|
||||
ScriptColorGrupoModulo = ColorPage(drP("CveGrupoModulo").ToString.ToEntero)
|
||||
End If
|
||||
If Hijos.Count > 0 Then
|
||||
Linkpapa = LinkPadre
|
||||
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"))
|
||||
For Each drH As DataRow In Hijos
|
||||
Dim CveModuloHijo As Integer = drH("CveModulo").ToString.ToEntero
|
||||
LinkHijo = drH("LIGA").ToString
|
||||
If CveModulo = drH("CveModulo").ToString.ToEntero Then
|
||||
CveModuloPadreSeleccionado = CveModuloPadre
|
||||
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)
|
||||
ScriptColorGrupoModulo = ColorPage(drH("CveGrupoModulo").ToString.ToEntero)
|
||||
Else
|
||||
|
||||
ClassActive = ""
|
||||
End If
|
||||
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
|
||||
If Nietos.Count > 0 Then
|
||||
Linkson = LinkHijo
|
||||
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"))
|
||||
For Each drN As DataRow In Nietos
|
||||
LinkNieto = drN("LIGA").ToString
|
||||
If CveModulo = drN("CveModulo").ToString.ToEntero Then
|
||||
CveModuloPadreSeleccionado = CveModuloPadre : CveModuloHijoSeleccionado = CveModuloHijo
|
||||
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"))
|
||||
ScriptColorGrupoModulo = ColorPage(drN("CveGrupoModulo").ToString.ToEntero)
|
||||
Else
|
||||
ClassActive = ""
|
||||
End If
|
||||
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)
|
||||
Next
|
||||
MenuHTML.AppendFormat("</ul></li>")
|
||||
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)
|
||||
End If
|
||||
Next
|
||||
MenuHTML.AppendFormat("</ul></li>")
|
||||
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")), ""))
|
||||
End If
|
||||
Next
|
||||
|
||||
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='j{0}'", CveModuloPadreSeleccionado), String.Format("id='j{0}' class='selected'", CveModuloPadreSeleccionado))
|
||||
Else
|
||||
End If
|
||||
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='j{0}'", CveModuloHijoSeleccionado), String.Format("id='j{0}' class='selected'", CveModuloHijoSeleccionado))
|
||||
End If
|
||||
HeaderBar.AppendFormat("</li>{0}", ScriptColorGrupoModulo)
|
||||
BarraNavegacion.Text = HeaderBar.ToString
|
||||
CargaMenu(MenuHTML)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function ColorPage(value As Integer) As String
|
||||
|
||||
Select Case value
|
||||
Case 1
|
||||
Return "<script>$('body').addClass('ventasbody')</script>"
|
||||
Case 2
|
||||
Return "<script>$('body').addClass('comprasbody')</script>"
|
||||
Case 3
|
||||
Return "<script>$('body').addClass('bancosbody')</script>"
|
||||
Case 4
|
||||
Return "<script>$('body').addClass('ocomprabody')</script>"
|
||||
Case 5
|
||||
Return "<script>$('body').addClass('inventariosbody')</script>"
|
||||
Case 6
|
||||
Return "<script>$('body').addClass('oserviciobody')</script>"
|
||||
Case 7
|
||||
Return "<script>$('body').addClass('oibody')</script>"
|
||||
Case 8
|
||||
Return "<script>$('body').addClass('contabilidadbody')</script>"
|
||||
Case 9
|
||||
Return "<script>$('body').addClass('rhumanosbody')</script>"
|
||||
Case 10
|
||||
Return "<script>$('body').addClass('afijosbody')</script>"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Sub CargaMenu(Texto As StringBuilder)
|
||||
Menu.Text = Texto.ToString
|
||||
End Sub
|
||||
|
||||
#Region "Notificaciones"
|
||||
|
||||
Private Sub CargarNotificaciones()
|
||||
Dim Notificaciones As New StringBuilder
|
||||
|
||||
'Bienvenida
|
||||
Notificaciones.Append(ItemNotificaciones("Bienvenido a SIG ", "Hoy", "fa fa-bullhorn"))
|
||||
|
||||
'Certificado
|
||||
Dim fechacer As String = ConvertCER()
|
||||
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"))
|
||||
countNotificaciones = countNotificaciones + 1
|
||||
Else
|
||||
Notificaciones.Append(ItemNotificaciones("Su certificado expira en: ", fechacer))
|
||||
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
|
||||
If UsuarioActual.CveUsuario = 1459 Then
|
||||
Dim OC As New ClsOC
|
||||
If OC.GetOrdenesPendientes("-1", 0, UsuarioActual.CveEmpresa, -1, -1, -1, UsuarioActual.CveUsuario, -1) 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"))
|
||||
countNotificaciones = countNotificaciones + 1
|
||||
End If
|
||||
End If
|
||||
OC.Dispose()
|
||||
End If
|
||||
|
||||
|
||||
''OC Pendientes por atender
|
||||
'Dim OC As New ClsOC
|
||||
'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"))
|
||||
' If OC.DtResultados.Rows.Count > 0 Then
|
||||
' countNotificaciones = countNotificaciones + 1
|
||||
' End If
|
||||
'End If
|
||||
'OC.Dispose()
|
||||
|
||||
LtlMNotificaciones.Text = LtlMNotificaciones.Text & Notificaciones.ToString
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function ConvertCER() As String
|
||||
Try
|
||||
Dim Archivo As String = String.Format("{0}Empresas\{1}\Certificados\{2}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.ArchivoCer)
|
||||
If File.Exists(Archivo) Then
|
||||
Dim CerFile As New FileStream(Archivo, FileMode.Open, FileAccess.Read)
|
||||
Dim Size As Integer = CerFile.Length.ToString.ToEntero()
|
||||
Dim Data As Byte() = New Byte(Size - 1) {}
|
||||
Size = CerFile.Read(Data, 0, Size)
|
||||
CerFile.Close()
|
||||
CerFile.Dispose()
|
||||
|
||||
Dim x509 As New X509Certificate2()
|
||||
x509.Import(Data)
|
||||
Return x509.NotAfter.ToShortDateString()
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Return ""
|
||||
End Try
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "TIPO DE CAMBIO"
|
||||
Private Sub CargaTipoCambio()
|
||||
Dim ObjGenerales As ClsGenerales = New ClsGenerales
|
||||
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())
|
||||
End If
|
||||
ObjGenerales.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.Security.Cryptography.X509Certificates
|
||||
Imports Extensiones
|
||||
'Imports Microsoft.AspNet.SignalR.Client
|
||||
'Imports ChatHub
|
||||
|
||||
Partial Class Site
|
||||
Inherits BaseMasterPage
|
||||
#Region "Propiedades"
|
||||
|
||||
Public Overrides Property EsPopup() As Boolean
|
||||
Get
|
||||
Return Convert.ToBoolean(HdnEsPopup.Value)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
HdnEsPopup.Value = value.ToString
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overrides Property PopupWidth() As Integer
|
||||
Get
|
||||
Return HdnPopUpWidth.Value.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
HdnPopUpWidth.Value = value.ToString
|
||||
End Set
|
||||
End Property
|
||||
Public Property userx As Usuario
|
||||
Get
|
||||
userx = DirectCast(ViewState("userx"), Usuario)
|
||||
End Get
|
||||
Set(value As Usuario)
|
||||
ViewState("userx") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property countNotificaciones As Integer
|
||||
Get
|
||||
countNotificaciones = If(IsNothing(ViewState("countNotificaciones")), 0, ViewState("countNotificaciones").ToString.ToEntero)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("countNotificaciones") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property UsuarioCve As Integer
|
||||
Get
|
||||
Return 15
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
lblFecha.Text = DateTime.Now.ToString("dd.MMMyyyy HH:mm tt")
|
||||
MasterChat.Visible = False
|
||||
|
||||
If Request("Masterimpoup") IsNot Nothing AndAlso Request("Masterimpoup").ToString = "true" Then EsPopup = True
|
||||
If UsuarioActual IsNot Nothing Then
|
||||
HdnCveE.Value = UsuarioActual.CveEmpresa.ToString
|
||||
HdnCveU.Value = UsuarioActual.CveUsuario.ToString
|
||||
LitTit.Text = UsuarioActual.Empresa.EmpresaEncabezado
|
||||
If UsuarioActual.CveUsuario = 100 Then
|
||||
LitTit.Text = String.Format("<span style='color:white; font-size:x-large'></span> <span style='color: #32A1CF; font-size:x-large'>Mi Empresa de Ventas ({0})</span> ", UsuarioActual.CveEmpresa)
|
||||
TxtTit.Visible = True
|
||||
End If
|
||||
|
||||
Dim thisURL As String = Request.Url.Segments(Request.Url.Segments.Count - 1)
|
||||
If thisURL.Equals("WizardRegistro.aspx") OrElse thisURL.Equals("Registro.aspx") Then
|
||||
LitTit.Text = "<span style='color:white; font-size:x-large'>AD</span> <span style='color: #32A1CF; font-size:x-large'> Soluciones en TI</span> "
|
||||
End If
|
||||
|
||||
userx = New Usuario
|
||||
userx.Empresa = New Empresa
|
||||
userx.Referencia = Encripta(UsuarioActual.CveUsuario.ToString)
|
||||
userx.Usuario = Encripta(UsuarioActual.Usuario)
|
||||
userx.Liga = Encripta(UsuarioActual.Rol)
|
||||
|
||||
If UsuarioActual.CvePersonal > 0 Then
|
||||
DivPerfil.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
userx.Empresa.Direccion = Encripta("-999")
|
||||
userx.Empresa.Empresa = Encripta("ADSistemas")
|
||||
Else
|
||||
'.Empresa.Direccion = Encripta(UsuarioActual.Empresa.CveEmpresa)
|
||||
'userx.Empresa.Empresa = Encripta(UsuarioActual.Empresa.Empresa)
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveRol = 1200 Then
|
||||
dashboard.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CvePlataforma = 6 Or UsuarioActual.CvePlataforma = 7 Then
|
||||
header_search_bar.Visible = False
|
||||
header_notification_bar.Visible = False
|
||||
End If
|
||||
|
||||
If EsPopup Then
|
||||
|
||||
scriptoppner.Visible = True
|
||||
divMenu.Visible = False
|
||||
RegistraScript("$('#barradenavegacion').css({'display':'none'})")
|
||||
divContenido.Attributes.CssStyle("background") = "white"
|
||||
divpagecontainer.Attributes.CssStyle("margin") = "0px !important"
|
||||
headertitleh3.Attributes.CssStyle("margin") = "0px !important"
|
||||
divtopmenu.Visible = False
|
||||
Else
|
||||
'MyChat_Init(Nothing, Nothing)
|
||||
|
||||
'19/05/2018 - CARGA TIPO DE CAMBIO
|
||||
'2018.08.14, se movió de la linea 59 a la actual
|
||||
CargaTipoCambio()
|
||||
|
||||
|
||||
If UsuarioActual.Portal = False Then
|
||||
CreaMenu()
|
||||
'Configuracion()
|
||||
CargaUsuario()
|
||||
CargaBuscadores()
|
||||
Else
|
||||
LtMasterPerfil.Text = UsuarioActual.Rol
|
||||
LtMasterUsuario.Text = UsuarioActual.Usuario
|
||||
End If
|
||||
|
||||
End If
|
||||
CargarNotificaciones()
|
||||
Else
|
||||
|
||||
Dim thisURL As String = Request.Url.Segments(Request.Url.Segments.Count - 1)
|
||||
If thisURL.Equals("WizardRegistro.aspx") OrElse thisURL.Equals("Registro.aspx") Then
|
||||
LitTit.Text = "<span style='color:white; font-size:x-large'>AD</span> <span style='color: #32A1CF; font-size:x-large'> Soluciones en TI</span> "
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
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,
|
||||
'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
|
||||
Response.Redirect(FormsAuthentication.DefaultUrl)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaUsuario()
|
||||
If UsuarioActual IsNot Nothing Then
|
||||
'LtMasterNombre.Text = UsuarioActual.Nombre
|
||||
LtMasterPerfil.Text = UsuarioActual.Rol
|
||||
LtMasterUsuario.Text = UsuarioActual.Usuario
|
||||
|
||||
|
||||
'DivConfiguracionEmpresa.Visible = True
|
||||
' BtnConfiguracionEmpresa.Attributes.Add("onclick", String.Format("javascript:document.location.href='/Sistemas/Empresa.aspx?CveEmpresa={0}'", UsuarioActual.CveEmpresa))
|
||||
BtnConfiguracionEmpresa.Visible = False
|
||||
DivConfiguracionEmpresa.Visible = False
|
||||
'loadchat()
|
||||
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.ModoSimulacion Then
|
||||
DivCambiarUsuario.Visible = True
|
||||
BtnCambiarUsuario.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpCambiaUsuario.aspx');")
|
||||
End If
|
||||
If UsuarioActual.MultipleEmpresa Then
|
||||
BtnCambiarEmpresa.Attributes.Add("onclick", "javascript:AbrirVentana('/Sistemas/PopUpSeleccionarEmpresa.aspx');")
|
||||
DivCambiarEmpresa.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
'Private Sub loadchat()
|
||||
|
||||
' If UsuarioActual.CveRol = 1 OrElse UsuarioActual.ModoSimulacion Then
|
||||
' 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 prefix As String = ""
|
||||
' Dim userstring As New StringBuilder
|
||||
' For Each item As Integer In userconectedlist
|
||||
' userstring.AppendFormat("{0}{1} ", prefix, item)
|
||||
' prefix = ","
|
||||
' Next
|
||||
' stringusers = userstring.ToString
|
||||
' If userconectedlist.Count > 0 Then
|
||||
' GlobalDTUsuarios = GlobalDTUsuarios.FiltraParametros(String.Format("CveUsuario in ({0})", userstring))
|
||||
' RptChatEmpresa.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa >1", "", {"CveEmpresa", "Empresa"})
|
||||
' RptChatEmpresa.DataBind()
|
||||
' End If
|
||||
' MasterChat.Visible = True
|
||||
|
||||
' End If
|
||||
'End Sub
|
||||
'Private stringusers As String = "0"
|
||||
'Private Sub RptChatEmpresa_ItemDataBound(sender As Object, e As RepeaterItemEventArgs) Handles RptChatEmpresa.ItemDataBound
|
||||
' 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 rpthijo As Repeater = DirectCast(e.Item.FindControl("RPTChatuser"), Repeater)
|
||||
' rpthijo.DataSource = GlobalDTUsuarios
|
||||
' rpthijo.DataBind()
|
||||
'End Sub
|
||||
Private Sub CargaBuscadores()
|
||||
'Proveedores
|
||||
If UsuarioActual.TienePermisoPagina(37) Then tdProv.Visible = True
|
||||
|
||||
'Clientes
|
||||
If UsuarioActual.TienePermisoPagina(26) Then tdCliente.Visible = True
|
||||
|
||||
'Factura de Ventas
|
||||
If UsuarioActual.TienePermisoPagina(6) Then tdVentas.Visible = True
|
||||
|
||||
'Personal
|
||||
If UsuarioActual.TienePermisoPagina(46) Then tdPersonal.Visible = True
|
||||
|
||||
'Buscar Productos servicios
|
||||
If UsuarioActual.TienePermisoPagina(13) Then tdBuscarPs.Visible = True
|
||||
|
||||
'Compras
|
||||
If UsuarioActual.TienePermisoPagina(38) Then tdCompras.Visible = True
|
||||
|
||||
'Ordenes Servicio
|
||||
If UsuarioActual.TienePermisoPagina(135) Then tdOS.Visible = True
|
||||
|
||||
'Ingresos / Egresos
|
||||
If UsuarioActual.TienePermisoPagina(153) Then tdCheques.Visible = True
|
||||
|
||||
'Órdenes de Compra
|
||||
If UsuarioActual.TienePermisoPagina(103) Then tdOC.Visible = True
|
||||
|
||||
'Cuando es Requisición
|
||||
If UsuarioActual.TienePermisoPagina(250) Then tdOC.Visible = True
|
||||
|
||||
'Inventarios Movimientos
|
||||
If UsuarioActual.TienePermisoPagina(219) Then TdMovInv.Visible = True
|
||||
|
||||
'Prospectos
|
||||
If UsuarioActual.TienePermisoPagina(181) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx',980,547,'popBuscarProspectos');")
|
||||
'ProspectosRedes
|
||||
If UsuarioActual.TienePermisoPagina(183) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx?Opt=Redes',980,547,'popBuscarProspectos');")
|
||||
'ProspectosG15
|
||||
If UsuarioActual.TienePermisoPagina(187) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospectos/PopUpBuscarProspectos.aspx?Opt=Atn',980,547,'popBuscarProspectos');")
|
||||
'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(392) Then tdProspectos.Visible = True : ImgProspecto.Attributes.Add("onclick", "AbrirVentana('/Prospeccion/PopUpBuscarProspectos.aspx',980,547,'popBuscarProspectos');")
|
||||
|
||||
If UsuarioActual.TienePermisoPagina(228) Then tdBExi.Visible = True
|
||||
|
||||
'Contratos
|
||||
If UsuarioActual.TienePermisoPagina(313) Then TdContratos.Visible = True
|
||||
|
||||
|
||||
'BUSCAR MILITANTE
|
||||
If UsuarioActual.TienePermisoPagina(1001) Then tdBuscarMilitante.Visible = True
|
||||
|
||||
'Orden Produccion'
|
||||
If UsuarioActual.TienePermisoPagina(816) Then tdOP.Visible = True
|
||||
|
||||
'Produccion'
|
||||
If UsuarioActual.TienePermisoPagina(823) Then tdP.Visible = True
|
||||
|
||||
'BUSCAR ACERCAMIENTO CRM'
|
||||
If UsuarioActual.TienePermisoProceso(251) Then TdCRMAcercamientos.Visible = True
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub CerrarSesion_Click(sender As Object, e As EventArgs) Handles BtnCerrarSesion.ServerClick
|
||||
|
||||
'If Request.ServerVariables("URL").ToUpper.Contiene("/PortalCliente/PortalCliente.aspx".ToUpper) Then
|
||||
' UsuarioActual.CerrarSession(1)
|
||||
'ElseIf Request.ServerVariables("URL").ToUpper.Contiene("/PortalProveedores/PortalProveedor.aspx".ToUpper) Then
|
||||
' UsuarioActual.CerrarSession(2)
|
||||
'Else
|
||||
'MyHub.RemoveConexiones(UsuarioActual.CveUsuario)
|
||||
Usuario.CerrarSession()
|
||||
'End If
|
||||
|
||||
'UsuarioActual.Dispose()
|
||||
End Sub
|
||||
|
||||
'Private Sub Configuracion()
|
||||
' Dim dt As New DataTable
|
||||
' dt.ReadXml(String.Format("{0}\Menu\ERP\{1}_Conf.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveUsuario))
|
||||
|
||||
'End Sub
|
||||
|
||||
Private Sub CreaMenu()
|
||||
Dim dt As New DataTable
|
||||
|
||||
If UsuarioActual.CveRol = 1200 Then
|
||||
dt.ReadXml(String.Format("{0}\Menu\GPS\{1}.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveUsuario))
|
||||
Else
|
||||
dt.ReadXml(String.Format("{0}\Menu\ERP\{1}.xml", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveUsuario))
|
||||
End If
|
||||
|
||||
Dim Inicio = From i In dt.AsEnumerable Where i!CvePadre.Equals(0) Order By i!Orden
|
||||
Dim CveModuloPadre, CveModuloPadreSeleccionado, CveModuloHijoSeleccionado, CveModuloNietoSeleccionado As Integer
|
||||
Dim CveModulo As Integer = CveModulomasterpage.Text.ToEntero
|
||||
Dim ScriptColorGrupoModulo As String = ""
|
||||
Dim LinkBase = "javascript:;"
|
||||
Dim HeaderBar As New StringBuilder("<li><i class='fa fa-home'></i><a href='/Inicio.aspx'>Inicio</a>")
|
||||
Dim LinkPadre = ""
|
||||
Dim Linkpapa As String = ""
|
||||
Dim LinkHijo = ""
|
||||
Dim Linkson As String = ""
|
||||
Dim LinkNieto = ""
|
||||
Dim ClassActive As String
|
||||
CveModuloPadreSeleccionado = 0 : CveModuloHijoSeleccionado = 0 : CveModuloNietoSeleccionado = 0
|
||||
Dim MenuHTML As New StringBuilder
|
||||
For Each drP As DataRow In Inicio
|
||||
CveModuloPadre = drP("CveModulo").ToString.ToEntero
|
||||
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"))
|
||||
|
||||
Dim Hijos = From h In dt.AsEnumerable Where h!CvePadre.Equals(CveModuloPadre) Order By h!Orden
|
||||
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)
|
||||
ScriptColorGrupoModulo = ColorPage(drP("CveGrupoModulo").ToString.ToEntero)
|
||||
End If
|
||||
If Hijos.Count > 0 Then
|
||||
Linkpapa = LinkPadre
|
||||
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"))
|
||||
For Each drH As DataRow In Hijos
|
||||
Dim CveModuloHijo As Integer = drH("CveModulo").ToString.ToEntero
|
||||
LinkHijo = drH("LIGA").ToString
|
||||
If CveModulo = drH("CveModulo").ToString.ToEntero Then
|
||||
CveModuloPadreSeleccionado = CveModuloPadre
|
||||
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)
|
||||
ScriptColorGrupoModulo = ColorPage(drH("CveGrupoModulo").ToString.ToEntero)
|
||||
Else
|
||||
|
||||
ClassActive = ""
|
||||
End If
|
||||
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
|
||||
If Nietos.Count > 0 Then
|
||||
Linkson = LinkHijo
|
||||
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"))
|
||||
For Each drN As DataRow In Nietos
|
||||
LinkNieto = drN("LIGA").ToString
|
||||
If CveModulo = drN("CveModulo").ToString.ToEntero Then
|
||||
CveModuloPadreSeleccionado = CveModuloPadre : CveModuloHijoSeleccionado = CveModuloHijo
|
||||
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"))
|
||||
ScriptColorGrupoModulo = ColorPage(drN("CveGrupoModulo").ToString.ToEntero)
|
||||
Else
|
||||
ClassActive = ""
|
||||
End If
|
||||
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)
|
||||
Next
|
||||
MenuHTML.AppendFormat("</ul></li>")
|
||||
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)
|
||||
End If
|
||||
Next
|
||||
MenuHTML.AppendFormat("</ul></li>")
|
||||
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")), ""))
|
||||
End If
|
||||
Next
|
||||
|
||||
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='j{0}'", CveModuloPadreSeleccionado), String.Format("id='j{0}' class='selected'", CveModuloPadreSeleccionado))
|
||||
Else
|
||||
End If
|
||||
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='j{0}'", CveModuloHijoSeleccionado), String.Format("id='j{0}' class='selected'", CveModuloHijoSeleccionado))
|
||||
End If
|
||||
HeaderBar.AppendFormat("</li>{0}", ScriptColorGrupoModulo)
|
||||
BarraNavegacion.Text = HeaderBar.ToString
|
||||
CargaMenu(MenuHTML)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function ColorPage(value As Integer) As String
|
||||
|
||||
Select Case value
|
||||
Case 1
|
||||
Return "<script>$('body').addClass('ventasbody')</script>"
|
||||
Case 2
|
||||
Return "<script>$('body').addClass('comprasbody')</script>"
|
||||
Case 3
|
||||
Return "<script>$('body').addClass('bancosbody')</script>"
|
||||
Case 4
|
||||
Return "<script>$('body').addClass('ocomprabody')</script>"
|
||||
Case 5
|
||||
Return "<script>$('body').addClass('inventariosbody')</script>"
|
||||
Case 6
|
||||
Return "<script>$('body').addClass('oserviciobody')</script>"
|
||||
Case 7
|
||||
Return "<script>$('body').addClass('oibody')</script>"
|
||||
Case 8
|
||||
Return "<script>$('body').addClass('contabilidadbody')</script>"
|
||||
Case 9
|
||||
Return "<script>$('body').addClass('rhumanosbody')</script>"
|
||||
Case 10
|
||||
Return "<script>$('body').addClass('afijosbody')</script>"
|
||||
Case Else
|
||||
Return ""
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Sub CargaMenu(Texto As StringBuilder)
|
||||
Menu.Text = Texto.ToString
|
||||
End Sub
|
||||
|
||||
#Region "Notificaciones"
|
||||
|
||||
Private Sub CargarNotificaciones()
|
||||
Dim Notificaciones As New StringBuilder
|
||||
|
||||
'Bienvenida
|
||||
Notificaciones.Append(ItemNotificaciones("Bienvenido a SIG ", "Hoy", "fa fa-bullhorn"))
|
||||
|
||||
'Certificado
|
||||
Dim fechacer As String = ConvertCER()
|
||||
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"))
|
||||
countNotificaciones = countNotificaciones + 1
|
||||
Else
|
||||
Notificaciones.Append(ItemNotificaciones("Su certificado expira en: ", fechacer))
|
||||
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
|
||||
If UsuarioActual.CveUsuario = 1459 Then
|
||||
Dim OC As New ClsOC
|
||||
If OC.GetOrdenesPendientes("-1", 0, UsuarioActual.CveEmpresa, -1, -1, -1, UsuarioActual.CveUsuario, -1) 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"))
|
||||
countNotificaciones = countNotificaciones + 1
|
||||
End If
|
||||
End If
|
||||
OC.Dispose()
|
||||
End If
|
||||
|
||||
|
||||
''OC Pendientes por atender
|
||||
'Dim OC As New ClsOC
|
||||
'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"))
|
||||
' If OC.DtResultados.Rows.Count > 0 Then
|
||||
' countNotificaciones = countNotificaciones + 1
|
||||
' End If
|
||||
'End If
|
||||
'OC.Dispose()
|
||||
|
||||
LtlMNotificaciones.Text = LtlMNotificaciones.Text & Notificaciones.ToString
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function ConvertCER() As String
|
||||
Try
|
||||
Dim Archivo As String = String.Format("{0}Empresas\{1}\Certificados\{2}", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.ArchivoCer)
|
||||
If File.Exists(Archivo) Then
|
||||
Dim CerFile As New FileStream(Archivo, FileMode.Open, FileAccess.Read)
|
||||
Dim Size As Integer = CerFile.Length.ToString.ToEntero()
|
||||
Dim Data As Byte() = New Byte(Size - 1) {}
|
||||
Size = CerFile.Read(Data, 0, Size)
|
||||
CerFile.Close()
|
||||
CerFile.Dispose()
|
||||
|
||||
Dim x509 As New X509Certificate2()
|
||||
x509.Import(Data)
|
||||
Return x509.NotAfter.ToShortDateString()
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Return ""
|
||||
End Try
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "TIPO DE CAMBIO"
|
||||
Private Sub CargaTipoCambio()
|
||||
Dim ObjGenerales As ClsGenerales = New ClsGenerales
|
||||
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())
|
||||
End If
|
||||
ObjGenerales.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
@@ -1291,8 +1291,10 @@ Partial Class Clientes
|
||||
'CargaFormaPago33()
|
||||
'CargaComboCFDI()
|
||||
|
||||
LnkPorcentajeMarcas.Visible = True
|
||||
LnkPorcentajePrecios.Visible = True
|
||||
If UsuarioActual.TienePermisoProceso(279) Then
|
||||
LnkPorcentajeMarcas.Visible = True
|
||||
LnkPorcentajePrecios.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(261) Then LnkVerGrafica.Visible = True
|
||||
|
||||
@@ -2787,7 +2789,8 @@ Partial Class Clientes
|
||||
TxtNumeroCuenta.Text = ""
|
||||
DdlMetodoPagoSucursal.SelectedIndex = 0
|
||||
UpAgregarSucursal.Update()
|
||||
|
||||
Me.CveClienteSuc = -1
|
||||
Me.Actualizar = False
|
||||
txtLg.Text = ""
|
||||
txtLt.Text = ""
|
||||
HDMAPOP.Value = "2"
|
||||
@@ -2896,11 +2899,11 @@ Partial Class Clientes
|
||||
UpAgregarSucursal.Update()
|
||||
CargaDdlSucursalCliente()
|
||||
ObjCliente.Dispose()
|
||||
RegistraScript("hideDivEC();")
|
||||
Actualizar = False
|
||||
|
||||
|
||||
|
||||
Me.Actualizar = False
|
||||
Me.CveClienteSuc = -1
|
||||
RegistraScript("hideDivEC();")
|
||||
|
||||
End Sub
|
||||
Protected Sub LnkAgragarDireccion_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -2971,8 +2974,8 @@ Partial Class Clientes
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GVSucursales.RowEditing
|
||||
|
||||
Actualizar = True
|
||||
CveClienteSuc = GVSucursales.DataKeys(e.NewEditIndex).Value.ToString.ToEntero
|
||||
Me.Actualizar = True
|
||||
Me.CveClienteSuc = GVSucursales.DataKeys(e.NewEditIndex).Value.ToString.ToEntero
|
||||
|
||||
|
||||
Dim ObjCliente As New ClsClientes
|
||||
|
||||
@@ -2321,7 +2321,7 @@
|
||||
</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="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>
|
||||
</div>
|
||||
<div id="DivNumeroCPCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||
@@ -2332,7 +2332,7 @@
|
||||
</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="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>
|
||||
</div>
|
||||
<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 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="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>
|
||||
</div>
|
||||
<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 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="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>
|
||||
</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="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>
|
||||
</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="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>
|
||||
</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="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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2387,15 +2387,17 @@
|
||||
</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="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: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>
|
||||
</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="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>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
@@ -4592,6 +4592,17 @@ Partial Class PV
|
||||
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
|
||||
@@ -4614,6 +4625,17 @@ Partial Class PV
|
||||
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
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<asp:BoundField HeaderText="Estatus" DataField="EstatusFactura" ItemStyle-Width="160px" />
|
||||
<asp:TemplateField ItemStyle-Width="35px" HeaderText="Verificar">
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField HeaderText="Refacturación" Text="Refacturar" DataNavigateUrlFields="CveVenta" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveDevolucion={0}&NuevaFactura=1" />
|
||||
|
||||
@@ -78,6 +78,25 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
Alert(VerificarVigenciaSAT(CveVenta, CveCliente, Folio, TipoDocto, Uuid, UsuarioActual.Empresa.RFC, RFCCliente, Total));
|
||||
}
|
||||
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)
|
||||
{
|
||||
@@ -132,7 +151,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
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);
|
||||
if (CveEstatus.Contiene(4, 5) && EsRefacturacion)
|
||||
@@ -170,10 +189,19 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
|
||||
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 retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse);
|
||||
if (EsRefacturacion)
|
||||
{
|
||||
retorno = factura.CancelarPorRefacturacion();
|
||||
}
|
||||
else
|
||||
{
|
||||
retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse);
|
||||
}
|
||||
|
||||
return retorno;
|
||||
}
|
||||
|
||||
|
||||
@@ -381,6 +381,7 @@
|
||||
|
||||
<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>
|
||||
<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:HiddenField ID="HdnCveCliente" 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>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtImporteCredito" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</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: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>
|
||||
</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 class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Debito:</label>
|
||||
@@ -2988,7 +3004,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie1">
|
||||
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Transf.:</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
@@ -3003,6 +3020,47 @@
|
||||
</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="row">
|
||||
<div class="col-md-6">
|
||||
@@ -3020,6 +3078,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6044,6 +6108,139 @@
|
||||
</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 ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
|
||||
@@ -6486,7 +6683,18 @@
|
||||
var totalDebito = ToDouble($get("TxtImporteDebito").value);
|
||||
var totalCheque = ToDouble($get("TxtImporteCheque").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;
|
||||
}
|
||||
@@ -6894,7 +7102,7 @@
|
||||
indexd += 1;
|
||||
});
|
||||
}
|
||||
function CargaExistenciasSucursales(id,ps) {
|
||||
function CargaExistenciasSucursales(id, ps) {
|
||||
$.ajax({
|
||||
url: '/Ashx/SIGWeb.ashx?metodo=getpsalmacen&cveps=' + id,
|
||||
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>
|
||||
</asp:Content>
|
||||
|
||||
@@ -1725,6 +1725,10 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Autorización", "PA"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa <> 141 Then
|
||||
LnkAgregarCliente.Visible = False
|
||||
End If
|
||||
|
||||
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Pd2"))
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(344).ToString = "1" Then
|
||||
@@ -1802,7 +1806,10 @@ Partial Class Ventas
|
||||
TxtImporteDebito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtImporteCheque.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtImporteTransferencia.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtImporteOtrosContado.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
|
||||
TxtEfectivoEnCaja.Attributes.Add("onKeyUp", "CalculaDiferencia();")
|
||||
|
||||
'ImgCerrarTerminoCorte.Attributes.Add("OnClick", "$('#DivTerminarCorte').hide();")
|
||||
'ImgCerrarIE.Attributes.Add("OnClick", "$('#DivIngresoEgreso').hide();")DdlTipoComprobante
|
||||
'ImgCerrarEstadoCaja.Attributes.Add("OnClick", "$('#DivEstadoCaja').hide();")
|
||||
@@ -1907,6 +1914,8 @@ Partial Class Ventas
|
||||
CargaOrdenProduccion()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'Carga Venta
|
||||
If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero > 0 Then
|
||||
ViewState("CveVenta") = Request("CveVenta")
|
||||
@@ -2422,6 +2431,16 @@ Partial Class Ventas
|
||||
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
|
||||
|
||||
''EN REALIDAD SE OCUPAN ESTAS COSAS DENTRO DEL POSTABCK ???
|
||||
@@ -4345,6 +4364,11 @@ Partial Class Ventas
|
||||
DdlFormaPago33.DataSource = dtt
|
||||
DdlFormaPago33.SelectedValue = dtt.FiltroPrimeroValor("CveFormaPago", "")
|
||||
DdlFormaPago33.DataBind()
|
||||
|
||||
DdlFormaCliente.DataSource = GlobalDTVtaFormaPago
|
||||
DdlFormaCliente.DataBind()
|
||||
DdlMetodoCliente.DataSource = GlobalDTVtaMetodoPago
|
||||
DdlMetodoCliente.DataBind()
|
||||
'End If
|
||||
End Sub
|
||||
Private Sub CargaUsoCFDI()
|
||||
@@ -4500,6 +4524,8 @@ Partial Class Ventas
|
||||
EnviarCorreoCliente = ObjCliente.EnviarFactura
|
||||
EstatusCliente = ObjCliente.Estatus
|
||||
|
||||
LnkAgregarCliente.Visible = False
|
||||
|
||||
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
|
||||
@@ -7267,7 +7293,7 @@ Partial Class Ventas
|
||||
|
||||
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)
|
||||
Else
|
||||
ObjFactura = New Modelos.Factura
|
||||
@@ -10083,7 +10109,7 @@ Partial Class Ventas
|
||||
Exit For
|
||||
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
|
||||
|
||||
@@ -15234,7 +15260,7 @@ Partial Class Ventas
|
||||
Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta
|
||||
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
|
||||
Asunto = Asunto.Replace("{""Sucursal""}", DdlSubProyectoDatos.SelectedItem.Text)
|
||||
Asunto = Asunto.Replace("{""SerieFolio""}", $"{LblSerie.Text} - {TxtFolio.Text}")
|
||||
Asunto = Asunto.Replace("{""SerieFolio""}", ObjFactura.SerieFolio)
|
||||
End If
|
||||
|
||||
If Not EnviarFactura Then
|
||||
@@ -16088,6 +16114,7 @@ Partial Class Ventas
|
||||
DtPagos.Columns.Add("Observaciones", GetType(String))
|
||||
DtPagos.Columns.Add("Tipo", GetType(String))
|
||||
DtPagos.Columns.Add("CveMetodoPago", GetType(Integer))
|
||||
DtPagos.Columns.Add("MesesSinIntereses", GetType(Integer))
|
||||
|
||||
CargaCuentas()
|
||||
|
||||
@@ -16101,6 +16128,8 @@ Partial Class Ventas
|
||||
TxtImporteCheque.Text = "0.00"
|
||||
TxtImporteTransferencia.Text = "0.00"
|
||||
TxtImporteContado.Text = "0.00"
|
||||
TxtImporteOtrosContado.Text = "0.00"
|
||||
|
||||
End Sub
|
||||
Private Sub LimpiaEscondeContado()
|
||||
'LIMPIA
|
||||
@@ -16149,6 +16178,39 @@ Partial Class Ventas
|
||||
DdlCuentaTransferencia.DataBind()
|
||||
|
||||
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
|
||||
Dim Folio As Long
|
||||
|
||||
@@ -16204,6 +16266,8 @@ Partial Class Ventas
|
||||
DrEfectivo("Observaciones") = ""
|
||||
DrEfectivo("Tipo") = "Caja Chica"
|
||||
DrEfectivo("CveMetodoPago") = 1
|
||||
DrEfectivo("MesesSinIntereses") = -1
|
||||
|
||||
DtPagos.Rows.Add(DrEfectivo)
|
||||
Else
|
||||
Alert("Debe seleccionar una cuenta válida de caja", TipoMensaje.MsgAdvertencia)
|
||||
@@ -16212,6 +16276,7 @@ Partial Class Ventas
|
||||
|
||||
'Pago Tarjeta Credito
|
||||
If TxtImporteCredito.Text.ToDecimal > 0 Then
|
||||
|
||||
If DdlCuentaTarjetaCredito.Items.Count > 0 Then
|
||||
Dim DrCredito = DtPagos.NewRow
|
||||
DrCredito("CveTipoMovimiento") = 12
|
||||
@@ -16223,10 +16288,20 @@ Partial Class Ventas
|
||||
DrCredito("Observaciones") = ""
|
||||
DrCredito("Tipo") = "Tarjeta de Crédito"
|
||||
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)
|
||||
Else
|
||||
Alert("Debe seleccionar una cuenta válida de crédito", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'Pago Tarjeta Debito
|
||||
@@ -16242,6 +16317,7 @@ Partial Class Ventas
|
||||
DrDebito("Observaciones") = ""
|
||||
DrDebito("Tipo") = "Tarjeta de Débito"
|
||||
DrDebito("CveMetodoPago") = 5
|
||||
DrDebito("MesesSinIntereses") = -1
|
||||
|
||||
DtPagos.Rows.Add(DrDebito)
|
||||
Else
|
||||
@@ -16262,6 +16338,7 @@ Partial Class Ventas
|
||||
DrCheque("Observaciones") = ""
|
||||
DrCheque("Tipo") = "Cheque"
|
||||
DrCheque("CveMetodoPago") = 2
|
||||
DrCheque("MesesSinIntereses") = -1
|
||||
|
||||
DtPagos.Rows.Add(DrCheque)
|
||||
Else
|
||||
@@ -16282,6 +16359,7 @@ Partial Class Ventas
|
||||
DrCheque("Observaciones") = ""
|
||||
DrCheque("Tipo") = "Transferencia"
|
||||
DrCheque("CveMetodoPago") = 3
|
||||
DrCheque("MesesSinIntereses") = -1
|
||||
|
||||
DtPagos.Rows.Add(DrCheque)
|
||||
Else
|
||||
@@ -16289,6 +16367,82 @@ Partial Class Ventas
|
||||
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.
|
||||
abonado = DtPagos.SUM("Importe")
|
||||
saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado
|
||||
@@ -16398,6 +16552,97 @@ Partial Class Ventas
|
||||
VerificarContrato()
|
||||
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
|
||||
|
||||
@@ -22665,4 +22910,5 @@ Partial Class Ventas
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user