From c8c12f862e370fadb1b59cc19c1131b593c2deb4 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Thu, 15 Oct 2020 07:13:28 -0700 Subject: [PATCH 01/18] --- App_Code/ClsInventarios.vb | 9 ++++++--- Inventarios/Kardex.aspx | 5 ++++- Inventarios/Kardex.aspx.vb | 13 +++++++++---- Nomina/Nomina2.aspx | 10 ++++++++++ Nomina/Nomina2.aspx.cs | 8 ++++++-- vwd.webinfo | 2 ++ 6 files changed, 37 insertions(+), 10 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 4f57d07db..de4c0e719 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1516,7 +1516,7 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetKardex(Entrada As Boolean, Salida As Boolean, CvePS As Integer, FechaI As String, FechaF As String, CveAlmacen As Integer, CveTiposAlmacen As String, CveUnidadMedida As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional AgruparAlmacen As Boolean = False, Optional Serie As String = "-1") As Boolean + Public Function GetKardex(Entrada As Boolean, Salida As Boolean, CvePS As Integer, FechaI As String, FechaF As String, CveAlmacen As Integer, CveTiposAlmacen As String, CveUnidadMedida As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional AgruparAlmacen As Boolean = False, Optional Serie As String = "-1", Optional CveAlmacenes As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_KardexGet") @@ -1534,6 +1534,8 @@ Public Class ClsInventarios .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@AgruparAlmacen", SqlDbType.Bit).Value = AgruparAlmacen .Add("@Serie", SqlDbType.VarChar).Value = Serie + .Add("@CveAlmacenes", SqlDbType.VarChar).Value = CveAlmacenes + End With Try @@ -1551,16 +1553,17 @@ Public Class ClsInventarios End Function - Public Function GetExistenciasProductoSerie(CvePS As Integer, CveAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Public Function GetExistenciasProductoSerie(CvePS As Integer, CveAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CveAlmacenes As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_ExistenciaPSSeriesGet") With SqlAdapter.SelectCommand.Parameters .Add("@CvePS", SqlDbType.Int).Value = CvePS - .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen + .Add("@CveAlmacen", SqlDbType.VarChar).Value = CveAlmacen .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveAlmacenes", SqlDbType.VarChar).Value = CveAlmacenes End With Try diff --git a/Inventarios/Kardex.aspx b/Inventarios/Kardex.aspx index c63c3d11e..4df28a4d8 100644 --- a/Inventarios/Kardex.aspx +++ b/Inventarios/Kardex.aspx @@ -155,7 +155,10 @@
- + <%----%> + +
diff --git a/Inventarios/Kardex.aspx.vb b/Inventarios/Kardex.aspx.vb index 040ca2bc1..0fa236d7d 100644 --- a/Inventarios/Kardex.aspx.vb +++ b/Inventarios/Kardex.aspx.vb @@ -80,7 +80,7 @@ Partial Class Inventarios_Kardex ddlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1) ddlAlmacen.DataBind() - If IfNull(Request("CveAlmacen"), "-1").ToString.ToEntero > 0 Then ddlAlmacen.SelectedValueExist(Request("CveAlmacen").ToString) + If IfNull(Request("CveAlmacen"), "-1").ToString.ToEntero > 0 Then ddlAlmacen.SelectedValuesIfExist(Request("CveAlmacen").ToString) CargaClasificaciones() CBLTiposAlmacen.DataSource = GlobalDTTipoAlmacen(-1) @@ -255,7 +255,8 @@ Partial Class Inventarios_Kardex Dim FechaI As String = If(TxtFechaI.Text <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1") Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1") - Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero + Dim CveAlmacen As Integer = -1 + Dim CveAlmacenes As String = ddlAlmacen.GetSelectedValues() If CvePS > 0 Then ddlProducto2.SelectedText = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("PSCodigo", "") Dim CveTiposAlmacen = "" @@ -266,7 +267,7 @@ Partial Class Inventarios_Kardex Dim Serie As String = If(TxtSerie.Text <> "", TxtSerie.Text, "-1") Dim ObjInventarios As New ClsInventarios - If ObjInventarios.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked, Serie) Then + If ObjInventarios.GetKardex(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen.Substring(0, CveTiposAlmacen.Length - 1), DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ChkAgruparAlmacen.Checked, Serie, CveAlmacenes) Then dt = ObjInventarios.DtResultados.Copy End If ObjInventarios.Dispose() @@ -304,8 +305,12 @@ Partial Class Inventarios_Kardex End Sub Private Sub CargarExistenciasProductosSeries() + Dim almacenes As String = ddlAlmacen.GetSelectedValues() + If almacenes = "" Then + almacenes = "-1" + End If Dim ObjInventarios As New ClsInventarios - If ObjInventarios.GetExistenciasProductoSerie(ddlProducto2.SelectedValue.ToEntero(), ddlAlmacen.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + If ObjInventarios.GetExistenciasProductoSerie(ddlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then GvSeries.DataSource = ObjInventarios.DtResultados End If ObjInventarios.Dispose() diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx index 9e2e3a4b1..abf7b0787 100644 --- a/Nomina/Nomina2.aspx +++ b/Nomina/Nomina2.aspx @@ -557,6 +557,16 @@ +
+
Salario base cotización
+
+ +
+
+
+ +
+
Puesto
diff --git a/Nomina/Nomina2.aspx.cs b/Nomina/Nomina2.aspx.cs index 0be303c0f..8abe5f270 100644 --- a/Nomina/Nomina2.aspx.cs +++ b/Nomina/Nomina2.aspx.cs @@ -1247,6 +1247,7 @@ public partial class Nomina_Nomina2 : ClsPaginas string Departamento = ""; string SD = ""; string SDI = ""; + string SalarioDiarioIMSS = ""; DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal)); if (drow != null) { @@ -1257,8 +1258,9 @@ public partial class Nomina_Nomina2 : ClsPaginas FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]); DiasRetardos = string.Format("{0}", drow["DiasRetardos"].ToString().ToEntero()); DiasIncapacidad = string.Format("{0}", drow["DiasIncapacidad"].ToString().ToEntero()); - SD = string.Format("{0}", drow["SalarioDiario"]); - SDI = string.Format("{0}", drow["SalarioDiarioIntegrado"]); + SD = string.Format("{0:####.####}", drow["SalarioDiario"]); + SDI = string.Format("{0:####.####}", drow["SalarioDiarioIntegrado"]); + SalarioDiarioIMSS = string.Format("{0:####.####}", drow["SalarioDiarioIMSS"]); } using (ClsRH objrh = new ClsRH()) @@ -1292,6 +1294,8 @@ public partial class Nomina_Nomina2 : ClsPaginas LblSRDepartamento.Text = Departamento; LblSRSalarioDiario.Text = SD; LblSRSalarioDiarioIntegrado.Text = SDI; + LblSRSbc.Text = SalarioDiarioIMSS; + #endregion #region "Sobre Recibo" { diff --git a/vwd.webinfo b/vwd.webinfo index 4ab5c7c64..7f4ab5f2d 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -118,6 +118,8 @@ + + From cd6d1bc84271e518eb8df3d2603ac023bcc72ffe Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Thu, 15 Oct 2020 07:16:22 -0700 Subject: [PATCH 02/18] --- Inventarios/Kardex.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/Kardex.aspx.vb b/Inventarios/Kardex.aspx.vb index 0fa236d7d..188a071e0 100644 --- a/Inventarios/Kardex.aspx.vb +++ b/Inventarios/Kardex.aspx.vb @@ -32,7 +32,7 @@ Partial Class Inventarios_Kardex TxtFechaI.Text = Now.AddMonths(-1).ToShortDateString TxtFechaF.Text = Now.ToShortDateString CargaCombos() - ddlAlmacen.Items.Insert(0, New ListItem("Todos", "-1")) + 'ddlAlmacen.Items.Insert(0, New ListItem("Todos", "-1")) If UsuarioActual.TienePermisoProceso(258) Then GvM.Columns(1).Visible = True From 8e896fe3e7ae2af546d9c93ee01f606742a0c05a Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Thu, 15 Oct 2020 09:16:54 -0700 Subject: [PATCH 03/18] eFacturas --- Compras/eFacturas.aspx.vb | 15 +++------ TareasProgramadas/Tareas119.ashx | 58 +++++++++++++++++++++++++------- 2 files changed, 50 insertions(+), 23 deletions(-) diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 64b14396c..a565bc154 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -2893,7 +2893,10 @@ Partial Class Compras_eFacturas If Not (FechaDoRecibo >= FT1 And FechaDoRecibo < FT2) Then - BtnVincularPago.Visible = False + If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then + DivVincularPagoManualmente.Visible = True + End If + MSGComplemento = MSGComplemento & " Existen mas de 3 días de diferencia entre la fecha del documento y la fecha de complemento. " Exit For @@ -2902,24 +2905,14 @@ Partial Class Compras_eFacturas Next If MSGComplemento.Trim.Length > 0 Then - ' BtnVincularPago.Visible = False ViculacionConPUE = True End If - 'saco la información de lo vinculado en el ie - ImporteIES = ObjCompras.DtResultados.FiltraParametros("CveIE > 0").SUM("Importe") - - - - - - - DiferenciaImportes = Monto - ImporteIES ObjCompras.Dispose() diff --git a/TareasProgramadas/Tareas119.ashx b/TareasProgramadas/Tareas119.ashx index 9617b6a33..dc0163785 100644 --- a/TareasProgramadas/Tareas119.ashx +++ b/TareasProgramadas/Tareas119.ashx @@ -91,9 +91,6 @@ public class TareasJam : IHttpHandler } - - //"ftp://us2.hostedftp.com/", "agrojam", "A12345678"; - string FTPServer = "ftp://127.0.0.1/"; string TFPUsr = "Toor"; string FTPPass = "agj-3500"; @@ -198,8 +195,12 @@ public class TareasJam : IHttpHandler DTAlmacenes.AcceptChanges(); + + + + DataTable dtCloned = DTVentas.Clone(); - dtCloned.Columns[3].DataType = typeof(DateTime); + dtCloned.Columns[3].DataType = typeof(string); foreach (DataRow row in DTVentas.Rows) { @@ -209,7 +210,7 @@ public class TareasJam : IHttpHandler DTVentas = dtCloned; foreach (DataRow dRow in DTVentas.Rows) { - DateTime tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd").ToDate(); + string tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd");//.ToDate().ToString("yyyy/MM/dd").ToDate(); dRow[3] = tmpDate; } @@ -217,7 +218,7 @@ public class TareasJam : IHttpHandler dtCloned = DTAlmacenes.Clone(); - dtCloned.Columns[3].DataType = typeof(DateTime); + dtCloned.Columns[3].DataType = typeof(string); foreach (DataRow row in DTAlmacenes.Rows) { @@ -227,7 +228,8 @@ public class TareasJam : IHttpHandler DTAlmacenes = dtCloned; foreach (DataRow dRow in DTAlmacenes.Rows) { - DateTime tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd").ToDate(); + //DateTime tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd").ToDate(); + string tmpDate = dRow[3].ToString().ToDate().ToString("yyyy/MM/dd"); dRow[3] = tmpDate; } DTAlmacenes.AcceptChanges(); @@ -249,6 +251,7 @@ public class TareasJam : IHttpHandler if (!ErrorProceso) { + int contador = 0; SpreadsheetInfo.SetLicense(Extensiones.ModExtensiones.SerialGemBoxSpreadsheet()); @@ -258,8 +261,18 @@ public class TareasJam : IHttpHandler { ColumnHeaders = true, StartRow = 0 - }); - worksheetAlmacenes.Columns[3].Style.NumberFormat = "yyyy/MM/dd"; + }); + + foreach (DataRow DRow in DTAlmacenes.Rows) + { + + //contador++; + //var cell = worksheetAlmacenes.Cells[contador, 3]; + //cell.Style.WrapText = true; + + + } + //worksheetAlmacenes.Columns[3].Style.NumberFormat = "yyyy/MM/dd"; workbookAlmacenes.Save(RutaAlmacenes); var workbookProductos = new ExcelFile(); @@ -278,7 +291,28 @@ public class TareasJam : IHttpHandler ColumnHeaders = true, StartRow = 0 }); - worksheetVentas.Columns[3].Style.NumberFormat = "yyyy/MM/dd"; + + + contador = 0; + foreach (DataRow DRow in DTVentas.Rows) + { + + //var value = DateTime.Now; + contador++; + + var cell = worksheetVentas.Cells[contador, 3]; + cell.Style.WrapText = false; + cell.Style.IsTextVertical = false; + cell.Style.Font.Italic = false; + + //cell.Style.NumberFormat = "h:mm AM/PM"; // "yyyy-MM-dd"; + //cell.SetValue(value); + + + } + + //worksheetVentas.Columns[3].Style.NumberFormat = "yyyy/MM/dd"; + workbookVentas.Save(RutaVentas); @@ -292,7 +326,7 @@ public class TareasJam : IHttpHandler workbookClientes.Save(RutaClientes); - + var FInfoProductos = new FileInfo(RutaProductos); @@ -438,7 +472,7 @@ public class TareasJam : IHttpHandler ClsSisMail Correo = new ClsSisMail(); - // string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx"; + // string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx"; string Para = "oscar.irigoyen@adssistemas.mx"; string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}"; From 383b24f7ca2ba52cdc6a1c060a5e500fdb204ba0 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 Oct 2020 12:37:15 -0700 Subject: [PATCH 04/18] -- cambio en contabilizacion, primero se caudra y luego se contabiliza --- Bancos/PagoDeudor.aspx.cs | 21 +++++++++++-------- Bancos/PolizaCheque.aspx.vb | 41 +++++++++++++++++++++---------------- 2 files changed, 35 insertions(+), 27 deletions(-) diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs index 88424c2bd..c59201a8f 100644 --- a/Bancos/PagoDeudor.aspx.cs +++ b/Bancos/PagoDeudor.aspx.cs @@ -842,6 +842,17 @@ public partial class Bancos_PagoDeudor : ClsPaginas MsgError = "No se pudo insertar concepto de bancos complementaria"; } } + + if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 10)) + { + if (ObjMov.ValorPolizaDescuadre > 0) + { + MsgError = ObjMov.MensajePolizaDescuadre; + $"Bancos/IE PAGO Deudor | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}".GuardaLogAD("LogPrePolizas"); + } + } + + bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1"); //if (UsuarioActual.CveEmpresa == 119) AutoConta = false; @@ -881,15 +892,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas MsgError = "No se pudo insertar la póliza"; } - if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 10)) - { - if (ObjMov.ValorPolizaDescuadre > 0) - { - MsgError = ObjMov.MensajePolizaDescuadre; - $"Bancos/IE PAGO Deudor | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}".GuardaLogAD("LogPrePolizas"); - } - } - + if (MsgError.Equals("")) { if (Msg.ToString().Equals("")) diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb index f27450da1..40d7ad541 100644 --- a/Bancos/PolizaCheque.aspx.vb +++ b/Bancos/PolizaCheque.aspx.vb @@ -849,7 +849,8 @@ Partial Class Bancos_PolizaCheque 'Dim Conta As ClsContPAQi = Nothing Dim IDPoliza As Integer = 0 Dim CveIE As Integer - Dim MsgError As String = "" + Dim MsgError As String = "" + Dim idCuentaContabilizacion As Long = 1 'If ChkContabilizar.Checked AndAlso UsuarioActual.Empresa.UsaContabilidad Then ' Conta = New ClsContPAQi(UsuarioActual.Empresa) @@ -875,7 +876,8 @@ Partial Class Bancos_PolizaCheque Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuenta.SelectedValue)) If dr IsNot Nothing Then CveMoneda = dr("CveMoneda").ToString.ToEntero - End If + End If + Dim TC As Decimal = If(CveMoneda > 1, GlobalTipoCambio(TxtFechaDocumento.Text.ToDate), 1) Dim CveTipoPoliza As Integer = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla).FiltroPrimeroValor("TipoPoliza", String.Format("CvePlantillaPoliza={0}", DdlPlantilla.SelectedValue)).ToEntero CvePrePoliza = ObjMov.AddPrePolizas("PolizaCheque/Guardar", DdlPlantilla.SelectedValue.ToEntero, TotalCargos, TotalAbonos, 1, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=CveTipoPoliza) @@ -886,8 +888,8 @@ Partial Class Bancos_PolizaCheque If CvePrePoliza > 0 Then - Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:

" - Dim idCuentaContabilizacion As Long = 1 + Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:

" + Dim Importe As Double = 0 Dim TipoMovto As Boolean = False Dim IdCtaContable As Integer = 0 @@ -958,20 +960,6 @@ Partial Class Bancos_PolizaCheque End If - 'El movimiento 2 es el de Pago - If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then - If idCuentaContabilizacion > 0 Then - If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - 'Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion) - IDPoliza = ObjMov.ContaIdPoliza - Else - Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) - End If - Else - Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas", TipoMensaje.MsgError) - End If - End If - If CvePeriodo > 0 Then If Not ObjNom.UpdatePagoNomina(CvePeriodo, CveIE, CvePrePoliza, UsuarioActual.CveEmpresa) Then MsgError = "No se pudo actualizar el periodo de la nómina" @@ -1008,8 +996,25 @@ Partial Class Bancos_PolizaCheque Else MsgError = "No se pudo validar la prepoliza de cuadre." End If + End If + + + 'El movimiento 2 es el de Pago + If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then + If idCuentaContabilizacion > 0 Then + If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then + 'Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion) + IDPoliza = ObjMov.ContaIdPoliza + Else + MsgError = "Error al contabilizar" + Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) + End If + Else + Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas", TipoMensaje.MsgError) + End If End If + If MsgError = "" Then ObjIE.Commit() From 3f2ef4bf72ef4bb934ff361f60188e02210e623f Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 Oct 2020 12:47:57 -0700 Subject: [PATCH 05/18] -- cambio en pasos de valida cuadre y contabilidad --- Contabilidad/RegPrePoliza1.aspx.vb | 26 ++++++++++++++------------ Contabilidad/RegPrePolizaS.aspx.vb | 28 +++++++++++++++------------- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/Contabilidad/RegPrePoliza1.aspx.vb b/Contabilidad/RegPrePoliza1.aspx.vb index bfa0a695d..24a9d6da5 100644 --- a/Contabilidad/RegPrePoliza1.aspx.vb +++ b/Contabilidad/RegPrePoliza1.aspx.vb @@ -856,6 +856,20 @@ Partial Class ContabilidadC_RegPrePoliza End If Next + If CvePeriodo > 0 Then + If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then + MsgError = "No se pudo actualizar el periodo de la nómina" + End If + End If + + If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then + If ObjMov.ValorPolizaDescuadre > 0 Then + GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") + MsgError = ObjMov.MensajePolizaDescuadre + End If + End If + + 'El movimiento 2 es el de Pago If ChkAutoConta.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then If idCuentaContabilizacion > 0 Then @@ -871,18 +885,6 @@ Partial Class ContabilidadC_RegPrePoliza Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas") End If End If - If CvePeriodo > 0 Then - If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then - MsgError = "No se pudo actualizar el periodo de la nómina" - End If - End If - - If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then - If ObjMov.ValorPolizaDescuadre > 0 Then - GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") - MsgError = ObjMov.MensajePolizaDescuadre - End If - End If Else MsgError = "No se pudo insertar la póliza" diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index cfa135354..2c17d3d82 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -853,7 +853,21 @@ Partial Class ContabilidadC_RegPrePolizaS End If Next - 'El movimiento 2 es el de Pago + If CvePeriodo > 0 Then + If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then + MsgError = "No se pudo actualizar el periodo de la nómina" + End If + End If + + If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then + If ObjMov.ValorPolizaDescuadre > 0 Then + GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") + MsgError = ObjMov.MensajePolizaDescuadre + End If + End If + + + 'El movimiento 2 es el de Pago If ChkAutoConta.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then If idCuentaContabilizacion > 0 Then If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then @@ -868,18 +882,6 @@ Partial Class ContabilidadC_RegPrePolizaS Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas") End If End If - If CvePeriodo > 0 Then - If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then - MsgError = "No se pudo actualizar el periodo de la nómina" - End If - End If - - If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then - If ObjMov.ValorPolizaDescuadre > 0 Then - GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") - MsgError = ObjMov.MensajePolizaDescuadre - End If - End If Else MsgError = "No se pudo insertar la póliza" From 42a767e2ee738aa4d545aa75b18ef6bc4e9008a7 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 Oct 2020 12:49:20 -0700 Subject: [PATCH 06/18] -- cambio de GlobalDTAlmacen --- App_Code/ClsPaginas.vb | 30 +++++++++++++++++++++++++++--- Global.asax | 2 +- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index a3d763c62..eb0be2aa0 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1809,6 +1809,13 @@ Public Class ClsPaginas Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable Get + Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) + 'sino existe, recarga los datos + If Application(AppNombre) Is Nothing Then + Dim ObjUsr As New ClsInventarios + If ObjUsr.GetAlmacenes(-1, -1, CveEmpresa, -1) Then Application(AppNombre) = ObjUsr.DtResultados + ObjUsr.Dispose() + End If Dim Str As New StringBuilder Str.Append("1=1 AND ") @@ -1817,14 +1824,31 @@ Public Class ClsPaginas If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus) If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) - Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) GlobalDTAlmacen = Dv.ToTable Dv.Dispose() - End Get Set(value As DataTable) - Application("GlobalDTAlmacen") = value + Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) + Application(AppNombre) = value End Set + 'Get + + ' Dim Str As New StringBuilder + ' Str.Append("1=1 AND ") + ' If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) + ' If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) + ' If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus) + ' If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen) + + ' Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + ' GlobalDTAlmacen = Dv.ToTable + ' Dv.Dispose() + + 'End Get + 'Set(value As DataTable) + ' Application("GlobalDTAlmacen") = value + 'End Set End Property Property GlobalDTAlmacenUsuarios(CveUsuario As Integer, CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = 1, Optional CveEstatus As Integer = 1) As DataTable Get diff --git a/Global.asax b/Global.asax index 857349e12..f095b7118 100644 --- a/Global.asax +++ b/Global.asax @@ -208,7 +208,7 @@ 'I N V E N T A R I O S Using Objinventarios As New ClsInventarios - If Objinventarios.GetAlmacenes(-1, -1, -1, -1) Then Application("GlobalDTAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTAlmacen") = Nothing + 'If Objinventarios.GetAlmacenes(-1, -1, -1, -1) Then Application("GlobalDTAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTAlmacen") = Nothing If Objinventarios.GetSeccionesAlmacenes(-1, -1) Then Application("GlobalDTSeccionAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTSeccionAlmacen") = Nothing If Objinventarios.GetTiposAlmacenes Then Application("GlobalDTTipoAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTTipoAlmacen") = Nothing If Objinventarios.GetConceptos Then Application("GlobalDTInvConceptos") = Objinventarios.DtResultados Else Application("GlobalDTInvConceptos") = Nothing From a8bdb1959b8de35e1777ac8aa7a7d130f9a1286e Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 Oct 2020 12:52:39 -0700 Subject: [PATCH 07/18] -- cambios valida y cuadre --- Bancos/ProductosFinancieros.aspx.vb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Bancos/ProductosFinancieros.aspx.vb b/Bancos/ProductosFinancieros.aspx.vb index c37c9eb41..ec2761da3 100644 --- a/Bancos/ProductosFinancieros.aspx.vb +++ b/Bancos/ProductosFinancieros.aspx.vb @@ -373,6 +373,11 @@ Partial Class Bancos_ProductosFinancieros Next + + If Not ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then + ErrorTransaccion = True + End If + 'Por el momento no hay movimiento para estas plantillas y no debe entrar aqui If UsuarioActual.Empresa.Funcionalidad(200).ToEntero > 0 And Not ErrorTransaccion Then If idCuentaContabilizacion > 0 Then @@ -386,9 +391,6 @@ Partial Class Bancos_ProductosFinancieros End If End If - If Not ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then - ErrorTransaccion = True - End If End If From a29d3626d0ab5031a90973e798ea1fc2061916c9 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Thu, 15 Oct 2020 15:06:56 -0700 Subject: [PATCH 08/18] Bloquear clasificacion, subproyecto cuando exista almacen --- OC/OC.aspx | 2 +- OC/OC.aspx.vb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OC/OC.aspx b/OC/OC.aspx index 01867c377..b2d5821c9 100644 --- a/OC/OC.aspx +++ b/OC/OC.aspx @@ -871,7 +871,7 @@ + DataKeyNames="SubProyecto, Cantidad, Importe, Descuento, CveOrdenCompra, CveUnidadMedida, CvePresupuestoEgreso, PS,CveClasificacion, CvePS, CveSubProyecto, CveActivoFijo, CodigoAF, TipoDato, Observacion, CveOrdenCompraDetalle,CveCompra,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje,CantidadNoEditable" data-tableheader=".GVDHeader" ShowHeader="false" data-rows="0"> diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index dc0d4a830..35b261248 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -3741,7 +3741,7 @@ Partial Class OC CargaDatosDetalles() Dim EditingRow As GridViewRow = GvD.Rows(e.NewEditIndex) If Not EsCreaApartirDe Then - If EditingRow.DataKey("TipoDato").ToEntero = 2 Then + If EditingRow.DataKey("TipoDato").ToEntero = 2 Or EditingRow.DataKey("CantidadNoEditable").ToDecimal > 0 Then EditingRow.FCDropDownList("DdlClasificacion").Enabled = False EditingRow.FCDropDownList("DdlPS").Enabled = False EditingRow.FCDropDownList("CboUnidadMedidaEdit").Enabled = False From 5aa711c5df3cc4827eec672158e0d25d8f638fbe Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Thu, 15 Oct 2020 19:23:15 -0700 Subject: [PATCH 09/18] --- Scripts/custom.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Scripts/custom.js b/Scripts/custom.js index ced6aaba3..87e85c300 100644 --- a/Scripts/custom.js +++ b/Scripts/custom.js @@ -1174,7 +1174,9 @@ function setwebservice(idDdlWS, idhdValue, idhdText, btn) { CveSubProyecto: (!(DdlWS.data('cvesubproyecto')) || DdlWS.data('cvesubproyecto') == '') ? ((!(DdlWS.parent().data('cvesubproyecto')) || DdlWS.parent().data('cvesubproyecto') == '') ? -1 : DdlWS.parent().data('cvesubproyecto')) : DdlWS.data('cvesubproyecto'), metodo: (!(DdlWS.data('metodo')) || DdlWS.data('metodo') == 'getps') ? ((!(DdlWS.parent().data('metodo')) || DdlWS.parent().data('metodo') == 'getps') ? 'getps' : DdlWS.parent().data('metodo')) : DdlWS.data('metodo'), Pagina: (!(DdlWS.data('pagina')) || DdlWS.data('pagina') == '') ? '-2' : DdlWS.data('pagina'), - ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto') + ColTexto: (!(DdlWS.data('coltexto')) || DdlWS.data('coltexto') == '') ? 'NC' : DdlWS.data('coltexto'), + aplicaparaventa: (!(DdlWS.data('aplicaparaventa')) || DdlWS.data('aplicaparaventa') == '') ? -1 : DdlWS.data('aplicaparaventa') + //Metodo: metodo }; }, From 6eb4cd9814ac837056b3f68d3b11340f5d2e55ea Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 15 Oct 2020 20:03:09 -0700 Subject: [PATCH 10/18] Pendientes BDH --- App_Code/Modelos.vb | 47 ++-- Compras/PopUpVerFactura.aspx.vb | 182 +++++++------- Inventarios/RecepcionAlmacen.aspx.vb | 5 +- Ventas/Clientes.aspx | 2 +- Ventas/Clientes.aspx.vb | 20 +- Ventas/PV.aspx | 65 ++--- Ventas/PV.aspx.vb | 56 +++++ Ventas/Ventas.aspx | 160 ++++++++---- Ventas/Ventas.aspx.vb | 350 ++++++++++++++++----------- 9 files changed, 557 insertions(+), 330 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index deb17d739..220d9dcb6 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -1366,10 +1366,6 @@ Namespace Modelos End If - If Not GuardarUsados(ObjVentas.IniciaTransacSQL, ObjVentas.CveVenta, ObjVentas, factura.TipoDocto) Then - ErrorList.Add("Error al guardar usados") - End If - If ErrorList.Count = 0 AndAlso ObjVentas.CveVenta > 0 Then @@ -1379,6 +1375,11 @@ Namespace Modelos factura.Timbre.Comprobante.Serie = ObjVentas.Serie factura.Timbre.Comprobante.Folio = ObjVentas.Folio.ToString + + If Not GuardarUsados(ObjVentas.IniciaTransacSQL, ObjVentas, factura) Then + ErrorList.Add("Error al guardar usados") + End If + If factura.TipoDocto = "Egs" AndAlso NuevaFactura = 1 Then If DtVentasNC Is Nothing Then InicializaDTVentasNC() @@ -1909,30 +1910,31 @@ Namespace Modelos DtVentasNC.Rows.Add(Dr) End If End Sub - Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, CveVenta As Integer, ByRef ObjVentas As ClsVentas, TipoDocto As String) As Boolean + Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, ByRef ObjVentas As ClsVentas, factura As Modelos.Factura) As Boolean Dim Resultado As Boolean = True - If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 AndAlso TipoDocto.Contiene("Ing", "Ant", "Rem") Then - Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero + If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then - Dim ObjAcum As New ClsAcumuladores(SqlTransaccion) + If factura.TipoDocto = "Ing" AndAlso factura.Cliente.EsDistribuidor Then + Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero - For Each drow As DataRow In DtDetalle.Rows - If drow("CveTamaño").ToString.ToEntero > 0 And (CvePSPSA <> drow("CvePS").ToString.ToEntero) Then - If ObjAcum.DistribuidorMovtosAdd(CveCliente, drow("Cantidad").ToString.ToEntero, drow("CveTamaño").ToString.ToEntero, 2, CveVenta, UsuarioActual.CveUsuario, - UsuarioActual.CveEmpresa, 0D, "") Then - Else - Resultado = False - Exit For + Dim ObjAcum As New ClsAcumuladores(SqlTransaccion) + + For Each drow As DataRow In factura.DtDetalle.Rows + If drow("CveTamaño").ToString.ToEntero > 0 And (CvePSPSA <> drow("CvePS").ToString.ToEntero) Then + If Not ObjAcum.DistribuidorMovtosAdd(CveCliente, drow("Cantidad").ToString.ToEntero, drow("CveTamaño").ToString.ToEntero, 2, CveVenta, UsuarioActual.CveUsuario, + UsuarioActual.CveEmpresa, 0D, "") Then + Resultado = False + Exit For + End If End If - Else - Resultado = True - End If - Next + Next - If TipoDocto.Contiene("Rem") Then - If DtRecepcionUsados IsNot Nothing Then - For Each drow As DataRow In DtRecepcionUsados.Rows + End If + + If factura.TipoDocto.Contiene("Rem") Then + If factura.DtRecepcionUsados IsNot Nothing Then + For Each drow As DataRow In factura.DtRecepcionUsados.Rows If Not ObjVentas.AddVentaUsado(CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("CveBCIUsado").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero) Then Resultado = False Exit For @@ -9302,6 +9304,7 @@ Namespace Modelos Public Property ClaveSATMunicipio As String Public Property ClaveSATColonia As String Public Property ClaveSATCP As String + Public Property EsDistribuidor As Boolean End Class diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index ebb9a654f..aadc8ad8e 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1275,23 +1275,23 @@ Partial Class PopUpVerFactura Dim FechaMovimiento As Date = ObjInventarios.FechaRegistro Dim CveMovimientoRelacionado As Integer = -1 - Dim FolioRelacionado As String = "" + Dim FolioRelacionado As String = "" Dim CveConceptoMovtoRelacionado As Integer = -1 'VERIFICA SI TIENE MOVIMIENTO VIRTUAL RELACIONADO If UsuarioActual.CveEmpresa = 140 AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then CveMovimientoRelacionado = ObjInventarios.DtResultados.Rows(0)("CveMtoRel").ToString().ToEntero() - If CveConcepto.Contiene(3, 26) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then - FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioVirtual") - CveConceptoMovtoRelacionado = 37 - ElseIf CveConcepto = 37 Then - FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado") - CveConceptoMovtoRelacionado = 3 + If CveConcepto.Contiene(3, 26) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then + FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioVirtual") + CveConceptoMovtoRelacionado = 37 + ElseIf CveConcepto = 37 Then + FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioRelacionado") + CveConceptoMovtoRelacionado = 3 End If - End If - - - + End If + + + Dim CantidadProductos As Decimal = 0 Dim CantidadUsados As Decimal = 0 @@ -1567,8 +1567,8 @@ Partial Class PopUpVerFactura Dim concepto As String = "" If CveConcepto = 3 Then concepto = "SALIDA DE ALMACÉN" - ElseIf CveConcepto = 37 Then - concepto = "SALIDA VIRTUAL" + ElseIf CveConcepto = 37 Then + concepto = "SALIDA VIRTUAL" Else concepto = "SALIDA DE ALMACÉN POR RECONSTRUCCIÓN" End If @@ -1705,34 +1705,34 @@ Partial Class PopUpVerFactura 'ImprimirPDF(String.Format("Empresas/{0}/Formatos/Salidas.rdlc", 72), DtMovimientos, params, "ReporteSalidas", RDSName:="DsInventarios") ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") - ElseIf UsuarioActual.CveEmpresa = 140 Then - - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) - Else - params.Add(New ReportParameter("LogoPath", "")) - End If - - params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("Concepto", concepto)) - params.Add(New ReportParameter("Almacen", Almacen)) - params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FacturaProveedor", FolioVenta)) - params.Add(New ReportParameter("FacturadoA", If(DtMovimientos(0)("Nombre").ToString <> "", DtMovimientos(0)("Nombre").ToString, NombreCliente))) - params.Add(New ReportParameter("Observaciones", Observaciones)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) - params.Add(New ReportParameter("Folio", Folio)) - params.Add(New ReportParameter("Descuentos", "")) - params.Add(New ReportParameter("IVA", "")) - params.Add(New ReportParameter("Total", "")) - 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) - params.Add(New ReportParameter("NombreRecibio", Recibio)) - params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString())) - params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado)) - - ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") + ElseIf UsuarioActual.CveEmpresa = 140 Then + + Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + params.Add(New ReportParameter("LogoPath", logouri)) + Else + params.Add(New ReportParameter("LogoPath", "")) + End If + + params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("Concepto", concepto)) + params.Add(New ReportParameter("Almacen", Almacen)) + params.Add(New ReportParameter("Fecha", Fecha)) + params.Add(New ReportParameter("FacturaProveedor", FolioVenta)) + params.Add(New ReportParameter("FacturadoA", If(DtMovimientos(0)("Nombre").ToString <> "", DtMovimientos(0)("Nombre").ToString, NombreCliente))) + params.Add(New ReportParameter("Observaciones", Observaciones)) + params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("Folio", Folio)) + params.Add(New ReportParameter("Descuentos", "")) + params.Add(New ReportParameter("IVA", "")) + params.Add(New ReportParameter("Total", "")) + 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) + params.Add(New ReportParameter("NombreRecibio", Recibio)) + params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) + params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString())) + params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado)) + + ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") Else params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Fecha", Fecha)) @@ -2169,8 +2169,8 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("CantidadProductos", CantidadProductos.ToString())) - params.Add(New ReportParameter("CantidadUsados", CantidadUsados.ToString())) - params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString())) + params.Add(New ReportParameter("CantidadUsados", CantidadUsados.ToString())) + params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString())) params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado)) Else params.Add(New ReportParameter("Observaciones", Observaciones)) 'TxtObservaciones.Text @@ -2516,19 +2516,19 @@ Partial Class PopUpVerFactura If (UsuarioActual.CveEmpresa = 72) Then params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu)) End If - ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidasGarantia.rdlc", DtMovimientos, params, String.Format("SalidaGarantia{0}", Folio.ToString), RDSName:="DsInventarios") - 'Else - ' params.Add(New ReportParameter("Folio", Folio)) - ' params.Add(New ReportParameter("Fecha", Fecha)) - ' params.Add(New ReportParameter("Almacen", Almacen)) - ' params.Add(New ReportParameter("SubProyecto", SubProyecto)) - ' params.Add(New ReportParameter("Observaciones", Observaciones)) - ' params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) - ' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) - ' ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") - 'End If - - + ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidasGarantia.rdlc", DtMovimientos, params, String.Format("SalidaGarantia{0}", Folio.ToString), RDSName:="DsInventarios") + 'Else + ' params.Add(New ReportParameter("Folio", Folio)) + ' params.Add(New ReportParameter("Fecha", Fecha)) + ' params.Add(New ReportParameter("Almacen", Almacen)) + ' params.Add(New ReportParameter("SubProyecto", SubProyecto)) + ' params.Add(New ReportParameter("Observaciones", Observaciones)) + ' params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) + ' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) + ' ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") + 'End If + + Case 18 'D E V O L U C I O N D E L C L I E N T E Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DevolucionCliente.rdlc", UsuarioActual.Empresa.Ruta)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) @@ -2705,36 +2705,36 @@ Partial Class PopUpVerFactura ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios") ElseIf CveConcepto = 22 Then ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios") - End If - - 'Case 22 'ENTRADA POR PRESTAMO - ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - ' Dim params As New List(Of ReportParameter) - - ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - ' If Imagen.Exists Then - ' params.Add(New ReportParameter("LogoPath", logouri)) - ' Else - ' params.Add(New ReportParameter("LogoPath", "")) - ' End If - - ' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) - ' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo")) - ' params.Add(New ReportParameter("Almacen", Almacen)) - ' params.Add(New ReportParameter("Fecha", Fecha)) - ' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) - ' params.Add(New ReportParameter("Folio", Folio)) - ' params.Add(New ReportParameter("Descuentos", "")) - ' params.Add(New ReportParameter("IVA", "")) - ' params.Add(New ReportParameter("Total", "")) - ' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) - ' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) - ' params.Add(New ReportParameter("FacturadoA", NombreCliente)) - ' If (UsuarioActual.CveEmpresa = 72) Then - ' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu)) - ' End If - ' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios") - + End If + + 'Case 22 'ENTRADA POR PRESTAMO + ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + ' Dim params As New List(Of ReportParameter) + + ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + ' If Imagen.Exists Then + ' params.Add(New ReportParameter("LogoPath", logouri)) + ' Else + ' params.Add(New ReportParameter("LogoPath", "")) + ' End If + + ' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) + ' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo")) + ' params.Add(New ReportParameter("Almacen", Almacen)) + ' params.Add(New ReportParameter("Fecha", Fecha)) + ' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + ' params.Add(New ReportParameter("Folio", Folio)) + ' params.Add(New ReportParameter("Descuentos", "")) + ' params.Add(New ReportParameter("IVA", "")) + ' params.Add(New ReportParameter("Total", "")) + ' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) + ' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) + ' params.Add(New ReportParameter("FacturadoA", NombreCliente)) + ' If (UsuarioActual.CveEmpresa = 72) Then + ' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu)) + ' End If + ' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios") + Case 24 'SALIDA POR RESGUARDO If DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 20 Or DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 19 Then Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) @@ -3217,11 +3217,11 @@ Partial Class PopUpVerFactura If CveConcepto = 2 Then ElseIf CveConcepto = 3 Then End If - End Sub - - + End Sub + + #End Region - + #Region "OP = 'OC' - IMPRIME PDF OC" Private Sub ImprimePDFOC(CveOrdenCompra As Integer) Dim reporte As Byte() = NewGeneraBytesOC(CveOrdenCompra, ConBitacora:=(UsuarioActual.Empresa.Funcionalidad(119) = "1")) @@ -3576,7 +3576,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("RFC", dr("RFC").ToString)) params.Add(New ReportParameter("Puesto", dr("Puesto").ToString)) params.Add(New ReportParameter("PuestoEntrego", dr("PuestoEntrego").ToString)) - params.Add(New ReportParameter("Departamento", dr("Departamento").ToString)) + params.Add(New ReportParameter("Departamento", dr("Departamento").ToString)) params.Add(New ReportParameter("DepartamentoEntrego", dr("DepartamentoEntrego").ToString)) params.Add(New ReportParameter("Folio", dr("Folio").ToString)) params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString)) diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index b6f55b9e9..668575094 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -972,9 +972,12 @@ Partial Class Inventarios_RecepcionAlmacen CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero 'SI ES MOTOBATERIA NO GENERA MOVIMIENTO VIRTUAL - If UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso (DtRecepcion.COUNT("CveTamaño", "CveTamaño > 0 AND CveTamaño <> 16") > 0 OrElse CargaSoloUsados) Then + If UsuarioActual.Empresa.Funcionalidad(573) = "1" AndAlso (DtRecepcion.COUNT("CveTamaño", "CveTamaño > 0 AND CveTamaño <> 16") > 0) Then RealizarMovimientoVirtual = True DivVirtualAdvertencia.Visible = True + Else + RealizarMovimientoVirtual = False + DivVirtualAdvertencia.Visible = False End If If TipoMovimiento = 2 AndAlso CveAlmacenDevolucionProveedor > 0 Then diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 391f5f8cb..a52d606c4 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -378,7 +378,7 @@
- +
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index ca113dc39..35ca1ceff 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -845,6 +845,12 @@ Partial Class Clientes If Request("CveEmpresaCRM") IsNot Nothing AndAlso IsNumeric(Request("CveEmpresaCRM")) AndAlso Request("CveEmpresaCRM").ToEntero > 0 Then ViewState("CveEmpresaCRM") = Request("CveEmpresaCRM") CargaDatosCRM() + End If + + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then ' Funcionalidad Es Distribuidor + DivEsDistribuidor.Visible = True + DivCargoUsado.Visible = True + DivBonificacionUsado.Visible = True End If ChecaPermiteCredito() @@ -10190,6 +10196,18 @@ Partial Class Clientes GvPagosNoBancarios.DataBind() End If ObjBancos.Dispose() - End Sub + End Sub + Protected Sub TxtCodigo_TextChanged(sender As Object, e As EventArgs) + + If CveCliente <= 0 AndAlso UsuarioActual.CveEmpresa = 140 Then + DdlTipoCliente.SelectedValueExist("1") + ChkEsDistribuidor.Checked = True + ChkCargoUsado.Checked = True + ChkBonificacionUsado.Checked = True + End If + + UpDatos.Update() + + End Sub End Class diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index d93efb1b6..af87d4902 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -1,4 +1,4 @@ -<%@ Page Title="Ventas - Facturación" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PV.aspx.vb" Inherits="PV" EnableEventValidation="false"%> +<%@ Page Title="Ventas - Facturación" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PV.aspx.vb" Inherits="PV" EnableEventValidation="false" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <%--Necesario para el modal que no se cierra--%> @@ -621,7 +621,7 @@ - <%--0--%> @@ -2374,25 +2374,25 @@
-
- -
- - - - - - +
- - +
+ + + + + + + + +
- - - - - + + + + +
@@ -2571,7 +2571,7 @@
- +
- +
@@ -2960,16 +2960,19 @@
-
-
+
+
- + + <%----%> <%----%> - +
-
+
+
+
@@ -2978,7 +2981,7 @@
-
+
@@ -2991,7 +2994,7 @@
- +
@@ -4316,23 +4316,18 @@
- <%----%> Bitacora
- <%--
- - Agregar -
--%>
Agendar
-
@@ -6799,7 +6794,7 @@ - + @@ -6876,23 +6871,24 @@
- - -
-
- - - - - - -
Saldo Maximo Utilizable.: -   -
+
+
+ + + + + + +
Saldo Maximo Utilizable.: +   +
+
+
+ + + + + + + + + + + + + + diff --git a/Acumuladores/CatFoliosGarantia.aspx.vb b/Acumuladores/CatFoliosGarantia.aspx.vb index 8647f5a96..f891e5530 100644 --- a/Acumuladores/CatFoliosGarantia.aspx.vb +++ b/Acumuladores/CatFoliosGarantia.aspx.vb @@ -216,12 +216,34 @@ Partial Class Acumuladores_CatFoliosGarantia RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarFolioGarantia")) - End Sub + End Sub + + Public Sub ImgVer_Click(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + CveFolioGarantia = GvRow.DataKey("CveFolioGarantia") + LblFolio.Text = GvRow.DataKey("FolioGarantia") + + Using ObjAcum As New ClsAcumuladores + If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia) Then + GvGarantiasDetalle.DataSource = ObjAcum.DtResultados + End If + End Using + GvGarantiasDetalle.DataBind() + + UpGarantiasDetalle.Update() + + RegistraScript("$('#DivGarantiasDetalle').modal('show');") + + End Sub + + + + #End Region - + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) CargadatosGvFolioGarantia(DdlEstatus.SelectedValue.ToEntero, DdlTipoFolio.SelectedValue) End Sub diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index d2b74dfa7..7f2c2e6ca 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -1126,6 +1126,25 @@ Public Class ClsAcumuladores Return Retorno End Function + Public Function GetFoliosGarantiasDetalle(CveFolioGarantia As Integer) As Boolean + Dim Retorno As Boolean = False + + SqlDataAdapter("PA_Acum_GarantiasDetalleFolioGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al consultar los movimientos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + #Region " IDisposable Support " diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 220d9dcb6..1a6d06c81 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -1922,7 +1922,7 @@ Namespace Modelos For Each drow As DataRow In factura.DtDetalle.Rows If drow("CveTamaño").ToString.ToEntero > 0 And (CvePSPSA <> drow("CvePS").ToString.ToEntero) Then - If Not ObjAcum.DistribuidorMovtosAdd(CveCliente, drow("Cantidad").ToString.ToEntero, drow("CveTamaño").ToString.ToEntero, 2, CveVenta, UsuarioActual.CveUsuario, + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToEntero, drow("CveTamaño").ToString.ToEntero, 2, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "") Then Resultado = False Exit For @@ -1935,7 +1935,7 @@ Namespace Modelos If factura.TipoDocto.Contiene("Rem") Then If factura.DtRecepcionUsados IsNot Nothing Then For Each drow As DataRow In factura.DtRecepcionUsados.Rows - If Not ObjVentas.AddVentaUsado(CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("CveBCIUsado").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero) Then + If Not ObjVentas.AddVentaUsado(factura.CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("CveBCIUsado").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero) Then Resultado = False Exit For End If diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 83d578c62..5ac9815d2 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -7182,6 +7182,38 @@ } } + function CalculaSaldoRNCBonChk(TxtImporte, Saldo, Chk) { + if (Chk.checked) { + TxtImporte.value = FormatoNumero(Saldo, 2); + } else { + TxtImporte.value = ""; + } + } + function LimitaSaldoRNCBonChk(TxtImporte, Saldo) { + var Importe = 0; + + if (TxtImporte.value.includes('.')) { + return; + } + if (TxtImporte.value.includes(',')) { + return; + } + + var regex = new RegExp("^[-+]?[0-9]+\.[0-9]+$"); + + if (regex.test(TxtImporte.value)) { + if (TxtImporte.value != '') { + Importe = parseFloat(TxtImporte.value); + } + + if (Importe > Saldo) { + TxtImporte.value = FormatoNumero(Saldo, 2); + } else { + TxtImporte.value = FormatoNumero(Importe, 2);; + } + } + } + function CalculaTotalChk(Total, SubTotal, TxtTotalGv, TxtImporte, Saldo, Porcentaje, Chk) { var Importe = 0, ImporteSinPorcentaje = 0; Importe = ($('#C_DdlNCNivelImporte').val() == "1" ? Total : SubTotal); @@ -7629,7 +7661,7 @@ $get("TxtCambio").value = "0.00"; } - $get("TxtImporteContado").value = total; + $get("TxtImporteContado").value = total - totalRNC; } // **************************************************************************************************************************************************************************** diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 39ef4aaff..58f1d0fa1 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -1791,6 +1791,15 @@ Partial Class Ventas End Set End Property + Private Property SerieVenta As String + Get + Return IfNull(ViewState("SerieVenta"), "", ViewState("SerieVenta")).ToString() + End Get + Set(value As String) + ViewState("SerieVenta") = value + End Set + End Property + #End Region '#Region "AuxiliarConta" @@ -4070,7 +4079,9 @@ Partial Class Ventas ViewState("FolioFiscal") = DbRowVenta("FolioFiscal").ToString() - LblSerie.Text = DbRowVenta("Serie").ToString() + + SerieVenta = DbRowVenta("Serie").ToString() + LblSerie.Text = SerieVenta ViewState("Serie") = DbRowVenta("Serie").ToString() ViewState("Folio") = DbRowVenta("Folio").ToString().ToEntero() TxtFolio.Text = DbRowVenta("Folio").ToString() @@ -15071,7 +15082,11 @@ Partial Class Ventas 'ViewState("NumAprobacion") = CLng(DT.Rows(0)("Aprobacion").ToString()) 'ViewState("FechaAprobacion") = DT.Rows(0)("FechaAprobacion").ToString().ToDate ViewState("FolioActual") = DT.Rows(0)("FActual").ToString() - LblSerie.Text = DT.Rows(0)("Serie").ToString() + If UsuarioActual.CveEmpresa = 140 AndAlso CveVenta > 0 AndAlso Not EsCreaApartirDe AndAlso Not String.IsNullOrEmpty(SerieVenta) Then + LblSerie.Text = SerieVenta + Else + LblSerie.Text = DT.Rows(0)("Serie").ToString() + End If TxtFolio.Text = DT.Rows(0)("FActual").ToString() BtnCrearApartirDe.Enabled = True BtnEmitirImprimir.Visible = True @@ -15126,7 +15141,13 @@ Partial Class Ventas 'ViewState("SubProyectoPorcentajeIVA") = dr("IVA") ViewState("TipoFormato") = dr("TipoFormato") ViewState("Serie") = dr("Serie") - LblSerie.Text = dr("Serie").ToString() + + If UsuarioActual.CveEmpresa = 140 AndAlso Me.CveVenta > 0 AndAlso Not EsCreaApartirDe AndAlso Not String.IsNullOrEmpty(SerieVenta) Then + LblSerie.Text = SerieVenta + Else + LblSerie.Text = dr("Serie").ToString() + End If + If SerieXML <> "" Then LblSerie.Text = SerieXML Dim CveSubProyecto As Integer = GetSubProyectoSucursal() If CveSubProyecto > 0 Then CargaSubProyecto(CveSubProyecto) @@ -23283,8 +23304,8 @@ Partial Class Ventas End Sub Protected Sub GvDescNCBonificaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDescNCBonificaciones.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);") - e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaSaldoRNCChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble});") + e.Row.FCCheckBox("ChkAplicar").Attributes.Add("onclick", $"CalculaSaldoRNCBonChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble}, this);") + e.Row.FCTextBox("TxtImporte").Attributes.Add("onkeyup", $"LimitaSaldoRNCBonChk({e.Row.FCTextBox("TxtImporte").ClientID},{e.Row.DBCampo("Saldo").ToDouble});") End If End Sub @@ -26577,7 +26598,7 @@ Partial Class Ventas For Each drow As DataRow In factura.DtDetalle.Rows If drow("CveTamaño").ToString.ToEntero > 0 And (CvePSPSA <> drow("CvePS").ToString.ToEntero) Then - If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToEntero, drow("CveTamaño").ToString.ToEntero, 2, CveVenta, UsuarioActual.CveUsuario, + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToEntero, drow("CveTamaño").ToString.ToEntero, 2, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "") Then Resultado = False Exit For From 7f612041bf2b8b55599d4feb546375f5dd83b11c Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 16 Oct 2020 12:52:01 -0700 Subject: [PATCH 13/18] cambio en log --- App_Code/ClsPaginas.vb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index b8fed70d2..a1583a93a 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -986,13 +986,6 @@ Public Class ClsPaginas Dim P As New ClsSubProyectos If P.GetSubProyectos(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = P.DtResultados P.Dispose() - - Dim msg As String = "aqui no se carga subproyectos" - If Request IsNot Nothing Then - msg = msg & Request.ServerVariables("URL") - End If - msg.GuardaLog() - End If If CveProyecto <> -1 OrElse CveSubProyecto <> -1 OrElse CveEmpresa <> -1 OrElse Estatus <> -1 Then From 40edf8879df49fa7bb8e9b80607e21ee93a7f719 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 16 Oct 2020 12:52:29 -0700 Subject: [PATCH 14/18] -- cambio en la carga de global --- Inventarios/CatAlmacenes.aspx.vb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Inventarios/CatAlmacenes.aspx.vb b/Inventarios/CatAlmacenes.aspx.vb index a0b990035..f447eba09 100644 --- a/Inventarios/CatAlmacenes.aspx.vb +++ b/Inventarios/CatAlmacenes.aspx.vb @@ -215,11 +215,11 @@ Partial Class Inventarios_CatAlmacenes Private Sub RecargaGlobalAlmacenes() GlobalDTAlmacen(UsuarioActual.CveEmpresa) = Nothing - 'Dim ObjAlmacen As New ClsInventarios - 'If ObjAlmacen.GetAlmacenes(-1, -1, -1, -1) Then - ' GlobalDTAlmacen(-1) = ObjAlmacen.DtResultados - 'End If - 'ObjAlmacen.Dispose() + Dim ObjAlmacen As New ClsInventarios + If ObjAlmacen.GetAlmacenes(-1, -1, -1, -1) Then + GlobalDTAlmacen(-1) = ObjAlmacen.DtResultados + End If + ObjAlmacen.Dispose() End Sub Private Sub RecargaGlobalAlmacenesUsuarios() From 5b230881bd9d8444b7e906f40b391d785a6bf97e Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 16 Oct 2020 12:52:38 -0700 Subject: [PATCH 15/18] cambios en global --- Inventarios/CatAlmacenes.aspx.vb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Inventarios/CatAlmacenes.aspx.vb b/Inventarios/CatAlmacenes.aspx.vb index f447eba09..a0b990035 100644 --- a/Inventarios/CatAlmacenes.aspx.vb +++ b/Inventarios/CatAlmacenes.aspx.vb @@ -215,11 +215,11 @@ Partial Class Inventarios_CatAlmacenes Private Sub RecargaGlobalAlmacenes() GlobalDTAlmacen(UsuarioActual.CveEmpresa) = Nothing - Dim ObjAlmacen As New ClsInventarios - If ObjAlmacen.GetAlmacenes(-1, -1, -1, -1) Then - GlobalDTAlmacen(-1) = ObjAlmacen.DtResultados - End If - ObjAlmacen.Dispose() + 'Dim ObjAlmacen As New ClsInventarios + 'If ObjAlmacen.GetAlmacenes(-1, -1, -1, -1) Then + ' GlobalDTAlmacen(-1) = ObjAlmacen.DtResultados + 'End If + 'ObjAlmacen.Dispose() End Sub Private Sub RecargaGlobalAlmacenesUsuarios() From 2dad7facdd184ccb7ddc0a1f0f191c64c7111bcc Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 16 Oct 2020 12:52:52 -0700 Subject: [PATCH 16/18] -- filtro de aplicaparaventa de la E140 --- Ashx/SIGWeb.ashx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 88ad21772..7b397f53f 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -661,6 +661,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152, 153) Then UsaGlobal = False + If CveEmpresa = 140 And Pagina.Contiene("ventas/ventas") Then + AplicaParaVenta = 1 + End If + Dim objInv As New ClsInventarios If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa) Then From dc48c3a86fa1dd60d92fe61ff2788c7f92eabf7f Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 16 Oct 2020 12:53:13 -0700 Subject: [PATCH 17/18] -- apoyo logistico --- Inventarios/RecepcionAlmacen.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index b6f55b9e9..f05469ab0 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -935,7 +935,7 @@ Partial Class Inventarios_RecepcionAlmacen End If If CveTipoCompra = 9 Then - CargaAlmacenes(-1, "21", CveTipoCompra) + CargaAlmacenes(-1, "27", CveTipoCompra) End If If CveTipoCompra = 10 Then From 7a97550f2f1bc252b866fc34d8015d9ad8be4c94 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 17 Oct 2020 09:38:48 -0700 Subject: [PATCH 18/18] -- deshabilitar generar NC de pub general --- Ventas/Ventas.aspx.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 58f1d0fa1..8df466012 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -23016,6 +23016,7 @@ Partial Class Ventas Exit Sub End If + DeshabilitarAplicarNotaDeCredito(LblRFC.Text) AplicaNCMasiva = False AplicaNC = False