This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-04-30 14:53:19 -07:00
40 changed files with 3204 additions and 1094 deletions

View File

@@ -112,12 +112,12 @@ Public Class ClsClasificaciones
Public Sub Commit()
If SqlTransacc IsNot Nothing Then SqlTransacc.Commit()
SqlTransacc = Nothing
End Sub
End Sub
#Region "C L A S I F I C A C I O N E S"
Public Function GetClasificaciones(Optional CveEmpresa As Integer = -1, Optional Tipo As Integer = 1) As Boolean
Dim Retorno As Boolean = False
@@ -134,6 +134,46 @@ Public Class ClsClasificaciones
OnError("Ocurrió un error al consultar las Clasificaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetClasificacionesComprobaciones(CveEmpresa As Integer, Optional Opcion As Integer = 1, Optional TipoComprobacion As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_ClasificacionesComprobacionesGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Opcion", SqlDbType.Int).Value = Opcion
.Add("@TipoComprobacion", SqlDbType.Int).Value = TipoComprobacion
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As SqlException
OnError("Ocurrió un error al consultar las Clasificaciones de comprobaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function AddClasificacionesComprobaciones(CveClasificacion As Integer, CveEmpresa As Integer, TipoComprobacion As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_ClasificacionesComprobacionesAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@TipoComprobacion", SqlDbType.Int).Value = TipoComprobacion
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As SqlException
OnError("Ocurrió un error al modificar la clasificación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function

View File

@@ -519,13 +519,14 @@ Public Class ClsClientes
'SqlAdapter.Dispose()
Return Retorno
End Function
Public Function GetHistorialVentas(CveCliente As Integer, Optional SelectTop As Integer = -1, Optional CveClienteSucursal As Integer = -1) As Boolean
Public Function GetHistorialVentas(CveCliente As Integer, Optional SelectTop As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional TipoDocto As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_ClienteHistorialVentas")
SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
SqlAdapter.SelectCommand.Parameters.Add("@SelectTop", SqlDbType.Int).Value = SelectTop
SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
SqlAdapter.SelectCommand.Parameters.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
Try
SqlAdapter.Fill(Data)

View File

@@ -6230,7 +6230,7 @@ Public Class ClsContabilidad
.Add("@Opcion", SqlDbType.Int).Value = Opcion
.Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
.Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 800).Direction = ParameterDirection.Output
.Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 8000).Direction = ParameterDirection.Output
.Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output
End With
@@ -6366,8 +6366,10 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function UpdatePeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer, Mes1 As Integer, Mes2 As Integer, Mes3 As Integer, Mes4 As Integer, Mes5 As Integer, Mes6 As Integer, Mes7 As Integer, Mes8 As Integer, Mes9 As Integer, Mes10 As Integer, Mes11 As Integer, Mes12 As Integer, CveUsuario As Integer) As Boolean
Dim Retorno = False
Public Function UpdatePeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer, Mes1 As Boolean, Mes2 As Boolean, Mes3 As Boolean, Mes4 As Boolean, Mes5 As Boolean,
Mes6 As Boolean, Mes7 As Boolean, Mes8 As Boolean, Mes9 As Boolean, Mes10 As Boolean, Mes11 As Boolean, Mes12 As Boolean,
CveUsuario As Integer) As String
Dim Retorno = ""
DataAdapter("PA_Conta_EmpresasBloqueoMesesUpdate")
With SqlAdapter.SelectCommand.Parameters
@@ -6386,16 +6388,19 @@ Public Class ClsContabilidad
.Add("@Mes11", SqlDbType.Bit).Value = Mes11
.Add("@Mes12", SqlDbType.Bit).Value = Mes12
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@MensajeError", SqlDbType.VarChar, 500).Direction = ParameterDirection.Output
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Retorno = SqlAdapter.SelectCommand.Parameters("@MensajeError").Value.ToString
Catch ex As Exception
Me.OnError("Ocurrió un error al actualizar el Periodo de Bloqueo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Retorno = ""
End Try
Return Retorno
End Function
Public Function RemovePeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer) As Boolean
Dim Retorno = False

View File

@@ -1241,7 +1241,7 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function GetMovimientosDetalleVirtual(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1) As Boolean
Public Function GetMovimientosDetalleVirtual(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1, Optional CveMovimientoRelacionado As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_MovimientosDetalleVirtualGet")
@@ -1249,6 +1249,7 @@ Public Class ClsInventarios
.Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
.Add("@CveMovimientoRelacionado", SqlDbType.Int).Value = CveMovimientoRelacionado
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -851,14 +851,16 @@ Public Class ClsMovimientos
Return Retorno
End Function
Public Function GetChequesFYE(CveEmpresa As Integer) As Boolean
Public Function GetChequesFYE(CveEmpresa As Integer, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Banc_ReporteChequesFYEGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
End With
Try
@@ -1278,14 +1280,16 @@ Public Class ClsMovimientos
Return Retorno
End Function
Public Function GetCxPPersonalCajaChica(CveEmpresa As Integer, CvePersonal As Integer, CveCajaChica As Integer, NumeroReembolso As String) As Boolean
Public Function GetCxPPersonalCajaChica(CveEmpresa As Integer, CvePersonal As Integer, CveCajaChica As Integer, NumeroReembolso As String, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_CxPPersonalCajaChica")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveCajaChica", SqlDbType.Int).Value = CveCajaChica
.Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso
.Add("@NumeroReembolso", SqlDbType.VarChar).Value = NumeroReembolso
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
End With
Try

View File

@@ -4183,6 +4183,7 @@ Public Class ClsPaginas
'GENERAL
#Region "General"
PaginaDict.Add("/General/CatClasificaciones.aspx".ToUpper(), 425)
PaginaDict.Add("/General/CatClasificacionesComprobaciones.aspx".ToUpper(), 1308)
PaginaDict.Add("/General/CatPSCaracteristicas.aspx".ToUpper(), 101)
PaginaDict.Add("/General/CatCategorias.aspx".ToUpper(), 233)
PaginaDict.Add("/General/SaldosIniciales.aspx".ToUpper(), 526)
@@ -5268,7 +5269,7 @@ Public Class ClsPaginas
End If
sw.Stop()
If sw.Elapsed.TotalSeconds > 1 Then
If sw.Elapsed.TotalSeconds > 5 Then
GuardaLog($"Reporte:{RutaReporte} | Tiempo Renderizado Milisegundos: {sw.ElapsedMilliseconds},Total Segundos: {sw.Elapsed.TotalSeconds} ")
End If

View File

@@ -3186,8 +3186,9 @@ Namespace Modelos
Next
End If
'Si es Facturacion de una remision cancelamos, traspasamos saldos y agregamos evento a la bitacora
If (DtRemisionesRelacionadas IsNot Nothing AndAlso DtRemisionesRelacionadas.Rows.Count > 0) OrElse ObjFactura.RemisionesLista.Count > 0 Then
'SI ES FACTURACION DE UNA REMISION CANCELAMOS, TRASPASAMOS SALDOS Y AGREGAMOS EVENTO A LA BITACORA
'NO DEBE ENTRAR SI SE ESTA CANCELANDO UNA FACTURA
If ValorMultiplicador <> -1 AndAlso (DtRemisionesRelacionadas IsNot Nothing AndAlso DtRemisionesRelacionadas.Rows.Count > 0) OrElse ObjFactura.RemisionesLista.Count > 0 Then
If Not ObjFactura.TipoDocto.Contiene("Ing", "Ant") Then
ErrorPrepoliza = True

View File

@@ -1263,8 +1263,8 @@ Public Class Timbrado
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais,
ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CP)
'RECEPTOR
cfdi.agregarComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib)
cfdi.agregarComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle,
cfdi.agregarComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib,
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle,
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior,
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior,
ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia,

View File

@@ -365,7 +365,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Dim i As Integer = 0
While i < objInv.DtResultados.Columns.Count
If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CvePS", "PSCodigo", "PSCodigoClasificacion") AndAlso objInv.DtResultados.SUM(String.Format("[{0}]", objInv.DtResultados.Columns(i).ColumnName)) = 0 Then
If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CvePS", "PSCodigo", "PSCodigoClasificacion", "CveClasificacion") AndAlso objInv.DtResultados.SUM(String.Format("[{0}]", objInv.DtResultados.Columns(i).ColumnName)) = 0 Then
objInv.DtResultados.Columns.RemoveAt(i)
Else
i = i + 1
@@ -460,8 +460,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
'Try, generado para cuando el resultado no tiene valores(The source contains no DataRows.), no detenga la ejecucion, no se le puso un count previo, porque el costo se duplica, al preguntar y luego ordenar y convertir a datatable
Try
DtPSRetorno = New DataView(DTPS.OrderBy(Function(a) a!PSCodigo).CopyToDataTable).ToTable(True, {"CvePS", "PSCodigo", "PSCodigoClasificacion"})
DtPSRetorno = New DataView(DTPS.OrderBy(Function(a) a!PSCodigo).CopyToDataTable).ToTable(True, {"CvePS", "PSCodigo", "PSCodigoClasificacion", "CveClasificacion"})
Catch ex As Exception
DtPSRetorno = Nothing
End Try
@@ -469,7 +468,61 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
End If
DTPS = Nothing
End If
If (usuario.TienePermisoProceso(300) Or usuario.TienePermisoProceso(301)) And (DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0) Then
Dim ObjClasificaciones As New ClsClasificaciones()
Dim DTClasificacionesComprobaciones As DataTable
Dim DTTmp As DataTable = DtPSRetorno.Clone
If ObjClasificaciones.GetClasificacionesComprobaciones(usuario.CveEmpresa) Then
If usuario.TienePermisoProceso(300) And usuario.TienePermisoProceso(301) Then
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados
ElseIf usuario.TienePermisoProceso(300) Then 'TipoComprobacion 1 Biaticos
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 1")
Else 'TipoComprobacion 2 Compreobacines
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 2")
End If
For Each pRow As DataRow In DtPSRetorno.Rows
For Each drow As DataRow In DTClasificacionesComprobaciones.Rows
If pRow("CveClasificacion").ToString.ToEntero = drow("CveClasificacion").ToString.ToEntero Then
Dim nRow As DataRow = DTTmp.NewRow
nRow("CvePS") = pRow("CvePS")
nRow("PSCodigo") = pRow("PSCodigo")
nRow("PSCodigoClasificacion") = pRow("PSCodigoClasificacion")
nRow("CveClasificacion") = pRow("CveClasificacion")
DTTmp.Rows.Add(nRow)
End If
Next
Next
DtPSRetorno = DTTmp.Copy
Else
'no regresar datos herror al consultar
DtPSRetorno.Clear()
End If
End If
If DtPSRetorno IsNot Nothing AndAlso DtPSRetorno.Rows.Count > 0 Then
DtPSRetorno.Columns("CvePS").ColumnName = "id"
DtPSRetorno.Columns(PSCodigoDescripcion).ColumnName = "text"
If PSCodigoDescripcion = "PSCodigo" Then
@@ -477,8 +530,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Else
DtPSRetorno.Columns().Remove("PSCodigo")
End If
retorno = JsonConvert.SerializeObject(DtPSRetorno).ToString
context.Response.Write(retorno)
Else
context.Response.Write("[]")
End If

View File

@@ -2090,54 +2090,82 @@ Partial Class Bancos_PopIEVentas
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
TimpocambioGeneral = TCImpuestos
Dim tImporteVenta, tImportePago, Diferencia As Decimal
ImporteMovimiento = 0
Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
Diferencia = Math.Round(Diferencia, 2)
If CveMonedaVenta = 1 And CveMoneda = 2 Then
'factura pesos, pago en dolares
tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL
tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta / tipoCambioPago).RoundSQL
ElseIf CveMonedaVenta = 2 And CveMoneda = 2 Then
'factura dolares, pago en dolares
tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL
tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago).RoundSQL
ElseIf CveMonedaVenta = 2 And CveMoneda = 1 Then
'factura dolares, pago en pesos
tImporteVenta = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVenta).RoundSQL
tImportePago = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago).RoundSQL
End If
If tImporteVenta <> tImportePago Then
If tImporteVenta < tImportePago Then
CveConcepto = 64
Else
CveConcepto = 65
End If
Diferencia = Math.Abs(tImporteVenta - tImportePago)
End If
' si tiene funcionalidad para que tome el TC de pago, que solo afecta a los impuestos
If FuncionalidadFluctuacionImpuestos Then
Dim TCImpuestos As Decimal = tipoCambioPago
TimpocambioGeneral = TCImpuestos
Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
Diferencia = Math.Round(Diferencia, 2)
End If
'' se considera, las diferencias, y no el tipo de cambio, por el caso de las fluctuaciones
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
If Diferencia < 0 AndAlso CveMonedaVenta = 2 Then
ImporteMovimiento = Math.Abs(Diferencia)
ImporteMX = ImporteMovimiento
End If
'If Diferencia < 0 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = Math.Abs(Diferencia)
' ImporteMX = ImporteMovimiento
'End If
Else
ImporteMovimiento = 0
End If
CveSubProyectoContabilizar = CveSubProyectoVenta
Case 65 'Perdida
If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
'Case 65 'Perdida
' If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then
' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
TimpocambioGeneral = TCImpuestos
' Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
' TimpocambioGeneral = TCImpuestos
Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
Diferencia = Math.Round(Diferencia, 2)
' Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
' Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
' Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
' Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
' Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
' Diferencia = Math.Round(Diferencia, 2)
'si la diferencia es negativa es pérdida, si es positiva es ganancia
If Diferencia > 0 AndAlso CveMonedaVenta = 2 Then
ImporteMovimiento = Math.Abs(Diferencia)
ImporteMX = ImporteMovimiento
End If
Else
ImporteMovimiento = 0
End If
CveSubProyectoContabilizar = CveSubProyectoVenta
' 'si la diferencia es negativa es pérdida, si es positiva es ganancia
' If Diferencia > 0 AndAlso CveMonedaVenta = 2 Then
' ImporteMovimiento = Math.Abs(Diferencia)
' ImporteMX = ImporteMovimiento
' End If
' Else
' ImporteMovimiento = 0
' End If
' CveSubProyectoContabilizar = CveSubProyectoVenta
Case 30
If RBLContado.SelectedValue = "1" Then

Binary file not shown.

View File

@@ -22,6 +22,10 @@
<asp:LinkButton ID="LnkImprimirExcel" OnClick="LnkImprimirExcel_Click" runat="server"><i class="fa fa-file-excel-o"></i><span style="padding-left:5px;">Excel</span></asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkImprimir"/>
<asp:PostBackTrigger ControlID="LnkImprimirExcel"/>
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">

View File

@@ -22,6 +22,10 @@
<asp:LinkButton ID="LnkImprimirExcel" OnClick="LnkImprimirExcel_Click" runat="server"><i class="fa fa-file-excel-o"></i><span style="padding-left:5px;">Excel</span></asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkImprimir"/>
<asp:PostBackTrigger ControlID="LnkImprimirExcel"/>
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">

View File

@@ -225,6 +225,6 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas
param.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
param.Add(new ReportParameter("FechaImpresion", DateTime.Today.ToString()));
ImprimirPDF("Empresas/Grales/Formatos/RepCatProbabilidadAcercamiento", TmpDT, param, "Report Cat Etapas Proceso", formato);
ImprimirPDF("Empresas/Grales/Formatos/RepCatProbabilidadAcercamiento.rdlc", TmpDT, param, "Report Cat Etapas Proceso", formato);
}
}

View File

@@ -22,6 +22,10 @@
<asp:LinkButton ID="LnkImprimirExcel" OnClick="LnkImprimirExcel_Click" runat="server"><i class="fa fa-file-excel-o"></i><span style="padding-left:5px;">Excel</span></asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkImprimir"/>
<asp:PostBackTrigger ControlID="LnkImprimirExcel"/>
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">

View File

@@ -194,7 +194,7 @@ public partial class CRM_CatTipoProceso : ClsPaginas
Imprimir("EXCEL");
}
private void Imprimir(string formato)
public void Imprimir(string formato)
{
System.IO.FileInfo Image = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
string logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);

View File

@@ -1008,6 +1008,7 @@ Partial Class Compras_Compras
ViewState("CveFlete") = value
End Set
End Property
Private Property FleteImportacionOpcion As Integer
Get
Return IfNull(ViewState("FleteImportacionOpcion"), -1).ToString.ToEntero
@@ -1017,6 +1018,22 @@ Partial Class Compras_Compras
End Set
End Property
Private Property DTClasificacionesComprobaciones As DataTable
Get
If ViewState("DTClasificacionesComprobaciones") Is Nothing Then
Return New DataTable
Else
Return DirectCast(ViewState("DTClasificacionesComprobaciones"), DataTable)
End If
End Get
Set(value As DataTable)
ViewState("DTClasificacionesComprobaciones") = value
End Set
End Property
#End Region
#Region " PROPIEDADES DE TOTALES "
@@ -1603,6 +1620,10 @@ Partial Class Compras_Compras
InicializaDevolucionAlmacen()
HabilitaEdicionManualAgregar()
InicializaActualizarTC()
End If
@@ -3412,6 +3433,7 @@ Partial Class Compras_Compras
End Function
Private Sub CargaPSAlias()
DdlPSAlias2.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
If UsuarioActual.CveEmpresa = 66 Then
@@ -3424,9 +3446,39 @@ Partial Class Compras_Compras
DdlPSAlias2.ddlWS.Attributes.Add("data-pagina", "Compras2")
End If
End If
If Not DdlPSAlias2.UsaWebService AndAlso CType(DdlPSAlias2.DataSource, DataTable) Is Nothing Then
DdlPSAlias2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
DdlPSAlias2.DataBind()
If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then
Dim DTTemp As New DataTable
DTTemp.Columns.Add("CvePS", GetType(Integer))
DTTemp.Columns.Add("PSCodigoClasificacion", GetType(String))
For Each dRow As DataRow In GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).Rows
For Each drowCla As DataRow In DTClasificacionesComprobaciones.Rows
If drowCla("CveClasificacion").ToString.ToEntero = dRow("CveClasificacion").ToString.ToEntero Then
Dim InRow As DataRow = DTTemp.NewRow
InRow("CvePS") = dRow("CvePS").ToString.ToEntero
InRow("PSCodigoClasificacion") = dRow("PSCodigoClasificacion").ToString
DTTemp.Rows.Add(InRow)
End If
Next
Next
DdlPSAlias2.DataSource = DTTemp
DdlPSAlias2.DataBind()
Else
DdlPSAlias2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
DdlPSAlias2.DataBind()
End If
End If
End Sub
@@ -3763,6 +3815,37 @@ Partial Class Compras_Compras
'DtPSTemp.Dispose()
End Sub
Private Sub CargaClasificacionesComprobaciones()
If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then
Dim ObjClasificaciones As New ClsClasificaciones()
If ObjClasificaciones.GetClasificacionesComprobaciones(UsuarioActual.CveEmpresa) Then
If UsuarioActual.TienePermisoProceso(300) And UsuarioActual.TienePermisoProceso(301) Then
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados
Else
If UsuarioActual.TienePermisoProceso(300) Then 'TipoComprobacion = 1 Biaticos
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 1")
ElseIf UsuarioActual.TienePermisoProceso(301) Then 'TipoComprobacion = 2 Comprobaciones
DTClasificacionesComprobaciones = ObjClasificaciones.DtResultados.FiltraParametros("TipoComprobacion = 2")
End If
End If
End If
ObjClasificaciones.Dispose()
End If
End Sub
#End Region
#Region "Vinculacion De Servcios"
@@ -4335,7 +4418,7 @@ Partial Class Compras_Compras
Try
Dim FolioFijo As Integer = 0
'cheque
If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = TxtFolio.Text.ToEntero
If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa <> 119 Then FolioFijo = TxtFolio.Text.ToEntero
CvePrePoliza = ObjConta.AddPrePolizas("Compras/Registrar", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa))
@@ -4471,6 +4554,8 @@ Partial Class Compras_Compras
'End If
End If
'si el registro es manual, toma el mismo dato
If CveFactura <= 0 Then TotalOriginal = TxtTotal.Text.ToDecimal
'Compra
If ObjCompras.AddCompra(DdlTipoComprobante.SelectedValue, TxtDescripcion.Text.Trim, TxtSerie.Text.Trim, TxtFolio.Text.Trim, TxtFolioSecundario.Text.Trim, CveProveedor, TxtSubTotal.Text.ToDouble, TxtDescuento.Text.ToDouble,
@@ -6305,7 +6390,7 @@ Partial Class Compras_Compras
Case 6 'Compra
Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 141) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
Dim RegistraConcepto225 As Boolean = UsuarioActual.Empresa.UsaInventarios AndAlso DdlTipoComprobante.SelectedValue.Contiene("DEV") AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1"
If RBLPago.SelectedValue.ToEntero = 4 Then
Exit Select 'Es credito el concepto 6 se agrega en CASE 17
@@ -6643,18 +6728,22 @@ Partial Class Compras_Compras
importeMN = importeMovimiento * tipoCambioActual * Multiplicador '[IPP] EL 6 DEBE SER POSITIVO 27/AGOSTO/2018
'CLASIFICACION
If Row2("CveClasificacion").ToString.ToEntero > 0 Then
If Row2("CveClasificacion").ToString.ToEntero > 0 AndAlso DdlTipoComprobante.SelectedValue = "FAC" Then
If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then
If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero
Else
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
' CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
End If
End If
End If
'SEGMENTO DE NEGOCIO
Dim IdSegmentoNegocio As Integer = -1
Dim drT As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero).FiltroPrimero(String.Format("CveSubProyecto = {0} ", Row2("CveSubProyecto").ToString.ToEntero))
@@ -6684,6 +6773,11 @@ Partial Class Compras_Compras
If DdlMoneda.SelectedValue = "2" Then
tidctacon = ViewState("CtaProveedorAnticiposExtranjera").ToString.ToEntero
End If
ElseIf DdlTipoComprobante.SelectedValue = "NC" Then
tcvecon = 259
tidctacon = UsuarioActual.Empresa.Funcionalidad(405).ToEntero
End If
Dim usacomplementariaProveedor As Boolean = False
@@ -11154,6 +11248,7 @@ Partial Class Compras_Compras
'CargaEstatus()
CargaTiposAF()
CargaProyectoAsignado()
CargaClasificacionesComprobaciones()
CargaClasificaciones()
CargaPS(-1)
CargaProyecto()
@@ -17123,6 +17218,7 @@ Partial Class Compras_Compras
UPPClasificacion.Update()
End Sub
Private Sub CargaPS(CveClasificacion As Integer)
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
@@ -17131,7 +17227,41 @@ Partial Class Compras_Compras
DdlPS.SelectedValue = "-1"
Else
DdlPS.ddl.Items.Clear()
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion)
'DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion)
If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then
Dim DTTemp As New DataTable
DTTemp.Columns.Add("CvePS", GetType(Integer))
DTTemp.Columns.Add("PSCodigo", GetType(String))
DTTemp.Columns.Add("CveClasificacion", GetType(Integer))
For Each dRow As DataRow In GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).Rows
For Each drowCla As DataRow In DTClasificacionesComprobaciones.Rows
If drowCla("CveClasificacion").ToString.ToEntero = dRow("CveClasificacion").ToString.ToEntero Then
Dim InRow As DataRow = DTTemp.NewRow
InRow("CvePS") = dRow("CvePS").ToString.ToEntero
InRow("PSCodigo") = dRow("PSCodigo").ToString
InRow("CveClasificacion") = dRow("CveClasificacion").ToString.ToEntero
DTTemp.Rows.Add(InRow)
End If
Next
Next
DdlPS.DataSource = If(CveClasificacion > 0, DTTemp.FiltraParametros($"CveClasificacion = {CveClasificacion}"), DTTemp)
Else
DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
End If
DdlPS.ddl.DataBind()
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
End If
@@ -17659,13 +17789,24 @@ Partial Class Compras_Compras
#Region " RECLASIFICA PARTIDAS - CLASIFICACION - SUBPROYECTO "
Private Sub CargaClasificaciones()
If UsuarioActual.Empresa.UsaAC Then
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
DdlAplicaClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
Else
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
DdlAplicaClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then
DdlClasificacion.DataSource = DTClasificacionesComprobaciones.FiltraParametros("", Orderby:="Clasificacion")
DdlAplicaClasificacion.DataSource = DTClasificacionesComprobaciones.FiltraParametros("", Orderby:="Clasificacion")
End If
End If
DdlClasificacion.DataBind()
DdlAplicaClasificacion.DataBind()
End Sub

View File

@@ -1,241 +1,279 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepRembolsoComprobaciones.aspx.vb" Inherits="Compras_RepRembolsoComprobaciones" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.truncate {
width: 300px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reembolsos / Comprobaciones
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<li>
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepRembolsoComprobaciones.aspx.vb" Inherits="Compras_RepRembolsoComprobaciones" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.truncate {
width: 300px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reembolsos / Comprobaciones
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkExportar" runat="server">
<i class="fa fa-ad-excel"></i> Exportar Excel
</asp:LinkButton>
</li>
<li runat="server" id="LiImprimir" visible="true">
</asp:LinkButton>
</li>
<li runat="server" id="LiImprimir" visible="true">
<asp:LinkButton ID="LnkImprimir" runat="server" Visible="false">
<i class="fa fa-print"></i> Imprimir Reembolso
</asp:LinkButton>
</li>
<li></li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkImprimir" />
<asp:PostBackTrigger ControlID="LnkExportar" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" ValidationGroup="GrpConsultar" />
<a href="javascript;" class="expand"></a>
</div>
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1" style="margin-top: 10px; margin-left: 5px;">Tipo de Pago:</label>
<div class="col-md-1" style="margin-top: 5px;">
<asp:DropDownList ID="DdlTipoPago" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" OnSelectedIndexChanged="DdlTipoPago_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="Seleccione un Tipo de Pago" Value="-1"></asp:ListItem>
<asp:ListItem Text="Funcionarios/Empleados" Value="1"></asp:ListItem>
<asp:ListItem Text="Caja Chica" Value="2"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoPago" runat="server" ControlToValidate="DdlTipoPago" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Debe seleccionar un <b>Tipo de Pago</b>." InitialValue="-1" ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipoPago" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoPago" Width="300px" BehaviorID="VCETipoPago"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-3" style="margin-top: 5px; padding-left: 0px; padding-right: 0px;">
<div class="col-md-2">
<asp:Literal ID="LtTituloPago" runat="server" />
</div>
<div class="col-md-10">
<asp:DropDownList ID="DdlPersonal" CssClass="form-control select2me" Width="100%" Visible="false" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal">
<asp:ListItem Selected="True" Text="Seleccione un F / E" Value="-2"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVPersonal" runat="server" ControlToValidate="DdlPersonal" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Debe seleccionar un <b>Funcionario/Empleado</b>." InitialValue="-2" ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEPersonal" runat="server" HighlightCssClass="vco" TargetControlID="RFVPersonal" Width="300px" BehaviorID="VCEPersonal"></ajax:ValidatorCalloutExtender>
<asp:DropDownList ID="DdlCajaChica" CssClass="form-control select2me" Width="100%" Visible="false" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta">
<asp:ListItem Selected="True" Text="Seleccione una Cuenta" Value="-2"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVCajaChica" runat="server" ControlToValidate="DdlCajaChica" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Debe seleccionar una <b>Cuenta</b>." InitialValue="-2" ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECajaChica" runat="server" HighlightCssClass="vco" TargetControlID="RFVCajaChica" Width="300px" BehaviorID="VCECajaChica"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1" style="margin-top: 2px; padding-left: 0px; padding-right: 0px;">No. Reembolso:</label>
<div class="col-md-2" style="margin-top: 2px; padding-left: 0px; padding-right: 0px;">
<asp:TextBox ID="TxtNumeroReembolso" CssClass="form-control input-sm" Width="100px" runat="server" Style="margin-top: 5px;" />
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UPCompras" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" runat="server" id="divUnificar" visible="false">
<div class="col-md-12" runat="server" style="margin-top: 2px; padding-left: 0px; padding-right: 0px;">
<label class="col-md-1">Concepto:</label>
<div class="col-md-3">
<asp:TextBox ID="TxtConcepto" CssClass="form-control input-sm" Width="100%" runat="server" Style="margin-top: 5px;" />
</div>
<label class="col-md-1">Fecha:</label>
<div class="col-md-1">
<asp:TextBox runat="server" ID="TxtFechaUnificacion" Width="75px"></asp:TextBox>
<ajax:MaskedEditExtender ID="MEEFechaUnificacion" runat="server" TargetControlID="TxtFechaUnificacion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
</div>
<div class="col-md-1">
</asp:LinkButton>
</li>
<li></li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkImprimir" />
<asp:PostBackTrigger ControlID="LnkExportar" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" ValidationGroup="GrpConsultar" />
<a href="javascript;" class="expand"></a>
</div>
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1" style="margin-top: 10px; margin-left: 5px;">Tipo de Pago:</label>
<div class="col-md-2" style="margin-top: 5px;">
<asp:DropDownList ID="DdlTipoPago" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" OnSelectedIndexChanged="DdlTipoPago_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="Seleccione un Tipo de Pago" Value="-1"></asp:ListItem>
<asp:ListItem Text="Funcionarios/Empleados" Value="1"></asp:ListItem>
<asp:ListItem Text="Caja Chica" Value="2"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoPago" runat="server" ControlToValidate="DdlTipoPago" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Debe seleccionar un <b>Tipo de Pago</b>." InitialValue="-1" ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipoPago" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoPago" Width="300px" BehaviorID="VCETipoPago"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-4" style="margin-top: 5px; padding-left: 0px; padding-right: 0px;">
<div class="col-md-3">
<asp:Literal ID="LtTituloPago" runat="server" />
</div>
<div class="col-md-9">
<asp:DropDownList ID="DdlPersonal" CssClass="form-control select2me" Width="100%" Visible="false" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal">
<asp:ListItem Selected="True" Text="Seleccione un F / E" Value="-2"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVPersonal" runat="server" ControlToValidate="DdlPersonal" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Debe seleccionar un <b>Funcionario/Empleado</b>." InitialValue="-2" ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEPersonal" runat="server" HighlightCssClass="vco" TargetControlID="RFVPersonal" Width="300px" BehaviorID="VCEPersonal"></ajax:ValidatorCalloutExtender>
<asp:DropDownList ID="DdlCajaChica" CssClass="form-control select2me" Width="100%" Visible="false" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta">
<asp:ListItem Selected="True" Text="Seleccione una Cuenta" Value="-2"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVCajaChica" runat="server" ControlToValidate="DdlCajaChica" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Debe seleccionar una <b>Cuenta</b>." InitialValue="-2" ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECajaChica" runat="server" HighlightCssClass="vco" TargetControlID="RFVCajaChica" Width="300px" BehaviorID="VCECajaChica"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1" style="margin-top: 10px; margin-left: 5px;">No. Reembolso:</label>
<div class="col-md-2" style="margin-top: 2px; padding-left: 0px; padding-right: 0px;">
<asp:TextBox ID="TxtNumeroReembolso" CssClass="form-control input-sm" Width="100px" runat="server" Style="margin-top: 5px;" />
</div>
</div>
</div>
</div>
<div class="portlet-body" style="display: none">
<div class="row">
<label class="col-md-1" style="margin-top: 10px; margin-left: 5px;">Fecha Inicio:</label>
<div class="col-md-2" style="margin-top: 10px;">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="txtFechaI" PopupButtonID="imgCalendarioI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<label class="col-md-1" style="margin-top: 10px; margin-left: 5px;">Fecha Fin:</label>
<div class="col-md-2" style="margin-top: 10px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UPCompras" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" runat="server" id="divUnificar" visible="false">
<div class="col-md-12" runat="server" style="margin-top: 2px; padding-left: 0px; padding-right: 0px;">
<label class="col-md-1">Concepto:</label>
<div class="col-md-3">
<asp:TextBox ID="TxtConcepto" CssClass="form-control input-sm" Width="100%" runat="server" Style="margin-top: 5px;" />
</div>
<label class="col-md-1">Fecha:</label>
<div class="col-md-1">
<asp:TextBox runat="server" ID="TxtFechaUnificacion" Width="75px"></asp:TextBox>
<ajax:MaskedEditExtender ID="MEEFechaUnificacion" runat="server" TargetControlID="TxtFechaUnificacion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
</div>
<div class="col-md-1">
<asp:LinkButton ID="LbkUnificar" runat="server">
<i class="fa fa-refresh"></i> Unificar
</asp:LinkButton>
</div>
<div id="DivVincularEgreso" runat="server">
<label class="col-md-1">Egreso x Comprobar:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlCheque" CssClass="form-control input-sm select2me" Width="100%" AppendDataBoundItems="true" runat="server" DataTextField="FolioFecha" DataValueField="CveIE"></asp:DropDownList>
</div>
<div class="col-md-1">
<asp:LinkButton data-toggle="tooltip" data-placement="top" ToolTip="Vincular Egreso" runat="server" ID="BtnVincularEgreso" OnClick="BtnVincularEgreso_Click" Text="<i class='fa fa-check' style='color:green'></i>" CssClass="btn btn-default btn-circle btn-xs" />
</div>
</div>
</div>
</asp:LinkButton>
</div>
<div id="DivVincularEgreso" runat="server">
<label class="col-md-1">Egreso x Comprobar:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlCheque" CssClass="form-control input-sm select2me" Width="100%" AppendDataBoundItems="true" runat="server" DataTextField="FolioFecha" DataValueField="CveIE"></asp:DropDownList>
</div>
<div class="col-md-1">
<asp:LinkButton data-toggle="tooltip" data-placement="top" ToolTip="Vincular Egreso" runat="server" ID="BtnVincularEgreso" OnClick="BtnVincularEgreso_Click" Text="<i class='fa fa-check' style='color:green'></i>" CssClass="btn btn-default btn-circle btn-xs" />
</div>
</div>
</div>
</div>
</div>
</div>
<asp:HiddenField runat="server" ID="HdnFechasComprasVinculadas" Value="-1" ClientIDMode="Static" />
<asp:GridView ID="GvCxP" GridLines="None" CssClass="ScrollAD table table-smallpadding Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes" DataKeyNames="CveCompra,FechaCompra,Proveedor,SerieFolio,Original,SubTotal,IVA,RetIVA,RetISR,IdCtaContProveedores,CvePrePoliza">
<Columns>
<asp:TemplateField>
<HeaderTemplate>Compra</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HplF" CssClass="Texto" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}")%>' Text='<%# Eval("SerieFolio")%>' runat="server"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-CssClass="truncate">
<HeaderTemplate>Proveedor</HeaderTemplate>
<ItemTemplate>
<div class="truncate" style="width: 300px;">
<asp:Label runat="server" CssClass="truncate" ID="LtProveedor" Text='<%# Eval("Proveedor") %>'></asp:Label>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Fecha Compra</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaCompra", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Proyecto</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate># R</HeaderTemplate>
<ItemTemplate>
<asp:HiddenField runat="server" ID="HdnFechasComprasVinculadas" Value="-1" ClientIDMode="Static" />
<asp:GridView ID="GvCxP" GridLines="None" CssClass="ScrollAD table table-smallpadding Widthall" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Pagar pendientes" DataKeyNames="CveCompra,FechaCompra,Proveedor,SerieFolio,Original,SubTotal,IVA,RetIVA,RetISR,IdCtaContProveedores,CvePrePoliza">
<Columns>
<asp:TemplateField>
<HeaderTemplate>Compra</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HplF" CssClass="Texto" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}")%>' Text='<%# Eval("SerieFolio")%>' runat="server"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-CssClass="truncate">
<HeaderTemplate>Proveedor</HeaderTemplate>
<ItemTemplate>
<div class="truncate" style="width: 300px;">
<asp:Label runat="server" CssClass="truncate" ID="LtProveedor" Text='<%# Eval("Proveedor") %>'></asp:Label>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Fecha Compra</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaCompra", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Proyecto</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate># R</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("NumeroReembolso", "{0}")%>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Monto Compra (Saldo Orig.)</HeaderTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Monto Compra (Saldo Orig.)</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Abonado</HeaderTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Abonado</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlAbonado" runat="server" Text='<%# Eval("Abonado", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Saldo</HeaderTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Saldo</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate>Excedente</HeaderTemplate>
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate>Excedente</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtSaldoExcedente" Width="80px" runat="server" Style="text-align: right;" onkeyup="FormatoMoneda(this)"></asp:TextBox>&nbsp;
<asp:RangeValidator ID="RVSaldoExcedente" runat="server" Enabled="false" Type="Currency" MinimumValue="0" MaximumValue='<%#If(Eval("Saldo").ToString().Contains("-"), "0", Eval("Saldo", "{0:N2}")) %>' ErrorMessage="*" ControlToValidate="TxtSaldoExcedente" Display="Dynamic"></asp:RangeValidator>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate>Auxiliar</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlAux" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="False">
<HeaderTemplate>CveCompra</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HplF2" CssClass="Texto" Text='<%# Eval("CveCompra")%>' runat="server"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="False">
<HeaderTemplate>CveProveedor</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HLProv" CssClass="Texto" Text='<%# Eval("CveProveedor")%>' runat="server"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="False">
<HeaderTemplate>IdCtaContProveedores</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HLIdCta" CssClass="Texto" Text='<%# Eval("IdCtaContProveedores")%>' runat="server"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField HeaderText="Poliza" DataTextField="FolioPoliza" DataNavigateUrlFields="IdPoliza" DataNavigateUrlFormatString="/Contabilidad/RegPoliza.aspx?IdPoliza={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<asp:RangeValidator ID="RVSaldoExcedente" runat="server" Enabled="false" Type="Currency" MinimumValue="0" MaximumValue='<%#If(Eval("Saldo").ToString().Contains("-"), "0", Eval("Saldo", "{0:N2}")) %>' ErrorMessage="*" ControlToValidate="TxtSaldoExcedente" Display="Dynamic"></asp:RangeValidator>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate>Auxiliar</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlAux" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="False">
<HeaderTemplate>CveCompra</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HplF2" CssClass="Texto" Text='<%# Eval("CveCompra")%>' runat="server"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="False">
<HeaderTemplate>CveProveedor</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HLProv" CssClass="Texto" Text='<%# Eval("CveProveedor")%>' runat="server"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="False">
<HeaderTemplate>IdCtaContProveedores</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HLIdCta" CssClass="Texto" Text='<%# Eval("IdCtaContProveedores")%>' runat="server"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField HeaderText="Poliza" DataTextField="FolioPoliza" DataNavigateUrlFields="IdPoliza" DataNavigateUrlFormatString="/Contabilidad/RegPoliza.aspx?IdPoliza={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript">
$(document).on('mouseenter', ".truncate", function () {
$(document).on('mouseenter', ".truncate", function () {
debugger;
var $this = $(this);
if (this.offsetWidth < this.scrollWidth && !$this.attr('title')) {
$this.tooltip({
if (this.offsetWidth < this.scrollWidth && !$this.attr('title')) {
$this.tooltip({
title: $this.text(),
placement: "top"
placement: "top"
});
$this.tooltip('show');
}
$this.tooltip('show');
}
});
</script>
</asp:Content>
</script>
</asp:Content>

View File

@@ -257,7 +257,10 @@ Partial Class Compras_RepRembolsoComprobaciones
GvCxP.Visible = True
ObjMovtos.GetCxPPersonalCajaChica(UsuarioActual.CveEmpresa, CvePersonal, CveCajaChica, If(TxtNumeroReembolso.Text.Trim = "", "-1", TxtNumeroReembolso.Text.Trim))
Dim FechaI As DateTime = If(String.IsNullOrEmpty(txtFechaI.Text.Trim()), ModExtensiones.MinFecha, txtFechaI.Text.ToDateTime())
Dim FechaF As DateTime = If(String.IsNullOrEmpty(txtFechaF.Text.Trim()), ModExtensiones.MaxFecha, txtFechaF.Text.ToDateTime())
ObjMovtos.GetCxPPersonalCajaChica(UsuarioActual.CveEmpresa, CvePersonal, CveCajaChica, If(TxtNumeroReembolso.Text.Trim = "", "-1", TxtNumeroReembolso.Text.Trim), FechaI:=FechaI, FechaF:=FechaF)
DtDatos = ObjMovtos.DtResultados
GvCxP.DataSource = DtDatos
@@ -341,7 +344,8 @@ Partial Class Compras_RepRembolsoComprobaciones
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
params.Add(New ReportParameter("FechaInicio", txtFechaI.Text))
params.Add(New ReportParameter("FechaFin", txtFechaF.Text))
params.Add(New ReportParameter("CajaChica", If(DdlCajaChica.SelectedValue.ToEntero > 0, "Caja chica: " & DdlCajaChica.SelectedItem.Text, "Funcionario/Empleado: " & DdlPersonal.SelectedItem.Text)))
If Imagen.Exists Then

View File

@@ -1,7 +1,6 @@
Imports System.Data
Imports Extensiones
Partial Class Contabilidad_CatPeriodosBloqueo
Inherits ClsPaginas
@@ -129,8 +128,8 @@ Partial Class Contabilidad_CatPeriodosBloqueo
Alert("Ocurrió un error al guardar el Periodo de Bloqueo", TipoMensaje.MsgError)
End If
Else
If ObjConta.UpdatePeriodosBloqueo(UsuarioActual.CveEmpresa, TxtEjercicio.Text, ChkM1.Checked, ChkM2.Checked, ChkM3.Checked, ChkM4.Checked, ChkM5.Checked, ChkM6.Checked, ChkM7.Checked, ChkM8.Checked, ChkM9.Checked, ChkM10.Checked, ChkM11.Checked, ChkM12.Checked, UsuarioActual.CveUsuario) Then
Dim AplicarBloqueso As String = ObjConta.UpdatePeriodosBloqueo(UsuarioActual.CveEmpresa, TxtEjercicio.Text, ChkM1.Checked, ChkM2.Checked, ChkM3.Checked, ChkM4.Checked, ChkM5.Checked, ChkM6.Checked, ChkM7.Checked, ChkM8.Checked, ChkM9.Checked, ChkM10.Checked, ChkM11.Checked, ChkM12.Checked, UsuarioActual.CveUsuario)
If AplicarBloqueso.Length = 0 Then
CargadatosGvPeriodosBloqueo()
UpModalPeriodosBloqueo.Update()
@@ -140,7 +139,8 @@ Partial Class Contabilidad_CatPeriodosBloqueo
UpGral.Update()
Alert("Bloqueo Actualizado Correctamente", TipoMensaje.MsgInformacion)
Else
Alert("Ocurrió un error al Actualizar el Periodo de Bloqueo", TipoMensaje.MsgError)
Dim mensajeAlerta As String = AplicarBloqueso.Replace(";", Environment.NewLine)
Alert("Ocurrió un error al Actualizar el Periodo de Bloqueo " & Environment.NewLine & mensajeAlerta, TipoMensaje.MsgError)
End If
End If

View File

@@ -412,6 +412,10 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas
if (ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa))
{
if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza,5))// por default manda la opcion 5, para ajustar a fluctuacion
{
}
Alert("Se ha simplificado la poliza correctamente", ModExtensiones.TipoMensaje.MsgInformacion);
}
else

View File

@@ -158,6 +158,15 @@ Partial Class ContabilidadC_RegPrePoliza
ViewState("IndiceGrid") = value
End Set
End Property
Public Property IdPoliza As Integer
Get
Return CType(ViewState("IdPoliza"), Integer)
End Get
Set(value As Integer)
ViewState("IdPoliza") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -174,6 +183,7 @@ Partial Class ContabilidadC_RegPrePoliza
Observaciones = "-1"
Beneficiario = "-1"
Actualizar = False
IdPoliza = -1
If IfNull(Request("Tipo"), "").ToString = "NOMPROV" Then
DivTipoGasto.Visible = True
@@ -388,9 +398,15 @@ Partial Class ContabilidadC_RegPrePoliza
LnkComplementoPago.Visible = True
End If
IdPoliza = dr("IdPoliza").ToString.ToEntero
If dr("IdPoliza").ToString.ToEntero > 0 Then
HplContabilizada.NavigateUrl = String.Format("RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza"))
divContabilziada.Visible = True
BtnEliminar.Visible = False
If UsuarioActual.CveUsuario = 100 Then
BtnContabilizar.Visible = True
BtnContabilizar.Text = "Actualizar Poliza"
End If
ElseIf TxtTotalCargos.Text.ToDouble = TxtTotalAbonos.Text.ToDouble Then
'sino está contabilizada, se activa el botón
BtnContabilizar.Visible = True
@@ -1622,7 +1638,11 @@ Partial Class ContabilidadC_RegPrePoliza
Dim ObjConta As New ClsContabilidad
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero
ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False)
End If
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1), Concepto:=TxtConcepto.Text, Fecha:=TxtFechaDocumento.Text.ToDateTime) Then
Alert(String.Format("Prepóliza contabilizada. <br/><br/>Folio:<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion)
Else

File diff suppressed because it is too large Load Diff

View File

@@ -882,7 +882,6 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
@@ -997,7 +996,7 @@
<Width>8.25256in</Width>
<Page>
<PageHeader>
<Height>4.30332cm</Height>
<Height>5.09474cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
@@ -1028,7 +1027,9 @@
</Style>
</TextRun>
</TextRuns>
<Style />
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
@@ -1408,6 +1409,39 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox23">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=IIF(Len(Parameters!FechaInicio.Value) &gt; 0 and Len(Parameters!FechaFin.Value) &gt; 0,"Desde el día "&amp;Parameters!FechaInicio.Value &amp;" a "&amp;Parameters!FechaFin.Value,"")</Value>
<Style>
<FontSize>9pt</FontSize>
<FontWeight>SemiBold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox23</rd:DefaultName>
<Top>4.4021cm</Top>
<Left>0.127cm</Left>
<Height>0.49417cm</Height>
<Width>14.30236cm</Width>
<ZIndex>12</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Style>
<Border>

View File

@@ -0,0 +1,137 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" ValidateRequest="false" EnableEventValidation="false" CodeFile="CatClasificacionesComprobaciones.aspx.vb" Inherits="Gral_CatClasificacionesComprobaciones" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Catálogo de Clasificaciones Viáticos y Comprobaciones
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="PFiltros" class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" ValidationGroup="Valida" />
<a href="javascript:;" class="expand"></a>
</div>
<div class=" caption">
<div class="row" style="margin-left: 10px;">
<label class="col-md-1 " id="LbDdlEstados" runat="server" style="width: 90px; margin-top: 5px;">Tipo:</label>
<div class="col-md-2" >
<asp:DropDownList ID="DdlEstadosComprobaciones" runat="server" Width="150px" Class="select2me" AutoPostBack="true">
<asp:ListItem Selected="True" Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="0">Sin Asignar</asp:ListItem>
<asp:ListItem Value="1">Viáticos</asp:ListItem>
<asp:ListItem Value="2">Comprobacines</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body" style="display: none;">
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-6">
<asp:GridView runat="server" ID="GvClasificaciones" DataKeyNames="CveClasificacion, Clasificacion,TipoComprobacion" GridLines="None" CssClass="table table-striped table-hover Widthall" AutoGenerateColumns="false">
<Columns>
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" />
<asp:BoundField DataField="TipoComprobacionStr" HeaderText="Tipo Comprobacion" />
<asp:TemplateField ItemStyle-Width="40px" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" OnClick="ActualizaModalClasif" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:TemplateField ItemStyle-HorizontalAlign="center">
<ItemTemplate>
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Desea Elminar?" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>--%>
</Columns>
</asp:GridView>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div id="ModalClasificaciones" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalClasificaciones" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
<asp:Literal ID="LtlTituloModal" runat="server">Agregar Clasificaciones</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtClasificaciones" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" ValidationGroup="Clasif" Enabled="false"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCampaña" runat="server" ControlToValidate="TxtClasificaciones" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>
<label for="<%= TxtClasificaciones.ClientID.ToString()%>">Clasificación:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<label for="<%= DdlTipoComprobacion.ClientID.ToString()%>">Tipo Comprobacion:</label>
<br />
<asp:DropDownList runat="server" ID="DdlTipoComprobacion" CssClass="select2me">
<asp:ListItem Value="-1">Sin Asignar</asp:ListItem>
<asp:ListItem Value="1">Viáticos</asp:ListItem>
<asp:ListItem Value="2">Comprobacines</asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="LbAgregarClasificacion" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarRegistro" />
<button id="BtnCancelarCampaña" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
<asp:HiddenField ID="HdnModalidadClasificacion" runat="server" Value="I" ClientIDMode="Static" />
<asp:HiddenField ID="HdnIDClasificacion" runat="server" Value="-1" ClientIDMode="Static" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,82 @@
Option Explicit On
Option Strict On
Imports Extensiones
Partial Class Gral_CatClasificacionesComprobaciones
Inherits ClsPaginas
Property CveClasificacion As Integer
Get
If ViewState("CveClasificacion") Is Nothing Then
Return -1
Else
Return ViewState("CveClasificacion").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("CveClasificacion") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaGridClasificaciones()
End If
End Sub
#Region " C L A S I F I C A C I O N E S"
Protected Sub CargaGridClasificaciones()
Dim ObjClasificaciones As New ClsClasificaciones()
If ObjClasificaciones.GetClasificacionesComprobaciones(UsuarioActual.CveEmpresa, 2, DdlEstadosComprobaciones.SelectedValue.ToEntero) Then
GvClasificaciones.DataSource = ObjClasificaciones.DtResultados
GvClasificaciones.DataBind()
End If
ObjClasificaciones.Dispose()
UpDatos.Update()
End Sub
Private Sub LbAgregarClasificacion_Click(sender As Object, e As EventArgs) Handles LbAgregarClasificacion.Click
Dim ObjClasificaciones As New ClsClasificaciones()
If ObjClasificaciones.AddClasificacionesComprobaciones(CveClasificacion, UsuarioActual.CveEmpresa, DdlTipoComprobacion.SelectedValue.ToEntero) Then
Alert("La clasificación se actualizo correctamente.")
CargaGridClasificaciones()
UpDatos.Update()
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalClasificaciones"))
End If
ObjClasificaciones.Dispose()
End Sub
Public Sub ActualizaModalClasif(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
TxtClasificaciones.Text = GvRow.DataKey("Clasificacion")
CveClasificacion = GvRow.DataKey("CveClasificacion").ToString.ToEntero
RegistraScript(String.Format("$('#{0}').modal();", "ModalClasificaciones"))
DdlTipoComprobacion.SelectedValueExist(GvRow.DataKey("TipoComprobacion"))
UpModalClasificaciones.Update()
End Sub
#End Region
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CargaGridClasificaciones()
End Sub
End Class

View File

@@ -464,7 +464,7 @@ Partial Class Inventarios_RecepcionEntrega
GVPendientes.DataBind()
UpPendientes.Update()
DtPendientes.Dispose()
If DtPendientes IsNot Nothing Then DtPendientes.Dispose()
End Sub
Protected Sub GVPendientes_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVPendientes.RowDataBound
@@ -632,10 +632,7 @@ Partial Class Inventarios_RecepcionEntrega
DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen)
End If
DtDatos.Columns.Add("AplicaSeccion", GetType(Boolean))
DtDatos.Columns.Add("AplicaSerie", GetType(Boolean))
DtDatos.Columns.Add("AplicaLote", GetType(Boolean))
DtDatos.Columns.Add("AplicaCaducidad", GetType(Boolean))
If Not DtDatos.Columns.Contains("Lote") Then
DtDatos.Columns.Add("Lote", GetType(String))
End If
@@ -1749,7 +1746,7 @@ Partial Class Inventarios_RecepcionEntrega
For Each Dr As DataRow In DtDatos.Rows
If Dr("CantidadGV").ToString.ToDecimal > 0 Then
If CBool(Dr("AplicaSeccion")) Then
If CBool(Dr("AplicaSerieLote")) Then
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
For Each Dr1 As DataRow In DtDetalle.Rows
@@ -1882,7 +1879,12 @@ Partial Class Inventarios_RecepcionEntrega
CantidadPendiente = If(Dr1("ExistenciaFinal").ToString.ToDecimal > CantidadSaldo, CantidadSaldo, Dr1("ExistenciaFinal").ToString.ToDecimal)
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1,
SerieLote:=Dr("SerieLote").ToString,
CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero,
FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha),
Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"),
CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
Exit For
@@ -1894,7 +1896,8 @@ Partial Class Inventarios_RecepcionEntrega
Next
If ErrorMovInv Then Exit For
Else
ErrorMovInv = True
End If
End If

View File

@@ -353,13 +353,15 @@
<div class="col-md-9">
<div class="form-group form-md-line-input input-iconright">
<ADS:Dropdownlost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm ddlps" data-metodo="getps" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" causesvalidation="true" DataTextField="pscodigo" DataValueField="cveps" Onselectedindexchange="ddlpsajuste_selectedindexchange"></ADS:Dropdownlost>
<asp:HiddenField ID="HdnPSAjusteMarca" ClientIDMode="Static" runat="server" Value="-1" />
<asp:HiddenField ID="HdnPSAjusteClasificacion" ClientIDMode="Static" runat="server" Value="-1" />
<label for="<%= DdlPSAjuste.ClientID.ToString()%>">producto/servicio a recibir:</label>
</div>
</div>
<div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPUFactura" CssClass="form-control" runat="server" MaxLength="50" Enabled="false"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVPUFactura" runat="server" ControlToValidate="TxtPUFactura" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''PU Factura''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RFVPUFactura" runat="server" ControlToValidate="TxtPUFactura" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''PU Factura''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAjuste"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEPUFactura" runat="server" HighlightCssClass="vco" TargetControlID="RFVPUFactura"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FTBEPUFactura" runat="server" TargetControlID="TxtPUFactura" FilterType="Custom, Numbers" ValidChars=".," />
<label for="<%= TxtPUFactura.ClientID.ToString()%>">P.U.:</label>
@@ -380,8 +382,8 @@
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlFolioGarantia" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="FolioGarantia" DataValueField="CveFolioGarantia" Width="100%" AutoPostBack="true">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVFolioGarantia" runat="server" ControlToValidate="DdlFolioGarantia" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFolioGarantia" runat="server" HighlightCssClass="vco" TargetControlID="RFVFolioGarantia"></ajax:ValidatorCalloutExtender>
<%-- <asp:RequiredFieldValidator ID="RFVFolioGarantia" runat="server" ControlToValidate="DdlFolioGarantia" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAjuste"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFolioGarantia" runat="server" HighlightCssClass="vco" TargetControlID="RFVFolioGarantia"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= DdlFolioGarantia.ClientID.ToString()%>">Folio:</label>
</div>
</div>
@@ -398,7 +400,7 @@
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCodEnsamble" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Ensamble''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[0-9][A-HJ-M]([[0-2][0-9]|3[0-1])[0-9A-Z][ACEN][2-5]$"></asp:RegularExpressionValidator>
<asp:CustomValidator ID="CVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" ClientValidationFunction="ValidarCodigoEnsamble" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Ensamble''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAjuste" />
<%--<asp:RequiredFieldValidator ID="RFVCodEnsamble" runat="server" ControlToValidate="TxtCodEnsamble" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%
<%--<ajax:ValidatorCalloutExtender ID="VCECodEnsamble" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodEnsamble"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtCodEnsamble.ClientID.ToString()%>">Cod.Ensamble:</label>
@@ -408,7 +410,7 @@
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoUso" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoUso" DataValueField="CveTipoUso" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoUso_SelectedIndexChanged">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoUso" runat="server" ControlToValidate="DdlTipoUso" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Uso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RFVTipoUso" runat="server" ControlToValidate="DdlTipoUso" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Uso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAjuste"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipoUso" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoUso"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlTipoUso.ClientID.ToString()%>">Tipo de Uso:</label>
</div>
@@ -419,7 +421,7 @@
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCodLinea" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TxtCodLinea" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Linea''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[*]$"></asp:RegularExpressionValidator>
<asp:CustomValidator ID="CVCodLinea" runat="server" ControlToValidate="TxtCodLinea" ClientValidationFunction="ValidarCodigoLinea" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Linea''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAjuste" />
<%--<asp:RequiredFieldValidator ID="RFVCodLinea" runat="server" ControlToValidate="TxtCodLinea" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Linea''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCECodLinea" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodLinea"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtCodLinea.ClientID.ToString()%>">Cod.Linea:</label>
@@ -434,7 +436,7 @@
</span>
<ajax:MaskedEditExtender ID="MEEFechaAjuste" runat="server" TargetControlID="TxtFechaAjuste" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEEFechaAjuste" TargetControlID="TxtFechaAjuste" PopupButtonID="LnkFechaAjuste" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaAjuste" runat="server" ControlToValidate="TxtFechaAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RFVFechaAjuste" runat="server" ControlToValidate="TxtFechaAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAjuste"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFechaAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaAjuste"></ajax:ValidatorCalloutExtender>
</div>
</div>
@@ -443,7 +445,7 @@
<div class="col-md-8">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCodInspeccion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAddVenta" ValidationExpression="^[A-L][0-9][1-9A-Z][A-HJ-M]$"></asp:RegularExpressionValidator>
<asp:CustomValidator ID="CVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" ClientValidationFunction="ValidarCodigoInspeccion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod.Inspección''</b> es incorrecto, por favor ingréselo correctamente." ValidationGroup="GrpAjuste" />
<%--<asp:RequiredFieldValidator ID="RFVCodInspeccion" runat="server" ControlToValidate="TxtCodInspeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cod. Inspeccion''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCECodInspeccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodInspeccion"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtCodInspeccion.ClientID.ToString()%>">Cod. Inspección:</label>
@@ -452,7 +454,7 @@
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtMesesUso" CssClass="form-control" runat="server" MaxLength="50" Enabled="false"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVMesesUso" runat="server" ControlToValidate="TxtMesesUso" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Meses de Uso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RFVMesesUso" runat="server" ControlToValidate="TxtMesesUso" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Meses de Uso''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAjuste"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEMesesUso" runat="server" HighlightCssClass="vco" TargetControlID="RFVMesesUso"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FTBEMesesUso" runat="server" TargetControlID="TxtMesesUso" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtMesesUso.ClientID.ToString()%>">Meses de Uso:</label>
@@ -464,7 +466,7 @@
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoDefecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="TipoDefecto" DataValueField="CveTipoDefecto" Width="100%" AutoPostBack="true">
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoDefecto" runat="server" ControlToValidate="DdlTipoDefecto" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Defecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RFVTipoDefecto" runat="server" ControlToValidate="DdlTipoDefecto" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Defecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAjuste"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipoDefecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoDefecto"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlTipoDefecto.ClientID.ToString()%>">Tipo de Defecto:</label>
</div>
@@ -472,7 +474,7 @@
<div class="col-md-4">
<div id="DivCodigoTD" class="form-group form-md-line-input input-iconright" runat="server" visible="false">
<asp:TextBox ID="TxtCodigoTD" CssClass="form-control" runat="server" MaxLength="11" Width="100%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCodigoTD" runat="server" ControlToValidate="TxtCodigoTD" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RFVCodigoTD" runat="server" ControlToValidate="TxtCodigoTD" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAjuste"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RFVCodigoTD"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtCodigoTD" FilterType="Custom, Numbers, UppercaseLetters " ValidChars="." />
<label for="<%= TxtCodigoTD.ClientID.ToString()%>">Código:</label>
@@ -481,7 +483,7 @@
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPorcentajeAjuste" CssClass="form-control" Enabled="false" runat="server" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVPorcentajeAjuste" runat="server" ControlToValidate="TxtPorcentajeAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''% Ajuste''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RFVPorcentajeAjuste" runat="server" ControlToValidate="TxtPorcentajeAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''% Ajuste''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAjuste"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEPorcentajeAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVPorcentajeAjuste"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FTBEPorcentajeAjuste" runat="server" TargetControlID="TxtPorcentajeAjuste" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtPorcentajeAjuste.ClientID.ToString()%>">% Ajuste:</label>
@@ -500,15 +502,15 @@
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtImporteAjuste" CssClass="form-control" runat="server" Enabled="false" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVImporteAjuste" runat="server" ControlToValidate="TxtImporteAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RFVImporteAjuste" runat="server" ControlToValidate="TxtImporteAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAjuste"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEImporteAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVImporteAjuste"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FTBEImporteAjuste" runat="server" TargetControlID="TxtImporteAjuste" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtImporteAjuste.ClientID.ToString()%>">Importe:</label>
</div>
</div>
<div class="col-md-4">
<asp:Button ID="BtnCalcularImporteAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnCalcularImporteAjuste_Click" runat="server" Text="Recalcular" />
<asp:Button ID="BtnAgregarProductoAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnAgregarProductoAjuste_Click" runat="server" Text="Agregar" />
<asp:Button ID="BtnCalcularImporteAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnCalcularImporteAjuste_Click" runat="server" Text="Recalcular" ValidationGroup="GrpAjuste" />
<asp:Button ID="BtnAgregarProductoAjuste" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnAgregarProductoAjuste_Click" runat="server" Text="Agregar" ValidationGroup="GrpAjuste" />
</div>
</div>
</div>
@@ -969,8 +971,7 @@
<h4 class="modal-title" id="HTituloDispostivo" runat="server">Agregar</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input ">
<div class="form-group form-md-line-input">
<div class="row">
<div class="col-md-2" style="width: 50%">
<label for='<%= txtCantidad.ClientID %>'>Cantidad:</label>
@@ -988,39 +989,27 @@
</div>
<i></i>
</div>
<%--<div class="form-group form-md-line-input ">
<label for='<%= DdlClasificacion.ClientID %>'>Clasificación:</label>
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" Class="form-control input-sm select2me">
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>--%>
<div class="form-group form-md-line-input ">
<div class="form-group form-md-line-input">
<asp:DropDownList runat="server" ID="DdlProducto2" AutoPostBack="true" AppendDataBoundItems="true" Class="form-control select2me" Style="width: 200px !important;" DataTextField="PSCodigo" DataValueField="CvePS" OnSelectedIndexChanged="DdlProducto2_SelectedIndexChanged" />
<asp:HiddenField ID="HdnCveTamaño" runat="server" />
<label for='<%= DdlProducto2.ClientID %>'>Producto:</label>
</div>
<div class="form-group form-md-line-input ">
<div class="form-group form-md-line-input">
<br />
<label for='<%= DdlUnidad.ClientID %>'>Unidad de Medida:</label><br />
<asp:DropDownList ID="DdlUnidad" runat="server" Class="form-control input-sm select2me" Style="width: 75px !important;" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida"></asp:DropDownList>
<asp:CompareValidator ID="CVUnidad" runat="server" ControlToValidate="ddlUnidad" Type="Integer" Operator="GreaterThan" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad Medida''</b> es necesario, por favor selecione una." Display="None" ValueToCompare="0" ValidationGroup="GprAgregarUsado"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVUnidad" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
<div class="form-group form-md-line-input " runat="server" visible="false">
<div class="form-group form-md-line-input" runat="server" visible="false">
<label for='<%= txtPrecio.ClientID %>'>PU:</label>
<asp:TextBox ID="txtPrecio" CssClass="form-control input-sm" runat="server" Width="55px" Text="0"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="ftbe" runat="server" TargetControlID="txtPrecio" FilterType="Custom, Numbers" ValidChars="+-.," />
</div>
<div class="form-group form-md-line-input ">
<div class="form-group form-md-line-input">
<label for='<%= TxtObservacionesdetalle.ClientID %>'>Observaciones:</label>
<asp:TextBox ID="TxtObservacionesdetalle" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
@@ -1035,13 +1024,60 @@
</asp:UpdatePanel>
</div>
</div>
<asp:Button ID="BtnGenerarRNC" runat="server" ClientIDMode="Static" Text="RNC" Style="display: none;" />
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript">
function ValidarCodigoEnsamble(source, arguments) {
let CveMarca = HdnPSAjusteMarca.value;
let CveClasificacion = HdnPSAjusteClasificacion.value;
//MARCA OPTIMA
if (CveMarca == "1086") {
let regex = new RegExp("^[0-9]+$");
arguments.IsValid = regex.test(arguments.Value);
return;
//MARCA MOTOBATERIAS
} else if ((CveMarca == "1090" || CveMarca == "1091") || CveClasificacion == "20517") {
let regex = new RegExp("^[1X]");
arguments.IsValid = regex.test(arguments.Value);
return;
//AUTOMOTRIZ-ACUMULADORES
} else {
let regex = new RegExp("^[1X]|^[0-9][A-HJ-M][0-3][0-9][A-Z][ACEN][2-5]$");
arguments.IsValid = regex.test(arguments.Value);
return;
}
}
function ValidarCodigoLinea(source, arguments) {
var regex = new RegExp("^[*]");
arguments.IsValid = regex.test(arguments.Value);
}
function ValidarCodigoInspeccion(source, arguments) {
let CveMarca = HdnPSAjusteMarca.value;
let CveClasificacion = HdnPSAjusteClasificacion.value;
//MARCA OPTIMA
if (CveMarca == "1086") {
var regex = new RegExp("^\d{4}$|^[A-L][0-9][1-9A-Z][A-HJ-M]$");
arguments.IsValid = regex.test(arguments.Value);
return;
//MARCA MOTOBATERIAS
} else if ((CveMarca == "1090" || CveMarca == "1091") || CveClasificacion == "20517") {
var regex = new RegExp("^[A-L][0-9][1-9A-Z][A-HJ-M]$");
arguments.IsValid = regex.test(arguments.Value);
return;
//AUTOMOTRIZ-ACUMULADORES
} else {
var regex = new RegExp("^[X]|^[x]|[A-L][0-9][1-9A-Z][A-HJ-M]$");
arguments.IsValid = regex.test(arguments.Value);
return;
}
}
function CalculaMesesUso() {
$get("BtnCalculaMesesUso").click();
}

View File

@@ -1038,7 +1038,7 @@ Partial Class Inventarios_RecepcionUsados
Dim GenerarRNC As Boolean = False
'SI ES DISTRIBUIDOR Y NO VIENE DE REMISION, GENERA UNA REMISION DE NOTA DE CREDITO
If EsDistribuidor AndAlso Me.CveRemisionRecibida <= 0 Then
If Me.CveRemisionRecibida <= 0 Then 'EsDistribuidor AndAlso , comentado, 2020.04.21 RMF
GenerarRNC = True
Dim CveCliente As Integer = DdlClientes.SelectedValue.ToEntero()
Dim CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={DdlAlmacen.SelectedValue}").ToEntero
@@ -1162,7 +1162,7 @@ Partial Class Inventarios_RecepcionUsados
If Not ErrorMovInv Then
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio)
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b><a href='Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a></b>", ObjInventario.Folio, CveMovimiento)
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza)
@@ -2563,12 +2563,17 @@ Partial Class Inventarios_RecepcionUsados
Protected Sub DdlPSAjuste_selectedindexchange(sender As Object, e As EventArgs)
If DdlPSAjuste.SelectedValue.ToEntero > 0 Then
Dim CvePSParametro As Integer = DdlPSAjuste.SelectedValue.ToEntero
Dim CveMarca As Integer = -1
Dim CveClasificacion As Integer = -1
Dim PrecioSugerido As Decimal = 0
Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
If drPS IsNot Nothing Then
PrecioSugerido = drPS("Precio").ToString.ToDecimal
Dim PS As String = drPS("PS").ToString
CveMarca = drPS("CveMarca").ToString.ToEntero
CveClasificacion = drPS("CveClasificacion").ToString.ToEntero
Dim Arr = PS.Split("-"c)
If Arr.Count > 0 Then
If (DdlBCIAjuste.Items.FindByText(Arr(1).ToString) IsNot Nothing) Then
@@ -2578,6 +2583,10 @@ Partial Class Inventarios_RecepcionUsados
End If
End If
HdnPSAjusteMarca.Value = CveMarca.ToString()
HdnPSAjusteClasificacion.Value = CveClasificacion.ToString()
Dim MarcaPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero(String.Format("CveMarca = {0}", drPS("CveMarca").ToString))
If MarcaPorcentaje IsNot Nothing Then
Dim PorcentajeProducto As Decimal = MarcaPorcentaje("PorcentajeProducto").ToString.ToDecimal / 100
@@ -2606,6 +2615,7 @@ Partial Class Inventarios_RecepcionUsados
txtPrecio.Text = PrecioSugerido.FormatoNumero(2)
TxtPUFactura.Text = PrecioSugerido.FormatoNumero(2)
End If
UpModalAgregar.Update()
End Sub
Private Sub CargaBCIAjuste()

View File

@@ -370,10 +370,10 @@
<th width="25px">#</th>
<th width="100px">Cantidad</th>
<th width="90px">Unidad</th>
<th width="500px">Clasificación
<th width="500px">Clasificación
<br />
Producto
Producto
</th>
<th width="100px">Observaciones</th>
<th style="width: 88px" runat="server" id="ThSerieLote" visible="false">Serie - Lote </th>
@@ -499,27 +499,27 @@
</div>
<div class="titlefiltros caption ">
<ul class="list-inline" style="font-size: 12px;">
<li>Almacén Recibe:
<li>Almacén Recibe:
<asp:DropDownList ID="DdlAlmacenRecepcion" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Style="width: 150px !important;" ValidationGroup="GrpCargaTransitorios"></asp:DropDownList>
<%--<asp:RequiredFieldValidator ID="RFVAlmacenRecepcion" runat="server" ControlToValidate="DdlAlmacenRecepcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen Recibe''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpCargaTransitorios"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCEAlmacenRecepcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacenRecepcion" Width="350px"></ajax:ValidatorCalloutExtender>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCEAlmacenRecepcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacenRecepcion" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</li>
<li>Almacén Transitorio:
<li>Almacén Transitorio:
<asp:DropDownList ID="DdlAlmacenTransitorioRecepcion" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Style="width: 150px !important;" ValidationGroup="GrpCargaTransitorios"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVAlmacenTransitorioRecepcion" runat="server" ControlToValidate="DdlAlmacenTransitorioRecepcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen Transitorio''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpCargaTransitorios"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEAlmacenTransitorioRecepcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacenTransitorioRecepcion" Width="350px"></ajax:ValidatorCalloutExtender>
</li>
<li>Folio:
<li>Folio:
<asp:TextBox ID="TxtFolioRecepcion" runat="server" Width="70px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtFolioRecepcion" FilterType="Numbers" />
</li>
<%--<li>Transportista/Responsable:
<asp:DropDownList ID="DdlResponsableRecepcion" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVResponsableRecepcion" runat="server" ControlToValidate="DdlResponsableRecepcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen Transitorio''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpCargaTransitorios"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEResponsableRecepcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVResponsableRecepcion" Width="350px"></ajax:ValidatorCalloutExtender>
<%--<li>Transportista/Responsable:
<asp:DropDownList ID="DdlResponsableRecepcion" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 200px !important;"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVResponsableRecepcion" runat="server" ControlToValidate="DdlResponsableRecepcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen Transitorio''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpCargaTransitorios"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEResponsableRecepcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVResponsableRecepcion" Width="350px"></ajax:ValidatorCalloutExtender>
</li>--%>
</ul>
</div>
@@ -587,7 +587,7 @@
<div style="text-align: center;" class="col-sm-12">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:Button ID="BtnRecibir" runat="server" Text="Recibir Traspaso" OnClick="BtnRecibir_Click" class="btn btn-primary" ValidationGroup="GrpRecibir" />&nbsp;&nbsp;&nbsp;
<asp:Button ID="BtnRecibir" runat="server" Text="Recibir Traspaso" OnClick="BtnRecibir_Click" class="btn btn-primary" ValidationGroup="GrpRecibir" />&nbsp;&nbsp;&nbsp;
<asp:Button ID="BtnCancelarTraspaso" runat="server" Text="Cancelar Traspaso" OnClick="BtnCancelarTraspaso_Click" class="btn btn-danger" Visible="false" ValidationGroup="GrpRecibir" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el traspaso?" data-btn-ok-label="si" />
</ContentTemplate>
@@ -634,8 +634,8 @@
<asp:GridView ID="GvDatosRecepcion" DataKeyNames="CveMovimiento,CveUM,CvePS,PS,CveAF,CodigoBarras,CveAlmacen,CveAlmacenDestino,AplicaSerieLote,CveMovimientoDetalle,PU,CveAlmacenSalida,CveMovimientoSalida,SerieLote,Lote,Batch,Cantidad, GastoIndirectoSalida, Importe,Codigo" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" ToolTip="Listado de Movimientos" CssClass="table table-hover Widthall" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
<%--<HeaderTemplate>
<input type="checkbox" id="ChkAll" onclick="CheckAll();" />
<%--<HeaderTemplate>
<input type="checkbox" id="ChkAll" onclick="CheckAll();" />
</HeaderTemplate>--%>
<ItemTemplate>
<asp:CheckBox ID="Chk" Checked="true" runat="server"></asp:CheckBox>
@@ -699,18 +699,18 @@
<div class="row">
<div class="col-xs-4">
Con copia para:<br />
(Separar con: ;)
(Separar con: ;)
</div>
<div class="col-xs-8">
<asp:TextBox ID="TxtCC" runat="server" TextMode="MultiLine" Columns="3" Rows="3" CssClass="form-control"></asp:TextBox>
</div>
</div>
<%--<div class="row">
<div class="col-xs-4">Texto Adicional:</div>
<div class="col-xs-8">
<asp:TextBox ID="TxtAdicional" runat="server" TextMode="MultiLine" Columns="3" Rows="3" CssClass="form-control"></asp:TextBox>
</div>
<%--<div class="row">
<div class="col-xs-4">Texto Adicional:</div>
<div class="col-xs-8">
<asp:TextBox ID="TxtAdicional" runat="server" TextMode="MultiLine" Columns="3" Rows="3" CssClass="form-control"></asp:TextBox>
</div>
</div>--%>
</ContentTemplate>
</asp:UpdatePanel>
@@ -876,87 +876,87 @@
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript" language="javascript">
<script type="text/javascript" language="javascript">
function ValidaCantidad(input, valorInicial) {
var ValorActual = input.value;
if (ValorActual > valorInicial) {
//alert("El valor no puede ser mayor a la cantidad inicial: " + valorInicial);
var ValorActual = input.value;
if (ValorActual > valorInicial) {
//alert("El valor no puede ser mayor a la cantidad inicial: " + valorInicial);
input.value = valorInicial;
}
}
}
function ImprimirTraslado(clave) {
$get('BtnImprimirTraspaso').click();
}
}
function Focus() {
$('#TxtCodigoPS').focus()
}
}
function Focus1() {
$('#TxtCodigoPSRecepcion').focus()
}
}
function Focus2() {
$('#TxtSeriePSRecepcion').focus()
}
}
function playsonidito(NomArchivo) {
var URL = /Sonidos/ + NomArchivo
var snd = new Audio(URL);
snd.play();
var URL = /Sonidos/ + NomArchivo
var snd = new Audio(URL);
snd.play();
snd.currentTime = 0;
}
//EXISTENCIAS ALMACEN
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
}
//EXISTENCIAS ALMACEN
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
$("body").on("mouseenter", ".select2-container.select2-container--default.select2-container--open .select2-dropdown li", function (event) {
var $this = $(this);
var ind = $this.index();
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable tr.active").removeClass('active');
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable tr:nth-child(" + (ind + 2) + ")").addClass('active');
//log($this);
});
var $this = $(this);
var ind = $this.index();
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable tr.active").removeClass('active');
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable tr:nth-child(" + (ind + 2) + ")").addClass('active');
//log($this);
});
var scrollfuncion = function () {
var stop = this.scrollTop;
var stop = this.scrollTop;
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable").scrollTop(stop);
}
}
function CargaExistenciaAlmacenes(data, params) {
var div = $('<div class="select2anothertable"></div>');
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable').remove();
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown').prepend(div);
var table = $('<table></table>'); div.append(table);
var tbody = $('<tbody></tbody>'); table.append(tbody);
$(".select2-container--default .select2-results>.select2-results__options").off("scroll", scrollfuncion);
$(".select2-container--default .select2-results>.select2-results__options").scroll(scrollfuncion);
var indexd = 0;
var div = $('<div class="select2anothertable"></div>');
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable').remove();
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown').prepend(div);
var table = $('<table></table>'); div.append(table);
var tbody = $('<tbody></tbody>'); table.append(tbody);
$(".select2-container--default .select2-results>.select2-results__options").off("scroll", scrollfuncion);
$(".select2-container--default .select2-results>.select2-results__options").scroll(scrollfuncion);
var indexd = 0;
data.forEach(function (item) {
if (indexd == 0) {
var tr = $('<tr></tr>'); tbody.append(tr);
var td;
var tr = $('<tr></tr>'); tbody.append(tr);
var td;
for (var key in item) {
if (!(key == "text" || key == "id")) { td = $('<td style="font-weight:bold;">' + key + '</td>'); tr.append(td); }
}
}
var tr = $('<tr></tr>'); tbody.append(tr);
var td;
}
var tr = $('<tr></tr>'); tbody.append(tr);
var td;
for (var key in item) {
if (!(key == "text" || key == "id")) { td = $('<td ' + ((item[key] > 0) ? 'style = "font-weight:bold;"' : '') + '>' + item[key] + '</td>'); tr.append(td); }
}
}
indexd += 1;
});
}
}
</script>
</asp:Content>

View File

@@ -369,7 +369,7 @@ Partial Class Inventarios_TraspasoAlmacen
'Llena Almacen Destino, todos los almacenes destino,
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11) AND Estatus = 'Activo'")
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,24) AND Estatus = 'Activo'")
'DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen <> 4")
DdlAlmacenDestino.DataBind()
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
@@ -380,7 +380,7 @@ Partial Class Inventarios_TraspasoAlmacen
DdlAlmacenTransitorio.Items.Insert(0, New ListItem("Seleccione", "-1"))
'Llena Almacen Recepcion
DdlAlmacenRecepcion.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11)")
DdlAlmacenRecepcion.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,24)")
DdlAlmacenRecepcion.DataBind()
DdlAlmacenRecepcion.Items.Insert(0, New ListItem("Todos", "-1"))
@@ -440,7 +440,7 @@ Partial Class Inventarios_TraspasoAlmacen
Private Sub CargaAlmacenOrigen()
DdlAlmacenOrigen.Enabled = True
DdlAlmacenOrigen.Items.Clear()
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,21)")
DdlAlmacenOrigen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,24)")
DdlAlmacenOrigen.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
DdlAlmacenOrigen.SelectedValue = "-1"
DdlAlmacenOrigen.DataBind()
@@ -1517,6 +1517,8 @@ Partial Class Inventarios_TraspasoAlmacen
Dim ErrorMovInv As Boolean = False
Dim TextoError As String = ""
Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate
Dim CveMovimientoVirtualEntrada As Integer = 0
Dim FolioVirtualEntrada As Integer = 0
Dim ObjInventario As New ClsInventarios
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
@@ -1598,6 +1600,43 @@ Partial Class Inventarios_TraspasoAlmacen
' TextoError = "Ocurrió un error al obtener los movimientos de salida"
'End If
'VIRTUAL ENTRADA
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero}").ToEntero()
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyecto}").ToEntero()
If CveAlmacenVirtual > 0 Then
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/C2")
FolioVirtualEntrada = ObjInventario.Folio
Dim dtvirtual As DataTable = Nothing
If CveMovimientoVirtualEntrada > 0 AndAlso ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoEntrada, UsuarioActual.CveEmpresa, CveMovimientoRelacionado:=CveMovimientoSalida) Then
dtvirtual = ObjInventario.DtResultados
For Each RowVirtual As DataRow In dtvirtual.Rows
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
Dim CantidadUsado As Decimal = RowVirtual("Cantidad").ToString().ToDecimal()
Dim PU As Decimal = RowVirtual("PUOriginal").ToString().ToDecimal()
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
Dim CostoIndirecto As Decimal = RowVirtual("CostoIndirecto").ToString().ToDecimal()
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualEntrada, CantidadUsado, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
Exit For
End If
Next
Else
TextoError = "No se pudo registrar el movimiento virtual"
ErrorMovInv = True
End If
Else
TextoError = "La Sucursal no tiene creado un almacen virtual"
ErrorMovInv = True
End If
End If
If Not ErrorMovInv Then
Dim ImporteDecimal As Decimal = importe.ToDecimal.RoundSQL
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
@@ -1633,6 +1672,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim Mensaje As StringBuilder = New StringBuilder
Mensaje.AppendFormat("Se realizo correctamente la cancelación. <br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", Folio, CveMovimientoEntrada)
Mensaje.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada))) 'onclick='ImprimirTraslado()'
If CveMovimientoVirtualEntrada > 0 Then Mensaje.AppendFormat("<br/>Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a>&nbsp;<a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Entrada Virtual</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada)
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)

View File

@@ -1,6 +1,5 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="OC.aspx.vb" EnableEventValidation="false" Inherits="OC" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAcciones" UpdateMode="Conditional">
@@ -42,7 +41,9 @@
<li>
<asp:LinkButton ID="LbVerificarExistencia" Visible="True" runat="server"><i class='fa fa-list-alt'></i> Verificar Existencias</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkCambiarMoneda" Visible="False" runat="server"><i class='fa fa-money'></i> Cambiar Moneda</asp:LinkButton>
</li>
<li style="text-align: left!important" runat="server" id="LiLnkGuias" visible="true">
<asp:LinkButton runat="server" ID="LnkAgregarGuia" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkAgregarGuia_Click" title="Paquetería Guías." Text="<i class='fa fa-truck'></i> Paqueteria Guías" Visible="false"></asp:LinkButton>
</li>
@@ -606,7 +607,7 @@
<asp:ImageButton ID="ImgCambiaClienteVendedor" data-toggle="tooltip" title="Actualizar Cliente/Vendedor" Visible="false" ImageUrl="/Imagenes/accept.png" runat="server" />
</div>
</div>
<div class="col-md-2" style="max-width: 145px;">
<div id="DivEntregaDirecta" runat="server" visible="true" class="col-md-2" style="max-width: 145px;">
<asp:CheckBox ID="ChkEntregaDirecta" CssClass="md-checksd" AutoPostBack="true" OnCheckedChanged="ChkEntregaDirecta_CheckedChanged" Text="Entrega Directa" TextAlign="Right" runat="server" Checked="false" />
</div>
<div runat="server" id="DivLugarEntregaDirecta1" visible="false" class="col-md-2" style="max-width: 120px;">
@@ -2599,6 +2600,41 @@
</div>
</div>
</div>
<div id="DivCambiarMoneda" class="modal ADS fade">
<div class="modal-dialog">
<asp:UpdatePanel ID="UpdatePanel3" runat="server" class="modal-content rowpadding" tabindex="-1" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4>
<asp:Label Text="Cambiar Moneda" ID="LblCambioMonedaTitle" runat="server" />
</h4>
</div>
<div class="modal-body">
<asp:UpdatePanel ID="UpCambiarMonedaBody" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<div class="row" style="width:100%">
<label class="col-md-1" style="width:100%">Desea Cambiar el Tipo de Moneda:</label>
</div>
<br />
<div class="row" runat="server" id="DivTCRow" style="width:100%">
<label class="col-md-3">Tipo de Cambio:</label>
<div class="col-md-3">
<asp:TextBox ID="TxtTCCambioMoneda" runat="server" Width="100%" CssClass="form-control" CausesValidation="true"></asp:TextBox>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<%--data-toggle="confirmation" data-btn-ok-label="Si" data-title="Está seguro que desea cancelar la orden de compra?"--%>
<asp:Button ID="BtnCambiarMoneda" runat="server" Text="Aplicar Cambio" ClientIDMode="Static" CssClass="btn btn-success" ValidationGroup="GrpCancelarCompra" />
<button type="button" class="btn default" data-dismiss="modal">Cancelar</button>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="server">

View File

@@ -795,6 +795,14 @@ Partial Class OC
PermisosPagina()
RegistraScript("$get('HdnWidth').value = $('#C_Tab_TabC_DivConceptosContenido').width();")
'NO MOSTRAR LA OPCION DE ENTREGA DIRECTA (ECONOLLANTAS)
If UsuarioActual.CveEmpresa = 141 Then
DivEntregaDirecta.Visible = False
ChkEntregaDirecta.Enabled = False
ChkEntregaDirecta.Checked = False
End If
End If
Me.Form.DefaultButton = ""
End Sub
@@ -6760,6 +6768,10 @@ Partial Class OC
GVInv.DataSource = ObjInventarios.DtResultados
If ObjInventarios.DtResultados.Rows.Count > 0 Then
DdlMoneda.Enabled = False
Dim TipoEstatusTerminado As String = GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltroPrimeroValor("TipoTermino", String.Format("CveEstatus = {0}", CboE.SelectedValue))
If TipoEstatusTerminado = "1" Then
LnkCambiarMoneda.Visible = True
End If
End If
End If
GVInv.DataBind()
@@ -6767,6 +6779,7 @@ Partial Class OC
ObjInventarios.Dispose()
UpAlmacen.Update()
UpAcciones.Update()
End If
End Sub
@@ -7664,4 +7677,136 @@ Partial Class OC
Protected Sub DdlMoneda_Change() Handles DdlMoneda.SelectedIndexChanged
MonedaTexto = DdlMoneda.SelectedItem.Text
End Sub
Protected Sub LnkCambiarMoneda_Click(sender As Object, e As EventArgs) Handles LnkCambiarMoneda.Click
RegistraScript("$('#DivCambiarMoneda').modal();")
End Sub
Protected Sub BtnCambiarMoneda_Click() Handles BtnCambiarMoneda.Click
Dim ObjInv As New ClsInventarios
Dim OC As New ClsOC
Dim Err As Boolean = False
If ObjInv.GetMovimientos(CveMovimientoAlmacenVenta, -1, -1, UsuarioActual.CveEmpresa) Then
Dim TipoMoneda As String = ObjInv.DtResultados.FiltroPrimeroValor("CveMoneda")
Dim ObjConta As New ClsContabilidad
Dim IdCtaContableOC As Integer = 0
Dim IdCtaContableOCME As Integer = 0
Dim IdCtaContableOCComplementaria As Integer = 0
If ObjConta.GetRetCuenta(176, UsuarioActual.CveEmpresa) Then
IdCtaContableOC = ObjConta.DtResultados.FiltroPrimeroValor("IdCtaContable").ToEntero
End If
If ObjConta.GetRetCuenta(228, UsuarioActual.CveEmpresa) Then
IdCtaContableOCME = ObjConta.DtResultados.FiltroPrimeroValor("IdCtaContable").ToEntero
End If
If ObjConta.GetRetCuenta(229, UsuarioActual.CveEmpresa) Then
IdCtaContableOCComplementaria = ObjConta.DtResultados.FiltroPrimeroValor("IdCtaContable").ToEntero
End If
Dim LugarEntrega = If(txtLugarEntrega.Text.Trim = "", "-1", txtLugarEntrega.Text.Trim)
LugarEntrega = If(DivLugarEntrega1.Visible, LugarEntrega, If(TxtLugarEntregaDirecta.Visible, TxtLugarEntregaDirecta.Text.Trim, ""))
Dim CveProveedorContacto As Integer = -1
Dim CveProveedor As Integer = -1
If Not ChkCotizacion.Checked OrElse (UsuarioActual.Empresa.Funcionalidad(565) = "1" AndAlso CveConfianzaProveedor > 0) Then
CveProveedor = DdlProveedores.SelectedValue.ToEntero
CveProveedorContacto = IIf(DdlProveedorContacto.SelectedValue.ToEntero = 0, "-1", DdlProveedorContacto.SelectedValue).ToString.ToEntero
End If
Dim IVA = If(TxtIVA.Visible, TxtIVA.Text.ToDecimal, LblIVA.Text.ToDecimal)
Dim Promocion = TxtPromocion.Text.Trim
Dim TCDecimal As Decimal = TxtTCCambioMoneda.Text.ToDecimal
Dim TCDouble As Double = TxtTCCambioMoneda.Text.ToDouble
If TipoMoneda = "2" Then
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OC/OC-(OCAlmacen)", 74, 0.0D, 0.0D, 1, Now, DdlProveedores.SelectedText, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePoliza > 0 Then
Dim PrimerImporte As Integer = (0 - LblSubTotal.Text.ToDecimal)
Dim SegundoImporte As Integer = (0 - LblSubTotal.Text.ToDecimal)
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte, lblFolio.Text, 228, lblFolio.Text, Now, IdCtaContableOCME, -1, CveProveedor:=DdlProveedores.SelectedText, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SegundoImporte, lblFolio.Text, 229, lblFolio.Text, Now, IdCtaContableOCComplementaria, -1, CveProveedor:=DdlProveedores.SelectedText, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte + SegundoImporte, lblFolio.Text, 176, lblFolio.Text, Now, IdCtaContableOC, -1, CveProveedor:=DdlProveedores.SelectedText, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then
Err = True
Else
If Not OC.UpdateOrdenCompra(-1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim),
LugarEntrega, 1, CveProveedor, CveOrdenCompra, UsuarioActual.CveUsuario, Ddlcliente.txtValue.Value.ToEntero, DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=(IVA * TCDecimal), RetIVA:=(TxtRetIVA.Text.ToDecimal * TCDecimal),
RetISR:=(TxtRetISR.Text.ToDecimal * TCDecimal), FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1),
Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto,
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)) Then
Err = True
Else
For Each dr As DataRow In DtDetalle.FiltraParametros("TipoDato IN (1)").Rows
If OC.UpdateOrdenCompraDetalle(dr("Cantidad").ToString.ToDouble, dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, (dr("Importe").ToString.ToDouble * TCDouble), dr("CveSubProyecto").ToString.ToEntero,
dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, UsuarioActual.CveUsuario, dr("CveOrdenCompraDetalle").ToString.ToEntero, If(TipoOC = "REQ", -1, dr("CvePresupuestoEgreso").ToString.ToEntero),
(dr("Descuento").ToString.ToDouble * TCDouble), IEPSPS:=(dr("IEPSPS").ToString.ToDouble * TCDouble), IEPSPSIVA:=(dr("IEPSPSIVA").ToString.ToDouble * TCDouble), IVA:=(dr("IVA").ToString.ToDouble * TCDouble),
RetIVA:=(dr("RetIVA").ToString.ToDouble * TCDouble), RetISR:=(dr("RetISR").ToString.ToDouble * TCDouble), Total:=(dr("Total").ToString.ToDouble * TCDouble), CveContratoDetalle:=dr("CveContratoDetalle").ToString.ToEntero,
IVAPorcentaje:=dr("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=dr("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=dr("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=dr("IEPSPSPorcentaje").ToString.ToDouble,
IEPSPSIVAPorcentaje:=dr("IEPSPSIVAPorcentaje").ToString.ToDouble) <= 0 Then
Err = True
Exit For
End If
Next
End If
End If
Else
Err = True
End If
Else
Err = True
End If
End If
ElseIf TipoMoneda = "1" Then
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OC/OC-(OCAlmacen)", 74, 0.0D, 0.0D, 1, Now, DdlProveedores.SelectedText, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePoliza > 0 Then
Dim PrimerImporte As Decimal = Decimal.Round(((LblSubTotal.Text.ToDecimal) / TxtTCCambioMoneda.Text.ToDecimal), 2, MidpointRounding.AwayFromZero)
Dim SegundoImporte As Decimal = LblSubTotal.Text.ToDecimal
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte, lblFolio.Text, 228, lblFolio.Text, Now, IdCtaContableOCME, -1, CveProveedor:=DdlProveedores.SelectedText, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SegundoImporte, lblFolio.Text, 229, lblFolio.Text, Now, IdCtaContableOCComplementaria, -1, CveProveedor:=DdlProveedores.SelectedText, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, (0 - (PrimerImporte + SegundoImporte)), lblFolio.Text, 176, lblFolio.Text, Now, IdCtaContableOC, -1, CveProveedor:=DdlProveedores.SelectedText, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then
Err = True
Else
If Not OC.UpdateOrdenCompra(-1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim),
LugarEntrega, 2, CveProveedor, CveOrdenCompra, UsuarioActual.CveUsuario, Ddlcliente.txtValue.Value.ToEntero, DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=(IVA / TCDecimal),
RetIVA:=(TxtRetIVA.Text.ToDecimal / TCDecimal), RetISR:=(TxtRetISR.Text.ToDecimal / TCDecimal), FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1),
Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto,
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)) Then
Err = True
Else
For Each dr As DataRow In DtDetalle.FiltraParametros("TipoDato IN (1)").Rows
If OC.UpdateOrdenCompraDetalle(dr("Cantidad").ToString.ToDouble, dr("CveUnidadMedida").ToString.ToEntero, dr("CvePS").ToString.ToEntero, (dr("Importe").ToString.ToDouble / TCDouble), dr("CveSubProyecto").ToString.ToEntero,
dr("CveActivoFijo").ToString.ToEntero, dr("Observacion").ToString, UsuarioActual.CveUsuario, dr("CveOrdenCompraDetalle").ToString.ToEntero, If(TipoOC = "REQ", -1, dr("CvePresupuestoEgreso").ToString.ToEntero),
(dr("Descuento").ToString.ToDouble / TCDouble), IEPSPS:=(dr("IEPSPS").ToString.ToDouble / TCDouble), IEPSPSIVA:=(dr("IEPSPSIVA").ToString.ToDouble / TCDouble), IVA:=(dr("IVA").ToString.ToDouble / TCDouble),
RetIVA:=(dr("RetIVA").ToString.ToDouble / TCDouble), RetISR:=(dr("RetISR").ToString.ToDouble / TCDouble), Total:=(dr("Total").ToString.ToDouble / TCDouble), CveContratoDetalle:=dr("CveContratoDetalle").ToString.ToEntero,
IVAPorcentaje:=dr("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=dr("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=dr("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=dr("IEPSPSPorcentaje").ToString.ToDouble,
IEPSPSIVAPorcentaje:=dr("IEPSPSIVAPorcentaje").ToString.ToDouble) <= 0 Then
Err = True
Exit For
End If
Next
End If
End If
Else
Err = True
End If
Else
Err = True
End If
End If
End If
ObjConta.Dispose()
End If
ObjInv.Dispose()
If Err Then
Alert("Sucedió un error con el cambio en la moneda", TipoMensaje.MsgError)
Else
Alert("Moneda actualizada con exito")
End If
End Sub
End Class

View File

@@ -340,9 +340,13 @@
<div class="col-md-4">
<%--<asp:Button ID="BtnCargarArchivo" runat="server" ClientIDMode="Static" Style="display: none;" class="btn btn-success" />--%>
<asp:Image ID="ImgPersonal" runat="server" ImageUrl="/Imagenes/SinImagen.jpg" Width="150px" Height="150px" />
<br />
<asp:LinkButton ID="LnkSubirFacturas" runat="server">Cargar Imagen</asp:LinkButton>
<asp:UpdatePanel ID="UpImage" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Image ID="ImgPersonal" runat="server" ImageUrl="/Imagenes/SinImagen.jpg" Width="150px" Height="150px" />
<br />
<asp:LinkButton ID="LnkSubirFacturas" runat="server">Cargar Imagen</asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="col-md-4 " style="margin-top: 20px;">
<div class="portlet light bordered xspadding">

View File

@@ -754,7 +754,6 @@ Partial Class RH_Personal
End If
End If
CargaLicencias()
End If
AgregarEventosAsincronosGvVacaciones()
End Sub
@@ -4972,6 +4971,10 @@ Partial Class RH_Personal
End If
ViewState("Archivo") = String.Format("{0}.{1}", CvePersonal.ToString, FileExtension)
Next
If File.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & ".jpg") Then
ImgPersonal.ImageUrl = $"/Empresas/{UsuarioActual.CveEmpresa}/RH/Personal/{CvePersonal}.jpg?version={Now}"
End If
UpImage.Update()
TxtCargaImg.Text = "[]"
UpAddArchivo.Update()
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchvivo"))

View File

@@ -1698,9 +1698,9 @@ Partial Class Clientes
Return Retorno
End Function
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1, Optional TipoDocto As String = "-1")
Dim ObjClientes As New ClsClientes()
If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then
If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero, TipoDocto:=TipoDocto) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
'Carga Generales
LtlCantidad.Text = ObjClientes.DtResultados.Rows(0)("CountTotal").ToString.FormatoNumero(0)
@@ -1894,10 +1894,10 @@ Partial Class Clientes
Protected Sub BtnVerMasVentas_Click(sender As Object, e As EventArgs)
If BtnVerMasVentas.Text = "Ver Más" Then
CargaHistorial(-1)
CargaHistorial(-1, TipoDocto:=RblTipo.SelectedValue)
BtnVerMasVentas.Text = "Ver Menos"
Else
CargaHistorial(21)
CargaHistorial(21, TipoDocto:=RblTipo.SelectedValue)
BtnVerMasVentas.Text = "Ver Más"
End If
End Sub
@@ -5426,26 +5426,7 @@ Partial Class Clientes
#Region "M E T O D O S "
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged
If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then
Dim tmp As DataTable = DTHistorialVentas.FiltraParametros($"TipoDocto = '{RblTipo.SelectedValue}'")
If tmp.Rows.Count > 0 Then
Dim Totales As DataRow = tmp.NewRow
Totales("SubTotal") = tmp.SUM("SubTotal")
Totales("Total") = tmp.SUM("Total")
Totales("Descuento") = tmp.SUM("Descuento")
Totales("Amortizacion") = tmp.SUM("Amortizacion")
Totales("MAX_Total") = tmp.MAX("MAX_Total")
Totales("AVG_Total") = tmp.AVG("AVG_Total")
Totales("MIN_Total") = tmp.MIN("MIN_Total")
Totales("CountTotal") = tmp.COUNT("CountTotal")
tmp.Rows.InsertAt(Totales, 0)
End If
GVHistorial.DataSource = tmp
ElseIf DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue = "-1" Then
GVHistorial.DataSource = DTHistorialVentas
End If
GVHistorial.DataBind()
CargaHistorial(TipoDocto:=RblTipo.SelectedValue)
End Sub
Private Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged
CargaCotizaciones(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) 'listo

View File

@@ -261,7 +261,7 @@
<asp:UpdatePanel ID="UPVentas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Cobrar Pendientes"
DataKeyNames="TipoDocto,CveVenta,CveCliente,SerieFolio,Original,SubTotal,IVA,IEPS,RetIVA,RetISR,Num3,CveSubProyecto,CveMoneda,Saldo,TipoCambio, RFC,UUID,Fecha,PorcentajeIVA,DescuentoProntoPago"
DataKeyNames="TipoDocto,CveVenta,CveCliente,SerieFolio,Original,SubTotal,IVA,IEPS,RetIVA,RetISR,Num3,CveSubProyecto,CveMoneda,Saldo,TipoCambio, RFC,UUID,Fecha,PorcentajeIVA,DescuentoProntoPago,CveTipoRetencion"
CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>

View File

@@ -800,7 +800,7 @@ Partial Class Ventas_ClientesAbonar
'inserto las ventas que voy a pagar
For Each gvr As GridViewRow In GvCxC.Rows
If gvr.FCCheckBox("Chk").Checked Then
Dim ObjFactura As Modelos.Factura
Dim ObjFactura As Modelos.Factura = Nothing
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
ObjFactura = New Modelos.Factura(UsuarioActual, gvr.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa)
@@ -905,7 +905,7 @@ Partial Class Ventas_ClientesAbonar
Case 8 'Ret IVA x Trasladar
If EsAnticipoEspecial Then Exit Select
If ObjFactura IsNot Nothing AndAlso ObjFactura.CveTipoRetencion = 4 Then
If gvr.DataKey("CveTipoRetencion").ToEntero = 4 Then
Exit Select
End If
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
@@ -954,7 +954,7 @@ Partial Class Ventas_ClientesAbonar
Case 313 'Ret Iva Servicios
If EsAnticipoEspecial Then Exit Select
If ObjFactura IsNot Nothing AndAlso ObjFactura.CveTipoRetencion = 4 Then
If gvr.DataKey("CveTipoRetencion").ToEntero = 4 Then
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
importeMX = ImporteMovimiento
@@ -1069,7 +1069,7 @@ Partial Class Ventas_ClientesAbonar
If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}"
Case 62 'Ret IVA Trasladado
If EsAnticipoEspecial Then Exit Select
If ObjFactura IsNot Nothing AndAlso ObjFactura.CveTipoRetencion = 4 Then
If gvr.DataKey("CveTipoRetencion").ToEntero = 4 Then
Exit Select
End If
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
@@ -1119,7 +1119,7 @@ Partial Class Ventas_ClientesAbonar
Case 314 'Ret Iva Servicios Traslado
If EsAnticipoEspecial Then Exit Select
If ObjFactura IsNot Nothing AndAlso ObjFactura.CveTipoRetencion = 4 Then
If gvr.DataKey("CveTipoRetencion").ToEntero = 4 Then
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago
importeMX = ImporteMovimiento
@@ -1282,26 +1282,73 @@ Partial Class Ventas_ClientesAbonar
CveCuenta = UsuarioActual.Empresa.CveCuentaIEPSTrasladado
Case 64 'Ganancia
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
Dim CveMonedaVenta As Integer = gvr.DataKey("CveMoneda").ToEntero
Dim tImporteVenta, tImportePago As Decimal
Dim Diferencia As Decimal = 0
ImporteMovimiento = 0
tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
Diferencia = Math.Round(Diferencia, 2)
If CveMonedaVenta = 1 And CveMoneda <> 1 Then
'factura pesos, pago en dolares
tImporteVenta = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion).RoundSQL
tImportePago = (((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVenta / tipoCambioPago).RoundSQL * tipoCambioPago).RoundSQL
ElseIf CveMonedaVenta <> 1 And CveMoneda <> 1 Then
'factura dolares, pago en dolares
tImporteVenta = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion).RoundSQL
tImportePago = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago).RoundSQL
ElseIf CveMonedaVenta <> 1 And CveMoneda = 1 Then
'factura dolares, pago en pesos
tImporteVenta = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion).RoundSQL
tImportePago = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago).RoundSQL
End If
If tImporteVenta <> tImportePago Then
If tImporteVenta < tImportePago Then
ConceptoContable = 64
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
TipoMovimiento = True
'CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
Else
ConceptoContable = 65
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
TipoMovimiento = False
' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
End If
Diferencia = tImporteVenta - tImportePago
End If
' si tiene funcionalidad para que tome el TC de pago, que solo afecta a los impuestos
If FuncionalidadFluctuacionImpuestos Then
Dim TCImpuestos As Decimal = tipoCambioPago
Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
Diferencia = Math.Round(Diferencia, 2)
End If
ImporteMovimiento = Math.Abs(Diferencia)
importeMX = ImporteMovimiento
'Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
'Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
'Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
'Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
'Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
'Diferencia = Math.Round(Diferencia, 2)
'' se considera, las diferencias, y no el tipo de cambio, por el caso de las fluctuaciones
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
If Diferencia < 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = Math.Abs(Diferencia)
importeMX = ImporteMovimiento
End If
'If Diferencia < 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
' ImporteMovimiento = Math.Abs(Diferencia)
' importeMX = ImporteMovimiento
'End If
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
'If tipoCambioPago > tipoCambioVentaDiferenciaCambiaria AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
@@ -1318,47 +1365,47 @@ Partial Class Ventas_ClientesAbonar
ImporteMovimiento = 0
End If
Case 65 'Perdida
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
'Case 65 'Perdida
' If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
' tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
' Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)
Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
Diferencia = Math.Round(Diferencia, 2)
'si la diferencia es negativa es pérdida, si es positiva es ganancia
If Diferencia > 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = Math.Abs(Diferencia)
importeMX = ImporteMovimiento
End If
' Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioVentaValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
' Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
' Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
' Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
' Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
' Diferencia = Math.Round(Diferencia, 2)
' 'si la diferencia es negativa es pérdida, si es positiva es ganancia
' If Diferencia > 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
' ImporteMovimiento = Math.Abs(Diferencia)
' importeMX = ImporteMovimiento
' End If
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
'If tipoCambioPago < tipoCambioVentaDiferenciaCambiaria AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
' ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioVentaDiferenciaCambiaria) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
' ImporteMovimiento -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
' ImporteMovimiento += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos)
' ImporteMovimiento += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
' ImporteMovimiento -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
' ImporteMovimiento = Math.Abs(Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero))
' importeMX = ImporteMovimiento
' 'ElseIf tipoCambioPago > tipoCambioVenta AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
' ' ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - (Math.Abs(Math.Round(gvr.FCTextBox("TxtAbonar").Text.ToDecimal / tipoCambioPago, 2)) * tipoCambioPago)
' ' 'ImporteMovimiento -= Math.Abs(Math.Round(((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el IVA
' ' 'ImporteMovimiento += Math.Abs(Math.Round(((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el RetIVA
' ' 'ImporteMovimiento += Math.Abs(Math.Round(((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el RetISR
' ' 'ImporteMovimiento -= Math.Abs(Math.Round(((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el IEPS
' ' ImporteMovimiento = ImporteMovimiento
' ' importeMX = ImporteMovimiento
'End If
CveSubProyectoContabilizar = CveSubProyecto
Else
ImporteMovimiento = 0
End If
' '' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
' 'If tipoCambioPago < tipoCambioVentaDiferenciaCambiaria AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
' ' ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioVentaDiferenciaCambiaria) - (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta
' ' ImporteMovimiento -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
' ' ImporteMovimiento += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos)
' ' ImporteMovimiento += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
' ' ImporteMovimiento -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVentaDiferenciaCambiaria) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
' ' ImporteMovimiento = Math.Abs(Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero))
' ' importeMX = ImporteMovimiento
' ' 'ElseIf tipoCambioPago > tipoCambioVenta AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
' ' ' ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - (Math.Abs(Math.Round(gvr.FCTextBox("TxtAbonar").Text.ToDecimal / tipoCambioPago, 2)) * tipoCambioPago)
' ' ' 'ImporteMovimiento -= Math.Abs(Math.Round(((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el IVA
' ' ' 'ImporteMovimiento += Math.Abs(Math.Round(((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el RetIVA
' ' ' 'ImporteMovimiento += Math.Abs(Math.Round(((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el RetISR
' ' ' 'ImporteMovimiento -= Math.Abs(Math.Round(((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta))) 'Añadimos la diferencia de ganancia en el IEPS
' ' ' ImporteMovimiento = ImporteMovimiento
' ' ' importeMX = ImporteMovimiento
' 'End If
' CveSubProyectoContabilizar = CveSubProyecto
' Else
' ImporteMovimiento = 0
' End If
Case 78 'Otros Ingresos
If ChkAjusteOI.Checked Then
@@ -1494,7 +1541,7 @@ Partial Class Ventas_ClientesAbonar
MsgError = "No se pudo insertar la póliza"
End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 204, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancariaComplementaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), CveCuenta:=CveCuentaBancariaComplementaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 204, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancariaComplementaria, -1, CveIE, -1, -1, -1, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), CveCuenta:=CveCuentaBancariaComplementaria, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then
MsgError = "No se pudo insertar la póliza"
End If
Else

File diff suppressed because it is too large Load Diff

View File

@@ -4334,6 +4334,7 @@ Partial Class Ventas
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") AndAlso GvRemisiones.Rows.Count > 0 Then
ChkDevAlm.Checked = True
ChkDevAlm.Enabled = False
LiDevolucionAlmacen.Visible = False
End If
End If
@@ -5802,8 +5803,13 @@ Partial Class Ventas
If UsuarioActual.CveEmpresa = 119 Then
e.Row.FCTextBox("TxtCantidad").Enabled = False
End If
'e.Row.FCDropDownList("DdlClasificacion").Enabled = False
'e.Row.FCDropDownLost("DdlPS").Enabled = False
'cuando ya tiene una salida, no se puede cambiar el producto
If e.Row.DBCampo("CantidadInventario").ToDouble > 0 Then
e.Row.FCDropDownList("DdlClasificacion").Enabled = False
e.Row.FCDropDownLost("DdlPS").Enabled = False
e.Row.FCDropDownLost("DdlPS").ddlWS.Attributes.Add("disabled", "disabled")
End If
e.Row.FCTextBox("TxtTiempoEntrega").Enabled = False
e.Row.FCDropDownList("DdlProyecto").Enabled = False
@@ -5948,6 +5954,7 @@ Partial Class Ventas
If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
Dim CvePS As Integer = DatarowPS("CvePS").ToString.ToEntero
Dim CveUM As Integer = DatarowPS("CveUM").ToString.ToEntero
Dim CveTipoPS As Integer = DatarowPS("CveTipoPS").ToString.ToEntero
CantidadInventario = GvPS.Rows(e.RowIndex).DataKey("CantidadInventario").ToString.ToDecimal
@@ -5962,7 +5969,7 @@ Partial Class Ventas
Dim ObjInventarios As New ClsInventarios
Dim Existencia As Decimal
If ValidaExistencia Then
Existencia = ObjInventarios.GetExistenciasPS(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
Existencia = ObjInventarios.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1)
End If
Dim Costo As Decimal = ObjInventarios.GetCostoPS(CvePS, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero, CveTipoAlmacen:=1)
@@ -8770,10 +8777,10 @@ Partial Class Ventas
'Try
'Obj.SetSubProyecto(Me)
Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
If Timbre.Comprobante.LugarExpedicion = "" Then
Dim aa As String = "no se guardo lugar de expedicion"
aa.GuardaLog()
End If
If Timbre.Comprobante.LugarExpedicion = "" Then
Dim aa As String = "no se guardo lugar de expedicion"
aa.GuardaLog()
End If
'Catch ex As Exception
'End Try
@@ -10935,7 +10942,7 @@ Partial Class Ventas
'REFACTURACION CON PAGOS, DEBE CANCELAR SALDOS DEL DOCUMENTO ANTERIOR Y TRASPASAR PAGOS AL NUEVO
If ModalidadRefacturacion = 2 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso ObjFactura.NuevaFactura = 1 Then
If Not ObjConta.TraspasarSaldosPrePolizasRefacturacion(ObjFacturaNC.CveVenta, ObjFactura.CveVenta, ObjFactura.CvePrePoliza, CvePlantilaPoliza, UsuarioActual.CveEmpresa) Then
ErrorList.Add("Ocurrió un error al agregar la bitacora de Póliza Virtual.")
ErrorList.Add("Ocurrió un error al traspasos saldos en refacturación")
End If
End If
@@ -11076,7 +11083,7 @@ Partial Class Ventas
CveConceptoAlmacen = 18
End If
Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEntero
Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEntero()
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoAlmacen, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Vta/E1")
If CveMovimientoInventario <= 0 Then
@@ -11248,7 +11255,6 @@ Partial Class Ventas
If factura.TipoDocto.Contiene("Ing", "Egs", "OP", "Com") Then
'Dim ObjAC As New ClsContPAQi(UsuarioActual.Empresa) : ObjAC.IniciaTransacSQL()
Dim IDPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, factura)
If IDPoliza.IdPoliza > 0 Then
@@ -19197,49 +19203,56 @@ Partial Class Ventas
CancelarRefacturada()
End If
CreaObjetosVenta(EsCancelacion:=True)
Dim ObjFacturaCancelacion As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=True)
Try
Dim resp As Modelos.Factura.MCancelacionVentaMensaje = Nothing
Dim resp As Modelos.Factura.MCancelacionVentaMensaje = Nothing
If ObjFacturaCancelacion IsNot Nothing AndAlso ObjFacturaCancelacion.CveVenta > 0 Then
If ObjFactura IsNot Nothing AndAlso ObjFactura.CveVenta > 0 Then
If EsRefacturacion Then
resp = ObjFacturaCancelacion.CancelarPorRefacturacion()
Else
Dim ListaRemisionesCancelar As New List(Of Integer)
If ChkCanRem.Checked Then
For Each Gvr As GridViewRow In GvCancelarRemisiones.Rows
If Gvr.FCCheckBox("ChkCancelarRemision").Checked Then
ListaRemisionesCancelar.Add(Gvr.DataKey("CveVenta").ToEntero)
End If
Next
End If
If EsRefacturacion Then
resp = ObjFactura.CancelarPorRefacturacion()
Else
Dim ListaRemisionesCancelar As New List(Of Integer)
If ChkCanRem.Checked Then
For Each Gvr As GridViewRow In GvCancelarRemisiones.Rows
If Gvr.FCCheckBox("ChkCancelarRemision").Checked Then
ListaRemisionesCancelar.Add(Gvr.DataKey("CveVenta").ToEntero)
End If
Next
ObjFacturaCancelacion.CveAlmacenDevolucion = CveAlmacenDevolucion
resp = ObjFacturaCancelacion.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar)
End If
ObjFactura.CveAlmacenDevolucion = CveAlmacenDevolucion
resp = ObjFactura.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar)
End If
If resp.CveEstatus = 5 AndAlso Not EsRefacturacion Then
Alert(resp.Mensaje, resp.TipoMensaje, JSBtnAceptar:="BtnEnviarMailCancelacion();", TextoConfirmacion:="&nbsp;&nbsp;&nbsp;&nbsp;Si&nbsp;&nbsp;&nbsp;&nbsp;", TextoCancelacion:="&nbsp;&nbsp;&nbsp;&nbsp;<a onclick='Recargar()'>No</>&nbsp;&nbsp;&nbsp;&nbsp;")
Else
If EsRefacturacion Then
If resp.CveEstatus = 20 Then
Response.Redirect($"/Ventas/RepCancelacionesPorRespuesta.aspx?CveVenta={CveVenta}")
ElseIf resp.CveEstatus.Contiene(4, 5) Then
Response.Redirect($"Ventas.aspx?CveDevolucion={CveVenta}&NuevaFactura=1")
If resp.CveEstatus = 5 AndAlso Not EsRefacturacion Then
Alert(resp.Mensaje, resp.TipoMensaje, JSBtnAceptar:="BtnEnviarMailCancelacion();", TextoConfirmacion:="&nbsp;&nbsp;&nbsp;&nbsp;Si&nbsp;&nbsp;&nbsp;&nbsp;", TextoCancelacion:="&nbsp;&nbsp;&nbsp;&nbsp;<a onclick='Recargar()'>No</>&nbsp;&nbsp;&nbsp;&nbsp;")
Else
If EsRefacturacion Then
If resp.CveEstatus = 20 Then
ObjFacturaCancelacion.Dispose()
Response.Redirect($"/Ventas/RepCancelacionesPorRespuesta.aspx?CveVenta={CveVenta}")
ElseIf resp.CveEstatus.Contiene(4, 5) Then
ObjFacturaCancelacion.Dispose()
Response.Redirect($"Ventas.aspx?CveDevolucion={CveVenta}&NuevaFactura=1")
Else
Alert(resp.Mensaje, resp.TipoMensaje, JSBtnAceptar:="BtnRefrescarPagina();")
End If
Else
Alert(resp.Mensaje, resp.TipoMensaje, JSBtnAceptar:="BtnRefrescarPagina();")
End If
Else
Alert(resp.Mensaje, resp.TipoMensaje, JSBtnAceptar:="BtnRefrescarPagina();")
End If
End If
ObjFactura.CveAlmacen = -1
Else
Alert("Ocurrió un error al generar la cancelación", TipoMensaje.MsgError)
End If
ObjFacturaCancelacion.CveAlmacen = -1
Else
Alert("Ocurrió un error al generar la cancelación", TipoMensaje.MsgError)
End If
Catch ex As Exception
OnError("Ocurrío un error al cancelar", ex)
End Try
ObjFacturaCancelacion.Dispose()
UpEstatus.Update()
@@ -21948,14 +21961,14 @@ Partial Class Ventas
If UltimoRenglon = DtImpuestos.Rows.Count Then
'ajusta 5 centavos de diferencia
If Acumulado12 <> AcumuladoNC And Math.Abs(Acumulado12 - AcumuladoNC) <= 0.05 Then
Ajuste = Acumulado12 - AcumuladoNC
Ajuste = (Acumulado12 - AcumuladoNC)
End If
End If
UltimoRenglon += 1
AgregaTempDT(TmpDT, DrPS("CvePS").ToString.ToEntero, DrPS("PS").ToString, DrPS("Codigo").ToString, DrPS("PSCodigo").ToString, DrPS("CveTipoPS").ToString.ToEntero, DrPS("Inv_CveMetodoInventario").ToString.ToEntero,
DrPS("CveUM").ToString.ToEntero, DrPS("UnidadMedida").ToString, DrPS("CveClasificacion").ToString.ToEntero, DrPS("Clasificacion").ToString, CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
TxtNCObservaciones.Text.Trim, 1, Dr("ImportePU").ToString.ToDecimal + Ajuste, Dr("PorcentajeIVA").ToString.ToDecimal, Dr("ImporteIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("ImporteRetIVA").ToString.ToDecimal,
Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("ImporteRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("ImporteIEPS").ToString.ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString.ToDecimal, "", "", -1, -1,
Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("ImporteRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("ImporteIEPS").ToString.ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString.ToDecimal(), "", "", -1, -1,
DrPS("SATClavePS").ToString, DrPS("SATClaveUnidadMedida").ToString, -1, -1, -1, -1, -1, -1)
Next
@@ -22067,7 +22080,7 @@ Partial Class Ventas
'codigo para ajuste de centavo, si el importe total no cuadra con los totales
Dim difTmp As Decimal = Importe - importeNC
If Math.Abs(difTmp) >= 0.01 Then
If Math.Abs(difTmp) > 0.00D Then
'asusto la diferencia en el último concepto
Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString.ToDecimal + difTmp
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal") = ImporteAjustado
@@ -24887,6 +24900,7 @@ Partial Class Ventas
Next
TxtImportesRemisionesNC.Text = TotalRemNCAplicado.FormatoNumero
TxtNCImporte.Text = TotalRemNCAplicado.FormatoNumero
UpModalRemisionesNC.Update()
UpAplicarNC.Update()