This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2024-12-05 18:14:31 -07:00
20 changed files with 427 additions and 449 deletions

View File

@@ -202,7 +202,8 @@ Public Class ClsContratos
Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1,
Optional CveTipoContrato As Integer = -1,
Optional FechaInicioIngreso As DateTime = MinFecha,
Optional FechaFinIngreso As DateTime = MaxFecha) As Boolean
Optional FechaFinIngreso As DateTime = MaxFecha,
Optional EsPresupuestal As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Con_ContratosReporteGet")
@@ -218,6 +219,7 @@ Public Class ClsContratos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaInicioIngreso", SqlDbType.DateTime).Value = FechaInicioIngreso
.Add("@FechaFinIngreso", SqlDbType.DateTime).Value = FechaFinIngreso
.Add("@EsPresupuestal", SqlDbType.Int).Value = EsPresupuestal
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -521,9 +521,9 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
If Not CveCliente > 0 Then
CveCliente = -1
End If
'no se consideran, los presupuestales
If ObjContratos.GetContratosReporte(usuarioActual_.CveEmpresa, FI.ToString.ToDate, FF.ToString.ToDate, CveCliente:=CveCliente, CveTipoAF:=CveTipoActivoFijo,
CveTipoContrato:=34, CveEstatus:=CveContratoEstatus) Then
CveTipoContrato:=34, CveEstatus:=CveContratoEstatus, EsPresupuestal:=0) Then
'CveTipoAF
'CveChofer, CveChofer2

View File

@@ -1,4 +1,4 @@
Option Explicit On
'{Option Explicit On
Option Strict On
Imports System.Data
@@ -14,9 +14,6 @@ Imports System.Data.SqlClient
Imports ClsPaginas
Imports Microsoft.Owin.Security.Provider
Partial Class Compras_Compras
Inherits ClsPaginas
@@ -9364,11 +9361,55 @@ Partial Class Compras_Compras
End If
End If
If (NumeroReembolsoOriginal.Trim <> TxtRembolsoNumero.Text.Trim) Then
'NOTA. si hay un cambio en el reembolso, puede tener estas consideraciones.
'1. no tenía comprobación y se ocupa relacionar, se deberá validar que no tenga pagos contabilizados
'2. se está cambiando de comprobación
'3. se está quitando la relación de una comprobación
If (TxtRembolsoNumero.Text.Trim.Length > 0 AndAlso IdPoliza <= 0) AndAlso (NumeroReembolsoOriginal.Trim <> TxtRembolsoNumero.Text.Trim) Then
If (TxtRembolsoNumero.Text.Trim.Length > 0) Then
'valida.
If NumeroReembolsoOriginal = "" Then ' se asignará a una nueva comprobación
Dim CvePersonalVal As Integer = -1
Dim CveCajaChicaVal As Integer = -1
Dim tienePagoContabilizado As Boolean = False
If RblRembolso.SelectedValue.ToEntero = 1 Then
CvePersonalVal = DdlRembolsoPersonal.SelectedValue.ToEntero
Else
CveCajaChicaVal = DdlRembolsoCajaChica.SelectedValue.ToEntero
End If
If ObjCompra.GetComprobacionPagosContabilizados(CvePersonalVal, CveCajaChicaVal, TxtRembolsoNumero.Text.Trim, UsuarioActual.CveEmpresa) Then
If ObjCompra.DtResultados IsNot Nothing AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
tienePagoContabilizado = True
End If
If tienePagoContabilizado Then
Alert($"No se puede actualizar el número de reembolso {TxtRembolsoNumero.Text}, ya tiene pagos contabilizados.", TipoMensaje.MsgAdvertencia)
Retorno = False
End If
'If objConta.GetPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa) Then
' Dim FolioPoliza As Integer = objConta.DtResultados.Rows(0)("FolioPoliza").ToString.ToEntero
' If FolioPoliza > 0 Then
' If Not objConta.ContabilizaDesContabilizaPrePoliza(CvePrePoliza, False, UsuarioActual.CveEmpresa) Then
' ErrorProceso = True
' End If
' End If
'End If
Else
Retorno = False
End If
End If
If Retorno Then
'CUANDO ES REEMBOLSO COMPROBACION Y CAJA CHICA
If UsuarioActual.CveEmpresa.Contiene(1, 119, 141, 172, 173, 174, 13, 83) AndAlso TxtRembolsoNumero.Text.Trim <> "" AndAlso (DdlRembolsoPersonal.SelectedValue.ToEntero > 0 Or DdlRembolsoCajaChica.SelectedValue.ToEntero > 0) Then
If UsuarioActual.CveEmpresa.Contiene(1, 119, 141, 172, 173, 174, 13, 83) AndAlso TxtRembolsoNumero.Text.Trim <> "" AndAlso (DdlRembolsoPersonal.SelectedValue.ToEntero > 0 OrElse DdlRembolsoCajaChica.SelectedValue.ToEntero > 0) Then
If ObjCompra.GetComprobacion(DdlRembolsoPersonal.SelectedValue.ToEntero, DdlRembolsoCajaChica.SelectedValue.ToEntero, TxtRembolsoNumero.Text.Trim, UsuarioActual.CveEmpresa) Then
Dim CvePreComprobacion As Integer
If ObjCompra.DtResultados.Rows.Count = 0 Then
@@ -9385,23 +9426,29 @@ Partial Class Compras_Compras
'si ya existe, obtenemos la prepóliza
CvePreComprobacion = ObjCompra.DtResultados.FiltroPrimeroValor("CvePrePoliza").ToEntero
End If
ObjContabilidad.PrePolizaUnificacion(CvePreComprobacion, CvePrePoliza)
'cambiar la prepóliza
If Not ObjContabilidad.PrePolizaCompraCambiaReembolso(CvePreComprobacion, CvePrePoliza, CveCompra, UsuarioActual.CveEmpresa, 1) Then
Retorno = False
End If
' ObjContabilidad.PrePolizaUnificacion(CvePreComprobacion, CvePrePoliza)
End If
End If
End If
Else
'Actualizar PrePoliza Actual de Donde CveCompra = CveCompra poner CvePrePolizaOriginal
If Not ObjContabilidad.PrePolizaCompraCambiaReembolso(-1, CvePrePoliza, CveCompra, UsuarioActual.CveEmpresa, 2) Then
Retorno = False
End If
End If
End If
Else
Retorno = False
End If
Else
Alert("La compra no se puede actualizar debido a que los totales no son iguales, verifique sus cambios", TipoMensaje.MsgError)
End If
If Retorno AndAlso (CveRetIVAConceptoOriginal <> DdlRetIVAConcepto.SelectedValue.ToEntero OrElse CveRetISRConceptoOriginal <> DdlRetISRConcepto.SelectedValue.ToEntero) Then
@@ -9421,20 +9468,17 @@ Partial Class Compras_Compras
End If
If Retorno AndAlso Not validaNumeroReembolso(ObjCompra.IniciaTransacSQL()) Then
Retorno = False
End If
'If Retorno AndAlso Not validaNumeroReembolso(ObjCompra.IniciaTransacSQL()) Then
' Retorno = False
' End If
Catch ex As Exception
Alert("Ocurrió un error al actualizar la compra", TipoMensaje.MsgError)
ObjCompra.RollBack()
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
Finally
If Retorno Then
If ObjContabilidad.MensajePolizaDescuadre IsNot Nothing AndAlso ObjContabilidad.MensajePolizaDescuadre.ToString <> "" Then
Alert(ObjContabilidad.MensajePolizaDescuadre.ToString)
@@ -9546,112 +9590,95 @@ Partial Class Compras_Compras
End Function
Private Function validaNumeroReembolso(ByRef transaccionSql As SqlTransaction) As Boolean
'Private Function validaNumeroReembolso(ByRef transaccionSql As SqlTransaction) As Boolean
Dim CvePersonalVal As Integer = -1
Dim CveCajaChicaVal As Integer = -1
' Dim CvePersonalVal As Integer = -1
' Dim CveCajaChicaVal As Integer = -1
If RblRembolso.SelectedValue.ToEntero = 1 Then
CvePersonalVal = DdlRembolsoPersonal.SelectedValue.ToEntero
Else
CveCajaChicaVal = DdlRembolsoCajaChica.SelectedValue.ToEntero
End If
' If RblRembolso.SelectedValue.ToEntero = 1 Then
' CvePersonalVal = DdlRembolsoPersonal.SelectedValue.ToEntero
' Else
' CveCajaChicaVal = DdlRembolsoCajaChica.SelectedValue.ToEntero
' End If
Dim objCompras As New ClsCompras(transaccionSql)
Dim objConta As New ClsContabilidad(transaccionSql)
' Dim objCompras As New ClsCompras(transaccionSql)
' Dim objConta As New ClsContabilidad(transaccionSql)
Dim tienePagoContabilizado As Boolean = False
Dim ErrorProceso As Boolean = False
' Dim tienePagoContabilizado As Boolean = False
' Dim ErrorProceso As Boolean = False
Dim CvePrePolizaReembolsoActual As Integer = CvePrePoliza
Dim CvePrePolizaReembolsoNuevo As Integer = -1
' Dim CvePrePolizaReembolsoActual As Integer = CvePrePoliza
' Dim CvePrePolizaReembolsoNuevo As Integer = -1
If TxtRembolsoNumero.Text.Trim.Length > 0 Then
' If TxtRembolsoNumero.Text.Trim.Length > 0 Then
If objCompras.GetComprobacion(CvePersonalVal, CveCajaChicaVal, TxtRembolsoNumero.Text.Trim, UsuarioActual.CveEmpresa) Then
' If objCompras.GetComprobacion(CvePersonalVal, CveCajaChicaVal, TxtRembolsoNumero.Text.Trim, UsuarioActual.CveEmpresa) Then
If objCompras.DtResultados.Rows.Count > 0 Then
CvePrePolizaReembolsoNuevo = objCompras.DtResultados.Rows(0)("CvePrePoliza").ToString.ToEntero
Else
' If objCompras.DtResultados.Rows.Count > 0 Then
' CvePrePolizaReembolsoNuevo = objCompras.DtResultados.Rows(0)("CvePrePoliza").ToString.ToEntero
' Else
Dim tConcepto As String = If(DdlRembolsoPersonal.SelectedValue.ToEntero > 0, DdlRembolsoPersonal.SelectedItem.Text, DdlRembolsoCajaChica.SelectedItem.Text)
' Dim tConcepto As String = If(DdlRembolsoPersonal.SelectedValue.ToEntero > 0, DdlRembolsoPersonal.SelectedItem.Text, DdlRembolsoCajaChica.SelectedItem.Text)
tConcepto = String.Format("{0}-{1}", tConcepto, TxtRembolsoNumero.Text.Trim)
' tConcepto = String.Format("{0}-{1}", tConcepto, TxtRembolsoNumero.Text.Trim)
CvePrePolizaReembolsoNuevo = objConta.AddPrePolizas("Compras Comproba", 1, 0, 0, 1, TxtFecha.Text.ToDate, tConcepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
' CvePrePolizaReembolsoNuevo = objConta.AddPrePolizas("Compras Comproba", 1, 0, 0, 1, TxtFecha.Text.ToDate, tConcepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not objCompras.AddComprobacion(DdlRembolsoPersonal.SelectedValue.ToEntero, DdlRembolsoCajaChica.SelectedValue.ToEntero, TxtRembolsoNumero.Text.Trim, CvePrePolizaReembolsoNuevo, UsuarioActual.CveEmpresa) > 0 Then
ErrorProceso = True
End If
' If Not objCompras.AddComprobacion(DdlRembolsoPersonal.SelectedValue.ToEntero, DdlRembolsoCajaChica.SelectedValue.ToEntero, TxtRembolsoNumero.Text.Trim, CvePrePolizaReembolsoNuevo, UsuarioActual.CveEmpresa) > 0 Then
' ErrorProceso = True
' End If
' End If
' End If
' If NumeroReembolsoOriginal = "" And TxtRembolsoNumero.Text.Trim.Length > 0 Then
End If
End If
' If objCompras.GetComprobacionPagosContabilizados(CvePersonalVal, CveCajaChicaVal, TxtRembolsoNumero.Text.Trim, UsuarioActual.CveEmpresa) Then
If NumeroReembolsoOriginal = "" And TxtRembolsoNumero.Text.Trim.Length > 0 Then
' If objCompras.DtResultados IsNot Nothing AndAlso objCompras.DtResultados.Rows.Count > 0 Then
' tienePagoContabilizado = True
' End If
If objCompras.GetComprobacionPagosContabilizados(CvePersonalVal, CveCajaChicaVal, TxtRembolsoNumero.Text.Trim, UsuarioActual.CveEmpresa) Then
' If tienePagoContabilizado Then
' Alert($"No se puede actualizar el número de reembolso {TxtRembolsoNumero.Text}, ya tiene pagos contabilizados.", TipoMensaje.MsgAdvertencia)
' Return False
' End If
If objCompras.DtResultados IsNot Nothing AndAlso objCompras.DtResultados.Rows.Count > 0 Then
tienePagoContabilizado = True
End If
' If objConta.GetPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa) Then
If tienePagoContabilizado Then
Alert($"No se puede actualizar el número de reembolso {TxtRembolsoNumero.Text}, ya tiene pagos contabilizados.", TipoMensaje.MsgAdvertencia)
Return False
End If
' Dim FolioPoliza As Integer = objConta.DtResultados.Rows(0)("FolioPoliza").ToString.ToEntero
' If FolioPoliza > 0 Then
' If Not objConta.ContabilizaDesContabilizaPrePoliza(CvePrePoliza, False, UsuarioActual.CveEmpresa) Then
' ErrorProceso = True
' End If
' End If
' End If
' Else
' ErrorProceso = True
' End If
' ElseIf NumeroReembolsoOriginal.Length > 0 And TxtRembolsoNumero.Text.Trim.Length > 0 Then
' 'cambiar de prepoliza la compra actual, de la prepoliza actual a la nueva
' If Not objConta.PrePolizaCompraCambiaReembolso(CvePrePolizaReembolsoNuevo, CvePrePoliza, CveCompra, UsuarioActual.CveEmpresa, 1) Then
' ErrorProceso = True
' End If
' End If
' Else
If objConta.GetPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa) Then
' If NumeroReembolsoOriginal.Length > 0 And TxtRembolsoNumero.Text.Trim.Length = 0 Then
' 'Actualizar PrePoliza Actual de Donde CveCompra = CveCompra poner CvePrePolizaOriginal
' If Not objConta.PrePolizaCompraCambiaReembolso(-1, CvePrePoliza, CveCompra, UsuarioActual.CveEmpresa, 2) Then
' ErrorProceso = True
' End If
' End If
Dim FolioPoliza As Integer = objConta.DtResultados.Rows(0)("FolioPoliza").ToString.ToEntero
' End If
If FolioPoliza > 0 Then
If Not objConta.ContabilizaDesContabilizaPrePoliza(CvePrePoliza, False, UsuarioActual.CveEmpresa) Then
ErrorProceso = True
End If
End If
End If
Else
ErrorProceso = True
End If
ElseIf NumeroReembolsoOriginal.Length > 0 And TxtRembolsoNumero.Text.Trim.Length > 0 Then
'cambiar de prepoliza la compra actual, de la prepoliza actual a la nueva
If Not objConta.PrePolizaCompraCambiaReembolso(CvePrePolizaReembolsoNuevo, CvePrePoliza, CveCompra, UsuarioActual.CveEmpresa, 1) Then
ErrorProceso = True
End If
End If
Else
If NumeroReembolsoOriginal.Length > 0 And TxtRembolsoNumero.Text.Trim.Length = 0 Then
'Actualizar PrePoliza Actual de Donde CveCompra = CveCompra poner CvePrePolizaOriginal
If Not objConta.PrePolizaCompraCambiaReembolso(-1, CvePrePoliza, CveCompra, UsuarioActual.CveEmpresa, 2) Then
ErrorProceso = True
End If
End If
End If
Return If(ErrorProceso, False, True)
End Function
' Return If(ErrorProceso, False, True)
'End Function
Private Sub MandaCorreoActualizacionDetalle()
Dim DTCorreos As New DataTable
Dim DTMovimientos As New DataTable
Dim strBody As New StringBuilder
@@ -9701,10 +9728,8 @@ Partial Class Compras_Compras
strBody.Append("<body>")
strBody.Append($"<p> Se realizo una actualización en los detalles de la compra <a href='{URlCompleta}' >{SerieFolioCompra}</a> del proveedor {HplProveedor.Text}</p>")
strBody.Append("</body>")
strBody.Append("</html>")
'' ENVIO DEL CORREO
Asunto = $"Actualizacion de Compra: {SerieFolioCompra} Proveedor: {HplProveedor.Text}"
ArrayCC = ""
@@ -9712,8 +9737,6 @@ Partial Class Compras_Compras
Dim Mail As New ClsSisMail()
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, ArrayCC)
End Sub
Private Function ComparaDatatables() As Boolean
@@ -9755,7 +9778,6 @@ Partial Class Compras_Compras
NumRow += 1
Next
Return True
End Function

View File

@@ -195,9 +195,7 @@ Partial Class Inventarios_CartaPorteManual
TxtFecha.Text = NowADS().ToShortDateString
CEFecha.EndDate = NowADS().AddDays(-1)
RVFecha.MaximumValue = NowADS().ToShortDateString
Folio = 0
CargaCombos()
CreaDT()
@@ -222,7 +220,6 @@ Partial Class Inventarios_CartaPorteManual
End If
'If UsuarioActual.Empresa.Funcionalidad(281).ToEntero = 1 Then
' TxtFecha.Enabled = False
@@ -233,7 +230,6 @@ Partial Class Inventarios_CartaPorteManual
End Sub
#Region "CARGA DATOS"
Protected Sub CreaDT()
Dim dt As New DataTable
@@ -247,8 +243,6 @@ Partial Class Inventarios_CartaPorteManual
dt.Columns.Add(column)
dt.Columns.Add("Cantidad", Type.GetType("System.Double"))
dt.Columns.Add("CveUM", Type.GetType("System.Int32"))
dt.Columns.Add("UnidadMedida")
@@ -265,8 +259,6 @@ Partial Class Inventarios_CartaPorteManual
dt.Columns.Add("Lote")
dt.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime"))
dt.Columns.Add("CveClasificacion", Type.GetType("System.Int32"))
dt.Columns.Add("EstatusExistencia")
@@ -285,14 +277,10 @@ Partial Class Inventarios_CartaPorteManual
dt.Columns.Add("Embalaje")
dt.Columns.Add("PesoKg", Type.GetType("System.Decimal"))
DtMovimientos = dt
CargaGvDatos()
End Sub
Private Sub CargaCombos()
'CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto, AplicaTodos:="")
@@ -307,17 +295,12 @@ Partial Class Inventarios_CartaPorteManual
' TxtFechaEntrega.Text = NowADS().ToShortDateString
TxtFechaLlegada.Text = NowADS().ToShortDateString
CargaPS()
CargarCamiones()
End Sub
Private Sub CargaPS()
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
DdlProducto2.setEsWebService(EsWS)
@@ -328,7 +311,12 @@ Partial Class Inventarios_CartaPorteManual
DdlProducto2.ddlWS.Attributes.Add("Data-onresult", "CargaExistenciaAlmacenes")
End If
Else
DdlProducto2.ddl.Items.Clear()
'Objeto.ddl.DataSource = GlobalDTProductosServicios(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion, AplicaParaVenta:=1, Estatus:=1)
DdlProducto2.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=-1, Estatus:=1, AplicaParaVenta:=-1)
DdlProducto2.ddl.DataBind()
DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
End If
End Sub

View File

@@ -2186,16 +2186,17 @@ Partial Class Inventarios_EntregaAlmacen
DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDecimal
DtDatos.Rows(Index)("CveSeccion") = gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero()
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
'Esto es por que
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
Dim DdlCaducidadProducto As DropDownList = gvr.FCDropDownList("DdlCaducidadProducto")
If DdlCaducidadProducto.SelectedValue <> "" AndAlso DdlCaducidadProducto.SelectedValue <> "|" Then
Dim ArrayCaducidad As String() = DdlCaducidadProducto.SelectedValue.Split("|"c)
Dim Lote As String = ArrayCaducidad(0)
Dim FechaCaducidad As String = ArrayCaducidad(1)
DtDatos.Rows(Index)("FechaCaducidad") = FechaCaducidad.ToDate
DtDatos.Rows(Index)("Lote") = Lote
End If
Else
DtDatos.Rows(Index)("FechaCaducidad") = gvr.FCTextBox("TxtCaducidad").Text.ToDate
DtDatos.Rows(Index)("Lote") = gvr.FCTextBox("TxtLote").Text

View File

@@ -108,24 +108,25 @@
<asp:GridView ID="GvT" Width="100%" runat="server" GridLines="None" BorderWidth="0" data-heighterror="330" data-freezecols="0" CssClass="table table-advance table-hover mysmallbtn ScrollAD Widthall"
ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False" OnRowDataBound="GvT_RowDataBound"
DataKeyNames="CveTraspasoSolicitud,Folio,Fecha,CveUsuario,CveAlmacenOrigen,CveAlmacenDestino,CveTrasladoEstatus,PermisoOrigen,PermisoDestino,TraspasoEstatus,AlmacenOrigen,AlmacenDestino,Nombre,CveMovimientoAlmacen,FolioMovimiento,CveMovimientoTransitorio,CveAlmacenTransitorio,CveMomientoEntrada,CveMovimientoRelacionado" >
DataKeyNames="CveTraspasoSolicitud,Folio,Fecha,CveUsuario,CveAlmacenOrigen,CveAlmacenDestino,CveTrasladoEstatus,PermisoOrigen,PermisoDestino,TraspasoEstatus,AlmacenOrigen,AlmacenDestino,Nombre,CveMovimientoAlmacen,FolioMovimiento,CveMovimientoTransitorio,CveAlmacenTransitorio,CveMovientoEntrada,CveMovimientoRelacionado" >
<Columns>
<asp:BoundField DataField="Folio" HeaderText="Folio" ItemStyle-Width="80px" />
<asp:BoundField DataField="AlmacenOrigen" HeaderText="Origen" ItemStyle-Width="200px" />
<asp:BoundField DataField="AlmacenDestino" HeaderText="Destino" ItemStyle-Width="200px" />
<asp:BoundField DataField="AlmacenOrigen" HeaderText="Origen" />
<asp:BoundField DataField="AlmacenDestino" HeaderText="Destino" />
<asp:BoundField DataField="Observaciones" HeaderText="Observaciones" />
<asp:BoundField DataField="Fecha" HeaderText="Fecha" ItemStyle-Width="90px" DataFormatString="{0:d}" />
<asp:BoundField DataField="Fecha" HeaderText="Fecha" ItemStyle-Width="80px" DataFormatString="{0:d}" />
<asp:BoundField DataField="Nombre" HeaderText="Solicitante" />
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Estatus" ItemStyle-Width="70px" >
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="70px" >
<ItemTemplate>
<asp:Label runat="server" ID="LblTraspasoEstatus" Width="70px" Height="15px" Text='<%# Eval("TraspasoEstatus") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="CveMovimientoAlmacen" DataNavigateUrlFormatString="~/Inventarios/EntradasSalidas.aspx?CveMovimiento={0} "
Target="_blank" ItemStyle-Width="5%" HeaderText="Movimiento" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="FolioMovimiento" />
Target="_blank" HeaderText="Movimiento" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Center" DataTextField="FolioMovimiento" />
<asp:BoundField DataField="RecibidaSolicitada" HeaderText="Cantidades" ItemStyle-HorizontalAlign="Right"/>
<%--<asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderText="Opciones" ItemStyle-Width="100px">
<ItemTemplate>
<div class="row">

View File

@@ -758,7 +758,7 @@ Partial Class Inventarios_TrasladoSolicitud
Dim CveMovimientoTransitorio As Integer = e.Row.DataKey("CveMovimientoTransitorio").ToEntero
Dim CveAlmacenTransitorio As Integer = e.Row.DataKey("CveAlmacenTransitorio").ToEntero
Dim CveMomientoEntrada As Integer = e.Row.DataKey("CveAlmacenTransitorio").ToEntero ' Este es el movmiento de recepcion de traspaso
'Dim CveMovimientoEntrada As Integer = e.Row.DataKey("CveAlmacenTransitorio").ToEntero ' Este es el movmiento de recepcion de traspaso
e.Row.FCLinkButton("LnkMostrarTraspaso").Visible = True

View File

@@ -124,7 +124,7 @@ Partial Class Portal_PortalProveedor
#Region "C A R G A - D A T O S"
Protected Sub CargaDatos()
GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimero($"CveProveedor = {CveProveedor}")
Dim ObjProveedor As New ClsCompProveedores()
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", 1, UsuarioActual.CveEmpresa) Then
If ObjProveedor.DtResultados.Rows.Count > 0 Then
@@ -259,7 +259,7 @@ Partial Class Portal_PortalProveedor
Private Sub CargaBancos(SerieSucursal As String, SelectTop As Integer)
Dim ObjMovtos As New ClsMovimientos()
'CxC Activas
If ObjMovtos.GetProveedorBancos(CveProveedor, CveProveedorSucursal:=-1, SelectTop:=SelectTop) AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then
If ObjMovtos.GetProveedorBancos(CveProveedor, UsuarioActual.CveEmpresa, CveProveedorSucursal:=-1, SelectTop:=SelectTop) AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then
GvBancos.DataSource = ObjMovtos.DtResultados
BtnVerMasBancos.Visible = ObjMovtos.DtResultados.Rows.Count > 19
DtBancos = ObjMovtos.DtResultados

View File

@@ -33,11 +33,11 @@
<asp:UpdatePanel runat="server" ID="Updatos" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet light smmallpadding bordered" id="portlet19">
<div class="portlet light smallpadding bordered" id="portlet19">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Filtros</span>
<span class="caption-subject bold uppercase">Filtros<asp:Label ID="LblNumero" runat="server" Text=""></asp:Label></span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>

View File

@@ -87,6 +87,7 @@ Partial Class SessionesActivas
dtF.Rows.Add(row.ItemArray())
End If
Next
dtU.Dispose()
Dim GroupBy1 As String() = {"CveEmpresa", "Empresa"}
DdlEmpresa.DataSource = dtF.FiltraParametros("", "", {"CveEmpresa", "Empresa"})
@@ -94,6 +95,8 @@ Partial Class SessionesActivas
dtF = dtF.GroupByDT(filtros, "", {GroupBy1}, Nothing, Nothing,)
GVDatos.DataSource = dtF
GVDatos.DataBind()
LblNumero.Text = $" ({dtF.COUNT("CveUsuario", "CveUsuario > 0")})"
objUsuarios.Dispose()
End Sub
Protected Sub GVDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)

View File

@@ -379,10 +379,9 @@
</div>
</div>
<div class="row">
<label class="col-md-4">Es Presupuestal</label>
<label class="col-md-4">NO Requiere Unidad</label>
<div class="col-md-8">
<asp:CheckBox runat="server" ID="ChkEsPresupuestal" CssClass="make-switchsd" data-size="small" Checked="true" />
<asp:CheckBox runat="server" ID="ChkEsPresupuestal" Checked="true" />
</div>
</div>
</div>
@@ -419,8 +418,7 @@
<div class="col-md-12" style="text-align: center;">
<asp:UpdatePanel ID="UpPagos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" runat="server" visible="false" id="DVFactura">
<div class="row" runat="server" id="DVFactura">
<label class="col-md-2">Factura: </label>
<div class="col-md-3">
<asp:HyperLink runat="server" Text="" Target="_blank" id="HypRemision" CssClass="Texto"></asp:HyperLink>

View File

@@ -7,8 +7,6 @@ Imports System.IO
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class RepContratoDetalle
Inherits ClsPaginas
#Region "Propiedades"
@@ -279,18 +277,8 @@ Partial Class RepContratoDetalle
LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-light"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveContrato:{0}}});""> <i class=""fa fa-plus""'></i> Tarea</a>", CveContrato)
CargaEventoBitacora()
End If
If CveVentaRemision > 0 Then
DVFactura.Visible = True
ChkEsPresupuestal.Enabled = False
ChkEsPresupuestal.Checked = False
End If
End If
End Sub
Private Sub InicializaCombos()
'Lista Tipo AF
@@ -325,16 +313,12 @@ Partial Class RepContratoDetalle
DdlVendedor.Enabled = False
End If
End Sub
Private Sub CargaDatos()
CargaDatosContrato()
CargaDatosViajes()
'Información General
End Sub
Private Sub CargaDatosContrato()
@@ -440,7 +424,6 @@ Partial Class RepContratoDetalle
UpTabContainer.Update()
End Sub
#End Region
Protected Sub DdlUsuarioFiltroBoletos_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaDatosViajes()
@@ -478,8 +461,6 @@ Partial Class RepContratoDetalle
Filename = fileItem.filename
Next
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, String.Format(".{0}", FileExtension), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato) Then
If Filename <> "" Then
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}OI", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False)
@@ -499,7 +480,6 @@ Partial Class RepContratoDetalle
CargaEventoBitacora()
UPAddEventoBitacora.Update()
End Sub
Private Sub CargaEventoBitacora()
If CveContrato > 0 Then
@@ -515,8 +495,6 @@ Partial Class RepContratoDetalle
End If
End Sub
Protected Sub DownloadFile(ByVal sender As Object, ByVal e As EventArgs)
Dim filePath As String = String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, CType(sender, LinkButton).CommandArgument)
Dim Archivo As New System.IO.FileInfo(filePath)
@@ -578,8 +556,6 @@ Partial Class RepContratoDetalle
BtnDescargar.Visible = True
End If
End Sub
Public Function ObtenerUrlCompleta() As String
Dim Solicitud As HttpRequest = HttpContext.Current.Request
@@ -589,7 +565,6 @@ Partial Class RepContratoDetalle
url &= ":" & Solicitud.Url.Port
End If
url &= Solicitud.ApplicationPath
If Not url.EndsWith("/") Then
@@ -599,15 +574,12 @@ Partial Class RepContratoDetalle
Return url
End Function
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
Dim ArchivoUpdate As String = "-1"
Dim ErrorProceso As Boolean = False
Dim SeGeneroRemision As Boolean = False
Dim SerieFolioRemision As String = ""
If Session("FileExtension").ToString <> "" Then
'ArchivoUpdate = $"{CveContrato.ToString}.{ Session("FileExtension")}"
ArchivoUpdate = $".{Session("FileExtension").ToString}"
Else
@@ -617,7 +589,6 @@ Partial Class RepContratoDetalle
Dim ObjContratos As New ClsContratos
ObjContratos.IniciaTransacSQL()
If Not ObjContratos.UpdateContratos(CveContrato, TxtFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "",
DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, -1, ArchivoUpdate, "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkEsPresupuestal.Checked, TxtAnticipo.Text.ToDecimal, -1, TxtImporte.Text.ToDecimal,
DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=CveContratoTipo, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveContratosEstatus:=CveContratoEstatus, Observaciones:=TxtObservaciones.Text) Then
@@ -639,24 +610,24 @@ Partial Class RepContratoDetalle
End If
End If
If Not ErrorProceso AndAlso Not CveVentaRemision > 0 AndAlso ChkEsPresupuestal.Checked = False Then
'CveVentaRemision
Dim ObsRemisionPartida As String = $"{DdlTipoAF.SelectedItem.Text}-{ TxtDescripcion.Text}-{TxtFolio.Text}"
'If Not ErrorProceso AndAlso Not CveVentaRemision > 0 AndAlso ChkEsPresupuestal.Checked = False Then
' 'CveVentaRemision
' Dim ObsRemisionPartida As String = $"{DdlTipoAF.SelectedItem.Text}-{ TxtDescripcion.Text}-{TxtFolio.Text}"
Dim Respuesta As New RespuestaFacturacion()
Dim CvePS As Integer = 907784
Respuesta = GeneraRemision(CveContrato, ObsRemisionPartida, TxtImporte.Text.ToDecimal, CvePS, ObjContratos.IniciaTransacSQL, DdlSubProyecto.SelectedValue.ToEntero)
' Dim Respuesta As New RespuestaFacturacion()
' Dim CvePS As Integer = 907784
' Respuesta = GeneraRemision(CveContrato, ObsRemisionPartida, TxtImporte.Text.ToDecimal, CvePS, ObjContratos.IniciaTransacSQL, DdlSubProyecto.SelectedValue.ToEntero)
If Respuesta.CveVenta > 0 Then
CveVentaRemision = Respuesta.CveVenta
SerieFolioRemision = Respuesta.SerieFolio
ErrorProceso = False
SeGeneroRemision = True
Else
ErrorProceso = True
Alert("se presento un error al generar la remisión", TipoMensaje.MsgAdvertencia)
End If
End If
' If Respuesta.CveVenta > 0 Then
' CveVentaRemision = Respuesta.CveVenta
' SerieFolioRemision = Respuesta.SerieFolio
' ErrorProceso = False
' SeGeneroRemision = True
' Else
' ErrorProceso = True
' Alert("se presento un error al generar la remisión", TipoMensaje.MsgAdvertencia)
' End If
'End If
If Not ErrorProceso Then
ObjContratos.Commit()

View File

@@ -120,7 +120,7 @@
<label class="col-md-1 truncate ">Centro de Costos</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlCentroCostos" data-text="Todos" AppendDataBoundItems="true"
DataTextField="" DataValueField="" CssClass="form-control ddlFiltros input-sm select2me"
DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control ddlFiltros input-sm select2me"
Style="width: 100%;" runat="server">
</asp:DropDownList>
</div>
@@ -204,6 +204,11 @@
<asp:Literal ID="LtlFechaFinal" runat="server" Text='<%# Eval("FechaFinal", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Rem/Invoice" >
<ItemTemplate>
<asp:HyperLink ID="HplRem" runat="server" NavigateUrl='<%#Eval("CveVentaRemision", "/Ventas/Ventas.aspx?CveVenta={0}") %>' Text='<%# Eval("RemisionSerieFolio") %>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<%-- Columnas Ocultas --%>
<asp:TemplateField HeaderText="Chofer 1" Visible="false">
@@ -223,6 +228,7 @@
<asp:Literal ID="LtUnidad" runat="server" Text='<%# Eval("NombreAF") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="F. Ingreso" >
<ItemTemplate>
<asp:Literal ID="LtFingreso" runat="server" Text='<%# Eval("FechaIng","{0:d}") %>'></asp:Literal>
@@ -508,15 +514,12 @@
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="row my-1">
<label class="col-md-4">Es Presupuestal</label>
<div class="col-md-8">
<asp:CheckBox runat="server" ID="ChkEsPresupuestal" CssClass="make-switchsd" data-size="small" Checked="true" />
<label class="col-md-6">NO Requiere Unidad</label>
<div class="col-md-6">
<asp:CheckBox runat="server" ID="ChkEsPresupuestal" />
</div>
</div>
</div>
</div>
</div>

View File

@@ -51,7 +51,7 @@ Partial Class ListadoContratos
DdlEstatus.DataBind()
DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoModal)
CargarCentrosDeCosto(Nothing, DdlCentroCostos, Nothing, LblSubProyectoModal)
DdlSubProyectoModal.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
DdlSubProyectoModal.DataBind()
@@ -180,7 +180,7 @@ Partial Class ListadoContratos
End If
Anexo.Text = ""
If ErrorProceso = False AndAlso Not ChkEsPresupuestal.Checked Then
If ErrorProceso = False Then
Dim ObsRemisionPartida As String = $"{DdlTipoAF.SelectedItem.Text}-{ TxtDescripcion.Text}-{LbFolio.Text}"

View File

@@ -296,7 +296,7 @@
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
<div class="row" style="margin-right: 10px; margin-top: 8px;" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
@@ -317,7 +317,6 @@
<HeaderTemplate>
Fecha<br />
Salida
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaI" runat="server" Text='<%# Eval("FechaInicial", "{0:dd/MM/yyyy HH:mm}") %>'></asp:Literal>
@@ -775,12 +774,15 @@
<script >
var chartHeader;
var chartBody;
function cargaDiagramaGrantAMC4(data, categorias, TipoVista) {
try {
// Si ya hay gráficos, eliminarlos para crear nuevos
if (chartHeader) {
chartHeader.dispose();
@@ -1009,9 +1011,10 @@
chartHeader.validateLayout();
});
}
catch (error) {
console.error(error);
}
}
function cargaDiagramaGrant(data, categorias, TipoVista) {

View File

@@ -189,27 +189,14 @@ Partial Class RepContratosCalendario
End Sub
Private Sub CargaCronograma(Optional TipoVista As Integer = -1)
If DtAvance IsNot Nothing Then
Dim strData As New StringBuilder
Dim strAFData As New StringBuilder
'Dim separator As String = ""
'Dim str As New StringBuilder()
'str.AppendLine("datosGant=[")
Dim StrFiltro As String = ""
If DdlTipoUnidad.SelectedValue.ToEntero > 0 Then StrFiltro = " AND CveTipoActivoFijo = " & DdlTipoUnidad.SelectedValue
Dim DtUnidades As DataTable = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltraParametros("Codigo <> '' AND MedidaVehicular IN (2,3) " & StrFiltro, Orderby:=" TipoActivoFijo ASC, CodigoNumeroOrden ASC", DistinctColumns:={"Codigo", "CveActivoFijo"})
Dim jsonData As New JArray()
Dim jsonCategorias As New JArray()
Dim random = New Random()
'DATOS
@@ -237,11 +224,11 @@ Partial Class RepContratosCalendario
Dim FF As Date = Row("FechaFinal").ToString.ToDate
strData.AppendLine("{")
strData.AppendLine($"category: '{Row("CodigoAF").ToString}',")
strData.AppendLine($"category: '{Row("CodigoAF").ToString.Replace("'", "")}',")
strData.AppendLine($"fromDate: '{FI.ToString("yyyy-MM-dd HH:mm:ss")}',")
strData.AppendLine($"toDate: '{FF.ToString("yyyy-MM-dd HH:mm:ss")}',")
'strData.AppendLine($"columnSettings: {{fill: '{String.Format("#{0:X6}", random.Next(16777216))}'}},")
strData.AppendLine($"unidad: '{Row("NombreAF").ToString}',")
strData.AppendLine($"unidad: '{Row("NombreAF").ToString.Replace("'", "")}',")
strData.AppendLine($"color: am4core.color('" & String.Format("#{0:X6}", random.Next(16777216)) & "'),")
strData.AppendLine($"cveContrato: {Row("CveContrato").ToString.ToEntero},")
strData.AppendLine($"contrato: '{Row("NumeroContrato").ToString}',")
@@ -249,7 +236,6 @@ Partial Class RepContratosCalendario
strData.AppendLine($"cliente: '{Row("NombreComercial").ToString.Replace("'", "")}'")
strData.AppendLine("},")
strAF.AppendFormat("{0},", Row("CveAF"))
'uniad contrato y duracion
@@ -275,16 +261,15 @@ Partial Class RepContratosCalendario
New JProperty("category", Row("Codigo"))
)
jsonCategorias.Add(obj)
strAFData.AppendLine("{")
strAFData.AppendLine($"category: '{Row("Codigo").ToString}',")
strAFData.AppendFormat("category: '{0}'", Row("Codigo"))
strAFData.AppendLine("},")
Next
strAFData.AppendLine("{}]")
'RegistraScript($"cargaDiagramaGrant({jsonData.ToString()},{jsonCategorias.ToString()},{TipoVista});", $"{random.Next(16777216)}")
RegistraScript($"cargaDiagramaGrantAMC4({strData.ToString().Replace(",{}", "")},{strAFData.ToString().Replace(",{}", "")},{TipoVista});", $"{random.Next(16777216)}")
RegistraScript($" cargaDiagramaGrantAMC4({strData.ToString().Replace(",{}", "")},{strAFData.ToString().Replace(",{}", "")},{TipoVista}); ", random.Next(16777216).ToString)
UPPGantt.Update()
UPGat.Update()
@@ -562,8 +547,6 @@ Partial Class RepContratosCalendario
e.Row.BackColor = Drawing.ColorTranslator.FromHtml(BGC_Atencion)
End If
End If
End If
End Sub
@@ -893,7 +876,7 @@ Partial Class RepContratosCalendario
'End If
DdlAF.DataBind()
DdlAF.Items.Insert(0, New ListItem("-", "-1"))
DdlAF.Items.Insert(0, New ListItem("-", "0")) 'DEBE DE SER CERO, SI SE QUIERE QUITAR LA UNIDAD
UpModal.Update()
End Sub

View File

@@ -990,20 +990,17 @@ Partial Class Ventas_ActualizarPrecios
For Each GvRow As GridViewRow In GvMultiple.Rows
If GvRow.FCCheckBox("chkPS").Checked Then
For colIndex As Integer = 2 To GvRow.Cells.Count - 1
For colIndex As Integer = 2 To GvRow.Cells.Count - 3
Dim indiceColumna As Integer = (colIndex)
Dim CvePS As Integer = DtPreciosMultiple.Rows(GvRow.RowIndex)("CvePS").ToString().ToEntero()
Dim LtlId As String = "LtlLista_" + (colIndex - 1).ToString()
Dim TxtId As String = "TxtPrecio_" + (colIndex - 1).ToString()
If indiceColumna <= DtPreciosMultiple.Columns.Count - 1 Then
Dim CvePrecioLista As Integer = GvMultiple.HeaderRow.FCLabel(LtlId).Attributes().Item("cvepreciolista").ToEntero()
Dim CvePS As Integer = DtPreciosMultiple.Rows(GvRow.RowIndex)("CvePS").ToString().ToEntero()
Dim Precio As Decimal = GvRow.FCTextBox(TxtId).Text.ToDecimal()
TieneError = Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLista, 0, CvePS, UsuarioActual.CveUsuario, NowADS(), True)
If Not TieneError Then

View File

@@ -1282,9 +1282,9 @@
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
//si es con.nc,es.el.total
let Total = ToDouble($get("C_LtlSaldo").value);
let Total = ToDouble($get("C_LtlSaldo").value.replace(",",""));
let SaldoCompra = parseFloat(parseFloat($get("C_LtlSaldo").value).toFixed(2));
let SaldoCompra = parseFloat(parseFloat($get("C_LtlSaldo").value.replace(",", "")).toFixed(2));
if (t.checked) {
@@ -1319,13 +1319,13 @@
function FnCambiaAnt(chk, txt, saldo) {
let Total = ToDouble($get("C_LtlSaldo").value);// ToDouble($get('TxtSubTotal').value);
let Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));// ToDouble($get('TxtSubTotal').value);
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
let importeTxt = parseFloat(txt.value.replace(/,/g, ''));
if (TipoAnticipo == '4') {
Total = ToDouble($get("C_LtlSaldo").value);
Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));
}
if (isNaN(importeTxt)) {

View File

@@ -758,7 +758,9 @@ Partial Class Ventas_PVCobranza
Private Function GenerarFactura(ByRef VentaRemision As Venta, ByRef ObjVentas As ClsVentas, ByRef ObjClientes As ClsClientes) As Modelos.Factura.MMensajeFactura
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
Dim SbAlert As New StringBuilder()
Try
Dim DtRemisiones As New DataTable
DtRemisiones.Columns.Add(New DataColumn("CveVenta", GetType(Integer)))
DtRemisiones.Columns.Add(New DataColumn("SerieFolio", GetType(String)))
@@ -872,9 +874,6 @@ Partial Class Ventas_PVCobranza
ObjFactura.DtAnticiposAplicados = DtAnticipos
End If
Dim SbAlert As New StringBuilder()
Try
Retorno = ObjFactura.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True)
Retorno.Factura = ObjFactura
@@ -944,6 +943,9 @@ Partial Class Ventas_PVCobranza
Private Function GenerarNC(ByRef Venta As Venta, ByRef ObjVentas As ClsVentas) As Modelos.Factura.MMensajeFactura
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
Dim SbAlert As New StringBuilder()
Try
Dim ObjNC = Modelos.Factura.CrearVentaNueva(UsuarioActual, Venta.CveSubProyecto, Venta.CveCliente, Venta.CveMoneda, "Egs")
Dim Total As Decimal = TxtNCDev.Text.ToDecimal()
@@ -1016,9 +1018,10 @@ Partial Class Ventas_PVCobranza
ObjNC.PreparaTimbre()
Dim SbAlert As New StringBuilder()
ObjNC.CveFormaPago33 = 21 'Aplicación de anticipos
ObjNC.CveMetodoPago33 = 1
ObjNC.CveMetodoPago = 1
Try
Retorno = ObjNC.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True)
Retorno.Factura = ObjNC

View File

@@ -7805,6 +7805,10 @@ Partial Class Ventas
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ant"))
End If
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
If (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0) Then
BtnsFacturar.Visible = False
End If
End If
Dim Bloqueo As Boolean = False
@@ -14319,7 +14323,7 @@ Partial Class Ventas
End If
End If
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica Then
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso EsVentaMedica AndAlso factura.TipoDocto.Contiene("Ped", "Rem") Then
Dim CveClientesucursatTemp As Integer = DdlClienteSucursalSucursal()
If CveClientesucursatTemp > 0 Then
@@ -14366,17 +14370,16 @@ Partial Class Ventas
End If
End If
Dim TotalImpuestoLocal As Double = 0
Dim TotalImpuestoLocal As Decimal = 0
If GvImpuestosLocales2.Rows.Count > 0 Then
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
If gvr.RowType = DataControlRowType.DataRow Then
If gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble <> 0 Then
If gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal <> 0 Then
If gvr.DataKey("TipoImpuesto") = "5" Then ' cuando es traslado local
TotalImpuestoLocal -= gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble
TotalImpuestoLocal -= gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal
Else ' cuando es retención
TotalImpuestoLocal += gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble
TotalImpuestoLocal += gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal
End If
End If
End If
Next