From 97e0543c813821a15f91c65e1709c51f00a9c202 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 8 Nov 2021 10:49:08 -0700 Subject: [PATCH 01/33] Compras prodcutos servicios agrupador --- App_Code/ClsInventarios.vb | 6 +- Compras/RepProductosServicios.aspx.vb | 9 +- Compras/RepProductosServiciosDetalle.aspx.vb | 6 + .../RepEstadoResultadosPorSegmento.aspx.vb | 3 +- Contabilidad2/RepEstadoActividades.aspx.vb | 8 +- Empresas/160/Formatos/Factura.rdlc | 16 +- Inventarios/RepAnomalias.aspx | 131 ++++++++++-- Inventarios/RepAnomalias.aspx.vb | 201 +++++++++++++----- 8 files changed, 285 insertions(+), 95 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 605070a2a..34bdd0d95 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -2906,13 +2906,14 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetInventarioFisicoResultados(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional GPO As Integer = 1) As Boolean + Public Function GetInventarioFisicoResultados(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional GPO As Integer = 1, Optional Opcion As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_InventarioFisicoResultadosGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@GPO", SqlDbType.Int).Value = GPO + .Add("@Opcion", SqlDbType.Int).Value = Opcion End With Try SqlAdapter.Fill(Data) @@ -2923,13 +2924,14 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetInventarioFisicoResultadosAvance(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional GPO As Integer = 1) As Boolean + Public Function GetInventarioFisicoResultadosAvance(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional GPO As Integer = 1, Optional Opcion As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_InventarioFisicoResultadoAvance") With SqlAdapter.SelectCommand.Parameters .Add("@CveInventarioFisico", SqlDbType.Int).Value = CveInventarioFisico .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@GPO", SqlDbType.Int).Value = GPO + .Add("@Opcion", SqlDbType.Int).Value = Opcion End With Try SqlAdapter.Fill(Data) diff --git a/Compras/RepProductosServicios.aspx.vb b/Compras/RepProductosServicios.aspx.vb index bed86756b..b3d4480b2 100644 --- a/Compras/RepProductosServicios.aspx.vb +++ b/Compras/RepProductosServicios.aspx.vb @@ -191,6 +191,13 @@ Partial Class Compras_RepProductosServicios DdlGrupo.Items.Insert(7, New ListItem("Proveedor", "10")) DdlGrupo.Items.Insert(8, New ListItem("Usuario", "11")) DdlGrupo.Items.Insert(9, New ListItem("Estatus Fact.", "12")) + + 'Agrega el grupo si es una empresa Agricola + If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then + DdlGrupo.Items.Insert(9, New ListItem("Cultivo", "15")) + End If + + DdlGrupo.DataBind() DdlGrupo.SelectedValueExist("8") End Sub @@ -296,7 +303,7 @@ Partial Class Compras_RepProductosServicios Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If DdlGrupo.SelectedValue.ToEntero < 13 Then + If DdlGrupo.SelectedValue.ToEntero < 13 Or DdlGrupo.SelectedValue.ToEntero = 15 Then If e.Row.DBCampo("GpoID") = "1" Then e.Row.Cells(0).Text = e.Row.DBCampo("Moneda") e.Row.CssClass = "Totales" diff --git a/Compras/RepProductosServiciosDetalle.aspx.vb b/Compras/RepProductosServiciosDetalle.aspx.vb index 9e444510f..879869d8f 100644 --- a/Compras/RepProductosServiciosDetalle.aspx.vb +++ b/Compras/RepProductosServiciosDetalle.aspx.vb @@ -296,6 +296,12 @@ Partial Class Compras_RepProductosServiciosDetalle DdlGrupo.Items.Insert(7, New ListItem("Proveedor", "10")) DdlGrupo.Items.Insert(8, New ListItem("Usuario", "11")) DdlGrupo.Items.Insert(9, New ListItem("Estatus Fact.", "12")) + + 'Agrega el grupo si es una empresa Agricola + If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then + DdlGrupo.Items.Insert(9, New ListItem("Cultivo", "15")) + End If + DdlGrupo.DataBind() DdlGrupo.SelectedValueExist("8") End Sub diff --git a/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb b/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb index a62d5c72a..f1953d5d4 100644 --- a/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb +++ b/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb @@ -269,9 +269,10 @@ Partial Class Contabilidad_RepEstadoResultadosPorSegmento If DSDatos IsNot Nothing AndAlso DSDatos.Tables.Count = 2 Then Try - HDSegmentos.Value = DSDatos.Tables(2).Rows(0)(0).ToString + liLnkDescarPersonalizado.Visible = True + Catch ex As Exception End Try diff --git a/Contabilidad2/RepEstadoActividades.aspx.vb b/Contabilidad2/RepEstadoActividades.aspx.vb index c9d8051e6..4f11a4492 100644 --- a/Contabilidad2/RepEstadoActividades.aspx.vb +++ b/Contabilidad2/RepEstadoActividades.aspx.vb @@ -254,8 +254,8 @@ Partial Class AC_RepEstadoActividades End If If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) + e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) End If @@ -283,8 +283,8 @@ Partial Class AC_RepEstadoActividades End If If e.Row.DBCampo("CtaMayor").ToString.ToEntero > 0 Then - e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) - e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString) + e.Row.FCHyperLink("HLActual").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) + e.Row.FCHyperLink("HLAnterior").NavigateUrl = String.Format("/Contabilidad2/RepAnexoCatalogo.aspx?CveCuenta={0}&FF={1}&FI={2}&ER=1&CveSubProyecto={3}", e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("FechaFActual").ToDate.ToShortDateString, e.Row.DBCampo("FechaInicial").ToDate.ToShortDateString, DdlSubproyecto.SelectedValue) End If If e.Row.DBCampo("ImporteActual").ToString.ToDouble < 0 Then diff --git a/Empresas/160/Formatos/Factura.rdlc b/Empresas/160/Formatos/Factura.rdlc index e33bc8fad..d5a7c40d2 100644 --- a/Empresas/160/Formatos/Factura.rdlc +++ b/Empresas/160/Formatos/Factura.rdlc @@ -1,5 +1,5 @@ - + 0 @@ -1368,19 +1368,6 @@ - - - + + + + true + true + + + + + Tipo Relación: + + + + + + + Textbox29 + 0.69848cm + 2.57101cm + 0.41981cm + 6.35221cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoRelacionTexto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.63922cm + + + 2.27051cm + + + 3.25097cm + + + 7.7847cm + + + + + 0.44125cm + + + + + true + true + + + + + Folio + + + + + + + Textbox10 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox21 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio Fiscal + + + + + + + Textbox11 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet4 + 1.22386cm + 2.57101cm + 0.85604cm + 15.9454cm + 2 + + + + + + true + true + + + + + VERSION 3.3 + + + + + + + Textbox5 + 2.15724cm + 17.53151cm + 0.52063cm + 3.32021cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + CFDI Relacionados + + + + + + + Textbox5 + 0.03101cm + 0.54004cm + 20.79183cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 15.5602cm + 0.16937cm + 2.67787cm + 20.85172cm + 20 + + =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) + + + + + - 15.90769cm + 18.23807cm + + + + + Reporte de Envíos + + + + + +<%-- + +
  • + Agregar Guía +
  • + +
  • + Generar PDF +
  • + +
  • + Generar Excel +
  • + +
    + + + + +
    --%> +
    + + + + + + +
    +
    +
    + + +
    + +
    +
    + Sucursal: +
    + + +
    + +
    + +
    + + +
    +
    + + + + +
    + + + + + + +
    + + +
    +
    + + + + +
    + + + + + + +
    + + +
    +
    +
    + +
    + +
    +
    + + + +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    + + + + + + diff --git a/General/RepPaqueteriasGuiasRuta.aspx.cs b/General/RepPaqueteriasGuiasRuta.aspx.cs new file mode 100644 index 000000000..6a38d21e6 --- /dev/null +++ b/General/RepPaqueteriasGuiasRuta.aspx.cs @@ -0,0 +1,433 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +using Extensiones; +using System.Data; +using Microsoft.Reporting.WebForms; +using System.IO; +using System.Text; + +public partial class General_RepPaqueteriasGuias : ClsPaginas +{ + #region PROPIEDADES + private DataTable DTDatos + { + get + { + return (DataTable)ViewState["DTDatos"]; + } + + set + { + ViewState["DTDatos"] = value; + } + } + + private int CveEntregaAlmacen + { + get + { + return ViewState["CveEntregaAlmacen"].ToString().ToEntero(); + } + + set + { + ViewState["CveEntregaAlmacen"] = value; + } + } + + private int CveVenta + { + get + { + return ViewState["CveVenta"].ToString().ToEntero(); + } + + set + { + ViewState["CveVenta"] = value; + } + } + + private int CveMovimiento + { + get + { + return ViewState["CveMovimiento"].ToString().ToEntero(); + } + + set + { + ViewState["CveMovimiento"] = value; + } + } + + private String SerieFolio + { + get + { + return ViewState["SerieFolio"].ToString(); + } + set + { + ViewState["SerieFolio"] = value; + } + } + + private String NombreCliente + { + get + { + return ViewState["NombreCliente"].ToString(); + } + set + { + ViewState["NombreCliente"] = value; + } + } + + private String Destinatario + { + get + { + return ViewState["Destinatario"].ToString(); + } + set + { + ViewState["Destinatario"] = value; + } + } + + private String Paqueteria + { + get + { + return ViewState["Paqueteria"].ToString(); + } + set + { + ViewState["Paqueteria"] = value; + } + } + private String Guia + { + get + { + return ViewState["Guia"].ToString(); + } + set + { + ViewState["Guia"] = value; + } + } + + private String Rastreo + { + get + { + return ViewState["Rastreo"].ToString(); + } + set + { + ViewState["Rastreo"] = value; + } + } + + + private DataTable DTMovimientos + { + get + { + return (DataTable)ViewState["DTMovimientos"]; + } + + set + { + ViewState["DTMovimientos"] = value; + } + } + + private int CvePaqueteriaGuiaReasignar + { + get + { + return ViewState["CvePaqueteriaGuiaReasignar"].ToString().ToEntero(); + } + + set + { + ViewState["CvePaqueteriaGuiaReasignar"] = value; + } + } + + private String Folio + { + get + { + return ViewState["Folio"].ToString(); + } + set + { + ViewState["Folio"] = value; + } + } + + #endregion + + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + CargaEstatus(); + CargaCombosModalEntrega(); + InicializaFechas(); + CargaChoferes(); + UPFiltros.Update(); + CargarCentrosDeCosto(null, DdlSucursales, null, LblDdlSucursal); + CargaDatos(); + } + } + + #region CARGA DDL + protected void CargaCombosModalEntrega() + { + ClsInventarios ObjInventarios = new ClsInventarios(); + + if (ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) && ObjInventarios.DtResultados.Rows.Count > 0) + { + DdlModalCamion.DataSource = ObjInventarios.DtResultados; + } + + ObjInventarios.Dispose(); + DdlModalCamion.Items.Insert(0, new ListItem("Seleccione", "-1")); + DdlModalCamion.DataBind(); + + ClsAcarreos ObjAcar = new ClsAcarreos(); + + if (ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1)) + { + DdlModalChofer.DataSource = ObjAcar.DtResultados; + DdlModalChofer.DataBind(); + } + ObjAcar.Dispose(); + DdlModalChofer.Items.Insert(0, new ListItem("Seleccione", "-1")); + } + protected void CargaChoferes() + { + ClsAcarreos ObjAcar = new ClsAcarreos(); + + if (ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1)) + { + DdlChofer.DataSource = ObjAcar.DtResultados; + } + ObjAcar.Dispose(); + DdlChofer.DataBind(); + DdlChofer.Items.Insert(0, new ListItem("Todos", "-1")); + } + + + + + + protected void CargaEstatus() + { + + DdlEstatus.Items.Insert(0, new ListItem("Todos ", "-1")); + DdlEstatus.Items.Insert(1, new ListItem("Registrado", "0")); + DdlEstatus.Items.Insert(2, new ListItem("Timbrado", "1")); + DdlEstatus.Items.Insert(3, new ListItem("Cancelado ", "2")); + + } + + + + + + protected void InicializaFechas() + { + + TxtFechaI.Text = DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy"); + TxtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy"); + + } + #endregion + + #region CARGA DATOS + protected void CargaDatos() + { + ClsGenerales ObjGeneral = new ClsGenerales(); + + if (ObjGeneral.GetInvEntregaAlmacenRutaRep(DdlSucursales.SelectedValue.ToEntero(),UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero(), TxtFechaI.Text.ToDate(), TxtFechaF.Text.ToDate(), DdlChofer.SelectedValue.ToEntero())) + { + DTDatos = ObjGeneral.DtResultados; + GVDatos.DataSource = DTDatos; + } + + ObjGeneral.Dispose(); + GVDatos.DataBind(); + UPDatos.Update(); + } + + + + + #endregion + + #region BOTONES + + protected void BtnConsultar_Click(object sender, EventArgs e) + { + CargaDatos(); + } + + protected void imgEditar_Click(object sender, EventArgs e) + { + GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); + + CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero(); + + int CveCliente = GvRow.DataKey("CveCliente").ToEntero(); + int CveDireccionOrigen = GvRow.DataKey("CveDireccionOrigen").ToEntero(); + int CveAlmacen = GvRow.DataKey("CveAlmacen").ToEntero(); + + CargaModalCombosDirecciones(CveCliente, CveDireccionOrigen, CveAlmacen); + + DdlModalDireccionOrigen.SelectedValueExist(GvRow.DataKey("CveDireccionOrigen")); + DdlModalDireccionDestino.SelectedValueExist(GvRow.DataKey("CveDireccionDestino")); + + DdlModalCamion.SelectedValueExist(GvRow.DataKey("CveCamion")); + DdlModalChofer.SelectedValueExist(GvRow.DataKey("CveChofer")); + + TxtmodalFechaEntrega.Text = GvRow.DataKey("FechaEntrega").ToDate().ToString("dd/MM/yyyy"); + + + UpModalEditarentrega.Update(); + this.RegistraScript("$('#DivEditarEntrega').modal('show');"); + } + + + private void CargaModalCombosDirecciones(int CveCliente, int CveDireccionOrigen, int CveAlmacen ) + { + + DdlModalDireccionOrigen.Items.Clear(); + DdlModalDireccionDestino.Items.Clear(); + + DataTable DTDireccionesCliente = new DataTable(); + ClsClientes ObjClientes = new ClsClientes(); + if (ObjClientes.DireccionEnvioGet(-1, -1, -1)) + { + DTDireccionesCliente = ObjClientes.DtResultados ; + } + ObjClientes.Dispose(); + + DdlModalDireccionDestino.DataSource = DTDireccionesCliente.FiltraParametros($"CveCliente = {CveCliente}"); + DdlModalDireccionDestino.DataBind(); + DdlModalDireccionDestino.Items.Insert(0,new ListItem("Seleccione Una", "-1")); + + string Almacen = get_GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen: CveAlmacen).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacen}"); + if (CveDireccionOrigen > 0) + { + DdlModalDireccionOrigen.DataSource = DTDireccionesCliente.FiltraParametros($"CveDireccionEnvio = {CveDireccionOrigen}"); + DdlModalDireccionOrigen.DataBind(); + DdlModalDireccionOrigen.Items.Insert(0, new ListItem($"Almacen: {Almacen}", "-2")); + }else + { + DdlModalDireccionOrigen.Items.Insert(0, new ListItem($"Almacen: {Almacen}", "-2")); + } + + } + + + protected void LnkTimbrar_Click(object sender, EventArgs e) + { + + } + + protected void LnkCancelaTimbre_Click(object sender, EventArgs e) + { + + } + + + protected void BtnModalEditarentrega_Click(object sender, EventArgs e) + { + + bool ProcesoOK = true ; + + ClsGenerales ObjGral = new ClsGenerales(); + if(!ObjGral.UpdateInvEntregaAlmacenRuta(CveEntregaAlmacen,DdlModalDireccionOrigen.SelectedValue.ToEntero(), DdlModalDireccionDestino.SelectedValue.ToEntero(), DdlModalChofer.SelectedValue.ToEntero(), DdlModalCamion.SelectedValue.ToEntero(), TxtmodalFechaEntrega.Text.ToDate(), UsuarioActual.CveEmpresa)) + { + ProcesoOK = false; + } + ObjGral.Dispose(); + + if (ProcesoOK) + { + this.RegistraScript("$('#DivEditarEntrega').modal('hide');"); + Alert("Entrega Actualizada correctamente."); + CargaDatos(); + } + + } + + protected void BtnEliminarGuia_Click(object sender, EventArgs e) + { + //EliminaGuia(); + //this.RegistraScript("$('#DivEditarGuia').modal('hide');"); + //CargaDatos(); + } + + protected void GVDatos_RowDataBound(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.DataRow) + { + LinkButton LnkEditar = e.Row.FCLinkButton("LnkEditar"); + LinkButton LnkTimbrar = e.Row.FCLinkButton("LnkTimbrar"); + LinkButton LnkCancelaTimbre = e.Row.FCLinkButton("LnkCancelaTimbre"); + + LnkEditar.Visible = false; + LnkTimbrar.Visible = false; + LnkCancelaTimbre.Visible = false; + + if (e.Row.DataKey("Estatus").ToEntero() == 0) + { + LnkEditar.Visible = true; + LnkTimbrar.Visible = true; + } + + if (e.Row.DataKey("Estatus").ToEntero() == 1) + { + LnkCancelaTimbre.Visible = true; + } + + if (e.Row.DataKey("Estatus").ToEntero() == 2) + { + + } + + } + } + + + + + + + + #endregion + + + + + + + + + + +} \ No newline at end of file diff --git a/Inventarios/EntregasPorRealizarRuta.aspx b/Inventarios/EntregasPorRealizarRuta.aspx new file mode 100644 index 000000000..3e76e78a9 --- /dev/null +++ b/Inventarios/EntregasPorRealizarRuta.aspx @@ -0,0 +1,295 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="EntregasPorRealizarRuta.aspx.cs" Inherits="Inventarios_EntregasPorRealizarRuta" %> + + + + + + + + + Entregas por Realizar + + + + + + + + + + + + +
    +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + + + + + +
    + +
    + Chofer: +
    +
    + + + +
    +
    + Unidad: +
    +
    + + + +
    + +
    + Fecha de Entrega: +
    + +
    +
    + + + + + + + + +
    +
    +
    + Carta Porte: +
    +
    + + +
    +
    + +
    + +
    + Generar Documentos +
    + +
    + +
    + +
    + +
    + + + +
    + + + + + +
    +
    + + ASIGNACIÓN DE ENTREGAS +
    +
    + +
    +
    +
    + + +
    +
    + + + + + + +   + + + + + +   + + + + <%----%> + + +   + + + + +   + + + + +   + + + + + + + + + +
    + +
    + + + +
    +
    + + + + + + + +   + + + + + + <%----%> + + + + + + + + + + + +   + + + + <%----%> + + +   + + + + +   + + + + +   + + + + + + + + + + + +
    + +
    + + + + + +
    +
    +
    +
    +
    + + + + + diff --git a/Inventarios/EntregasPorRealizarRuta.aspx.cs b/Inventarios/EntregasPorRealizarRuta.aspx.cs new file mode 100644 index 000000000..60f33e822 --- /dev/null +++ b/Inventarios/EntregasPorRealizarRuta.aspx.cs @@ -0,0 +1,389 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Data; +using Extensiones; +using Microsoft.Reporting.WebForms; +using System.Text; + +public partial class Inventarios_EntregasPorRealizarRuta : ClsPaginas +{ + + + DataTable DTGenrarDocumentos + { + get { + + if(ViewState["DTGenrarDocumentos"] == null){ + ViewState["DTGenrarDocumentos"] = new DataTable(); + } + return (DataTable)ViewState["DTGenrarDocumentos"]; + + } + set { + ViewState["DTGenrarDocumentos"] = (DataTable)value; + } + } + + DataTable DTDatosConsulta + { + get + { + + if (ViewState["DTDatosConsulta"] == null) + { + ViewState["DTDatosConsulta"] = new DataTable(); + } + return (DataTable)ViewState["DTDatosConsulta"]; + + } + set + { + ViewState["DTDatosConsulta"] = (DataTable)value; + } + } + + + bool SelecionEntrega + { + get + { + if (ViewState["SelecionEntrega"] == null) + { + ViewState["SelecionEntrega"] = false; + } + return (bool) ViewState["SelecionEntrega"]; + } + set + { + ViewState["SelecionEntrega"] = (bool)value; + } + } + + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + if (UsuarioActual.Empresa.Funcionalidad(161).ToEntero() == 1) + { + DvCartaPorte1.Visible = true; + DvCartaPorte2.Visible = true; + } + + SelecionEntrega = true; + + CargaCombos(); + CargaDatos(); + + } + } + + protected void BtnAsignar_Click(object sender, EventArgs e) + { + + + + + if(DdlChofer.SelectedValue.ToEntero() <= 0) + { + Alert("Debe seleccionar un chofer.", ModExtensiones.TipoMensaje.MsgAdvertencia); + return; + } + + if(DdlUnidadCamion.SelectedValue.ToEntero() <= 0) + { + Alert("Debe seleccionar una unidad", ModExtensiones.TipoMensaje.MsgAdvertencia); + return; + } + + + StringBuilder SBError = new StringBuilder(); + ActualizaOrdenDTGenrarDocumentos(); + + + + bool TieneError = false; + ClsGenerales ObjGeneral = new ClsGenerales(); + ObjGeneral.IniciaTransacSQL(); + + GridViewRowCollection Grid = GvGenerarDocumentos.Rows; + + + string Usuario = DdlChofer.SelectedItem.Text; + + + + + int CveDireccionOrigen = -1; + foreach (GridViewRow row in Grid) + { + //int CvePaqueteriasGuias = row.DataKey("CvePaqueteriaGuia").ToEntero(); + int Orden = row.DataKey("Orden").ToEntero(); + + //if (ObjGeneral.AsignarEntregasPorRealizar(CvePaqueteriasGuias, CvePersonal: -1, CveAsignacionEntrega: CveAsignacionEntrega, Orden: Orden)) + //{ + + int CveDireccionDestino = row.DataKey("CveDireccionEnvio").ToEntero(); + + if (CveDireccionDestino <= 0) + { + SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} el cliente {row.DataKey("Nombre")} no tiene una dirección de envio. "); + TieneError = true; + break; + } + int CveEntregaAlmacen = ObjGeneral.AddInvEntregaAlmacenRuta(row.DataKey("CveSubProyectoOrigen").ToEntero(), row.DataKey("CveMovimiento").ToEntero(), CveDireccionOrigen, CveDireccionDestino, DdlChofer.SelectedValue.ToEntero(), DdlUnidadCamion.SelectedValue.ToEntero(), TxtFechaEntrega.Text.ToDate(), "E",Orden); + CveDireccionOrigen = row.DataKey("CveDireccionEnvio").ToEntero(); + + if (CveEntregaAlmacen > 0) + { + DateTime MinFecha = new DateTime(1900, 01, 01); + int CveTimbre = ObjGeneral.AddGralTimbre("Tra", "-1", -1, "", MinFecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, -1, ChkEmitirCartaPorte.Checked, CveEntregaAlmacen, row.DataKey("CveSubProyectoOrigen").ToEntero()); + + if (CveTimbre <= 0) + { + SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar timbre. "); + + TieneError = true; + break; + } + } + else + { + SBError.AppendLine($"Factura {row.DataKey("SerieFolio")} error al agregar entrega alamcen. "); + TieneError = true; + break; + } + + + } + + + + + + if (!TieneError) + { + + foreach (GridViewRow row in Grid) + { + try + { + //MandarNotificacionCorreo(row); + } + catch (Exception ex) + { + TieneError = true; + ModExtensiones.GuardaLog(ex.Message); + } + + + } + + if (!TieneError) + { + ObjGeneral.Commit(); + Alert("Entregas asignadas correctamente"); + + DdlChofer.SelectedValueExist("-1"); + DdlUnidadCamion.SelectedValueExist("-1"); + ChkEmitirCartaPorte.Checked = false; + + SelecionEntrega = false; + SeleccioanrGenrar(); + + CargaDatos(); + UpDatos.Update(); + } + else + { + ObjGeneral.RollBack(); + } + ObjGeneral.Dispose(); + }else + { + Alert(SBError.ToString(), ModExtensiones.TipoMensaje.MsgAdvertencia); + } + + } + private void CargaDatos() + { + ClsGenerales ObjGeneral = new ClsGenerales(); + if (ObjGeneral.GetInvEntregaAlmacenRuta(DdlSubProyecto.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, 1)) + { + GvPaqueteriasGuias.DataSource = ObjGeneral.DtResultados; + DTDatosConsulta = ObjGeneral.DtResultados; + DTGenrarDocumentos = ObjGeneral.DtResultados.Clone(); + + } + ObjGeneral.Dispose(); + GvPaqueteriasGuias.DataBind(); + + UpDatos.Update(); + } + + + private void CargaCombos() + { + + ClsInventarios ObjInventarios = new ClsInventarios(); + + if(ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) && ObjInventarios.DtResultados.Rows.Count > 0){ + DdlUnidadCamion.DataSource = ObjInventarios.DtResultados; + } + ObjInventarios.Dispose(); + DdlUnidadCamion.Items.Insert(0, new ListItem("Seleccione", "-1")); + DdlUnidadCamion.DataBind(); + + + ClsAcarreos ObjAcar = new ClsAcarreos(); + + if(ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, 1, -1) ){ + DdlChofer.DataSource = ObjAcar.DtResultados; + DdlChofer.DataBind(); + } + ObjAcar.Dispose(); + DdlChofer.Items.Insert(0, new ListItem("Seleccione", "-1")); + + TxtFechaEntrega.Text = DateTime.Now.ToShortDateString(); + + + CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto); + + + } + + + protected void LnkGenerarDocumentos_Click(object sender, EventArgs e) + { + SeleccioanrGenrar(); + } + + + private void SeleccioanrGenrar() { + + if (SelecionEntrega) + { + + DTGenrarDocumentos.Rows.Clear(); + + + + int CountRows = 0; + foreach (GridViewRow GvRow in GvPaqueteriasGuias.Rows) + { + + CheckBox ChkAsigna = GvRow.FCCheckBox("ChkAsigna"); + + if (ChkAsigna.Checked) + { + + int CveMovimiento = GvRow.DataKey("CveMovimiento").ToEntero(); + + DataRow dRow = DTGenrarDocumentos.NewRow(); + DataRow dRowOrigen = DTDatosConsulta.FiltraParametros($"CveMovimiento = {CveMovimiento}").Rows[0]; + + int IndexColun = 0; + foreach (DataColumn dColumn in DTDatosConsulta.Columns) + { + dRow[IndexColun] = dRowOrigen[IndexColun]; + IndexColun++; + } + + dRow["Num"] = CountRows + 1; + DTGenrarDocumentos.Rows.Add(dRow); + CountRows++; + } + } + + DTGenrarDocumentos.AcceptChanges(); + + if (CountRows > 0) + { + GvGenerarDocumentos.DataSource = DTGenrarDocumentos; + GvGenerarDocumentos.DataBind(); + + DVGvGenerarDocumentos.Visible = true; + BtnAsignar.Visible = false; + DVGvPaqueteriasGuias.Visible = false; + + RegistraScript("InitOrdenamientoGvGenerarDocumentos();"); + } + else + { + Alert("No hay entregas seleccionadas", ModExtensiones.TipoMensaje.MsgAdvertencia); + return; + } + + + SelecionEntrega = false; + LnkGenerarDocumentos.Text = "Regresa a selección"; + + BtnAsignar.Visible = true; + BtnConsultar.Visible = false; + + UpDatos.Update(); + UpFiltro.Update(); + } + else + { + + BtnConsultar.Visible = true; + SelecionEntrega = true; + LnkGenerarDocumentos.Text = "Generar Documentos"; + BtnAsignar.Visible = false; + DVGvGenerarDocumentos.Visible = false; + DVGvPaqueteriasGuias.Visible = true; + UpDatos.Update(); + UpFiltro.Update(); + + } + + + } + + + + + + private void ActualizaOrdenDTGenrarDocumentos() + { + string[] OrdenMovimientos = Request.Form.GetValues("OrdenMovimientos"); + + int NumOrden = 1; + foreach (string CveMovimiento in OrdenMovimientos) + { + foreach(DataRow dRow in DTGenrarDocumentos.Rows) + { + if (CveMovimiento.ToEntero() == dRow["CveMovimiento"].ToString().ToEntero() ) + { + dRow["Orden"] = NumOrden; + } + } + DTGenrarDocumentos.AcceptChanges(); + NumOrden++; + } + + + DataView DTview = new DataView(DTGenrarDocumentos); + + // Sort by State and ZipCode column in descending order + DTview.Sort = "Orden ASC"; + + GvGenerarDocumentos.DataSource = DTview; + GvGenerarDocumentos.DataBind(); + UpDatos.Update(); + + + + } + + protected void BtnConsultar_Click(object sender, EventArgs e) + { + CargaDatos(); + } +} \ No newline at end of file From 8f44cc85cc14866af4c80e1907d3a31997e6ff0e Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 12 Nov 2021 14:51:38 -0700 Subject: [PATCH 05/33] PAC 3- folios relacionados --- App_Code/Timbrado.vb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index e6d226c83..b2bc2dcd0 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -3313,6 +3313,18 @@ Public Class Timbrado comprobante.MetodoPagoSpecified = If(ObjCFDITimbre.Comprobante.MetodoPago <> "", True, False) comprobante.LugarExpedicion = ObjCFDITimbre.Comprobante.LugarExpedicion + If ObjCFDITimbre.CFDIRelacionados.TipoRelacion <> "" Then + Dim CfdiRelacionados As New Profact.TimbraCFDI33.ComprobanteCfdiRelacionados + CfdiRelacionados.CfdiRelacionado = New Profact.TimbraCFDI33.ComprobanteCfdiRelacionadosCfdiRelacionado(ObjCFDITimbre.CFDIRelacionados.UUID.Count - 1) {} + Dim i As Integer = 0 + For Each uid As String In ObjCFDITimbre.CFDIRelacionados.UUID + CfdiRelacionados.CfdiRelacionado(i) = New Profact.TimbraCFDI33.ComprobanteCfdiRelacionadosCfdiRelacionado With {.UUID = uid} + i += 1 + Next + CfdiRelacionados.TipoRelacion = ObjCFDITimbre.CFDIRelacionados.TipoRelacion + comprobante.CfdiRelacionados = CfdiRelacionados + End If + #Region "Emisor" comprobante.Emisor = New Profact.TimbraCFDI33.ComprobanteEmisor() comprobante.Emisor.Rfc = EmisorRFC From 3e0bd1cbd81f0dcf0e3df6bfa26d14032ac9a6ac Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 12 Nov 2021 14:52:06 -0700 Subject: [PATCH 06/33] mejoras de rendimiento --- Bancos/PopIEVentas.aspx.vb | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index 1336491e0..87c387537 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -596,14 +596,11 @@ Partial Class Bancos_PopIEVentas End If CargaTipoTransaccion(TipoTransaccion) - CargaCuentas() - - Dim ObjCompras As New ClsCompras - If ObjCompras.GetCompras(-1, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, ProveedorRFC:=RFCCliente) Then - RBLContado.Items(4).Enabled = True - End If - ObjCompras.Dispose() - + CargaCuentas() + + + + Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, Now.Day - 1, Now.Day) Fecha = (dia.ToString + "/" + Now.Month.ToString + "/" + Now.Year.ToString).ToDate @@ -726,7 +723,7 @@ Partial Class Bancos_PopIEVentas CveMoneda = dr("CveMoneda").ToString.ToEntero CveMonedaVenta = dr("CveMoneda").ToString.ToEntero CveMonedaFiltros = dr("CveMoneda").ToString.ToEntero - NombreCliente = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente)) + NombreCliente = dr("ClienteNombre").ToString '' GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=CveCliente).FiltroPrimeroValor("Nombre", String.Format("CveCliente = {0}", CveCliente)) SerieFolio = dr("SerieFolio").ToString TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal CveSubProyectoVenta = dr("CveSubProyecto").ToString.ToEntero @@ -785,6 +782,14 @@ Partial Class Bancos_PopIEVentas 'Cortes de Caja If UsuarioActual.TienePermisoProceso(160) Then CargaCorteCaja() + End If + + If RFCCliente.ToUpper <> "XAXX010101000" Then + Dim ObjCompras As New ClsCompras + If ObjCompras.GetCompras(-1, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, ProveedorRFC:=RFCCliente) Then + RBLContado.Items(4).Enabled = True + End If + ObjCompras.Dispose() End If If Not Validada Then From 2b43709796f7544d2eedff1e1046a187368caa0a Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 12 Nov 2021 14:52:26 -0700 Subject: [PATCH 07/33] mejoras --- Bancos/IE.aspx.vb | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 9fa47aee1..287cb0c73 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -2860,7 +2860,9 @@ Partial Class Bancos_IE 'Agregamos el IVA If DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDecimal <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, 61, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera) Then + Dim CveConIVA As Integer = 61 + If UsuarioActual.CveEmpresa = 70 Then CveConIVA = 299 + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, CveConIVA, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera) Then MsgError = "Ocurrió un error al registrar el asiento del ingreso." End If End If @@ -4502,16 +4504,18 @@ Partial Class Bancos_IE If Not ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then ErrorCancelar = True MensajeError = "Error al desbloquear prepoliza." + Else + 'CANCELA IE MES ACTUAL + CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, CveTipoTransaccionCancelacion:=DdlTipoTransaccionCancelacion.SelectedValue.ToEntero) + If CvePrePolizaCancelacion <= 0 Then + ErrorCancelar = True + MensajeError = "Error al cancelar IE MES ACTUAL" + End If End If - 'CANCELA IE MES ACTUAL - CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, CveTipoTransaccionCancelacion:=DdlTipoTransaccionCancelacion.SelectedValue.ToEntero) - If CvePrePolizaCancelacion <= 0 Then - ErrorCancelar = True - MensajeError = "Error al cancelar IE MES ACTUAL" - End If + End If - If UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then + If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" Then If Not ObjConta.ContabilizarPrePoliza(CvePrePolizaCancelacion, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IDPoliza > 0, IDPoliza, -1), ObjConta:=ObjAC) Then ErrorCancelar = True @@ -4577,7 +4581,7 @@ Partial Class Bancos_IE End If - If Not ErrorCancelarComplemento Then + If Not ErrorCancelarComplemento AndAlso Not ErrorCancelar Then If ObjAC IsNot Nothing Then ObjAC.Commit() Banc.Commit() @@ -5698,24 +5702,30 @@ Partial Class Bancos_IE DVGenerarComplementoModal.Visible = False - If ObjBancos.GetVincularPago(CveProveedor, CveCompra, 2, MinFecha, MaxFecha, UsuarioActual.CveEmpresa, CveIE) Then + If Tipo = "Abono" Then - GvComplementoPagos.DataSource = ObjBancos.DtResultados + If ObjBancos.GetVincularPago(CveProveedor, CveCompra, 2, MinFecha, MaxFecha, UsuarioActual.CveEmpresa, CveIE) Then - If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 And ObjBancos.DtResultados.FiltraParametros(" CveIECancelacion > 0 ").Rows.Count = 0 Then - DVGenerarComplementoModal.Visible = True + GvComplementoPagos.DataSource = ObjBancos.DtResultados + + If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 And ObjBancos.DtResultados.FiltraParametros(" CveIECancelacion > 0 ").Rows.Count = 0 Then + DVGenerarComplementoModal.Visible = True + End If + Else + GvComplementoPagos.DataSource = Nothing End If Else - GvComplementoPagos.DataSource = Nothing - End If + If CveIE > 0 Then + If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then + GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"}) + End If + End If + End If ObjBancos.Dispose() GvComplementoPagos.DataBind() UpComplementoPagos.Update() - 'If ObjBancos.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then - ' GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "SerieFolio", "Fecha", "CveIE"}) - 'End If 'ObjBancos.Dispose() 'GvComplementoPagos.DataBind() From 4d75e3f02920ab3c75fc44009ad27825a918ab91 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 12 Nov 2021 14:53:51 -0700 Subject: [PATCH 08/33] filtro por cultivo --- Compras/RepProductosServicios.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compras/RepProductosServicios.aspx b/Compras/RepProductosServicios.aspx index ae60b1db0..e9a1bf7d1 100644 --- a/Compras/RepProductosServicios.aspx +++ b/Compras/RepProductosServicios.aspx @@ -262,7 +262,7 @@
    - +
    From aef3df622d3914e996c0e2cd9b007aa8d932df73 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 12 Nov 2021 14:54:23 -0700 Subject: [PATCH 09/33] virtual --- Inventarios/EntradasSalidas.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 5d16c394f..7be0c4e2d 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -5064,7 +5064,7 @@ Partial Class Inventarios_EntradasSalidas If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then - CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(tOrigen > 0, 2, 3), 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="ES/GV") + CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(tOrigen > 0, 36, 37), 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="ES/GV") FolioVirtual = ObjInventario.Folio For Each RowUsado As DataRow In DtPSVirtual.Rows From 9fabc1203de23e80f73c83b8c8c542b06f014a5b Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 12 Nov 2021 14:55:06 -0700 Subject: [PATCH 10/33] impuesto trasladado --- Ventas/CatImpuestosLocales.aspx | 1 + 1 file changed, 1 insertion(+) diff --git a/Ventas/CatImpuestosLocales.aspx b/Ventas/CatImpuestosLocales.aspx index 517dc8eb0..f6e5ce367 100644 --- a/Ventas/CatImpuestosLocales.aspx +++ b/Ventas/CatImpuestosLocales.aspx @@ -155,6 +155,7 @@ + From 6d70cb3b44c98c8eb289217ba0a6d8457ad04098 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 12 Nov 2021 14:57:26 -0700 Subject: [PATCH 11/33] - cambio al actualizar --- Contabilidad/RegPrePoliza.aspx.vb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index 6f47d8baa..342ec85f1 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -1188,10 +1188,12 @@ Partial Class ContabilidadC_RegPrePoliza Dim TipoMovtoOld As Boolean = (row.DataKey("TipoMovto").ToString = "True") Dim ImporteMN As Decimal = If(row.FCTextBox("TxtCargo").Text.ToDecimal() <> 0, row.FCTextBox("TxtCargo").Text.ToDecimal(), row.FCTextBox("TxtAbono").Text.ToDecimal()) Dim CveTipoGastonew As Integer = If(DdlTipoGasto.Visible, row.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero(), row.DataKey("CveTipoGasto").ToEntero()) + Dim ttSubProyecto As Integer = row.DataKey("CveSubProyecto").ToEntero() + If ttSubProyecto = 0 Then ttSubProyecto = -1 If row.DataKey("CvePrePolizaDetalle").ToEntero() > 0 Then Dim actualizar As Boolean - actualizar = (Concepto <> row.DataKey("Concepto") OrElse CveSubProyecto <> row.DataKey("CveSubProyecto").ToEntero() OrElse CtaContable <> row.DataKey("IdCtaContable").ToEntero() OrElse + actualizar = (Concepto <> row.DataKey("Concepto") OrElse CveSubProyecto <> ttSubProyecto OrElse CtaContable <> row.DataKey("IdCtaContable").ToEntero() OrElse TipoMovto <> TipoMovtoOld OrElse ImporteMN <> row.DataKey("ImporteMN").ToDecimal() OrElse CveTipoGastonew <> row.DataKey("CveTipoGasto").ToEntero()) 'diferencia = $"{diferencia}\r\n /*{actualizar}*/actualizar = '{Concepto}' <> '{row.DataKey("Concepto")}' || '{CveSubProyecto}' <> '{row.DataKey("CveSubProyecto").ToEntero()}' || '{CtaContable}' <> '{row.DataKey("IdCtaContable").ToEntero()}' ||" 'diferencia = $"{diferencia} '{TipoMovto}' <> '{TipoMovtoOld}' OrElse '{ImporteMN}' <> '{row.DataKey("ImporteMN").ToEntero()}' OrElse '{CveTipoGastonew}' <> '{row.DataKey("CveTipoGasto").ToEntero()}'" From 882ffa46b5b6587074585ff6ed07fe13e3e7ea59 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 12 Nov 2021 15:37:22 -0700 Subject: [PATCH 12/33] Cambio nombre entrega almacen --- App_Code/ClsPaginas.vb | 7 +++++-- ...aqueteriasGuiasRuta.aspx => RepEntregaAlmacenRuta.aspx} | 4 ++-- ...riasGuiasRuta.aspx.cs => RepEntregaAlmacenRuta.aspx.cs} | 2 +- ...ntregasPorRealizarRuta.aspx => EntregaAlmacenRuta.aspx} | 6 +++--- ...sPorRealizarRuta.aspx.cs => EntregaAlmacenRuta.aspx.cs} | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) rename General/{RepPaqueteriasGuiasRuta.aspx => RepEntregaAlmacenRuta.aspx} (99%) rename General/{RepPaqueteriasGuiasRuta.aspx.cs => RepEntregaAlmacenRuta.aspx.cs} (99%) rename Inventarios/{EntregasPorRealizarRuta.aspx => EntregaAlmacenRuta.aspx} (98%) rename Inventarios/{EntregasPorRealizarRuta.aspx.cs => EntregaAlmacenRuta.aspx.cs} (99%) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index c1c0f5228..9a9ab5e36 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4880,8 +4880,11 @@ Public Class ClsPaginas - PaginaDict.Add("/Inventarios/EntregasPorRealizarRuta.aspx".ToUpper(), -1) - PaginaDict.Add("/General/RepPaqueteriasGuiasRuta.aspx".ToUpper(), -1) + 'PaginaDict.Add("/Inventarios/EntregasPorRealizarRuta.aspx".ToUpper(), -1) + 'PaginaDict.Add("/General/RepPaqueteriasGuiasRuta.aspx".ToUpper(), -1) + + PaginaDict.Add("/Inventarios/EntregaAlmacenRuta.aspx".ToUpper(), 1320) + PaginaDict.Add("/General/RepEntregaAlmacenRuta.aspx".ToUpper(), 1319) diff --git a/General/RepPaqueteriasGuiasRuta.aspx b/General/RepEntregaAlmacenRuta.aspx similarity index 99% rename from General/RepPaqueteriasGuiasRuta.aspx rename to General/RepEntregaAlmacenRuta.aspx index ee30e8e65..1745120bf 100644 --- a/General/RepPaqueteriasGuiasRuta.aspx +++ b/General/RepEntregaAlmacenRuta.aspx @@ -1,4 +1,4 @@ -<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepPaqueteriasGuiasRuta.aspx.cs" Inherits="General_RepPaqueteriasGuias" %> +<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepEntregaAlmacenRuta.aspx.cs" Inherits="General_RepEntregaAlmacenRuta" %> - Entregas por Realizar + Entrega Alamacen Ruta @@ -49,7 +49,7 @@ - +
    diff --git a/Inventarios/EntregasPorRealizarRuta.aspx.cs b/Inventarios/EntregaAlmacenRuta.aspx.cs similarity index 99% rename from Inventarios/EntregasPorRealizarRuta.aspx.cs rename to Inventarios/EntregaAlmacenRuta.aspx.cs index 60f33e822..c3509d90c 100644 --- a/Inventarios/EntregasPorRealizarRuta.aspx.cs +++ b/Inventarios/EntregaAlmacenRuta.aspx.cs @@ -9,7 +9,7 @@ using Extensiones; using Microsoft.Reporting.WebForms; using System.Text; -public partial class Inventarios_EntregasPorRealizarRuta : ClsPaginas +public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas { From cca5213bc52b8bf1582991cdbec761a69967f953 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 13 Nov 2021 12:52:44 -0700 Subject: [PATCH 13/33] nombre de lacuenta --- Contabilidad/RegPrePolizaS.aspx.vb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index c24a32347..aa0875392 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -1350,7 +1350,9 @@ Partial Class ContabilidadC_RegPrePolizaS Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero) Dim dr As DataRow = DtMovimientos.NewRow dr("IdCtaContable") = IdCtaContable - dr("CveCuenta") = DdlCuentaContableE.SelectedValue + dr("CveCuenta") = DdlCuentaContableE.SelectedValue + 'dr("CodigoCuenta") = CodigoCuenta & "
    " & NombreCuenta + dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue dr("Concepto") = TxtConceptoE.Text From f02a5ef4cb6b571588ddcb06dbabf7e090ac027d Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 13 Nov 2021 12:53:05 -0700 Subject: [PATCH 14/33] cambio de titulos --- Inventarios/RepAnomalias.aspx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Inventarios/RepAnomalias.aspx b/Inventarios/RepAnomalias.aspx index 1d61b5461..79dd88018 100644 --- a/Inventarios/RepAnomalias.aspx +++ b/Inventarios/RepAnomalias.aspx @@ -137,11 +137,11 @@
    -
    Vista de Resultados:
    -
    +
    Vista de Resultados:
    +
    - - + +
    @@ -419,15 +419,15 @@
    - Registros Productos que Faltan: + Productos que Faltan:
    - Registros Productos que Sobran: + Productos que Sobran:
    - Registros Productos Coincidentes: + Productos Coincidentes:
    From bf32bdd9925230403177b03e6090f208ff382f0a Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 16 Nov 2021 14:37:44 -0700 Subject: [PATCH 15/33] --liga a la venta --- Inventarios/EntregasPorRealizarRuta.aspx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Inventarios/EntregasPorRealizarRuta.aspx b/Inventarios/EntregasPorRealizarRuta.aspx index 3e76e78a9..7205afbb3 100644 --- a/Inventarios/EntregasPorRealizarRuta.aspx +++ b/Inventarios/EntregasPorRealizarRuta.aspx @@ -49,7 +49,7 @@ - +
    @@ -150,7 +150,7 @@ -   +   From 1bef6ac22b16645dc53830ef82a9d817b1a0dce7 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Tue, 16 Nov 2021 17:27:45 -0700 Subject: [PATCH 16/33] Inventario Fisico --- App_Code/ClsGenerales.vb | 7 +- Compras/PopUpVerFactura.aspx.vb | 2 +- Inventarios/RepAnomalias.aspx | 449 +++++++++++++++------------- Inventarios/RepAnomalias.aspx.vb | 72 ++++- Inventarios/TraspasoAlmacen.aspx.vb | 27 +- 5 files changed, 323 insertions(+), 234 deletions(-) diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index b2cc54484..7c65c91cc 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -3679,7 +3679,7 @@ Public Class ClsGenerales Return Retorno End Function - Public Function GetGralTimbre(CveTimbre As Integer, TipoDocto As String, Serie As String, Folio As Integer, FechaI As Date, FechaF As Date, Estatus As Integer, CveEmpresa As Integer, CveMovimiento As Integer, CvePaqueteriaGuia As Integer) As Boolean + Public Function GetGralTimbre(CveTimbre As Integer, TipoDocto As String, Serie As String, Folio As Integer, FechaI As Date, FechaF As Date, Estatus As Integer, CveEmpresa As Integer, CveMovimiento As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_TimbreGet") @@ -3693,7 +3693,7 @@ Public Class ClsGenerales .Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento - .Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia + End With Try @@ -3706,7 +3706,7 @@ Public Class ClsGenerales Return Retorno End Function - Public Function UpdateGralTimbre(CveTimbre As Integer, TipoDocto As String, Serie As String, Folio As Integer, FolioFiscal As String, Fecha As Date, CvePaqueteriaGuia As Integer, CveUsuario As Integer, CveEmpresa As Integer, + Public Function UpdateGralTimbre(CveTimbre As Integer, TipoDocto As String, Serie As String, Folio As Integer, FolioFiscal As String, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer, Estatus As Integer, CvePAC As Integer, CvePACCancelacion As Integer, FechaCancelacion As Date, AplicaCP As Boolean, SelloCancelacion As String ) As Boolean Dim Retorno As Boolean = False @@ -3720,7 +3720,6 @@ Public Class ClsGenerales .Add("@Folio", SqlDbType.Int).Value = Folio .Add("@FolioFiscal", SqlDbType.VarChar).Value = FolioFiscal .Add("@Fecha", SqlDbType.Date).Value = Fecha - .Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia .Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@CvePAC", SqlDbType.Int).Value = CvePAC .Add("@CvePACCancelacion", SqlDbType.Int).Value = CvePACCancelacion diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 398a7575e..435be40ab 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -946,7 +946,7 @@ Partial Class PopUpVerFactura Dim ObjInv As New ClsGenerales - If ObjInv.GetGralTimbre(CveTimbre, "-1", "-1", -1, MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa, -1, -1) Then + If ObjInv.GetGralTimbre(CveTimbre, "-1", "-1", -1, MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa, -1) Then If ObjInv.DtResultados.Rows.Count > 0 Then Dim Dr As DataRow = ObjInv.DtResultados.Rows(0) If Dr IsNot Nothing Then diff --git a/Inventarios/RepAnomalias.aspx b/Inventarios/RepAnomalias.aspx index 1d61b5461..0346211b6 100644 --- a/Inventarios/RepAnomalias.aspx +++ b/Inventarios/RepAnomalias.aspx @@ -234,203 +234,227 @@ -
    - - -
    -
    - -
    -
    - Número de registros: -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - <%----%> - - - - - -
    -
    -
    - - - -
    -
    - -
    -
    - Número de registros: -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - <%----%> - - - - - - -
    -
    - -
    -
    - Número de registros: -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - <%----%> - - - - - - -
    -
    -
    - -