diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 52fd6dc07..45f22427f 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1249,7 +1249,7 @@ Public Class ClsInventarios ''' ''' Cuando sea cancelacion/devolucion hay que mandar este dato que seria la salida de almacen ''' - Public Function GetMovimientosDetalleVirtual(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1, Optional CveMovimientoRelacionado As Integer = -1) As Boolean + Public Function GetMovimientosDetalleVirtual(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1, Optional CveMovimientoRelacionado As Integer = -1, Optional ValidaUsadosCompra As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_MovimientosDetalleVirtualGet") @@ -1258,12 +1258,18 @@ Public Class ClsInventarios .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveCompra", SqlDbType.Int).Value = CveCompra .Add("@CveMovimientoRelacionado", SqlDbType.Int).Value = CveMovimientoRelacionado + .Add("@ValidaUsadosCompra", SqlDbType.Bit).Value = ValidaUsadosCompra End With Try SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception - OnError("Ocurrió un error al obtener los movimientos virtuales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + If ex.Message.Contains("Usados sistema") Then + OnError($"Los usados de la compra no coinciden. {ex.Message}", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Else + OnError("Ocurrió un error al obtener los movimientos virtuales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + End Try Return Retorno diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index fe050542c..79a6ab882 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -341,7 +341,7 @@ Public Class ClsVentas Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0, Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0, - Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False) As Boolean + Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasAdd") @@ -434,6 +434,7 @@ Public Class ClsVentas .Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria .Add("@FacturarSucursal", SqlDbType.Bit).Value = FacturarSucursal .Add("@VentaDesglosaIEPS", SqlDbType.Bit).Value = VentaDesglosaIEPS + .Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With @@ -462,7 +463,7 @@ Public Class ClsVentas Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1, Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1, - Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1) As Boolean + Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasUpdate") @@ -494,6 +495,7 @@ Public Class ClsVentas .Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra .Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje .Add("@CveUsoCFDi", SqlDbType.SmallInt).Value = CveUsoCFDi + .Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio End With Try @@ -1452,7 +1454,7 @@ Public Class ClsVentas Public Function GetRepVentasPeriodos(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer, CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1, - Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean + Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasGetRepPeriodo") @@ -1480,6 +1482,7 @@ Public Class ClsVentas .Add("@VerEn", SqlDbType.Int).Value = VerEn .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente + .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable End With Try @@ -1549,7 +1552,7 @@ Public Class ClsVentas CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, - Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1) As Boolean + Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_GetRepPS") @@ -1579,6 +1582,8 @@ Public Class ClsVentas .Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@MostrarLitraje", SqlDbType.Bit).Value = MostrarLitraje .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente + .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable + End With @@ -1597,7 +1602,7 @@ Public Class ClsVentas CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1", Optional GPO As Integer = -1, Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1, - Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean + Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_GetRepPSDetalle") @@ -1630,7 +1635,7 @@ Public Class ClsVentas .Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CveClasificacionDetalle", SqlDbType.Int).Value = CveClasificacionDetalle .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente - + .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable End With @@ -3790,8 +3795,8 @@ Public Class ClsVentas Public Function GetRepPSPeriodo(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer, CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, - Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1, Optional CvePS As Integer = -1, Optional CveClasificacion As Integer = -1, - Optional CveCategoria As Integer = -1, Optional TipoFecha As Integer = 1, Optional CveClienteClasificacion As Integer = -1) As Boolean + Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1, Optional CvePS As Integer = -1, Optional CveClasificacion As Integer = -1, + Optional CveCategoria As Integer = -1, Optional TipoFecha As Integer = 1, Optional CveClienteClasificacion As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasGetRepPeriodoPS") With SqlAdapter.SelectCommand.Parameters @@ -3820,6 +3825,7 @@ Public Class ClsVentas .Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria .Add("@TipoFecha", SqlDbType.Int).Value = TipoFecha .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion + .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable End With Try SqlAdapter.Fill(Data) @@ -4754,7 +4760,7 @@ Public Class ClsVentas Return Retorno End Function - Public Function GetVentasUsados(CveVenta As Integer, CveSubProyecto As Integer, Fecha As DateTime, CveEmpresa As Integer) As Boolean + Public Function GetVentasUsados(CveVenta As Integer, CveSubProyecto As Integer, Fecha As DateTime, CveEmpresa As Integer, Optional ServicioDomicilio As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasUsadosGet", CommandType.StoredProcedure) @@ -4764,6 +4770,7 @@ Public Class ClsVentas .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@Fecha", SqlDbType.DateTime).Value = Fecha .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio End With Try diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index d79a5d6b7..d9dd46a07 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -1422,7 +1422,7 @@ Namespace Modelos PedidoContrato:=factura.PedidoContrato, ObservacionesAlmacen:=factura.ObservacionesAlmacen, CveSubProyecto:=factura.CveSubProyecto, CveSubProyectoCobranza:=factura.CveSubProyectoCobranza, CveSubProyectoEjecucion:=factura.CveSubProyectoEjecucion, CveFormaPago33:=factura.CveFormaPago33, CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=factura.OrdenCompra, CveCuentaTerminal:=factura.CveCuentaTerminal, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal, CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)), - CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno) Then + CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio) Then ErrorList.Add("Ocurrió un error al Generar la Venta.
Revise su factura y cualquier detalle comuníquese a Soporte Técnico") @@ -5775,6 +5775,7 @@ Namespace Modelos #Region "P R O P I E D A D E S" + Public Property ServicioDomicilio As Boolean Public Property CveEstatusRefacturacion As Integer = 0 Public Property NuevaFactura As Integer Public Property EnviarCorreo As Boolean = False diff --git a/Bancos/RepCortes.aspx b/Bancos/RepCortes.aspx index 2f90c1b90..3ccba8aaf 100644 --- a/Bancos/RepCortes.aspx +++ b/Bancos/RepCortes.aspx @@ -323,7 +323,12 @@ - + + + + + + <%----%> diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index df363cc2c..3109668a4 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -100,6 +100,9 @@ Partial Class Bancos_RepCortes If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.DBCampo("CveVenta").ToString = "" Then e.Row.CssClass = "Totales" + End If + If e.Row.DBCampo("ImportePagado").ToDecimal() < 0 Then + e.Row.FCLabel("LblTotal").CssClass = "badge badge-danger" End If End If End Sub diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 283f3403f..7064cbbec 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -157,15 +157,14 @@ } .GastoIndirectoOpciones { - margin-left:auto; - margin-right:auto; - width:400px; + margin-left: auto; + margin-right: auto; + width: 400px; } - .GastoIndirectoOpciones td - { - text-align:right /* Or any other value */ - } + .GastoIndirectoOpciones td { + text-align: right; /* Or any other value */ + } /*IPP*/ @@ -3217,12 +3216,12 @@ -
- -
- -
-
+
+ +
+ +
+

-
Subcuenta de
@@ -171,7 +170,6 @@

-
Concepto
diff --git a/Contabilidad2/CatCuentas.aspx.vb b/Contabilidad2/CatCuentas.aspx.vb index 3b47bd41e..c863ad3d2 100644 --- a/Contabilidad2/CatCuentas.aspx.vb +++ b/Contabilidad2/CatCuentas.aspx.vb @@ -154,6 +154,7 @@ Partial Class Contabilidad2_CatCuentas ArbolCuentas.nodoid = "CveCuenta" ArbolCuentas.padre = "CvePadre" ArbolCuentas.titulo = "CtaCodigo" + ArbolCuentas.DataBind() End Sub @@ -175,7 +176,7 @@ Partial Class Contabilidad2_CatCuentas dt = getNodospadreHijos(IDSelected) If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then Dim dr As DataRow = dt.Rows(0) - TxtCuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString) + 'TxtCuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString) 'Tcuenta.Text = Trim(dr("CuentaFormato").ToString.Replace("-", "").ToString) Tsubcuenta.Text = dr("CuentaFormato").ToString() DTcuenta.SelectedValue = dr("Tipo").ToString() @@ -315,7 +316,7 @@ Partial Class Contabilidad2_CatCuentas Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") - If UsuarioActual.Empresa.TipoContabilidad = 2 Then + If UsuarioActual.Empresa.TipoContabilidad <> 1 Then Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) @@ -371,7 +372,6 @@ Partial Class Contabilidad2_CatCuentas 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContabilidad - Dim ObjConta2 As ClsContPAQi Dim CuentaEfectivo As Integer = 0 Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable @@ -386,11 +386,9 @@ Partial Class Contabilidad2_CatCuentas End If If idnew > 0 Then - - Dim codigoPadre As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - ObjConta2 = New ClsContPAQi(UsuarioActual.Empresa) - + If UsuarioActual.Empresa.TipoContabilidad <> 1 Then + Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) + Dim codigoPadre As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") 'Tsubcuenta.Text If ObjConta2.GetCuentas(-1, "-1", -1) Then Dim IdPadre As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigoPadre}'").ToEntero Dim IdAgrupador As Integer @@ -409,46 +407,48 @@ Partial Class Contabilidad2_CatCuentas End If End If + ObjConta2.Dispose() End If - Dim dr As DataRow = DtDatos.NewRow - dr("CveCuenta") = idnew - dr("CuentaFormato") = TxtCuenta.Text - 'dr("CuentaFormato") = Tcuenta.Text - dr("Nombre") = Tnombre.Text - dr("CtaCodigo") = String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text) - 'dr("CtaCodigo") = String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text) - dr("Tipo") = DTcuenta.SelectedValue.ToString - dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString - dr("CvePadre") = IDSelected - dr("Codigo") = Tnombre.Text - dr("CveMoneda") = DdlMoneda.SelectedValue.ToEntero - dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero - dr("NomIdioma") = TxtNomIngles.Text.Trim - DtDatos.Rows.Add(dr) - ArbolCuentas.DataSource = DtDatos - '.Attributes.Add("data-hijos","0"); - Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem) - item.Attributes.Item("data-hijos") = item.Attributes.Item("data-hijos").ToEntero + 1 - Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL) - If (IsNothing(objul)) Then - objul = New ADServerControl.DragableUL - objul.ID = String.Format("ul{0}", item.Cve) - item.Controls.Add(objul) - End If - ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text)) - 'ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text)) - 'updatos.Visible = False - 'nuevacuenta.Visible = False + 'Dim dr As DataRow = DtDatos.NewRow + 'dr("CveCuenta") = idnew + 'dr("CuentaFormato") = TxtCuenta.Text + ''dr("CuentaFormato") = Tcuenta.Text + 'dr("Nombre") = Tnombre.Text + 'dr("CtaCodigo") = String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text) + ''dr("CtaCodigo") = String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text) + 'dr("Tipo") = DTcuenta.SelectedValue.ToString + 'dr("CtaMayor") = DcuentaMayor.SelectedValue.ToString + 'dr("CvePadre") = IDSelected + 'dr("Codigo") = Tnombre.Text + 'dr("CveMoneda") = DdlMoneda.SelectedValue.ToEntero + 'dr("DigAgrup") = TxtDigAgrup.Text.Trim.ToEntero + 'dr("NomIdioma") = TxtNomIngles.Text.Trim + 'DtDatos.Rows.Add(dr) + 'ArbolCuentas.DataSource = DtDatos + ''.Attributes.Add("data-hijos","0"); + 'Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem) + 'item.Attributes.Item("data-hijos") = item.Attributes.Item("data-hijos").ToEntero + 1 + 'Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", IDSelected)), ADServerControl.DragableUL) + 'If (IsNothing(objul)) Then + ' objul = New ADServerControl.DragableUL + ' objul.ID = String.Format("ul{0}", item.Cve) + ' item.Controls.Add(objul) + 'End If + 'ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text)) + ''ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", Tcuenta.Text, Tnombre.Text)) + + ''updatos.Visible = False + ''nuevacuenta.Visible = False LimpiarCampos() updatos.Update() CargaDatos() + Alert("La cuenta se guardo correctamente") End If ObjConta.Dispose() - If ObjConta2 IsNot Nothing Then ObjConta2.Dispose() End Sub Private Sub LimpiarCampos() TxtCuenta.Text = "" @@ -473,7 +473,6 @@ Partial Class Contabilidad2_CatCuentas Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContabilidad - Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) 'ObjConta.IniciaTransacSQL() If ObjConta.RemoveCuenta(IDSelected.ToEntero) Then @@ -496,21 +495,27 @@ Partial Class Contabilidad2_CatCuentas Alert("La Cuenta ha sido eliminada", TipoMensaje.MsgInformacion) Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") - If ObjConta2.GetCuentas(-1, "-1", -1) Then - Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero - If Id > 0 Then - If ObjConta2.RemoveCuenta(Id) Then + If UsuarioActual.Empresa.TipoContabilidad <> 1 Then + Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) + If ObjConta2.GetCuentas(-1, "-1", -1) Then + Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero + + If Id > 0 Then + If ObjConta2.RemoveCuenta(Id) Then + End If End If End If + ObjConta2.Dispose() + End If + Else Alert("La Cuenta no pudo ser eliminada", TipoMensaje.MsgError) ' ObjConta.RollBack() End If ObjConta.Dispose() - ObjConta2.Dispose() End Sub 'Protected Sub BtnCambiaAgrupadorSAT_Click(sender As Object, e As EventArgs) diff --git a/Empresas/140/Formatos/Remision.rdlc b/Empresas/140/Formatos/Remision.rdlc index 665baaeed..e68ef4c45 100644 --- a/Empresas/140/Formatos/Remision.rdlc +++ b/Empresas/140/Formatos/Remision.rdlc @@ -1467,6 +1467,120 @@ + + + + + 2.99824cm + + + + + 0.48004cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 2.93858cm + + + true + true + + + + + =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + DataSet1 + 8.14637cm + 15.11602cm + 0.48004cm + 5.93682cm + 10 + + + + 18.12046cm + =Parameters!Observaciones.Value - + true true - = "Total: " & FormatNumber(Sum(Fields!Cantidad.Value, "DsInventarios"),0) + Total Productos : + + =Sum(iif(Not Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios") + + + + true + true + + + + + Total Usados: + + + + =Sum(iif(Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios") + + + + + + 2pt + 2pt + 2pt + 2pt + + 1.05208in - 8.4664cm + 7.77848cm true true @@ -1573,51 +1573,6 @@ 2pt - - true - true - - - - - Fecha Impresión: - - - - - - - - =Today - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - Textbox1 - 0.70708in - 0.23958in - 2.72234in - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información de Distribuidor - - - - - - - Textbox2 - 0.30083in - 0.43625in - 0.20139in - 3.41668in - 1 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre del distribuidor: - - - - =Parameters!NombreDistribuidor.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ciudad, Estado: - - - - =Parameters!CiudadEstado.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tel. - - - - =Parameters!TelCliente.Value - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre del mayorista que lo atiende: - - - - =Parameters!NombreEmpresa.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Consecutivo acuse de acumuladores: - - - - =Parameters!Consec.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio acuse: - - - - =Parameters!FolioAcuse.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información de Garantía o Ajuste - - - - - - - Textbox2 - 1.06055in - 0.43623in - 0.17014in - 3.41668in - 8 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha de instalación: - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Año: - - - - =Year(Parameters!FechaInst.Value) - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Día: - - - - =Day(Parameters!FechaInst.Value) - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Mes: - - - - = MonthName(Month(Parameters!FechaInst.Value)) - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha de Reclamación: - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Año: - - - - = Year(Parameters!Fecha.Value) - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Día: - - - - =Day(Parameters!Fecha.Value) - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Mes: - - - - = MonthName(Month(Parameters!Fecha.Value)) - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Defecto: - - - - =Parameters!Defecto.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - %Ajuste: - - - - =Parameters!PorcentajeAjuste.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Meses de uso: - - - - =Parameters!MesesUso.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información Acumulador - - - - - - - Textbox2 - 1.64736in - 0.43625in - 0.17014in - 3.4167in - 20 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tipo: - - - - =Parameters!Tipo.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Etiqueta: - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Marca: - - - - =Parameters!Marca.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CodEnsamble.Value - - - - - - - Textbox3 - 1.95639in - 0.43623in - 0.13889in - 1.00004in - 24 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CodInspeccion.Value - - - - - - - Textbox3 - 1.95639in - 2.61332in - 0.13889in - 1.23961in - 25 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CodLinea.Value - - - - - - - Textbox3 - 1.95639in - 1.43627in - 0.125in - 1.17707in - 26 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ensamble (primeros 7 dígitos) - - - - - - - Textbox3 - 2.09528in - 0.43623in - 0.125in - 1.39934in - 27 - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Inspección (4 dígitos) - - - - - - - Textbox3 - 2.09528in - 2.81123in - 0.125in - 1.04174in - 28 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Linea (4 dígitos) - - - - - - - Textbox3 - 2.09528in - 1.83557in - 0.125in - 0.97566in - 29 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información del Consumidor - - - - - - - Textbox2 - 2.22028in - 0.43627in - 0.17014in - 3.41668in - 30 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información Vehículo - - - - - - - Textbox2 - 2.39042in - 0.43627in - 0.17014in - 3.41668in - 31 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Marca: - - - - =Parameters!MarcaAuto.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tipo: - - - - =Parameters!TipoAuto.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Año: - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información Consumidor - - - - - - - Textbox2 - 2.69945in - 0.4362in - 0.17014in - 3.4167in - 35 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre del consumidor: - - - - =Parameters!NombreCliente.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección: - - - - =Parameters!Direccion.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ciudad, Estado: - - - - =Parameters!CiudadEstado.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tel. - - - - =Parameters!TelCliente.Value - - - - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Por medio de la presente acepto de conformidad el ajuste o garantía según información arriba mencionada. - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 4.16824in - 0.70712in - 0in - 1.26042in - 42 - - - - - - 4.16824in - 2.29046in - 0in - 1.25567in - 43 - - - - - - true - true - - - - - Fecha - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Firma del Consumidor - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox46 - 3.98421in - 0.70712in - 0.15625in - 1.26042in - 46 - - - 2pt - 2pt - 2pt - 2pt - - - - 4.48893in - - - - =FormatDateTime(Today, DateFormat.ShortDate) - - - - - - - - - - - - - - - 14cm - 10.75cm - 0.02cm - 0.02cm - 0.02cm - 0.02cm - + + + + + + Textbox1 + 0.65708in + 0.23958in + 2.72234in + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información de Distribuidor + + + + + + + Textbox2 + 0.30083in + 0.38625in + 0.20139in + 3.41668in + 1 + + + Silver + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Nombre del distribuidor: + + + + =Parameters!NombreDistribuidor.Value + + + + + + + + + + + + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Ciudad, Estado: + + + + =Parameters!CiudadEstado.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Tel. + + + + =Parameters!TelCliente.Value + + + + + + + + + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Nombre del mayorista que lo atiende: + + + + =Parameters!NombreEmpresa.Value + + + + + + + + + + + + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Consecutivo acuse de acumuladores: + + + + =Parameters!Consec.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Folio acuse: + + + + =Parameters!FolioAcuse.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información de Garantía o Ajuste + + + + + + + Textbox2 + 1.14805in + 0.38623in + 0.17014in + 3.41668in + 8 + + + Silver + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Fecha de instalación: + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Año: + + + + =Year(Parameters!FechaInst.Value) + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Día: + + + + =Day(Parameters!FechaInst.Value) + + + + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Mes: + + + + = MonthName(Month(Parameters!FechaInst.Value)) + + + + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Fecha de Reclamación: + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Año: + + + + = Year(Parameters!Fecha.Value) + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Día: + + + + =Day(Parameters!Fecha.Value) + + + + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Mes: + + + + = MonthName(Month(Parameters!Fecha.Value)) + + + + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Defecto: + + + + =Parameters!Defecto.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + %Ajuste: + + + + =Parameters!PorcentajeAjuste.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Meses de uso: + + + + =Parameters!MesesUso.Value + + + + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información Acumulador + + + + + + + Textbox2 + 1.78486in + 0.38625in + 0.17014in + 3.4167in + 20 + + + Silver + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Tipo: + + + + =Parameters!Tipo.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Etiqueta: + + + + =Parameters!Etiqueta.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Marca: + + + + =Parameters!Marca.Value + + + + + + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!CodEnsamble.Value + + + + + + + Textbox3 + 2.28139in + 0.38623in + 0.19445in + 1.00004in + 24 + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!CodInspeccion.Value + + + + + + + Textbox3 + 2.28139in + 2.56332in + 0.19445in + 1.23961in + 25 + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!CodLinea.Value + + + + + + + Textbox3 + 2.28139in + 1.38627in + 0.18056in + 1.17707in + 26 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Ensamble (primeros 7 dígitos) + + + + + + + Textbox3 + 2.46611in + 0.38623in + 0.16667in + 1.39934in + 27 + + + + + + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Inspección (4 dígitos) + + + + + + + Textbox3 + 2.46611in + 2.76123in + 0.16667in + 1.04174in + 28 + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Linea (4 dígitos) + + + + + + + Textbox3 + 2.46611in + 1.78557in + 0.16667in + 0.97566in + 29 + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información del Consumidor + + + + + + + Textbox2 + 2.63278in + 0.38627in + 0.17014in + 3.41668in + 30 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información Vehículo + + + + + + + Textbox2 + 2.80292in + 0.38627in + 0.17014in + 3.41668in + 31 + + + Silver + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Marca: + + + + =Parameters!MarcaAuto.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Tipo: + + + + =Parameters!TipoAuto.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Año: + + + + =Parameters!Anio.Value + + + + + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información Consumidor + + + + + + + Textbox2 + 3.12445in + 0.3862in + 0.17014in + 3.4167in + 35 + + + Silver + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Nombre del consumidor: + + + + =Parameters!NombreCliente.Value + + + + + + + + + + + + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Dirección: + + + + =Parameters!Direccion.Value + + + + + + + + + + + + + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Ciudad, Estado: + + + + =Parameters!CiudadEstadoConsumidor.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Tel. + + + + =Parameters!TelConsumidor.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Por medio de la presente acepto de conformidad el ajuste o garantía según información arriba mencionada. + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 4.64324in + 0.65712in + 0in + 1.26042in + 42 + + + + + + 4.64324in + 2.24046in + 0in + 1.25567in + 43 + + + + + + true + true + + + + + Fecha + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Firma del Consumidor + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox46 + 4.47171in + 0.65712in + 0.15625in + 1.26042in + 46 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Póliza: + + + + =Parameters!Comprobante.Value + + + + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Middle + 2pt + 2pt + 2pt + 2pt + + + + 5.0181in + + + + =FormatDateTime(Today, DateFormat.ShortDate) + + + + + + + + + + + + + + + 14cm + 10.75cm + 0.02cm + 0.02cm + 0.02cm + 0.02cm + - - - - -
- <%-- --%> -
-
-
-
- -
  • - PDF +<%@ Page Title="Reporte de Productos Servicios" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProductosServicios.aspx.vb" Inherits="Ventas_RepProductosServicios" %> + +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + + + + + + + +
    + <%-- --%> +
    +
    +
    +
    + +
  • + PDF <%----%> -
  • -
  • - Excel +
  • +
  • + Excel <%----%> -
  • -
  • - Personalizar -
  • -
  • - Ver Dlls en pesos -
  • - - -
  • - Ver Gráfica -
  • -
    -
    -
    - - Reporte de Productos Servicios - - - - - - -
    -
    -
    - - -
    -
    -
    - -
    - - - - - - - - - - + +
  • + Personalizar +
  • +
  • + Ver Dlls en pesos +
  • + + +
  • + Ver Gráfica +
  • +
    +
    + + + Reporte de Productos Servicios + + + + + + +
    +
    +
    + + +
    +
    +
    + +
    + + + + + + + + + + <%-- @@ -126,45 +126,47 @@ - --%> -
    -
    + --%> +
    +
    Fecha Inicio: -
    -
    -
    - - - - -
    - - - - - - -
    -
    + +
    +
    +
    + + + + +
    + + + + + + +
    +
    Fecha Fin: -
    -
    -
    - - - - -
    - - - - - - -
    - -
    - + +
    +
    +
    + + + + +
    + + + + + + +
    + +
    + <%-- @@ -184,357 +186,361 @@ - --%> - -
    -
    -
    -
    - +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + <%----%> + + <%----%> + <%----%> + + + + + + + + + + + + + -
    -
    -
    - - - - - - - - - - - - - - - - - - - <%----%> - - <%----%> - <%----%> - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + + diff --git a/Ventas/RepProductosServicios.aspx.vb b/Ventas/RepProductosServicios.aspx.vb index 961687d51..8dc9a06ac 100644 --- a/Ventas/RepProductosServicios.aspx.vb +++ b/Ventas/RepProductosServicios.aspx.vb @@ -273,7 +273,7 @@ Partial Class Ventas_RepProductosServicios DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra, - CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then + CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ChkModalidadContable.Checked) Then GvDatos.DataSource = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados Else @@ -353,11 +353,11 @@ Partial Class Ventas_RepProductosServicios FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1") FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1") - Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}", + Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}&ModalidadContable={32}", e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"), - FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca, CveClasificacionDetalle, If(DdlGrupo.SelectedValue.ToEntero = 23, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)) + FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca, CveClasificacionDetalle, If(DdlGrupo.SelectedValue.ToEntero = 23, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), If(ChkModalidadContable.Checked, 1, 0)) e.Row.FCLiteral("LtlGrupo").Text = String.Format("{2}", Css, Liga, e.Row.DBCampo("Gpo")) diff --git a/Ventas/RepProductosServiciosDetalle.aspx b/Ventas/RepProductosServiciosDetalle.aspx index f0fb503c3..76efe3b18 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx +++ b/Ventas/RepProductosServiciosDetalle.aspx @@ -1,123 +1,123 @@ -<%@ Page Title="Reporte de Productos Servicios" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProductosServiciosDetalle.aspx.vb" Inherits="Ventas_RepProductosServiciosDetalle" %> - -<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> - - - - - - +<%@ Page Title="Reporte de Productos Servicios" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProductosServiciosDetalle.aspx.vb" Inherits="Ventas_RepProductosServiciosDetalle" %> + +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + + + + + <%--
    -
    --%> -
    - -
  • - Generar -
  • -
  • - Personalizar -
  • -
  • - Ver Dlls en pesos -
  • -
  • - Imprimir -
  • - - -
  • - Ver Grafica -
  • -
    -
    - - - + --%> +
    + +
  • + Generar +
  • +
  • + Personalizar +
  • +
  • + Ver Dlls en pesos +
  • +
  • + Imprimir +
  • + +
  • - Descargar Facturas -
  • -
    - - - -
    - - - - - -
    - - Reporte de Productos Servicios - - - - - - -
    -
    -
    - - -
    -
    -
    - -
    - - - - - - - - - - + Ver Grafica + + + + + + +
  • + Descargar Facturas +
  • +
    + + + +
    + + + + + + + + Reporte de Productos Servicios + + + + + + +
    +
    +
    + + +
    +
    +
    + +
    + + + + + + + + + + <%-- @@ -127,45 +127,47 @@ - --%> -
    -
    + --%> +
    +
    Fecha Inicio: -
    -
    -
    - - - - -
    - - - - - - -
    -
    + +
    +
    +
    + + + + +
    + + + + + + +
    +
    Fecha Fin: -
    -
    -
    - - - - -
    - - - - - - -
    - -
    - + +
    +
    +
    + + + + +
    + + + + + + +
    + +
    + <%-- @@ -185,339 +187,342 @@ - --%> - -
    -
    -
    -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - -
    - - - - - - - - + + +
    + + +
    + +
    +
    +
    +
    +
    + + + +
    + + + + + + + + - - + +
    + diff --git a/Ventas/RepProductosServiciosDetalle.aspx.vb b/Ventas/RepProductosServiciosDetalle.aspx.vb index 989d36af3..2a8e14c21 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx.vb +++ b/Ventas/RepProductosServiciosDetalle.aspx.vb @@ -373,7 +373,8 @@ Partial Class Ventas_RepProductosServiciosDetalle TxtFechaIEjec.Text = If(AnioEjec <> "-1", String.Format("01/01/{0}", AnioEjec), TxtFechaIEjec.Text) TxtFechaIEjec.Text = If(MesEjec <> "-1", String.Format("01/{0}/0001", MesEjec), TxtFechaIEjec.Text) - + Dim ModalidadContable As Boolean = CBool(If(Request("ModalidadContable") IsNot Nothing, Request("ModalidadContable").ToEntero(), 0)) + ChkModalidadContable.Checked = ModalidadContable CveMoneda = If(Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToEntero() > 0, Request("CveMoneda").ToEntero(), -1).ToEntero DdlProyecto.SelectedValueExist(CveProyecto) @@ -403,7 +404,7 @@ Partial Class Ventas_RepProductosServiciosDetalle CargaProvedores(CveProveedorCompra) 'If CveProveedorCompra.ToEntero > 0 Then DdlProveedor.SelectedValue = CveProveedorCompra DdlTipoPSDes.SelectedValueExist(CveClasificacionDetalle) - CargaDatos(CveProyecto, CveSubProyecto, CveCategoria, CveClasificacion, CvePS, Mes, MesEjec, CveCliente, CveSubProyectoEjecucion, CveVendedor, CveUsuario, CveEstatus, GPO.ToEntero, TipoDocto, CveMarca) + CargaDatos(CveProyecto, CveSubProyecto, CveCategoria, CveClasificacion, CvePS, Mes, MesEjec, CveCliente, CveSubProyectoEjecucion, CveVendedor, CveUsuario, CveEstatus, GPO.ToEntero, TipoDocto, CveMarca, ModalidadContable) CargarMarcas(CveMarca) End Sub #End Region @@ -432,7 +433,8 @@ Partial Class Ventas_RepProductosServiciosDetalle DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, GPO:=DdlGrupo.SelectedValue.ToEntero, CveMoneda:=CveMoneda, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveProveedorCompra:=CveProveedorCompra, - CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero(), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then + CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero(), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, + ModalidadContable:=ChkModalidadContable.Checked) Then GvDatos.DataSource = ObjVentas.DtResultados TmpDT = ObjVentas.DtResultados Else @@ -444,7 +446,7 @@ Partial Class Ventas_RepProductosServiciosDetalle Agrupador = DdlGrupo.SelectedItem.Text End Sub - Private Sub CargaDatos(CveProyecto As String, CveSubProyecto As String, CveCategoria As String, CveClasificacion As String, CvePS As String, Mes As String, MesEjec As String, CveCliente As Integer, CveSubProyectoEjecucion As String, CveVendedor As Integer, CveUsuario As String, CveEstatus As String, Gpo As Integer, TipoDocto As String, CveMarca As Integer) + Private Sub CargaDatos(CveProyecto As String, CveSubProyecto As String, CveCategoria As String, CveClasificacion As String, CvePS As String, Mes As String, MesEjec As String, CveCliente As Integer, CveSubProyectoEjecucion As String, CveVendedor As Integer, CveUsuario As String, CveEstatus As String, Gpo As Integer, TipoDocto As String, CveMarca As Integer, ModalidadContable As Boolean) Dim ObjVentas As New ClsVentas() Dim FechaI, FechaF, FechaIEjec, FechaFEjec As Date FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha) diff --git a/Ventas/RepProductosServiciosPeriodo.aspx b/Ventas/RepProductosServiciosPeriodo.aspx index b9ab53565..d35327acb 100644 --- a/Ventas/RepProductosServiciosPeriodo.aspx +++ b/Ventas/RepProductosServiciosPeriodo.aspx @@ -236,6 +236,12 @@
    +
    + +
    + +
    +
    diff --git a/Ventas/RepProductosServiciosPeriodo.aspx.cs b/Ventas/RepProductosServiciosPeriodo.aspx.cs index efb83532f..5a4f308cf 100644 --- a/Ventas/RepProductosServiciosPeriodo.aspx.cs +++ b/Ventas/RepProductosServiciosPeriodo.aspx.cs @@ -353,8 +353,8 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas DdlVendedor.SelectedValue.ToEntero(), DdlUsuario.SelectedValue.ToEntero(), DdlEstatus.SelectedValue.ToEntero(), "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero(), DdlTipoComprobante.SelectedValue, DdlProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedValue.ToEntero(), RblTipoCambio.SelectedValue.ToEntero(), TCEspecifico, CveUsuarioConsulta: UsuarioActual.CveUsuario, VerEn: VerEn, CvePS: DdlPS.SelectedValue.ToEntero(), - CveClasificacion: DdlClasificacion.SelectedValue.ToEntero(), CveCategoria: DdlCategoria.SelectedValue.ToEntero(),TipoFecha:DdlTipoFecha.SelectedValue.ToEntero(), - CveClienteClasificacion:DdlClienteClasificacion.SelectedValue.ToEntero())) + CveClasificacion: DdlClasificacion.SelectedValue.ToEntero(), CveCategoria: DdlCategoria.SelectedValue.ToEntero(), TipoFecha: DdlTipoFecha.SelectedValue.ToEntero(), + CveClienteClasificacion: DdlClienteClasificacion.SelectedValue.ToEntero(), ModalidadContable: ChkModalidadContable.Checked)) { GvDatos.DataSource = ObjVentas.DtResultados; DtVentas = ObjVentas.DtResultados; diff --git a/Ventas/RepVentas.aspx b/Ventas/RepVentas.aspx index 10ce64ea8..b88991d67 100644 --- a/Ventas/RepVentas.aspx +++ b/Ventas/RepVentas.aspx @@ -299,7 +299,7 @@ -
    +
    diff --git a/Ventas/RepVentas.aspx.vb b/Ventas/RepVentas.aspx.vb index 40f0622e7..e6d31ad7c 100644 --- a/Ventas/RepVentas.aspx.vb +++ b/Ventas/RepVentas.aspx.vb @@ -98,6 +98,11 @@ Partial Class Ventas_RepVentas liRepHP.Visible = True End If + 'SI ES EL USUARIO SISTEMA MOSTRAR LA MODALIDAD CONTABLE (TEMPORAL) + If UsuarioActual.CveUsuario = 100 Then + divModalidadcontable.Visible = True + End If + 'Modalidad Cotizacion If Opcion = "Cot" Then DdlTipoComprobante.SelectedValuesIfExistM(Opcion) diff --git a/Ventas/RepVentasPeriodo.aspx b/Ventas/RepVentasPeriodo.aspx index 6a8b81c5a..ace8783f1 100644 --- a/Ventas/RepVentasPeriodo.aspx +++ b/Ventas/RepVentasPeriodo.aspx @@ -1,538 +1,560 @@ -<%@ Page Title="Reporte de Ventas Por Periodo" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepVentasPeriodo.aspx.vb" Inherits="RepVentasPeriodo" %> - - - - - - - - - - - - -
  • - PDF -
  • - -
    - - - -
    - -
  • - Excel -
  • - - -
  • - Personalizar -
  • -
    -
    - +<%@ Page Title="Reporte de Ventas Por Periodo" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepVentasPeriodo.aspx.vb" Inherits="RepVentasPeriodo" %> + + + + + + + + + + + + +
  • + PDF +
  • + +
    + + + +
    + +
  • + Excel +
  • + + +
  • + Personalizar +
  • +
    +
    + <%--
  • Personalizar
  • -
    --%> -
  • - Generar Reporte HP -
  • -
  • - Ver Dlls en pesos -
  • -
    - - Reporte de Ventas - - - - - - - - -
    -
    -
    - - -
    -
    -
    - -
    - - - - - - - - - - -
    - - -
    - - - -
    - - -
    - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    -
    - -
    -
    -
    - -
    - - - -
    - -
    -
    - - - - - - - - - - -
    -
    - -
    -
    - - - - - - - - - - -
    -
    - -
    - - - -
    -
    -
    - -
    - - - -
    - -
    -
    - - - - - - - - - - -
    -
    - -
    -
    - - - - - - - - - - -
    -
    - -
    - - - -
    -
    -
    - -
    - - - -
    - -
    - - - -
    - -
    - -
    - - -
    - - - - - -
    - -
    -
    -
    -
    -
    - - - - - - - - - + --%> +
  • + Generar Reporte HP +
  • +
  • + Ver Dlls en pesos +
  • +
    + + Reporte de Ventas + + + + + + + + +
    +
    +
    + + +
    +
    +
    + +
    + + + + + + + + + + +
    + + +
    + + + +
    + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    + +
    +
    +
    + +
    + + + +
    + +
    +
    + + + + + + + + + + +
    +
    + +
    +
    + + + + + + + + + + +
    +
    + +
    + + + +
    +
    +
    + +
    + + + +
    + +
    +
    + + + + + + + + + + +
    +
    + +
    +
    + + + + + + + + + + +
    +
    + +
    + + + +
    +
    +
    + +
    + + + +
    + +
    + + + +
    + +
    + +
    + + +
    + + + + + +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + Grupo - - - - - - - + + + + + + + + Cantidad - - - - - - - + + + + + + + + Ene - - - - - - - + + + + + + + + Feb - - - - - - - + + + + + + + + Mar - - - - - - - + + + + + + + + Abr - - - - - - - + + + + + + + + May - - - - - - - + + + + + + + + Jun - - - - - - - + + + + + + + + Jul - - - - - - - + + + + + + + + Ago - - - - - - - + + + + + + + + Sep - - - - - - - + + + + + + + + Oct - - - - - - - + + + + + + + + Nov - - - - - - - + + + + + + + + Dic - - - - - - - + + + + + + + + Total - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + +
    +
    + +
    +
    +
    + + Grafica +
    +
    + + + +
    +
    +
    +
    + loading +
    +
    +
    + +
    +
    +
    + - + + - - + + +
    diff --git a/Ventas/RepVentasPeriodo.aspx.vb b/Ventas/RepVentasPeriodo.aspx.vb index 9b733053f..abe6d2712 100644 --- a/Ventas/RepVentasPeriodo.aspx.vb +++ b/Ventas/RepVentasPeriodo.aspx.vb @@ -195,7 +195,7 @@ Partial Class RepVentasPeriodo If ObjVentas.GetRepVentasPeriodos(FechaI, FechaF, FechaIEjec, FechaFEjec, DdlClientes.SelectedValue.ToEntero, DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlTipoComprobante.SelectedValue, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario, - VerEn:=VerEn, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then + VerEn:=VerEn, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ChkModalidadContable.Checked) Then GvDatos.DataSource = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index d65958e1f..2d2138eab 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2089,7 +2089,7 @@ Partial Class Ventas TrSinExistencia.Visible = UsuarioActual.TienePermisoProceso(276) - If UsuarioActual.CveEmpresa.Contiene(119, 1) Then + If UsuarioActual.Empresa.Funcionalidad(595) = "1" Then ImgDescPU.Visible = False ImgDescConcepto.Visible = False DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Autorización", "PA")) @@ -4387,7 +4387,7 @@ Partial Class Ventas HdnIVAOriginal.Value = TxtIVA.Text TxtPedidoContrato.Text = DbRowVenta("PedidoContrato").ToString() TxtPedidoContrato.Enabled = False - TxtKilometraje.Text = DbRowVenta("Kilometraje").ToString() + TxtKilometraje.Text = DbRowVenta("Kilometraje").ToString().PadLeft(6, "0"c) HdnAmortizacion.Value = LblAmort.Text.ToDouble.ToString() HdnSubTotalDescuestos.Value = (TxtSubTotal.Text.Replace(",", "").ToDouble - LblDescuentos.Text.Replace(",", "").ToDouble - LblAmortizacion.Text.Trim.Replace(",", "").ToDouble - TxtRetISR.Text.Replace(",", "").ToDouble).FormatoNumero(2) @@ -5241,16 +5241,26 @@ Partial Class Ventas Else Dim DTAlmacen As DataTable ddlAlmacen.Items.Clear() + DTAlmacen = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()}") ddlAlmacen.DataSource = DTAlmacen - If DTAlmacen Is Nothing Or DTAlmacen.Rows.Count = 0 Then - ddlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1")) - ddlAlmacen.SelectedValue = "-1" - End If + + ddlAlmacen.Items.Insert(0, New ListItem("Seleccione ", "-1")) + ddlAlmacen.SelectedValueExist("-1") + ddlAlmacen.DataBind() + If GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()}").Rows.Count > 0 Then - ddlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) + 'SI ES DEL MISMO SUB PROYECTO SUGIERE EL ALMACEN ASIGNADO AL USUARIO + If UsuarioActual.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero() Then + ddlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) + Else + Dim CveAlmacen As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()}").ToEntero() + ddlAlmacen.SelectedValueExist(CveAlmacen) + End If + End If + End If 'SI TIENE CONTRATO NO SE MUEVE @@ -5351,8 +5361,11 @@ Partial Class Ventas If EstatusCliente = False And Not DdlTipoComprobante.SelectedValue.Contiene("Cot", "DPe") And (CveVenta <= 0 Or EsCreaApartirDe) Then Alert("El Cliente seleccionado no esta activo", TipoMensaje.MsgAdvertencia) + BtnEmitirImprimir.Visible = EstatusCliente + TrVistaPrevia.Visible = EstatusCliente End If + 'CUANDO SEA COTIZACION Y SEA COMPUPROVEEDORES (EMPRESA 72) NO DEBE ENVIAR CORREO AL CLIENTE If UsuarioActual.CveEmpresa = 72 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then ChkEnviarFactura.Checked = False @@ -5935,7 +5948,8 @@ Partial Class Ventas RBLPago.SelectedValue = "2" RBLPago.Items(0).Enabled = False RBLPago_SelectedIndexChanged(Nothing, Nothing) - If UsuarioActual.CveEmpresa.Contiene(119) AndAlso Not UsuarioActual.TienePermisoProceso(268) Then + 'GENERAR UNA AUTORIZACIÓN SI EL CLIENTE NO PERMITE CREDITO + If UsuarioActual.Empresa.Funcionalidad(595) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) Then DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización") DdlTipoComprobante.SelectedValue = "PA" TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString @@ -5948,7 +5962,8 @@ Partial Class Ventas LnkCotizaciones.Visible = False End If UPCondicionesPago.Update() - ElseIf UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 146, 158, 140) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta < 1 Then + 'CARGAR CREDITO DISPONIBLE AL GENERAR UNA FACTURA + ElseIf UsuarioActual.Empresa.Funcionalidad(596) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta < 1 Then RBLPago.SelectedValue = "1" RBLPago_SelectedIndexChanged(Nothing, Nothing) UPCondicionesPago.Update() @@ -5958,7 +5973,7 @@ Partial Class Ventas TrCreditoDisponible.Visible = True LblCreditoDisponible.Text = CreditoDispo.FormatoNumero If PorcentajeCredito > 80 Then TrPorcentajeCredito.Visible = True : LblPorcentajeCredito.Text = $"{PorcentajeCredito.FormatoNumero}%" - If UsuarioActual.CveEmpresa = 119 AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then + If UsuarioActual.Empresa.Funcionalidad(597) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then 'If LblRFC.Text.Trim <> "XAXX010101000" Then @@ -6010,19 +6025,23 @@ Partial Class Ventas End If Else + 'GENERAR AUTORIZACION SI TIENE EXCEDIO EL LIMITE DE CREDITO + If UsuarioActual.Empresa.Funcionalidad(595) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "Ant", "PA") Then - If UsuarioActual.CveEmpresa = 119 AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "Ant", "PA") Then - Dim Vta As New ClsVentas - Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa) - Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón:

    {0}", Vta.SerieVenta) - Vta.Dispose() - If Opcion > 0 Then - If Opcion = 1 Then - BtnEmitirImprimir.Visible = False + 'VERIFICAR CANDADOS DE VENTA, REMISIONES SIN FACTURAR, FACTURAS QUE NO TENGAN VENCIDAS + If UsuarioActual.Empresa.Funcionalidad(597) = "1" Then + Dim Vta As New ClsVentas + Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa) + Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón:

    {0}", Vta.SerieVenta) + Vta.Dispose() + If Opcion > 0 Then + If Opcion = 1 Then + BtnEmitirImprimir.Visible = False + End If + If Alertas Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia) + Else + If Alertas AndAlso UsuarioActual.Empresa.Funcionalidad(518) = "1" Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia) End If - If Alertas Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia) - Else - If Alertas AndAlso UsuarioActual.Empresa.Funcionalidad(518) = "1" Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia) End If 'RBLPago.SelectedValue = "2" @@ -6049,7 +6068,7 @@ Partial Class Ventas End If End If UPPCreditoDisponible.Update() - ElseIf UsuarioActual.CveEmpresa.Contiene(119, 1) AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso CveVenta > 0 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Pd2", "Cot") Or (DdlTipoComprobante.SelectedValue = "Rem" And ModalidadEdicion And ViewState("CveClienteAnterior").ToString().ToEntero() > 0 And LblRFC.Text.Trim <> "XAXX010101000")) Then + ElseIf UsuarioActual.Empresa.Funcionalidad(597) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso CveVenta > 0 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Pd2", "Cot") Or (DdlTipoComprobante.SelectedValue = "Rem" And ModalidadEdicion And ViewState("CveClienteAnterior").ToString().ToEntero() > 0 And LblRFC.Text.Trim <> "XAXX010101000")) Then Dim CreditoDispo As Decimal = CargaCreditoDisponible(CveCliente, DdlSucursalCliente.SelectedValue.ToEntero()) If CreditoDispo > 0 Then Dim Vta As New ClsVentas @@ -8441,7 +8460,7 @@ Partial Class Ventas ObjFacturaDevolucion.TipoDocto = "Egs" - If UsuarioActual.CveEmpresa = 140 Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then Dim ObjFolios As New ClsGralFolios() Dim TipoDoctoConsulta As String = If(ObjFacturaDevolucion.TipoDocto = "Ant", "Ing", If(ObjFacturaDevolucion.TipoDocto = "PA", "Rem", ObjFacturaDevolucion.TipoDocto)) @@ -8719,7 +8738,7 @@ Partial Class Ventas ObjFacturaBonificacion.TipoDocto = "Egs" - If UsuarioActual.CveEmpresa = 140 Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then Dim ObjFolios As New ClsGralFolios() Dim TipoDoctoConsulta As String = If(ObjFacturaBonificacion.TipoDocto = "Ant", "Ing", If(ObjFacturaBonificacion.TipoDocto = "PA", "Rem", ObjFacturaBonificacion.TipoDocto)) @@ -9148,7 +9167,7 @@ Partial Class Ventas ObjFactura.Serie = If(VistaPrevia, "VistaPrevia", LblSerie.Text) - If UsuarioActual.CveEmpresa = 140 Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then Dim ObjFolios As New ClsGralFolios() Dim TipoDoctoConsulta As String = If(ObjFactura.TipoDocto = "Ant", "Ing", If(ObjFactura.TipoDocto = "PA", "Rem", ObjFactura.TipoDocto)) @@ -9809,7 +9828,7 @@ Partial Class Ventas 'ObjFacturaDevolucion.SerieFolio = String.Format("{0}-{1}", LblSerie.Text, TxtFolio.Text) ObjFacturaDevolucion.TipoDocto = "Egs" - If UsuarioActual.CveEmpresa = 140 Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then Dim ObjFolios As New ClsGralFolios() Dim TipoDoctoConsulta As String = If(ObjFacturaDevolucion.TipoDocto = "Ant", "Ing", If(ObjFacturaDevolucion.TipoDocto = "PA", "Rem", ObjFacturaDevolucion.TipoDocto)) @@ -11074,17 +11093,26 @@ Partial Class Ventas End If - If DTRemisiones IsNot Nothing AndAlso DTRemisiones.Rows.Count > 0 AndAlso ErrorList.Count = 0 AndAlso factura.TipoDocto.Contiene("Ing", "Ant") Then + 'If DTRemisiones IsNot Nothing AndAlso DTRemisiones.Rows.Count > 0 AndAlso ErrorList.Count = 0 AndAlso factura.TipoDocto.Contiene("Ing", "Ant") Then - Dim dt As DataTable = DTRemisiones.FiltraParametros("Aplicado = True") - If dt.Rows.Count > 0 Then - For Each row As DataRow In dt.Rows - If Not ObjVentas.UpdateVentaRemision(row("CveVenta").ToString().ToEntero(), ObjFactura.CveVenta) Then - ErrorList.Add("Ocurrió un error al actualizar la remisión") - End If - Next - End If + ' Dim dt As DataTable = DTRemisiones.FiltraParametros("Aplicado = True") + ' If dt.Rows.Count > 0 Then + ' For Each row As DataRow In dt.Rows + ' If Not ObjVentas.UpdateVentaRemision(row("CveVenta").ToString().ToEntero(), ObjFactura.CveVenta) Then + ' ErrorList.Add("Ocurrió un error al actualizar la remisión") + ' End If + ' Next + ' End If + 'End If + + If RemisionesLista IsNot Nothing AndAlso RemisionesLista.Count > 0 AndAlso ErrorList.Count = 0 AndAlso factura.TipoDocto.Contiene("Ing", "Ant") Then + For Each CveRemision As Integer In RemisionesLista + If Not ObjVentas.UpdateVentaRemision(CveRemision, ObjFactura.CveVenta) Then + ErrorList.Add("Ocurrió un error al actualizar la remisión") + End If + Next End If + End If If ErrorList.Count = 0 Then @@ -12840,6 +12868,12 @@ Partial Class Ventas End If Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEntero() + + If CveAlmacen <= 0 Then + OcurrioError = True + ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.
    No ha seleccionado ningun almacen o no tiene permiso para el almacen de esta sucursal.") + End If + Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoAlmacen, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Vta/E1") If CveMovimientoInventario <= 0 Then @@ -15899,7 +15933,7 @@ Partial Class Ventas GvPS.DataBind() UpPS.Update() End Sub - Private Sub CargaFolios() + Private Sub CargaFolios(Optional FacturarDocumentoNuevo As Boolean = False) If ExFolioFactura Then Exit Sub End If @@ -15921,15 +15955,19 @@ 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() - If UsuarioActual.CveEmpresa = 140 AndAlso CveVenta > 0 AndAlso Not EsCreaApartirDe AndAlso Not String.IsNullOrEmpty(SerieVenta) Then + If UsuarioActual.Empresa.Funcionalidad(531) = "1" 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 - TrVistaPrevia.Visible = True + + If Not FacturarDocumentoNuevo Then + BtnCrearApartirDe.Enabled = EstatusCliente + BtnEmitirImprimir.Visible = EstatusCliente + TrVistaPrevia.Visible = EstatusCliente + End If + UpFacturar.Update() Else @@ -24300,7 +24338,7 @@ Partial Class Ventas Private Sub CargaCxC() Dim ObjMovtos As New ClsMovimientos() If ObjMovtos.GetCxCClienteDetalle(ViewState("CveCliente").ToString().ToEntero(), "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero()) Then - Dim DtTemporal As DataTable = ObjMovtos.DtResultados.FiltraParametros("TipoDocto <> 'RNC' AND Tipo = 'Act' AND CveVenta > 0", "Moneda, OrdenVencimiento, FechaVencimiento") + Dim DtTemporal As DataTable = ObjMovtos.DtResultados.FiltraParametros("TipoDocto NOT IN ('RNC','Rem') AND Tipo = 'Act' AND CveVenta > 0", "Moneda, OrdenVencimiento, FechaVencimiento") GvCxC.DataSource = DtTemporal End If ObjMovtos.Dispose() @@ -28204,7 +28242,7 @@ Partial Class Ventas End If End If - If FolioFijo = 0 Then CargaFolios() 'RECARGA FOLIOS CON EL NUEVO TIPO DOCTO + If FolioFijo = 0 Then CargaFolios(FacturarDocumentoNuevo:=True) 'RECARGA FOLIOS CON EL NUEVO TIPO DOCTO EmitirImprimir(TipoDoctoViejo) 'MANDA A EMITIR - PROCESO VIEJO End If @@ -28265,7 +28303,7 @@ Partial Class Ventas Private Sub CalculaUsados(Optional DtUsadosDevolucion As DataTable = Nothing) - If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Dev") Then + If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Dev", "PA") Then If ViewState("CargoUsado").ToString() = "False" Then Exit Sub End If diff --git a/WebBase.config b/WebBase.config index 544610b9d..a5bcb93b5 100644 --- a/WebBase.config +++ b/WebBase.config @@ -1,4 +1,4 @@ - + -
    +
    -
    -
    +
    +
    - + - + - + + - - - - + + + + - - - - - - - - - - + + + + + + + + + + - + - + + - + @@ -66,170 +68,193 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - + + + + + + + - - + + + @@ -267,34 +294,39 @@ --> - - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - + - + - + - - + + - + @@ -345,32 +377,25 @@ - - - - - - - - - - + + + + + + + + + + + - - - - - + + + +