diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 176ed8ac9..1445de74b 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -1488,7 +1488,7 @@ Public Class ClsBancos Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1, Optional Referencia As String = "-1", Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False, Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "", Optional ConceptoCIE As String = "", Optional CveOCAnticipo As Integer = -1, Optional ImporteDeduccionesPago As Decimal = -1, - Optional AnticipoPuntual As Boolean = False, Optional FechaEmision As Date = MinFecha) As Integer + Optional AnticipoPuntual As Boolean = False, Optional FechaEmision As Date = MinFecha, Optional CveAutorizacion As String = "") As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Banc_IEAdd") @@ -1531,6 +1531,7 @@ Public Class ClsBancos .Add("@ImporteDeduccionesPago", SqlDbType.Money).Value = ImporteDeduccionesPago .Add("@AnticipoPuntual", SqlDbType.Bit).Value = AnticipoPuntual .Add("@FechaEmision", SqlDbType.Date).Value = FechaEmision + .Add("@CveAutorizacion", SqlDbType.VarChar).Value = CveAutorizacion End With Try diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index b415508c3..c9ffe1b18 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -1678,7 +1678,8 @@ Public Class ClsClientes Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, CveEstado As Integer, RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer, NumCuentaPago As String, CveMetodoPago33 As Integer, CveFormaPago33 As Integer, Optional CvePrecioLista As Integer = -1, Optional RegimenSociedad As String = "-1", - Optional TipoPersona As Boolean = False, Optional CveRegimenFiscal As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional Genero As Boolean = True) As Boolean + Optional TipoPersona As Boolean = False, Optional CveRegimenFiscal As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional Genero As Boolean = True, + Optional CveClienteClasificacion As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClientesNoFrecuenteAdd") @@ -1707,6 +1708,7 @@ Public Class ClsClientes .Add("@TipoPersona", SqlDbType.Bit).Value = TipoPersona .Add("@CveRegimenFiscal", SqlDbType.Int).Value = CveRegimenFiscal .Add("@CveUsoCFDI", SqlDbType.Int).Value = CveUsoCFDI + .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@Genero", SqlDbType.Int).Value = Genero End With diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index d49296456..bc203d834 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -330,7 +330,7 @@ Public Class LogicNominas cfdi.Emisor.RFC = UsuarioActual.Empresa.RFC cfdi.Emisor.RegimenFiscal = UsuarioActual.Empresa.CodigoRegimenFiscal 'aplica persona fisica debe de tener CURP - If cfdi.Emisor.RegimenFiscal.Contiene("605", "606", "608", "611", "612", "614", "616", "621", "622", "629", "630", "615") Then + If cfdi.Emisor.RegimenFiscal.Contiene("605", "606", "608", "611", "612", "614", "616", "621", "622", "629", "630", "615", "626") OrElse cfdi.Emisor.RFC.Length = 13 Then cfdi.Emisor.CURP = UsuarioActual.Empresa.CURP End If cfdi.Nomina.CveNomina = CveNomina diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index 75b6ae9e5..8574dd9a6 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -58,7 +58,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState Dim FechaF As Date = context.Request("end").ToDate Dim Cvecliente As Integer = -1 'DdlClienteSucursalCliente() Dim CveClienteSucursal As Integer = -1 ' DdlClienteSucursalSucursal() - Dim CveVendedor As Integer = -1 + Dim CveVendedor As Integer = If(context.Request("CveVendedor") IsNot Nothing, context.Request("CveVendedor").ToEntero, -1) Dim CveEstatus As Integer = -1 Dim ObjOS As New ClsOS diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 1742628f5..bf4fd20c9 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -41,6 +41,12 @@ Partial Class Bancos_DepositosCaja Dim StrEncriptPrueba As String = Encripta($"OP=DC&CveIE={2784391}&CuentaCaja={"TestCuantaCaja"}&CuentaDepo={"Test cuenta"}") HplImprimirPDF.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={StrEncriptPrueba}" + If UsuarioActual.CveEmpresa = 189 Then + If DdlTipoPago.Items.FindByValue("-1") IsNot Nothing Then + DdlTipoPago.Items.Remove(DdlTipoPago.Items.FindByValue("-1")) + End If + End If + End If End Sub @@ -327,7 +333,7 @@ Partial Class Bancos_DepositosCaja If CveSubProyecto <= 0 Then 'se saca de la cuenta de la caja chica - CveSubProyecto = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, Estatus:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto") + CveSubProyecto = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, Estatus:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero() End If End If diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index 840131979..16ab112f6 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -246,11 +246,19 @@
- + +
+ + +
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 5688cc07e..af33ff1b5 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -815,6 +815,11 @@ Partial Class Bancos_IE NumComplementos = ObjIE.DtResultados(0)("NumComplementos").ToString.ToEntero Dim CveIEEstadoCuenta As Integer = ObjIE.DtResultados(0)("CveIEEstadoCuenta").ToString.ToEntero + If Not String.IsNullOrEmpty(ObjIE.DtResultados(0)("CveAutorizacion").ToString) Then + DivCveAutorizacion.Visible = True + LblCveAutorizacion.Text = ObjIE.DtResultados(0)("CveAutorizacion").ToString() + End If + If UsuarioActual.TienePermisoProceso(99) Then 'BtnActualizar.Visible = True TxtFechaDocumento.Enabled = True diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index c43a2ee8b..b7975235e 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -1644,7 +1644,7 @@ + DataKeyNames="CantidadF,FolioREQ,CveProveedorSucursal,CveTipoPS,PS,CantidadPendienteVincular,IEPSPS,IVA,RetIVA,RetISR,Descuento,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje,Cantidad,CveProveedorOC,Importe,CveSATPS,NumeroParte"> diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 61edd533d..0d7f05061 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -3812,6 +3812,7 @@ Partial Class Compras_Compras Dim PorcentajeIEPS As Decimal = 0 Dim PorcentajeRetISR As Decimal = 0 Dim PorcentajeRetIVA As Decimal = 0 + Dim NoIdentificacion As String = "" Dim DtTemporalGuardados As DataTable = New DataTable DtTemporalGuardados.Columns.Add("Contador", GetType(Integer)) DtTemporalGuardados.Columns.Add("Tipo", GetType(Integer)) @@ -3871,6 +3872,7 @@ Partial Class Compras_Compras PorcentajeIEPS = 0 PorcentajeRetISR = 0 PorcentajeRetIVA = 0 + NoIdentificacion = "" 'CARGA NODO ACTUAL @@ -3896,6 +3898,8 @@ Partial Class Compras_Compras 'OBTIENE SUBTOTAL SubTotalTemp += If(Total > 0, Total, PU * ValorXML(node, "cantidad").ToDecimal) + 'OBTIENE NoIdentificacion + If ValorXML(node, "noIdentificacion") IsNot Nothing Then NoIdentificacion = ValorXML(node, "noIdentificacion").Trim 'OBTIENE UM If ValorXML(node, "unidad") IsNot Nothing Then UMM = ValorXML(node, "unidad").Trim @@ -14535,9 +14539,26 @@ Partial Class Compras_Compras DTOCGV = If(ArrayCveOC.Length > 1, DTOCGV.FiltraParametros("", "Producto"), DTOCGV) CargaTipoCentroCostoOC() + GvOC1.DataSource = DTOCGV GvOC1.DataBind() + 'PROCESO DE ASIGNACION DE CANTIDAD DEPENDIENDO DEL NoIdentificacion DEL XML Y EL NumeroParte DEL PRODUCTO + If UsuarioActual.Empresa.Funcionalidad(382).ToEntero > 0 Then + For Each Gvr As GridViewRow In GvOC1.Rows + Dim Change As Boolean = False + For Each Dr2 As DataRow In TmpDT.Rows + If Gvr.DataKey("NumeroParte").ToString = Dr2("NoIdentificacion").ToString() Then + Gvr.FCTextBox("TxtCantidad").Text = Dr2("Cantidad").ToString + Change = True + End If + Next + If Not Change Then + Gvr.FCTextBox("TxtCantidad").Text = "0" + End If + Next + End If + Dim DTCVEOGV As DataTable = DTOCGV.FiltraParametros("", "", {"CveOrdenCompra"}) If DTCVEOGV.Rows.Count > 1 Then GvOC1.Columns(0).Visible = True @@ -22011,6 +22032,7 @@ Public Class ClsCompraManagerCompras TmpDT.Columns.Add("CveCultivoCuadroDetalle", GetType(Integer)) TmpDT.Columns.Add("TemporadaCuadro", GetType(String)) + TmpDT.Columns.Add("NoIdentificacion", GetType(String)) TmpDT.AcceptChanges() diff --git a/Compras/RepCxP.aspx.vb b/Compras/RepCxP.aspx.vb index 39f548632..6472107ff 100644 --- a/Compras/RepCxP.aspx.vb +++ b/Compras/RepCxP.aspx.vb @@ -1945,7 +1945,7 @@ Partial Class Compras_RepCxP Dim Filtro As String = $"{Cliente}{Sucursal}{Grupo}{FechaIn}{FechaFn}{TipoDocto}{FVI}{FVF}{ClasificacionProv}{CorteA}" - GvCxP.ExportToExcelGembox("ReporteCxC", UsuarioActual, "REPORTE DE CUENTAS POR PAGAR", DatoTituloExtra:=$"", DatosFiltros:=Filtro) + GvCxP.ExportToExcelGembox("ReporteCxP", UsuarioActual, "REPORTE DE CUENTAS POR PAGAR", DatoTituloExtra:=$"", DatosFiltros:=Filtro) End Sub diff --git a/Contabilidad/RepAnexoCatalogo.aspx.vb b/Contabilidad/RepAnexoCatalogo.aspx.vb index ce41eaabc..d2d660bd2 100644 --- a/Contabilidad/RepAnexoCatalogo.aspx.vb +++ b/Contabilidad/RepAnexoCatalogo.aspx.vb @@ -118,7 +118,6 @@ Partial Class AC2_RepAnexoCatalogo End If End If - If Request("CM") IsNot Nothing AndAlso IsNumeric(Request("CM")) AndAlso Request("CM").ToEntero > 0 Then DdlCuenta.SelectedValueExist(Request("CM").ToString) End If @@ -127,6 +126,7 @@ Partial Class AC2_RepAnexoCatalogo CveProyecto = Request("CveProyecto").ToString DdlProyecto.SelectedValueExist(CveProyecto) DdlProyecto_SelectedIndexChanged(Nothing, Nothing) + divProyecto.Visible = True End If If Request("CveSubProyecto") IsNot Nothing AndAlso IsNumeric(Request("CveSubProyecto")) Then @@ -172,7 +172,7 @@ Partial Class AC2_RepAnexoCatalogo DdlCuentas.DataBind() - CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto) + CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto, VisualizacionReporte:=1) End Sub diff --git a/Contabilidad/RepEstadoResultadosHorizontal.aspx.vb b/Contabilidad/RepEstadoResultadosHorizontal.aspx.vb index 72712ad98..63bf9822c 100644 --- a/Contabilidad/RepEstadoResultadosHorizontal.aspx.vb +++ b/Contabilidad/RepEstadoResultadosHorizontal.aspx.vb @@ -2745,7 +2745,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal e.Row.ControlStyle.Font.Size = 13 End If Dim CveCuenta As Integer = e.Row.DataKey("CveCuenta").ToEntero - 'setgraficaCC(e) + setgraficaProy(e) 'Dim CveProyecto As Integer = e.Row.DataKey("CveProyecto").ToEntero If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then @@ -2860,7 +2860,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal End If End Sub - Public Sub setgraficaProyCC(e As GridViewRowEventArgs) + Public Sub setgraficaProy(e As GridViewRowEventArgs) Dim lista As New List(Of Object) Dim colorindex As Integer = 0 For Each campo As String() In listaCampos @@ -2893,18 +2893,17 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal ExportToExcelG(GvIngresosMesH, GvGastosMesH, TMesT1, "Reporte_Mensual_Horizontal", UsuarioActual, "Mensual Horizontal", Gv3:=GvTotalesMesH) ElseIf Tab.ActiveTabIndex = 2 AndAlso GvIngresosAnualH.Rows.Count > 0 Then ExportToExcelG(GvIngresosAnualH, GvGastosAnualH, TMesT1, "Reporte_Anual_Horizontal", UsuarioActual, "Anual Horizontal", Gv3:=GvTotalesAnualH) - ElseIf Tab.ActiveTabIndex = 3 AndAlso GvIngresosSubProyectoH.Rows.Count > 0 Then - - ExportToExcelG(GvIngresosSubProyectoH, GvGastosSubProyectoH, TMesT1, "Reporte_Proyecto_Horizontal", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", Gv3:=GvTotalesSubProyectoH, EsPorSubProtyecto:=True) - + ExportToExcelG(GvIngresosSubProyectoH, GvGastosSubProyectoH, TMesT1, "Reporte_CentroCosto_Horizontal", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", Gv3:=GvTotalesSubProyectoH, EsPorSubProyecto:=True) + ElseIf Tab.ActiveTabIndex = 4 AndAlso GvIngresosProyectoH.Rows.Count > 0 Then + ExportToExcelG(GvIngresosProyectoH, GvGastosProyectoH, TMesT1, "Reporte_Proyecto_Horizontal", UsuarioActual, $"Estado de Resultados Horizontal por Proyecto", EsPorSubProyecto:=True) End If End Sub 'Public Sub ExportToExcelG(Gv1 As GridView, Gv2 As GridView, NombreArchivoXLSx As String, Optional Titulo As String = "Reporte", Optional Usuario As Usuario = Nothing, Optional Filtros As String = "", Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100) - Public Sub ExportToExcelG(Gv1 As GridView, Gv2 As GridView, TablaResultados As HtmlTable, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional Gv3 As GridView = Nothing, Optional EsPorSubProtyecto As Boolean = False) + Public Sub ExportToExcelG(Gv1 As GridView, Gv2 As GridView, TablaResultados As HtmlTable, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional Gv3 As GridView = Nothing, Optional EsPorSubProyecto As Boolean = False) Dim sw1 As New StringWriter() Dim htw1 As New HtmlTextWriter(sw1) @@ -3023,7 +3022,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal RangoFechas.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center - If EsPorSubProtyecto And DdlSubproyecto.SelectedValue.ToEntero > 0 Then + If EsPorSubProyecto And DdlSubproyecto.SelectedValue.ToEntero > 0 Then Dim RangoSubProyecto = worksheet.Cells.GetSubrangeAbsolute(5, celdasConTexto.FirstColumnIndex, 5, celdasConTexto.LastColumnIndex) RangoSubProyecto.Merged = True RangoSubProyecto.Value = DdlSubproyecto.SelectedItem.Text @@ -3042,9 +3041,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255) - - - If Not EsPorSubProtyecto Then + If Not EsPorSubProyecto Then worksheet.Rows(8 + Gv1.Rows.Count + 2).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) worksheet.Rows(8 + Gv1.Rows.Count + 2).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255) Else @@ -3052,8 +3049,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal worksheet.Rows(18).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255) End If - - If i > 0 Then Try worksheet.Columns(i).AutoFit(1) @@ -3081,11 +3076,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal End Using End If - - - - - For I = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex If I > 0 Then @@ -3108,7 +3098,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx") - End Sub Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control) @@ -3117,9 +3106,6 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal #End Region - - - End Class diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 8665395c8..9bc004bfe 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -1019,7 +1019,7 @@ Partial Class Inventarios_EntradasSalidas 'verifico si existe If (DdlSubProyecto.Items.FindByValue(Mov.CveSubProyecto.ToString()) Is Nothing) Then - Dim dr As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=Mov.CveSubProyecto, Estatus:=-1).FiltroPrimero("") + Dim dr As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=Mov.CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=-1).FiltroPrimero("") DdlSubProyecto.Items.Insert(0, New ListItem(dr("SubProyecto").ToString, dr("CveSubProyecto").ToString)) ' lo genera Obj.SelectedValue = Valor.ToString End If diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 616051072..852727307 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -656,7 +656,7 @@ Partial Class Inventarios_TraspasoAlmacen End If End Sub - Private Function ValidaExistencia(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, CveSeccionAlmacen As Integer, Serie As String, Lote As String, FechaCaducidad As Date) As Boolean + Private Function ValidaExistencia(Cantidad As Decimal, CvePS As Integer, CveUnidadMedida As Integer, CveSeccionAlmacen As Integer, Serie As String, Lote As String, FechaCaducidad As Date) As Boolean Dim Retorno As Boolean = True Dim ExistenciaEspecificada As Decimal @@ -2953,16 +2953,14 @@ Partial Class Inventarios_TraspasoAlmacen Dim RowPS As DataRow = DtPS.FiltroPrimero(String.Format("Codigo='{0}'", RowExcel("Codigo").ToString())) - Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero() - Dim CveUnidadMedida As Integer = RowPS("CveUnidadMedida").ToString().ToEntero() - - Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal() - Dim Serie As String = RowExcel("Serie").ToString() - Dim Lote As String = RowExcel("Lote").ToString() - Dim FechaCaducidad As Date = If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate) - Dim Observaciones As String = RowExcel("Observaciones").ToString() - - If CveProducto > 0 Then + If RowPS IsNot Nothing Then + Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero() + Dim CveUnidadMedida As Integer = RowPS("CveUnidadMedida").ToString().ToEntero() + Dim Cantidad As Decimal = RowExcel("Cantidad").ToString().ToDecimal() + Dim Serie As String = RowExcel("Serie").ToString() + Dim Lote As String = RowExcel("Lote").ToString() + Dim FechaCaducidad As Date = If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate) + Dim Observaciones As String = RowExcel("Observaciones").ToString() Dim Valido As Boolean = True Dim ValidarLote As Boolean = True @@ -3001,10 +2999,9 @@ Partial Class Inventarios_TraspasoAlmacen RowsNoCargados = RowsNoCargados + 1 ProductosNoCargados.AppendFormat("{0},", RowPS("PSCodigo").ToString()) End If - Else RowsNoCargados = RowsNoCargados + 1 - ProductosNoCargados.AppendFormat("{0},", RowExcel("Producto").ToString()) + ProductosNoCargados.AppendFormat("{0}, ", RowExcel("Producto").ToString()) End If End If Next @@ -3156,9 +3153,9 @@ Partial Class Inventarios_TraspasoAlmacen ElseIf DrAlmO("CveTipoAlmacen").ToString.Contiene("22") Then 'Recepcion de Usados If ChkTransitorio.Checked Then - DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (21,22) AND Estatus = 'Activo' ") + DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (21,22,2) AND Estatus = 'Activo' ") Else - DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (21,22) ") + DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (21,22,2) ") End If DdlAlmacenDestino.DataBind() @@ -3172,6 +3169,16 @@ Partial Class Inventarios_TraspasoAlmacen DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (1,21,22) ") End If + DdlAlmacenDestino.DataBind() + DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1")) + ElseIf DrAlmO("CveTipoAlmacen").ToString.Contiene("2") Then 'herramientas -- puede regresar a usados + + If ChkTransitorio.Checked Then + DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoAlmacen IN (21,22) AND Estatus = 'Activo' ") + Else + DdlAlmacenDestino.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen IN (1,21,22) ") + End If + DdlAlmacenDestino.DataBind() DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1")) Else @@ -3456,8 +3463,3 @@ Partial Class Inventarios_TraspasoAlmacen #End Region End Class - - - - - diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index f4928c806..89721786b 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -10525,7 +10525,7 @@ public partial class Nomina_Nomina2 : ClsPaginas StringBuilder SbErrores = new StringBuilder(); bool ErroresValidaciones = false; int modalidadnomina = 1; - if (UsuarioActual.CveEmpresa == 189) modalidadnomina = 2; + if (UsuarioActual.CveEmpresa.Contiene(189,193,195,196,197)) modalidadnomina = 2; SbErrores.AppendLine("Se detectaron los siguientes errores en la generación del layout:
"); diff --git a/OS/RepServiciosMedicos.aspx b/OS/RepServiciosMedicos.aspx index 7659d6de4..e6698a695 100644 --- a/OS/RepServiciosMedicos.aspx +++ b/OS/RepServiciosMedicos.aspx @@ -151,7 +151,9 @@
- + + +
@@ -758,7 +760,8 @@ E: '<%= UsuarioActual.CveEmpresa %>', METODO: 'servicio_medicos', CveUsuarioPara: $('#DdlTecnico').val(), - CveSubProyecto: $('#DdlSubProyecto').val() + CveSubProyecto: $('#DdlSubProyecto').val(), + CveVendedor: $('#HdnCveVendedor').val() } }, eventDrop: eventDropped, diff --git a/OS/RepServiciosMedicos.aspx.vb b/OS/RepServiciosMedicos.aspx.vb index d6ba29431..13b6520e6 100644 --- a/OS/RepServiciosMedicos.aspx.vb +++ b/OS/RepServiciosMedicos.aspx.vb @@ -259,7 +259,9 @@ Partial Class OS_RepServiciosMedicos CargaUsuariosTecnicos() CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyectoEtiqueta) LblSubProyectoFiltro.Text = LblSubProyectoEtiqueta.Text - ' LblModalSubProyectoLabel.Text = LblSubProyectoEtiqueta.Text + If UsuarioActual.CveVendedor > 0 Then + HdnCveVendedor.Value = UsuarioActual.CveVendedor.ToString + End If CargaTecnicos() ConsultaOrdenesServiciosNoAsignadas() CargaOrdenesServiciosNoAsignadas() @@ -273,7 +275,7 @@ Partial Class OS_RepServiciosMedicos Private Sub CargaUsuariosTecnicos() - If not UsuarioActual.TienePermisoProceso(171) Then Exit Sub + ' If not UsuarioActual.TienePermisoProceso(171) Then Exit Sub Dim DTTecnicosresultado As DataTable = Nothing DTTecnicos = New DataTable @@ -295,6 +297,8 @@ Partial Class OS_RepServiciosMedicos End If ObjOS.Dispose() + DTTecnicos = DTTecnicos.FiltraParametros("", DistinctColumns:={"CveUsuario", "Nombre"}) + DdlTecnicoAsignar.DataSource = DTTecnicos DdlTecnicoAsignar.DataBind() DdlTecnicoAsignar.Visible = True @@ -345,6 +349,10 @@ Partial Class OS_RepServiciosMedicos DdlTecnico.DataSource = DTTecnicos 'GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) DdlTecnico.DataBind() DdlTecnico.Items.Insert(0, New ListItem("Todos", "-1")) + If UsuarioActual.TienePermisoProceso(376) Then + DdlTecnico.Enabled = False + DdlTecnico.SelectedValueExist(UsuarioActual.CveUsuario) + End If End Sub Private Sub CargaTecnicosAsignar() diff --git a/Ventas/CatPS.aspx b/Ventas/CatPS.aspx index 54ae45b71..be19ea384 100644 --- a/Ventas/CatPS.aspx +++ b/Ventas/CatPS.aspx @@ -214,10 +214,10 @@ - + - - + + diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 5e3d9e961..111b6df00 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -1767,13 +1767,21 @@ Partial Class Ventas_ClientesAbonar DtImpuestos = CargaTotalesImpuestos(DtImpuestos) - Dim DrSubProyecto As DataRow = GlobalDTSubProyectos(-1, ObjFacturaDevolucion.CveSubProyecto).Rows(0) - + Dim DrSubProyecto As DataRow = GlobalDTSubProyectos(-1, ObjFacturaDevolucion.CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") Dim Cantidad As Decimal = 1 - Dim CveProyecto As Integer = DrSubProyecto("CveProyecto").ToString().ToEntero() - Dim CveSubProyecto As Integer = DrSubProyecto("CveSubProyecto").ToString.ToEntero - Dim SubProyecto As String = DrSubProyecto("SubProyecto").ToString - Dim Proyecto As String = DrSubProyecto("Proyecto").ToString + Dim CveProyecto As Integer + Dim CveSubProyecto As Integer + Dim SubProyecto As String + Dim Proyecto As String + If DrSubProyecto IsNot Nothing Then + CveProyecto = DrSubProyecto("CveProyecto").ToString().ToEntero() + CveSubProyecto = DrSubProyecto("CveSubProyecto").ToString.ToEntero + SubProyecto = DrSubProyecto("SubProyecto").ToString + Proyecto = DrSubProyecto("Proyecto").ToString + Else + Alert("Ocurrió un error al obtener información de la sucursal") + Exit Sub + End If Dim CveSATNC As Integer Dim ArrayNC As String() = UsuarioActual.Empresa.Funcionalidad(591).Split(",".ToCharArray()) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 31faf3fc8..9d5c24792 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -2639,6 +2639,10 @@ Partial Class PV LbVendedor.Text = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", $"CveVendedor = {ObjCliente.Vendedor}") End If + If ObjCliente.Vendedor <> "" Then + DdlVendedor.SelectedValueExistInsert(ObjCliente.DtResultados(0)("CveVendedor"), LbVendedor.Text) + End If + ' si es empresa acumuladores If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then CargaPorcentajeMarcas() @@ -3023,9 +3027,11 @@ Partial Class PV Dim DtVendedores As DataTable = Nothing - Dim ObjVendedores As New ClsVtaVendedores - If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then DtVendedores = ObjVendedores.DtResultados.Copy - ObjVendedores.Dispose() + 'Dim ObjVendedores As New ClsVtaVendedores + 'If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then DtVendedores = ObjVendedores.DtResultados.Copy + 'ObjVendedores.Dispose() + + DtVendedores = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).Copy If DtVendedores IsNot Nothing Then If UsuarioActual.Empresa.Funcionalidad(302) = "1" AndAlso DdlSubProyectoDatos.SelectedValue.ToEntero > 0 Then @@ -3035,12 +3041,14 @@ Partial Class PV End If End If - DdlVendedor.SelectedValue = "0" DdlVendedor.Items.Insert(0, New ListItem("Sin Asignar", "0")) DdlVendedor.DataBind() - DdlVendedor.SelectedValueExist(CveVendedorActual) + If CveVendedorActual > 0 Then + Dim tt As String = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", "CveVendedor =" & CveVendedorActual) + DdlVendedor.SelectedValueExistInsert(CveVendedorActual, tt) + End If If Not DdlVendedor.SelectedValue.ToEntero > 0 Then DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString) diff --git a/Ventas/PVCobranza.aspx b/Ventas/PVCobranza.aspx index 35db02691..080d75df6 100644 --- a/Ventas/PVCobranza.aspx +++ b/Ventas/PVCobranza.aspx @@ -11,7 +11,7 @@ width: 200px; } - .btn-xs { + .btn-xs { padding: 0px 5px; } @@ -200,9 +200,9 @@
  • Retiro de Efectivo
  • -
  • - Cobros en Transcurso -
  • +
  • + Cobros en Transcurso +
  • @@ -273,13 +273,13 @@ @@ -335,13 +335,18 @@
    Folio:
      
    -
    -
    -
    - -
    +
    + + +
    +
    + + + +
    -
    + + @@ -423,6 +428,20 @@ +
    +
    +
    + +
    + +
    + +
    + +
    +
    +
    +
    @@ -515,43 +534,44 @@
    - - - - - Serie - Folio - - - - - - - - - - - - - - - - - - - - - - + + + + + Serie - Folio + + + + + + + + + + + + + + + + + + + + + + + + -
    - + @@ -574,7 +594,7 @@     - + Sucursal: @@ -591,7 +611,7 @@ - +     @@ -763,7 +783,7 @@ - +
    @@ -913,54 +933,54 @@ -
    +
    +
    + + + + +
    +
    - - +