diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb index ccf45d815..10b6cbae5 100644 --- a/App_Code/ClsContPAQi.vb +++ b/App_Code/ClsContPAQi.vb @@ -1065,11 +1065,11 @@ Public Class ClsContPAQi StrSQL.Clear() StrSQL.AppendLine(" SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; ") StrSQL.AppendLine(" ") - StrSQL.AppendLine(" SELECT mp.id, mp.IdPoliza, mp.NumMovto, mp.IdCuenta , mp.IdCuenta as CveCuenta, c.CODIGO, c.NOMBRE as Cuenta , T.Codigo as CodigoTipoPoliza, T.Nombre AS TipoPoliza, mp.Folio, mp.Importe, mp.Concepto, mp.Referencia, mp.SIGReferencia, mp.Fecha, mp.IdSegNeg, p.IdUsuario, s.Nombre AS SegNeg, p.Fecha AS FechaPol, p.Cargos, p.Abonos, p.Concepto AS ConceptoPoliza, ") + StrSQL.AppendLine(" SELECT mp.id, mp.IdPoliza, mp.NumMovto, mp.IdCuenta , mp.IdCuenta as CveCuenta, c.CODIGO, c.NOMBRE as Cuenta , c.NOMBRE as NombreCuenta , T.Codigo as CodigoTipoPoliza, T.Nombre AS TipoPoliza, mp.Folio, mp.Folio as Numero, mp.Importe, mp.Concepto, mp.Referencia, mp.SIGReferencia, mp.Fecha, mp.IdSegNeg, p.IdUsuario, s.Nombre AS SegNeg, p.Fecha AS FechaPol, p.Cargos, p.Abonos, p.Concepto AS ConceptoPoliza, ") StrSQL.AppendLine(" CASE WHEN ISNUMERIC(c.Codigo) = 1 THEN FORMAT(CAST (c.Codigo AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.Codigo END + ' - ' + c.Nombre + ' ' AS CtaCodigo, ") 'Roberto 8/Nov/2014 StrSQL.AppendLine(" SUM (CASE WHEN mp.TipoMovto = 0 THEN mp.Importe ELSE 0 END) AS Cargo, SUM (CASE WHEN mp.TipoMovto = 1 THEN mp.Importe ELSE 0 END) AS Abono, ") StrSQL.AppendLine(" SUM (CASE WHEN mp.TipoMovto = 0 THEN mp.ImporteME ELSE 0 END) AS CargoME, SUM (CASE WHEN mp.TipoMovto = 1 THEN mp.ImporteME ELSE 0 END) AS AbonoME, ") - StrSQL.AppendLine(" mp.TipoMovto, CASE WHEN ISNUMERIC(c.CODIGO) = 1 THEN FORMAT(CAST (c.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.CODIGO END CuentaFormato, '' as Estado,MAX(U.Nombre) AS UsuarioRegistro ") + StrSQL.AppendLine(" mp.TipoMovto, CASE WHEN ISNUMERIC(c.CODIGO) = 1 THEN FORMAT(CAST (c.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.CODIGO END CuentaFormato, CASE WHEN ISNUMERIC(c.CODIGO) = 1 THEN FORMAT(CAST (c.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.CODIGO END CodigoCuenta, '' as Estado,MAX(U.Nombre) AS UsuarioRegistro, MAX(U.Nombre) AS NombreUsuario ") StrSQL.AppendLine(" FROM MovimientosPoliza mp ") StrSQL.AppendLine(" INNER JOIN Polizas p ON mp.IdPoliza = p.Id ") StrSQL.AppendLine(" INNER JOIN Cuentas c ON c.Id = mp.IdCuenta ") diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 8afea1057..0a9d5aca9 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -1409,6 +1409,30 @@ Public Class ClsProductosServicios Return Retorno End Function + + Public Function UpdateAplicaLoteCaducidadAlmacen(CvePS As Integer, CveEmpresa As Integer, AplicaLoteAlmacen As Boolean, AplicaCaducidadAlmacen As Boolean) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Gral_ProductosServiciosLoteCaducidadAlmacenUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@AplicaLoteAlmacen", SqlDbType.Bit).Value = AplicaLoteAlmacen + .Add("@AplicaCaducidadAlmacen", SqlDbType.Bit).Value = AplicaCaducidadAlmacen + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch Ex1 As SqlException + + Catch ex As Exception + OnError("Ocurrió un error al actualizar aplicar lote/caducidad almacen.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + Public Function GetMarcas(CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_MarcasGet") diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index e864519ea..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 @@ -2156,7 +2161,7 @@ Public Class ClsVentas #End Region #Region " PROMOCIONES DETALLE " - Public Function GetPromocionesPS(CvePS As Integer, Fecha As DateTime, CveSubProyecto As Integer, CveCliente As Integer, CveVendedor As Integer, CveEmpresa As Integer) As Boolean + Public Function GetPromocionesPS(CvePS As Integer, Fecha As DateTime, CveSubProyecto As Integer, CveCliente As Integer, CveVendedor As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_PromocionesPSGet") @@ -2166,6 +2171,7 @@ Public Class ClsVentas .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With @@ -3789,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 @@ -3819,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) @@ -4753,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) @@ -4763,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 37f285efa..d9dd46a07 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -526,7 +526,7 @@ Namespace Modelos Dim ObjVentas As New ClsVentas 'CARGA PROMOCIONES - If ObjVentas.GetPromocionesPS(-1, Me.Fecha, Me.CveSubProyecto, CveCliente, Me.CveVendedor, Me.CveEmpresa) Then + If ObjVentas.GetPromocionesPS(-1, Me.Fecha, Me.CveSubProyecto, CveCliente, Me.CveVendedor, 1, Me.CveEmpresa) Then Me.DtPromociones = ObjVentas.DtResultados.Copy() End If @@ -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/Ashx/SIGFacturacionCiclica.ashx b/Ashx/SIGFacturacionCiclica.ashx index efa477a6f..35541349c 100644 --- a/Ashx/SIGFacturacionCiclica.ashx +++ b/Ashx/SIGFacturacionCiclica.ashx @@ -425,14 +425,14 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI)) ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI)) - ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago + 'ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago - If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows.Count > 0 Then - ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows(0)("MetodoPago").ToString - Else - ObjFactura.CveMetodoPago = 1 - ObjFactura.MetodoPago = "Efectivo" - End If + 'If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows.Count > 0 Then + ' ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows(0)("MetodoPago").ToString + 'Else + ' ObjFactura.CveMetodoPago = 1 + ' ObjFactura.MetodoPago = "Efectivo" + 'End If End If End If diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs index 65a91d93d..acc3565c3 100644 --- a/Bancos/Devoluciones.aspx.cs +++ b/Bancos/Devoluciones.aspx.cs @@ -433,7 +433,7 @@ public partial class Bancos_Devoluciones : ClsPaginas } // OTROS INGRESOS - if (gvr.FCTextBox("TxtComision").Text.ToDecimal() > 0) + if (gvr.FCTextBox("TxtComision").Text.ToDecimal() != 0) { if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtComision").Text.ToDecimal(), Ref, 78, Conc, DateTime.Now, UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtComision").Text.ToDecimal(), CveIEDevolucion: CveIE)) { 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/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 3992cdd1d..74a48f0ea 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1342,7 +1342,7 @@ Partial Class PopUpVerFactura 'VERIFICA SI TIENE MOVIMIENTO VIRTUAL RELACIONADO If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then CveMovimientoRelacionado = ObjInventarios.DtResultados.Rows(0)("CveMtoRel").ToString().ToEntero() - If CveConcepto.Contiene(2, 3, 26, 27) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then + If CveConcepto.Contiene(2, 3, 26, 27, 40, 41) AndAlso ObjInventarios.DtResultados.FiltroPrimeroValor("CveMovimientoVirtual").ToEntero() > 0 Then FolioRelacionado = ObjInventarios.DtResultados.FiltroPrimeroValor("FolioVirtual") CveConceptoMovtoRelacionado = 37 ElseIf CveConcepto.Contiene(36, 37) Then @@ -1361,8 +1361,31 @@ Partial Class PopUpVerFactura If CveConcepto = 3 Or CveConcepto = 18 Or CveConcepto = 30 Or CveConcepto = 34 Or CveConcepto = 35 Or CveConcepto = 16 Or CveConcepto = 7 Or CveConcepto = 40 Then 'SALIDA Y DEVOLUCION DEL CLIENTE If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimiento, UsuarioActual.CveEmpresa) Then - DtMovimientos = ObjInventarios.DtResultados - Alert("asdf") + DtMovimientos = ObjInventarios.DtResultados + + If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveMovimientoRelacionado > 0 Then + If ObjInventarios.GetMovimientosDetalleImpresion(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then + Dim CveAlmacenRelacionado As Integer = ObjInventarios.DtResultados.Rows(0)("CveAlmacen").ToString().ToEntero() + Dim CveTipoAlmacenRelacionado As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenRelacionado}").ToString.ToEntero + + 'SI TIENE RELACIONADO UN MOVIMIENTO VIRTUAL DEBE AGREGAR ESTE MOVIMIENTO A LA IMPRESION + If CveTipoAlmacenRelacionado.Contiene(24, 25) Then + If ObjInventarios.GetMovimientosDetalle(CveMovimientoRelacionado, UsuarioActual.CveEmpresa) Then + Dim DtUsados As DataTable = ObjInventarios.DtResultados.Copy() + CantidadUsados = DtUsados.SUM("Cantidad").ToDecimal() + Dim IndexInicialUsados As Integer = DtMovimientos.Rows.Count + 1 + + For Each Dr As DataRow In DtUsados.Rows + Dr("No") = IndexInicialUsados + IndexInicialUsados += 1 + Next + + DtMovimientos.Merge(DtUsados) + End If + End If + End If + End If + DtMovimientos.Columns("No").AutoIncrement = True DtMovimientos.Columns("No").AutoIncrementSeed = DtMovimientos.Rows.Count + 1 DtMovimientos.Columns("No").AutoIncrementStep = 1 @@ -4638,18 +4661,28 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("TipoAuto", ModeloAuto)) 'Informacion Consumidor - 'Informacion Distribuidor If (CveCliente > 0) Then Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", CveCliente)) - Dim Nombre As String = DatosClienteSeleccionado.Item("Nombre").ToString - Dim Ciudad As String = DatosClienteSeleccionado.Item("Ciudad").ToString - Dim Estado As String = DatosClienteSeleccionado.Item("Estado").ToString + + Dim Nombre As String = "" + Dim Ciudad As String = "" + Dim Estado As String = "" + Dim Direccion As String = "" + Dim Telefono As String = "" + + If DatosClienteSeleccionado IsNot Nothing Then + Nombre = DatosClienteSeleccionado("Nombre").ToString + Ciudad = DatosClienteSeleccionado("Ciudad").ToString + Estado = DatosClienteSeleccionado("Estado").ToString + Direccion = DatosClienteSeleccionado("Direccion").ToString + Telefono = DatosClienteSeleccionado("Telefono").ToString + End If params.Add(New ReportParameter("NombreCliente", Nombre)) - params.Add(New ReportParameter("Direccion", String.Format("{0}, {1}", Ciudad.Trim, Estado))) - params.Add(New ReportParameter("CiudadEstadoConsumidor", String.Format("{0}, {1}", Ciudad.Trim, Estado))) - params.Add(New ReportParameter("TelConsumidor", DatosClienteSeleccionado.Item("Telefono").ToString)) + params.Add(New ReportParameter("Direccion", Direccion)) + params.Add(New ReportParameter("CiudadEstadoConsumidor", String.Format("{0}, {1}", Ciudad, Estado))) + params.Add(New ReportParameter("TelConsumidor", Telefono)) End If params.Add(New ReportParameter("Anio", Año)) diff --git a/Contabilidad2/CatCuentas.aspx b/Contabilidad2/CatCuentas.aspx index ca1f269ad..24cf2ec21 100644 --- a/Contabilidad2/CatCuentas.aspx +++ b/Contabilidad2/CatCuentas.aspx @@ -103,7 +103,6 @@
-
Subcuenta de
@@ -171,7 +170,6 @@

-
Concepto
diff --git a/Contabilidad2/CatCuentas.aspx.vb b/Contabilidad2/CatCuentas.aspx.vb index 40341986f..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() @@ -371,7 +372,6 @@ Partial Class Contabilidad2_CatCuentas 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContabilidad - Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) 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,65 +386,69 @@ Partial Class Contabilidad2_CatCuentas End If If idnew > 0 Then + 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 - 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 - - If ObjConta2.GetAgrupadoresSAT() Then - IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero - End If - - If IdPadre > 0 Then - Dim idnew2 As Integer = ObjConta2.AddCuenta(TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, Afectable, IdPadre, IdAgrupador) - - If idnew2 > 0 Then - If ObjConta.UpdateCuentaCompaq(idnew, idnew2, UsuarioActual.CveEmpresa) Then - End If + If ObjConta2.GetAgrupadoresSAT() Then + IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero End If + If IdPadre > 0 Then + Dim idnew2 As Integer = ObjConta2.AddCuenta(TxtCuenta.Text.Replace("-", ""), Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, CuentaEfectivo, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToEntero, TxtNomIngles.Text.Trim, Afectable, IdPadre, IdAgrupador) + + If idnew2 > 0 Then + If ObjConta.UpdateCuentaCompaq(idnew, idnew2, UsuarioActual.CveEmpresa) Then + End If + End If + + 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() - ObjConta2.Dispose() End Sub Private Sub LimpiarCampos() TxtCuenta.Text = "" @@ -469,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 @@ -492,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 @@ -154,7 +154,7 @@ Textbox1 - 3.38128cm + 3.15903cm 17.62925cm 0.6cm 3.12778cm @@ -163,6 +163,7 @@ + Bottom 2pt 2pt 2pt @@ -197,7 +198,7 @@ Textbox1 - 1.96045cm + 1.4207cm 15.85886cm 0.6cm 4.89817cm @@ -228,10 +229,10 @@ Textbox1 - 10.41495cm + 10.09745cm 2.98488cm - 0.73229cm - 17.39115cm + 1.7cm + 10.74213cm 5 + + true + 3.41684cm + 2.98488cm + 0.99076cm + 8.50604cm + 8 + + + + + + true + 4.88413cm + 2.98488cm + 0.99076cm + 8.50604cm + 9 + + + + true 5.91016cm 2.98488cm 0.99076cm 8.50604cm - 8 + 10 @@ -306,7 +333,7 @@ 2.98488cm 0.99076cm 8.50604cm - 9 + 11 @@ -319,7 +346,7 @@ 2.98488cm 0.99076cm 8.50604cm - 10 + 12 @@ -332,7 +359,7 @@ 2.98488cm 0.99076cm 8.50604cm - 11 + 13 @@ -436,10 +463,10 @@ DataSet1 12.24622cm - 0.61298cm + 0.58123cm 0.8825cm 3.21438cm - 12 + 14 @@ -543,10 +570,10 @@ DataSet1 12.24622cm - 4.42661cm + 4.68061cm 0.8825cm 9.3004cm - 13 + 15 @@ -653,10 +680,10 @@ DataSet1 12.24622cm - 14.89295cm + 15.84545cm 0.87916cm 2.5cm - 14 + 16 @@ -763,10 +790,10 @@ DataSet1 12.24622cm - 17.6897cm + 18.3247cm 0.87916cm 2.84396cm - 15 + 17 @@ -801,7 +828,7 @@ Textbox9 - 0.53975cm + 1.36525cm 3.13986cm 0.6cm 0.85958cm @@ -832,7 +859,7 @@ Textbox9 - 0.53975cm + 1.36525cm 5.21284cm 0.6cm 0.88604cm @@ -864,7 +891,7 @@ Textbox9 - 0.53975cm + 1.36525cm 7.41418cm 0.6cm 0.88604cm @@ -897,7 +924,7 @@ Textbox9 - 0.508cm + 1.36525cm 14.00924cm 0.6cm 2.5cm @@ -930,7 +957,7 @@ Textbox9 - 0.508cm + 1.36525cm 18.00832cm 0.6cm 2.36771cm @@ -1016,59 +1043,6 @@ ReportParameter1 - - - 2 - 5 - - - 0 - 0 - Folio - - - 1 - 0 - Fecha - - - 0 - 1 - Beneficiario - - - 1 - 1 - ImporteLetra - - - 0 - 2 - Importe - - - 1 - 2 - Observaciones - - - 0 - 3 - Tipo - - - 1 - 3 - TotalCargo - - - 0 - 4 - TotalAbono - - - - es-MX Cm ccd758f2-6f27-4a1e-af76-588dcd11f8b2 diff --git a/Empresas/Grales/Formatos/Ajuste.rdlc b/Empresas/Grales/Formatos/Ajuste.rdlc index 789f27218..a2f9750f7 100644 --- a/Empresas/Grales/Formatos/Ajuste.rdlc +++ b/Empresas/Grales/Formatos/Ajuste.rdlc @@ -1,2116 +1,2210 @@ - - - 0 - - - - - - true - true - - - - - Atención de Ajustes y Garantías - - - - - - - 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 + @@ -687,6 +687,7 @@ =Fields!IEPS.Value @@ -759,7 +760,7 @@ - =IIF(Sum(Fields!IEPS.Value, "DataSet1")> 0, true, false) + =iif(Sum(Fields!IEPS.Value, "DataSet1") > 0, false, true) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 3fe1cc915..4191ec709 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -856,16 +856,16 @@ Partial Class General_SaldosIniciales If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño, CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveClasificacionDetalle:=CveClasificacionDetalle) <= 0 Then - 'If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, - ' CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) <= 0 Then - ErrorPS = True - Codigo.GuardaLog - Exit For - 'Else - ' If ObjPS.GetPS(-1, -1, UsuarioActual.CveEmpresa) Then - ' DTPS = ObjPS.DtResultados - ' End If - End If + 'If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, + ' CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) <= 0 Then + ErrorPS = True + Codigo.GuardaLog + Exit For + 'Else + ' If ObjPS.GetPS(-1, -1, UsuarioActual.CveEmpresa) Then + ' DTPS = ObjPS.DtResultados + ' End If + End If 'End If End If @@ -1468,12 +1468,14 @@ Partial Class General_SaldosIniciales 'PrePólizaDetalle If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SubTotal, Folio.ToString, 4, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=Sucursal.ToEntero) Then ErrorVentas = True : Exit For If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, ConceptoContable, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total) Then ErrorVentas = True : Exit For - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, Folio.ToString, 13, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IVA, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For + + If IVA > 0 Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, Folio.ToString, 13, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IVA, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For + End If 'If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio.ToString, 38, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS) Then ErrorVentas = True : Exit For If UsaComplementaria Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, 203, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteME:=Total, ImporteMX:=Total * TipoCambio.ToDecimal, TipoCambio:=TipoCambio.ToDecimal) Then ErrorVentas = True : Exit For - + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total * TipoCambio.ToDecimal - Total, Folio.ToString, 203, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteME:=Total, ImporteMX:=Total * TipoCambio.ToDecimal - Total, TipoCambio:=TipoCambio.ToDecimal) Then ErrorVentas = True : Exit For End If 'Saldo @@ -1961,6 +1963,88 @@ Partial Class General_SaldosIniciales End If + Catch ex As Exception + ObjConta.RollBack() + End Try + + ObjConta.Dispose() + + ElseIf RblFormato.SelectedValue = "11" Then + + Dim ObjConta As New ClsContabilidad() + ObjConta.IniciaTransacSQL() + Try + Dim TieneError As Boolean = False + Dim ContadorUpdate As Integer = 0 + Dim ContadorError As Integer = 0 + Dim NombreCuenta As String = "" + Dim CvePrePoliza As Integer = 0 + Dim Cuenta As String = "" + Dim Reporte As New StringBuilder + + CvePrePoliza = ObjConta.AddPrePolizas("SI", 1, 0, 0, 1, Now.ToDate, "Saldos Iniciales", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + + For Each Row As DataRow In dt.Rows + NombreCuenta = Row("NombreCuenta").ToString + Cuenta = Row("Cuenta").ToString + + Dim Importe As Decimal = If(Row("Cargo").ToString.ToDecimal <> 0, Row("Cargo").ToString.ToDecimal, Row("Abono").ToString.ToDecimal) + Dim Concepto As String = Row("Concepto").ToString + Dim IdCuenta As Integer = -1 + Dim CveSubProyecto As Integer = -1 + Dim TipoMovto As Boolean = If(Row("Cargo").ToString.ToDecimal <> 0, False, True) + Dim YaExiste As Boolean = False + + Dim SubP As String = Row("SubProyecto").ToString + If SubP <> "" Then + CveSubProyecto = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=-1).FiltroPrimeroValor("CveSubProyecto", "").ToEntero + End If + + If ObjConta.GetCuentas(-1, Cuenta.Replace("-", ""), 1, UsuarioActual.CveEmpresa) Then + If ObjConta.DtResultados.Rows.Count > 0 Then + IdCuenta = ObjConta.DtResultados().FiltroPrimeroValor("CveCuenta").ToEntero + 'TipoCuenta = ObjConta.DtResultados().FiltroPrimeroValor("Tipo") + Else + Reporte.AppendLine($"{Cuenta} - {NombreCuenta} - {Importe}
") + TieneError = True + YaExiste = True + End If + Else + TieneError = True + Exit For + End If + + + 'If TipoCuenta.Contiene("A", "C", "E") Then + ' CargoAbono = False + 'End If + + If YaExiste = False Then + If IdCuenta > 0 Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", 95, Concepto, Now.toDate, -1, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto) Then + TieneError = True + Exit For + End If + Else + IdCuenta = -2 + End If + End If + + + Next + + If Not TieneError Then + ObjConta.Commit() + Alert(String.Format("

Prepóliza: {1}", CvePrePoliza, ObjConta.ContaFolio)) + + Alert($"Se agregó la póliza {ObjConta.ContaFolio}") + + Else + Alert($"No encontraron las siguientes cuentas: {Reporte.ToString} ", TipoMensaje.MsgError) + ObjConta.RollBack() + End If + + Catch ex As Exception ObjConta.RollBack() End Try @@ -2059,6 +2143,8 @@ Partial Class General_SaldosIniciales Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx" ElseIf RblFormato.SelectedValue = "9" Then Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx" + ElseIf RblFormato.SelectedValue = "11" Then + Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoPrePoliza.xlsx" ElseIf RblFormato.SelectedValue = "12" Then Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoAlmacen.xlsx" End If diff --git a/Inventarios/AjustesSeccionAlmacen.aspx.vb b/Inventarios/AjustesSeccionAlmacen.aspx.vb index 36df0bc64..3293c0fa6 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx.vb +++ b/Inventarios/AjustesSeccionAlmacen.aspx.vb @@ -204,7 +204,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=contabilizable, ImporteMX:=importe) Then ErrorMovInv = True End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=contabilizable, ImporteMX:=importe) Then + If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=contabilizable, ImporteMX:=importe) Then ErrorMovInv = True End If End If @@ -437,6 +437,13 @@ Partial Class Inventarios_AjustesSeccionAlmacen ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, False) End If + If LoteSalida = "" Then + ErrorMovInv = Not ObjPS.UpdateAplicaLoteCaducidadAlmacen(CvePS, UsuarioActual.CveEmpresa, False, False) + Else + ErrorMovInv = Not ObjPS.UpdateAplicaLoteCaducidadAlmacen(CvePS, UsuarioActual.CveEmpresa, True, True) + End If + + 'GENERA LA SALIDA DE LOS PRODUCTOS QUE VIENEN EN EL EXCEL If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadSalida, CveUM, CvePS, PUSalida, CveSeccionAlmacen:=CveSeccionAlmacenSalida, Serie:=SerieSalida, Lote:=LoteSalida, FechaCaducidad:=FechaCaducidadSalida, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then ErrorMovInv = True @@ -469,6 +476,12 @@ Partial Class Inventarios_AjustesSeccionAlmacen End If End If + If Lote = "" Then + ErrorMovInv = Not ObjPS.UpdateAplicaLoteCaducidadAlmacen(CvePS, UsuarioActual.CveEmpresa, False, False) + Else + ErrorMovInv = Not ObjPS.UpdateAplicaLoteCaducidadAlmacen(CvePS, UsuarioActual.CveEmpresa, True, True) + End If + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, CantidadEntrada, CveUMEntrada, CvePSEntrada, PUEntrada, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then ErrorMovInv = True Exit For diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 3d45b4103..8c24fa9af 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -1073,13 +1073,13 @@