diff --git a/AC/Reportes/RepSituacionFinanciera.rdlc b/AC/Reportes/RepSituacionFinanciera.rdlc index 05411130d..750d7f2cc 100644 --- a/AC/Reportes/RepSituacionFinanciera.rdlc +++ b/AC/Reportes/RepSituacionFinanciera.rdlc @@ -215,7 +215,7 @@ ImporteAnterior - true + =IIf(Parameters!CveEmpresa.Value = 48,False,True) @@ -3022,10 +3050,10 @@ - =Sum(iif(Fields!Tipo.Value.ToString() = "A" OR Fields!Tipo.Value.ToString() = "B" OR Fields!Tipo.Value.ToString() = "C" OR Cint(Fields!TipoCuenta.Value) = 9 , Fields!ImporteActual.Value, 0) , "DataSet1") + =Sum(iif(Fields!Sup.Value = "ACTIVO NO CIRCULANTE" OR Fields!Sup.Value="ACTIVO CIRCULANTE", Fields!ImporteActual.Value, 0) , "DataSet1") - =Sum( iif(Fields!Sup.Value = "ACTIVO NO CIRCULANTE" OR Fields!Sup.Value="ACTIVO CIRCULANTE" OR Cint(Fields!TipoCuenta.value) = 9 , Fields!ImporteAnterior.Value, 0), "DataSet1") + =Sum(iif(Fields!Sup.Value = "ACTIVO NO CIRCULANTE" OR Fields!Sup.Value="ACTIVO CIRCULANTE", Fields!ImporteAnterior.Value, 0), "DataSet1") =Sum( iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" , Fields!ImporteActual.Value, 0), "DataSet1") @@ -3035,22 +3063,22 @@ true - =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" , Fields!ImporteActual.Value, 0),"DataSet1") + =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PATRIMONIO CONTRIBUIDO" , Fields!ImporteActual.Value, 0),"DataSet1") - =Variables!TotalPatrimonioCActual.Value + =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PATRIMONIO GENERADO" , Fields!ImporteActual.Value, 0),"DataSet1") - =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" , Fields!ImporteAnterior.Value, 0),"DataSet1") + =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PATRIMONIO CONTRIBUIDO" , Fields!ImporteAnterior.Value, 0),"DataSet1") - =Variables!TotalPatrimonioCAnterior.Value + =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PATRIMONIO GENERADO" , Fields!ImporteAnterior.Value, 0),"DataSet1") - =Variables!TotalPasivoActual.Value+Variables!TotalPatrimonioHActual.Value + =Variables!TotalPasivoActual.Value+Variables!TotalPatrimonioHActual.Value+Variables!TotalPatrimonioCActual.Value - =Variables!TotalPatrimonioHAnterior.Value+ Variables!TotalPasivoAnterior.Value + =Variables!TotalPasivoAnterior.Value+Variables!TotalPatrimonioHAnterior.Value+Variables!TotalPatrimonioCAnterior.Value Cm diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb index cbe00b5ee..2abd5de9e 100644 --- a/App_Code/ClsContPAQi.vb +++ b/App_Code/ClsContPAQi.vb @@ -3741,7 +3741,7 @@ Public Class ClsContPAQi StrSQL.Append(" ") StrSQL.Append(" SELECT * ") StrSQL.Append(" FROM ( ") - StrSQL.Append(" SELECT C.Id, C.Codigo, C.Nombre, C.Tipo, C.CtaMayor, '' AS Clasificacion, Ct.Nombre as Sup, Orden, D.Level, C.CtaMayor as TipoCuenta, ") + StrSQL.Append(" SELECT C.Id, C.Codigo, C.Nombre, C.Tipo, C.CtaMayor, '' AS Clasificacion, Ct.Nombre as Sup, Orden, D.Level, ") StrSQL.Append(" CASE WHEN C.Id = @IdCuentaAhorroDesahorro THEN @TotalActual ELSE ISNULL (dbo.FNC_TotalComplementaria(c.Id, @FechaI, @FechaF, @Tipo, @SegmentoNegocio), 0) END AS ImporteActual, ") StrSQL.Append(" CASE ") StrSQL.Append(" WHEN @Tipo < 0 THEN CASE WHEN C.Id = @IdCuentaAhorroDesahorro THEN @TotalAnterior ELSE ISNULL (dbo.FNC_TotalComplementaria(c.Id, @FechaI, DATEADD(yy,-1,@FechaF), @Tipo, @SegmentoNegocio), 0) END ") @@ -3806,7 +3806,7 @@ Public Class ClsContPAQi StrSQL.Append(" ") StrSQL.Append(" SELECT * ") StrSQL.Append(" FROM ( ") - StrSQL.Append(" SELECT C.Id, C.Codigo, C.Nombre, C.Tipo, C.CtaMayor, '' AS Clasificacion, Ct.Nombre as Sup, Orden, Level, C.CtaMayor as TipoCuenta, ") + StrSQL.Append(" SELECT C.Id, C.Codigo, C.Nombre, C.Tipo, C.CtaMayor, '' AS Clasificacion, Ct.Nombre as Sup, Orden, Level, ") StrSQL.Append(" CASE WHEN C.Id = @IdCuentaAhorroDesahorro THEN @TotalActual ELSE ISNULL (dbo.FNC_TotalComplementaria(c.Id, @FechaI, @FechaF, @Tipo, @SegmentoNegocio), 0) END AS ImporteActual, ") StrSQL.Append(" CASE ") StrSQL.Append(" WHEN @Tipo < 0 AND @UsaAnterior > 0 THEN CASE WHEN C.Id = @IdCuentaAhorroDesahorro THEN @TotalAnterior ELSE ISNULL (dbo.FNC_TotalComplementaria(c.Id, DATEADD(yyyy,-1,@FechaI), DATEADD(yyyy,-1,@FechaF), @Tipo, @SegmentoNegocio), 0) END ") diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index f0d7a5286..44c68fdc5 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4451,11 +4451,13 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/RepAnticiposEspeciales.aspx".ToUpper(), 678) PaginaDict.Add("/Ventas/RepArqueos.aspx".ToUpper(), 679) PaginaDict.Add("/Ventas/RepArqueosDetalle.aspx".ToUpper(), 680) + PaginaDict.Add("/Ventas/RepCotizacionesxFacturar.aspx".ToUpper(), 686) + PaginaDict.Add("/Ventas/RepRemisionesNC.aspx".ToUpper(), 687) #End Region - - - - 'Portal Cliente/Proveedor + + + + 'Portal Cliente/Proveedor PaginaDict.Add("/PortalCliente/PortalCliente.aspx".ToUpper(), 1101) PaginaDict.Add("/PortalProveedor/PortalProveedor.aspx".ToUpper(), 1201) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index a5f4d0b01..60dea2804 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -2452,6 +2452,50 @@ Public Class ClsVentas Return Retorno End Function + Public Function GetRepCotizacionesSinFacturar(FechaI As String, FechaF As String, CveSubProyecto As String, CveCliente As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_RepCotizacionesSinFacturarGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@FechaI", SqlDbType.VarChar).Value = FechaI + .Add("@FechaF", SqlDbType.VarChar).Value = FechaF + .Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener las cotizaciones sin facturar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + Public Function GetRepRemisionesNCSinFacturar(FechaI As String, FechaF As String, CveSubProyecto As String, CveCliente As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_RepRemisionesNCGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@FechaI", SqlDbType.VarChar).Value = FechaI + .Add("@FechaF", SqlDbType.VarChar).Value = FechaF + .Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener las Remisiones de NC sin facturar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function Public Function GetReporteHP(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Compu_HPRep") diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 44dac8093..31b36d589 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6201,7 +6201,7 @@ Partial Class Compras_Compras If ObjConta.GetRetCuenta(ConceptoContabilizacionMEComp, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContableMEComp = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero End If - + Dim CveMovimientoAlmacen As Integer = -1 'If importeMovimiento <> 0 Then Select Case ConceptoContabilizacion @@ -6209,11 +6209,12 @@ Partial Class Compras_Compras Dim SumatoriaOCINV = 0.0D, Importe176 = 0.0D, ImporteME176 = 0.0D, ImporteMN176 = 0.0D, Importe228 = 0.0D, ImporteME228 = 0.0D, ImporteMN228 = 0.0D, Importe229 = 0.0D, ImporteME229 = 0.0D, ImporteMN229 = 0.0D, ImporteCI176 = 0.0D For Each Dr As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND ISNULL(CveTipoPS,0) = 2").Rows If ObjOC.OrdenesCompraDetalleCostoPP(Dr("CveOrdenCompraDetalle").ToString.ToEntero) AndAlso ObjOC.DtResultados.Rows.Count = 1 Then - Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text} OC: {ObjOC.DtResultados.FiltroPrimeroValor("Folio").ToString}" + Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text} OC: {ObjOC.DtResultados.FiltroPrimeroValor("Folio").ToString} Inv:{ObjOC.DtResultados.FiltroPrimeroValor("FolioAlmacen").ToString}" Importe176 = ObjOC.DtResultados.FiltroPrimeroValor("Importe176").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME176").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN176").ToDecimal * Dr("Cantidad").ToString.ToDecimal Importe228 = ObjOC.DtResultados.FiltroPrimeroValor("Importe228").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME228 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME228").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN228 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN228").ToDecimal * Dr("Cantidad").ToString.ToDecimal Importe229 = ObjOC.DtResultados.FiltroPrimeroValor("Importe229").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME229 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME229").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN229 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN229").ToDecimal * Dr("Cantidad").ToString.ToDecimal ImporteCI176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteCI176").ToDecimal + CveMovimientoAlmacen = ObjOC.DtResultados.FiltroPrimeroValor("CveMovimientoAlmacen").ToEntero Dim TCAjuste As Decimal = ObjOC.DtResultados.FiltroPrimeroValor("TipoCambioAjuste").ToDecimal 'RMF. falta verificar el costo indirecto de la OC If DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then @@ -6221,8 +6222,8 @@ Partial Class Compras_Compras CostoIndirectoAcum176 += ImporteCI176 'se considera costoindirecto, para que la factura tiene en un concepto tipo servicio SumatoriaOCINV += (Dr(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total")).ToString.ToDecimal * tipoCambioActual) - (ImporteMN228 + ImporteMN229 - ImporteCI176) - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe228, Referencia, ConceptoContabilizacionME, Concepto, FechaMovimiento, IdCtaContableME, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN228, ImporteME:=ImporteME228, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, Contabilizable:=SeContabiliza) Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe229, Referencia, ConceptoContabilizacionMEComp, Concepto, FechaMovimiento, IdCtaContableMEComp, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN229, ImporteME:=ImporteME229, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, Contabilizable:=SeContabiliza) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe228, Referencia, ConceptoContabilizacionME, Concepto, FechaMovimiento, IdCtaContableME, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN228, ImporteME:=ImporteME228, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=Dr("CveMovimientoAlmacen").ToString.ToEntero, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe229, Referencia, ConceptoContabilizacionMEComp, Concepto, FechaMovimiento, IdCtaContableMEComp, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN229, ImporteME:=ImporteME229, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=Dr("CveMovimientoAlmacen").ToString.ToEntero, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For End If @@ -6234,7 +6235,7 @@ Partial Class Compras_Compras CostoIndirectoAcum176 += ImporteCI176 'se considera costoindirecto, para que la factura tiene en un concepto tipo servicio SumatoriaOCINV += (Dr(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total")).ToString.ToDecimal * tipoCambioActual) - (ImporteMN176 - ImporteCI176) - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe176, Referencia, ConceptoContabilizacion, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN176, ImporteME:=ImporteME176, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe176, Referencia, ConceptoContabilizacion, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=ImporteMN176, ImporteME:=ImporteME176, CveCuenta:=CveCuenta, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=Dr("CveMovimientoAlmacen").ToString.ToEntero, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For End If @@ -14295,6 +14296,7 @@ Partial Class Compras_Compras DTOCTemp.Columns.Add("IEPSPSIVATC", GetType(Double)) DTOCTemp.Columns.Add("RetIVATC", GetType(Double)) DTOCTemp.Columns.Add("RetISRTC", GetType(Double)) + DTOCTemp.Columns.Add("FolioAlmacen", GetType(String)) For Each Dr As DataRow In DTOCTemp.Rows Dr("PUTC") = Dr("Importe") Dr("DescuentoTC") = Dr("Descuento") @@ -18591,6 +18593,7 @@ Partial Class Compras_Compras 'DtInvOCDiferencias.Columns.Add("ImporteMovtoDLLS", GetType(Double)) DtInvOCDiferencias.Columns.Add("CveAlmacen", GetType(Integer)) DtInvOCDiferencias.Columns.Add("CveMovimiento", GetType(Integer)) + DtInvOCDiferencias.Columns.Add("FolioAlmacen", GetType(String)) DtInvOCDiferencias.Columns.Add("TipoCambioAjuste", GetType(Double)) DtInvOCDiferencias.Columns.Add("ConceptoSalida", GetType(Integer)) DtInvOCDiferencias.Columns.Add("PS", GetType(String)) @@ -18614,6 +18617,7 @@ Partial Class Compras_Compras DrInvOCDiferencias("FolioOC") = dr2("FolioOC").ToString DrInvOCDiferencias("CveProveedor") = dr2("CveProveedorOC").ToString.ToEntero DrInvOCDiferencias("PS") = dr2("PS").ToString + DrInvOCDiferencias("FolioAlmacen") = dr2("FolioAlmacen").ToString If DdlOCVinculaInv.SelectedValue.ToEntero.Contiene(205) Then DrInvOCDiferencias("TipoCambioAjuste") = 0 @@ -18724,7 +18728,7 @@ Partial Class Compras_Compras SerieFolio = $"OC: {DrDiferencias("FolioOC").ToString}" CveProveedor = DrDiferencias("CveProveedor").ToString.ToEntero ProveedorNombre = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", $"CveProveedor = {CveProveedor}").ToString - Dim ConceptoPartida As String = String.Format("{0} OC# {1}", ProveedorNombre, DrDiferencias("FolioOC")) + Dim ConceptoPartida As String = String.Format("{0} OC: {1} Inv: {2}", ProveedorNombre, DrDiferencias("FolioOC"), DrDiferencias("FolioAlmacen")) ConceptoSalida = DrDiferencias("ConceptoSalida").ToString.ToEntero CveAlmacen = DrDiferencias("CveAlmacen").ToString.ToEntero diff --git a/Contabilidad/OCDetalleAlmacen.aspx.vb b/Contabilidad/OCDetalleAlmacen.aspx.vb index 840691ef0..70023f39b 100644 --- a/Contabilidad/OCDetalleAlmacen.aspx.vb +++ b/Contabilidad/OCDetalleAlmacen.aspx.vb @@ -85,8 +85,10 @@ Partial Class Contabilidad_OCDetalleAlmacen Dim Folio As String = GvDrow.DataKey("Folio").ToString - Dim CveCuenta176 As Integer = 55169 + Dim CveCuenta176 As Integer = 0 Dim IdCtaCuenta176 As Integer = 1245 + Dim IdCtaCuenta228 As Integer = 1247 + Dim IdCtaCuenta229 As Integer = 1249 Dim CveCuenta177 As Integer = 55294 Dim IdCtaCuenta177 As Integer = 1148 @@ -95,7 +97,7 @@ Partial Class Contabilidad_OCDetalleAlmacen If Chk IsNot Nothing AndAlso Chk.Checked Then - CvePrePoliza = ObjConta.AddPrePolizas(modulo, 3, Diferencia, Diferencia, CveMoneda, Fecha, Referencia, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3) + CvePrePoliza = ObjConta.AddPrePolizas(modulo, 74, Diferencia, Diferencia, CveMoneda, Fecha, Referencia, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3) GvDrow.Cells(1).Text = CvePrePoliza.ToString mensaje = mensaje & $"CvePrePoliza {CvePrePoliza } OC: {Folio} Importe :{Diferencia}
" @@ -104,7 +106,7 @@ Partial Class Contabilidad_OCDetalleAlmacen If CvePrePoliza > 0 Then If Cargo > Abono Then - If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, Diferencia, Referencia, 176, Referencia, Fecha, IdCtaCuenta176, -1, ImporteME:=0, ImporteMX:=Diferencia, CveCompra:=CveCompra, Contabilizable:=1, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then + If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, Diferencia, Referencia, 228, Referencia, Fecha, IdCtaCuenta228, -1, ImporteME:=Diferencia, ImporteMX:=Diferencia, CveCompra:=CveCompra, Contabilizable:=1, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Diferencia, Referencia, 177, Referencia, Fecha, IdCtaCuenta177, -1, ImporteME:=-0, ImporteMX:=-Diferencia, CveCompra:=CveCompra, Contabilizable:=1, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then ContadorProcesados = ContadorProcesados + 1 diff --git a/Empresas/72/Formatos/TrasladoAlmacen.rdlc b/Empresas/72/Formatos/TrasladoAlmacen.rdlc index f08837a87..7e73b9b9f 100644 --- a/Empresas/72/Formatos/TrasladoAlmacen.rdlc +++ b/Empresas/72/Formatos/TrasladoAlmacen.rdlc @@ -1,4739 +1,4751 @@ - - - - - - - - - 1.37635cm - - - 1.74824cm - - - 1.41283cm - - - 8.7207cm - - - 2.50488cm - - - 2.15376cm - - - 2.60235cm - - - - - 0.51314cm - - - - - true - - - - - Cant. - - - - - - - Textbox1 - - - - Black - - 1pt - - - Black - - 1pt - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Cve Int. - - - - - - - Textbox3 - - - - Black - - 1pt - - - Black - - 1pt - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - U.M. - - - - - - - - - - - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Descripción - - - - - - - Textbox5 - - - - Black - - 1pt - - - Black - - 1pt - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Serie/Lote - - - - - - - Textbox8 - - - - Black - - 1pt - - - Black - - 1pt - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - P.U - - - - - - - Textbox14 - - - - Black - - 1pt - - - Black - - 1pt - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox16 - - - - Black - - 1pt - - - Black - - 1pt - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.48887cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - =Fields!ClaveInterna.Value - - - - - - - ClaveInterna - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - =Fields!UnidadMedida.Value - - - - - - - UnidadMedida - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - true - - - - - =Fields!CodigoPS.Value - - - - - - - CodigoPS - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - - SerieLote - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - =Fields!ImporteContratoDetalle.Value - - - - - - - ImporteContratoDetalle - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - =Fields!TotalContrato.Value - - - - - - - TotalContrato - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - 0.6cm - - - - - true - true - - - - - - - - - - - - Textbox19 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - - - - - - - - Textbox20 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - - - - - - - - Textbox21 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - - - - - - - - Textbox23 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - - - - - - - - Textbox37 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - SUBTOTAL: - - - - - - - Textbox42 - - - - - - - - - Bottom - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!TotalContrato.Value) - - - - - - - Textbox43 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - es-MX - - - - - - - - 0.6cm - - - - - true - true - - - - - - - - - - - - Textbox44 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - - - - - - - - Textbox45 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - - - - - - - - Textbox46 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - - - - - - - - Textbox47 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - - - - - - - - Textbox48 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - IVA: - - - - - - - Textbox43 - - - - - - - - - Bottom - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!TotalContrato.Value * 0.16) - - - - - - - Textbox50 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - es-MX - - - - - - - - 0.6cm - - - - - true - true - - - - - - - - - - - - Textbox51 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - - - - - - - - Textbox52 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - - - - - - - - Textbox53 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - - - - - - - - Textbox54 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - - - - - - - - Textbox55 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - TOTAL: - - - - - - - Textbox44 - - - - - - - - - Bottom - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!TotalContrato.Value * 1.16) - - - - - - - Total1 - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - es-MX - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - Before - - - Before - - - Before - - - - DsInventarios - 0.07056cm - 0.03488cm - 2.80201cm - 20.51911cm - - - - - - true - true - - - - - - - - #0e2455 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Observaciones: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 1.68587in - - - - - - - Textbox4 - 1.53516cm - 18.54466cm - 0.59998cm - 1.76305cm - - - 2pt - 2pt - - - - true - true - - - - - Fecha - - - - : - - - - Textbox5 - 1.53514cm - 16.7949cm - 0.6cm - 1.74976cm - 1 - - - 2pt - 2pt - - - - true - true - - - - - Folio - - - - : - - - - =Parameters!Folio.Value - - - - - - - Textbox4 - 0.92863cm - 16.7949cm - 0.6cm - 3.51281cm - 2 - - - 2pt - 2pt - - - - true - true - - - - - =iif(Parameters!CveConcepto.Value = 8, "AVISO", "RECEPCIÓN") & " DE TRASLADO" - - - - - - - Textbox2 - 0.03603cm - 12.87736cm - 0.86458cm - 7.45584cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - Facturado a: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FacturadoA.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Factura: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Factura.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - 7.55064cm - 0.00055cm - 0.67121cm - 20.21916cm - 4 - - =IIF((Parameters!CveAlmacen.Value = "10" OrElse Parameters!CveTipoAlmacenDestino.Value = "10") AND Parameters!CveVentaDetalle.Value <> "", False,True) - - - - - - - Embedded - Logo1 - FitProportional - 0.01419in - 0.00022in - 0.93833in - 0.99497in - 5 - - - - - - true - true - - - - - Enviar a: - - - - - - - - - Cliente: - - - - =Parameters!ClienteNombre.Value - - - - - - - - - Contacto: - - - - =Parameters!EnvioContacto.Value - - - - - - - - - Departamento: - - - - =Parameters!EnvioDepartamento.Value - - - - - - - - - Calle: - - - - =Parameters!EnvioDireccion.Value - - - - - - - - - Colonia: - - - - - - - - =Parameters!EnvioColonia.Value - - - - - - - - - Ciudad: - - - - =Parameters!EnvioCiudad.Value - - - - - - - - - Municipio y/o Delegación: - - - - =Parameters!EnvioCiudad.Value - - - - - - - - - Estado: - - - - =Parameters!EnvioEstado.Value - - - - - - - - - Pais: - - - - =Parameters!ClientePais.Value - - - - - - - - CP: - - - - - - - - =Parameters!EnvioCP.Value - - - - - - - - - Contrato: - - - - =Parameters!Contrato.Value - - - - - - - - - No. Contrato: - - - - =Parameters!NumeroContrato.Value - - - - - - - Textbox36 - 2.45471cm - 11.02647cm - 4.92867cm - 8.96179cm - 6 - - =Microsoft.VisualBasic.Interaction.iif(Parameters!Contrato.Value <> "", False, True) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Detalles del Movimiento: - - - - - - - - - Almacén Origen: - - - - =Parameters!AlmacenOrigen.Value - - - - - - - - - Almacén Destino: - - - - =Parameters!AlmacenDestino.Value - - - - - - - - - Fecha - - - - : - - - - =Parameters!Fecha.Value - - - - - - - - - - Detalles de envío: - - - - - - - - - Paquetería - - - - : - - - - =Parameters!Paqueteria.Value - - - - - - - - - Guía - - - - : - - - - =Parameters!Guia.Value - - - - - - - - - Fecha Envío - - - - : - - - - =Parameters!Fecha.Value - - - - - - - Textbox36 - 2.45771cm - 0.0635cm - 4.92867cm - 9.61623cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 4.84364cm - true - true - - - true - true - - - - - =Parameters!NombreEntrego.Value - - - - Textbox21 - 0.85456cm - 2.91702cm - 0.63472cm - 5.79375cm - - =iif(Parameters!CveConcepto.Value = 9,true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!NombreAccion.Value - - - - Textbox21 - 0.85456cm - 11.63183cm - 0.63528cm - 5.78664cm - 1 - - =iif(Parameters!CveConcepto.Value = 9,true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________ - - - - - - Firma - - - - Textbox21 - 2.80753cm - 2.92497cm - 1.2cm - 5.78664cm - 2 - - =iif(Parameters!CveConcepto.Value = 9,true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________ - - - - - - Nombre y Firma - - - - Textbox21 - 2.80754cm - 11.63893cm - 1.2cm - 5.78664cm - 3 - - =iif(Parameters!CveConcepto.Value = 9,true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ENVIÓ - - - - - - - Textbox22 - 0.47625cm - 2.92497cm - 0.6cm - 5.78664cm - 4 - - =iif(Parameters!CveConcepto.Value = 9,true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Accion.Value - - - - - - - Textbox22 - 0.47625cm - 11.63893cm - 0.6cm - 5.78664cm - 5 - - =iif(Parameters!CveConcepto.Value = 9,true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =IIF(Parameters!NombreAccion.Value=-1,"",Parameters!NombreAccion.Value) - - - - Textbox21 - 0.854cm - 7.26733cm - 0.63528cm - 5.78664cm - 6 - - =iif(Parameters!CveConcepto.Value = 8, True, False) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ___________________________ - - - - - - Nombre y Firma - - - - Textbox21 - 2.80698cm - 7.27443cm - 1.2cm - 5.78664cm - 7 - - =iif(Parameters!CveConcepto.Value = 8, True, False) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Accion.Value - - - - - - - Textbox22 - 0.47625cm - 7.27443cm - 0.6cm - 5.78664cm - 8 - - =iif(Parameters!CveConcepto.Value = 8, True, False) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox35 - 4.37091cm - 17.71971cm - 0.41981cm - 2.5cm - 11 - - - 2pt - 2pt - 2pt - 2pt - - - - 4.19452cm - 0.05952cm - 0cm - 20.27015cm - 12 - - - - - - - - - - 25cm - 21.59cm - 0.5cm - 0.5cm - 0.5cm - 0.5cm - 0.13cm - + + + + + + Textbox1 + + + + Black + + 1pt + + + Black + + 1pt + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Cve Int. + + + + + + + Textbox3 + + + + Black + + 1pt + + + Black + + 1pt + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + U.M. + + + + + + + + + + + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Descripción + + + + + + + Textbox5 + + + + Black + + 1pt + + + Black + + 1pt + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Serie/Lote + + + + + + + Textbox8 + + + + Black + + 1pt + + + Black + + 1pt + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + P.U + + + + + + + Textbox14 + + + + Black + + 1pt + + + Black + + 1pt + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox16 + + + + Black + + 1pt + + + Black + + 1pt + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.48887cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!ClaveInterna.Value + + + + + + + ClaveInterna + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!UnidadMedida.Value + + + + + + + UnidadMedida + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + true + + + + + =Fields!CodigoPS.Value + + + + + + + CodigoPS + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!SerieLote.Value + + + + + + + SerieLote + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!ImporteContratoDetalle.Value + + + + + + + ImporteContratoDetalle + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!TotalContrato.Value + + + + + + + TotalContrato + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + + Textbox19 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox20 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox21 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox23 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox37 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + SUBTOTAL: + + + + + + + Textbox42 + + + + + + + + + Bottom + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!TotalContrato.Value) + + + + + + + Textbox43 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + es-MX + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + + Textbox44 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox45 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox46 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox47 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox48 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + IVA: + + + + + + + Textbox43 + + + + + + + + + Bottom + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!TotalContrato.Value * 0.16) + + + + + + + Textbox50 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + es-MX + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + + Textbox51 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox52 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox53 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox54 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox55 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + TOTAL: + + + + + + + Textbox44 + + + + + + + + + Bottom + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!TotalContrato.Value * 1.16) + + + + + + + Total1 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + es-MX + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + Before + + + Before + + + Before + + + + DsInventarios + 0.07056cm + 0.03488cm + 2.80201cm + 20.51911cm + + + + + + true + true + + + + + + + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Observaciones: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 1.68587in + + + + + + + Textbox4 + 1.53516cm + 18.54466cm + 0.59998cm + 1.76305cm + + + 2pt + 2pt + + + + true + true + + + + + Fecha + + + + : + + + + Textbox5 + 1.53514cm + 16.7949cm + 0.6cm + 1.74976cm + 1 + + + 2pt + 2pt + + + + true + true + + + + + Folio + + + + : + + + + =Parameters!Folio.Value + + + + + + + Textbox4 + 0.92863cm + 16.7949cm + 0.6cm + 3.51281cm + 2 + + + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!CveConcepto.Value = 8, "AVISO", "RECEPCIÓN") & " DE TRASLADO" + + + + + + + Textbox2 + 0.03603cm + 12.87736cm + 0.86458cm + 7.45584cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + Facturado a: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FacturadoA.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Factura: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Factura.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 7.55064cm + 0.00055cm + 0.67121cm + 20.21916cm + 4 + + =IIF((Parameters!CveAlmacen.Value = "10" OrElse Parameters!CveTipoAlmacenDestino.Value = "10") AND Parameters!CveVentaDetalle.Value <> "", False,True) + + + + + + + Embedded + Logo1 + FitProportional + 0.01419in + 0.00022in + 0.93833in + 0.99497in + 5 + + + + + + true + true + + + + + Enviar a: + + + + + + + + + Cliente: + + + + =Parameters!ClienteNombre.Value + + + + + + + + + Contacto: + + + + =Parameters!EnvioContacto.Value + + + + + + + + + Departamento: + + + + =Parameters!EnvioDepartamento.Value + + + + + + + + + Calle: + + + + =Parameters!EnvioDireccion.Value + + + + + + + + + Colonia: + + + + + + + + =Parameters!EnvioColonia.Value + + + + + + + + + Ciudad: + + + + =Parameters!EnvioCiudad.Value + + + + + + + + + Municipio y/o Delegación: + + + + =Parameters!EnvioCiudad.Value + + + + + + + + + Estado: + + + + =Parameters!EnvioEstado.Value + + + + + + + + + Pais: + + + + =Parameters!ClientePais.Value + + + + + + + + CP: + + + + + + + + =Parameters!EnvioCP.Value + + + + + + + + + Contrato: + + + + =Parameters!Contrato.Value + + + + + + + + + No. Contrato: + + + + =Parameters!NumeroContrato.Value + + + + + + + Textbox36 + 2.45471cm + 11.02647cm + 4.92867cm + 8.96179cm + 6 + + =Microsoft.VisualBasic.Interaction.iif(Parameters!Contrato.Value <> "", False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Detalles del Movimiento: + + + + + + + + + Almacén Origen: + + + + =Parameters!AlmacenOrigen.Value + + + + + + + + + Almacén Destino: + + + + =Parameters!AlmacenDestino.Value + + + + + + + + + Fecha + + + + : + + + + =Parameters!Fecha.Value + + + + + + + + + + Detalles de envío: + + + + + + + + + Paquetería + + + + : + + + + =Parameters!Paqueteria.Value + + + + + + + + + Guía + + + + : + + + + =Parameters!Guia.Value + + + + + + + + + Fecha Envío + + + + : + + + + =Parameters!Fecha.Value + + + + + + + Textbox36 + 2.45771cm + 0.0635cm + 4.92867cm + 9.61623cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 4.84364cm + true + true + + + true + true + + + + + =Parameters!NombreEntrego.Value + + + + Textbox21 + 0.85456cm + 2.91702cm + 0.63472cm + 5.79375cm + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NombreAccion.Value + + + + Textbox21 + 0.85456cm + 11.63183cm + 0.63528cm + 5.78664cm + 1 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + Firma + + + + Textbox21 + 2.80753cm + 2.92497cm + 1.2cm + 5.78664cm + 2 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + Nombre y Firma + + + + Textbox21 + 2.80754cm + 11.63893cm + 1.2cm + 5.78664cm + 3 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ENVIÓ + + + + + + + Textbox22 + 0.47625cm + 2.92497cm + 0.6cm + 5.78664cm + 4 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Accion.Value + + + + + + + Textbox22 + 0.47625cm + 11.63893cm + 0.6cm + 5.78664cm + 5 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!NombreAccion.Value=-1,"",Parameters!NombreAccion.Value) + + + + Textbox21 + 0.854cm + 7.26733cm + 0.63528cm + 5.78664cm + 6 + + =iif(Parameters!CveConcepto.Value = 8, True, False) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + Nombre y Firma + + + + Textbox21 + 2.80698cm + 7.27443cm + 1.2cm + 5.78664cm + 7 + + =iif(Parameters!CveConcepto.Value = 8, True, False) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Accion.Value + + + + + + + Textbox22 + 0.47625cm + 7.27443cm + 0.6cm + 5.78664cm + 8 + + =iif(Parameters!CveConcepto.Value = 8, True, False) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 4.37091cm + 17.71971cm + 0.41981cm + 2.5cm + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + 4.19452cm + 0.05952cm + 0cm + 20.27015cm + 12 + + + + + + + + + + 25cm + 21.59cm + 0.5cm + 0.5cm + 0.5cm + 0.5cm + 0.13cm + + + + <%--
  • + PDF +
  • +
  • + Excel +
  • --%> +
    + + + + + + + + + <%-- + +
    + +
    +
    +
    --%> +
    + + + + +
    +
    +
    + + "> + +
    +
    +
    + + + +
    +
    + + + + + + + + + + +
    +
    + +
    +
    + + + + + + + + + + +
    +
    + + +
    + + <%----%> +
    + + +
    +
    +
    + +
    > +
    + + + +
    + +
    + + + <%-- +
    +
    + + + + + + + + + + +
    +
    + + +
    + +
    --%> +
    +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + +
    + + <%----%> + + + + + + + + diff --git a/Ventas/RepCotizacionesxFacturar.aspx.vb b/Ventas/RepCotizacionesxFacturar.aspx.vb new file mode 100644 index 000000000..20f4131e0 --- /dev/null +++ b/Ventas/RepCotizacionesxFacturar.aspx.vb @@ -0,0 +1,188 @@ +Option Explicit On +Option Strict On + +Imports System.Data +Imports Microsoft.Reporting.WebForms +Imports Extensiones +Partial Class RepCotizacionesxFacturar + Inherits ClsPaginas + Private Shared missing As Object = System.Reflection.Missing.Value + +#Region "PROPIEDADES" + Private Property FechaI As String + Get + Return ViewState("FechaI").ToString + End Get + Set(value As String) + ViewState("FechaI") = value + End Set + End Property + Private Property FechaF As String + Get + Return ViewState("FechaF").ToString + End Get + Set(value As String) + ViewState("FechaF") = value + End Set + End Property + Private Property CveCliente As Integer + Get + Return ViewState("CveCliente").ToString.ToEntero + End Get + Set(value As Integer) + ViewState("CveCliente") = value + End Set + End Property + Private Property Sucursales As String + Get + Return ViewState("Sucursales").ToString + End Get + Set(value As String) + ViewState("Sucursales") = value + End Set + End Property + Private Property DtVentas As DataTable + Get + Return DirectCast(ViewState("DtVentas"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtVentas") = value + End Set + End Property + +#End Region + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not Page.IsPostBack Then + txtFechaI.Text = Now.Day.ToString + "/" + (Now.Month - 6).ToString + "/" + Now.Year.ToString + txtFechaF.Text = Now.ToShortDateString + + CargaSucursales() + CargaCliente() + CargaDatos() + OrdenaDatos() + + End If + End Sub + +#Region " C A R G A - D A T O S " + Public Sub CargaDatos() + Dim ObjVentas As New ClsVentas + + FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") + FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") + CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1) + + Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString + + If ObjVentas.GetRepCotizacionesSinFacturar(FechaI, FechaF, Sucursales, CveCliente, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then + GvDatos.DataSource = ObjVentas.DtResultados + DtVentas = ObjVentas.DtResultados + GvDatos.DataBind() + UPDatos.Update() + End If + + ObjVentas.Dispose() + End Sub +#End Region + +#Region "O R D E N A M I E N T O" + Private Sub OrdenaDatos() + 'If (GvDatos.Rows.Count > 0) Then + ' GvDatos.UseAccessibleHeader = True + ' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader + ' RegistraScript("OrdenarGV();") + 'End If + End Sub +#End Region + +#Region "G V - D A T O S " + Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + + If e.Row.DBCampo("CveCliente") = "" Then + e.Row.CssClass = "Totales" + ElseIf e.Row.DBCampo("CveVenta") = "" Then + e.Row.CssClass = "SubTotales2" + e.Row.Font.Bold = True + e.Row.Attributes.Add("style", "background:#CCCCCC !important") + Else + e.Row.FCLiteral("LtlFolio").Text = "" & e.Row.FCLiteral("LtlFolio").Text & "" + + If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then + ' e.Row.Cells(2).CssClass = "danger" + e.Row.Cells(2).ForeColor = Drawing.Color.Red + End If + + e.Row.Cells(5).Text = e.Row.Cells(5).Text + "%" + End If + + End If + End Sub +#End Region + +#Region "CARGA COMBOS FILTRO" + Private Sub CargaCliente() + 'CargaClientes + Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) + If EsWS Then + DdlClientes.setEsWebService(True) + Else + DdlClientes.setEsWebService(False) + DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) + DdlClientes.DataBind() + DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) + End If + + End Sub + Private Sub CargaSucursales() + + DdlSubProyectos.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + DdlSubProyectos.DataBind() + 'DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1")) + End Sub +#End Region + +#Region "PDF" + 'Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click + ' If DtVentas IsNot Nothing Then + ' Dim StrFiltro As New StringBuilder + ' If DdlSubProyectos.GetSelectedText <> "" Then StrFiltro.AppendFormat(" Sucursal: {0}", DdlSubProyectos.GetSelectedText) + ' If DdlClientes.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Cliente: {0}", DdlClientes.SelectedText) + ' 'If DdlContrato.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Contrato: {0}", DdlContrato.SelectedItem.Text) + + ' If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" Fecha Inicio : {0}", txtFechaI.Text.ToDate.ToShortDateString) + ' If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin : {0}", txtFechaF.Text.ToDate.ToShortDateString) + + ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + ' Dim FechaI, FechaF As String + ' FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text) + ' FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text) + + ' Dim params As New List(Of ReportParameter) + ' params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) + ' params.Add(New ReportParameter("FechaInicio", FechaI)) + ' params.Add(New ReportParameter("FechaFin", FechaF)) + ' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) + ' params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + ' params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) + ' If Imagen.Exists Then + ' params.Add(New ReportParameter("LogoPath", logouri)) + ' Else + ' params.Add(New ReportParameter("LogoPath", "")) + ' End If + ' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", Now.ToDateTime.ToShortDateString)) + ' Else + ' Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) + ' End If + 'End Sub +#End Region + Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click + CargaDatos() + End Sub + + 'Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click + ' GvDatos.ExportToExcel("Reporte de Remisiones por Facturar" & Now.ToShortDateString) + 'End Sub +End Class diff --git a/Ventas/RepRemisiones.aspx.vb b/Ventas/RepRemisiones.aspx.vb index 2fc79c08d..f697cdd7a 100644 --- a/Ventas/RepRemisiones.aspx.vb +++ b/Ventas/RepRemisiones.aspx.vb @@ -125,6 +125,7 @@ Partial Class RepRemisiones e.Row.Attributes.Add("style", "background:#CCCCCC !important") Else e.Row.FCLiteral("LtlFolio").Text = "" & e.Row.FCLiteral("LtlFolio").Text & "" + e.Row.FCLiteral("LtlFecha").Text = "" & e.Row.FCLiteral("LtlFecha").Text & "" If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then ' e.Row.Cells(2).CssClass = "danger" diff --git a/Ventas/RepRemisionesNC.aspx b/Ventas/RepRemisionesNC.aspx new file mode 100644 index 000000000..64f1f2697 --- /dev/null +++ b/Ventas/RepRemisionesNC.aspx @@ -0,0 +1,438 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepRemisionesNC.aspx.vb" Inherits="RepRemisionesNC" %> + + + + + + + + <%--
  • + PDF +
  • +
  • + Excel +
  • --%> +
    + + + + + + + + + <%-- + +
    + +
    +
    +
    --%> +
    + + + + +
    +
    +
    + + "> + +
    +
    +
    + + + +
    +
    + + + + + + + + + + +
    +
    + +
    +
    + + + + + + + + + + +
    +
    + + +
    + + <%----%> +
    + + +
    +
    +
    + +
    > +
    + + + +
    + +
    + + + <%-- +
    +
    + + + + + + + + + + +
    +
    + + +
    + +
    --%> +
    +
    +
    +
    +
    +
    +
    +
    + " style="display: inline-block; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + +
    + + <%----%> + + + + + + + + diff --git a/Ventas/RepRemisionesNC.aspx.vb b/Ventas/RepRemisionesNC.aspx.vb new file mode 100644 index 000000000..02b9da546 --- /dev/null +++ b/Ventas/RepRemisionesNC.aspx.vb @@ -0,0 +1,188 @@ +Option Explicit On +Option Strict On + +Imports System.Data +Imports Microsoft.Reporting.WebForms +Imports Extensiones +Partial Class RepRemisionesNC + Inherits ClsPaginas + Private Shared missing As Object = System.Reflection.Missing.Value + +#Region "PROPIEDADES" + Private Property FechaI As String + Get + Return ViewState("FechaI").ToString + End Get + Set(value As String) + ViewState("FechaI") = value + End Set + End Property + Private Property FechaF As String + Get + Return ViewState("FechaF").ToString + End Get + Set(value As String) + ViewState("FechaF") = value + End Set + End Property + Private Property CveCliente As Integer + Get + Return ViewState("CveCliente").ToString.ToEntero + End Get + Set(value As Integer) + ViewState("CveCliente") = value + End Set + End Property + Private Property Sucursales As String + Get + Return ViewState("Sucursales").ToString + End Get + Set(value As String) + ViewState("Sucursales") = value + End Set + End Property + Private Property DtVentas As DataTable + Get + Return DirectCast(ViewState("DtVentas"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtVentas") = value + End Set + End Property + +#End Region + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not Page.IsPostBack Then + txtFechaI.Text = Now.Day.ToString + "/" + (Now.Month - 6).ToString + "/" + Now.Year.ToString + txtFechaF.Text = Now.ToShortDateString + + CargaSucursales() + CargaCliente() + CargaDatos() + OrdenaDatos() + + End If + End Sub + +#Region " C A R G A - D A T O S " + Public Sub CargaDatos() + Dim ObjVentas As New ClsVentas + + FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") + FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") + CveCliente = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1) + + Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString + + If ObjVentas.GetRepCotizacionesSinFacturar(FechaI, FechaF, Sucursales, CveCliente, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then + GvDatos.DataSource = ObjVentas.DtResultados + DtVentas = ObjVentas.DtResultados + GvDatos.DataBind() + UPDatos.Update() + End If + + ObjVentas.Dispose() + End Sub +#End Region + +#Region "O R D E N A M I E N T O" + Private Sub OrdenaDatos() + 'If (GvDatos.Rows.Count > 0) Then + ' GvDatos.UseAccessibleHeader = True + ' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader + ' RegistraScript("OrdenarGV();") + 'End If + End Sub +#End Region + +#Region "G V - D A T O S " + Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + + If e.Row.DBCampo("CveCliente") = "" Then + e.Row.CssClass = "Totales" + ElseIf e.Row.DBCampo("CveVenta") = "" Then + e.Row.CssClass = "SubTotales2" + e.Row.Font.Bold = True + e.Row.Attributes.Add("style", "background:#CCCCCC !important") + Else + e.Row.FCLiteral("LtlFolio").Text = "" & e.Row.FCLiteral("LtlFolio").Text & "" + + If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then + ' e.Row.Cells(2).CssClass = "danger" + e.Row.Cells(2).ForeColor = Drawing.Color.Red + End If + + e.Row.Cells(5).Text = e.Row.Cells(5).Text + "%" + End If + + End If + End Sub +#End Region + +#Region "CARGA COMBOS FILTRO" + Private Sub CargaCliente() + 'CargaClientes + Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) + If EsWS Then + DdlClientes.setEsWebService(True) + Else + DdlClientes.setEsWebService(False) + DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) + DdlClientes.DataBind() + DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) + End If + + End Sub + Private Sub CargaSucursales() + + DdlSubProyectos.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + DdlSubProyectos.DataBind() + 'DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1")) + End Sub +#End Region + +#Region "PDF" + 'Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click + ' If DtVentas IsNot Nothing Then + ' Dim StrFiltro As New StringBuilder + ' If DdlSubProyectos.GetSelectedText <> "" Then StrFiltro.AppendFormat(" Sucursal: {0}", DdlSubProyectos.GetSelectedText) + ' If DdlClientes.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Cliente: {0}", DdlClientes.SelectedText) + ' 'If DdlContrato.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Contrato: {0}", DdlContrato.SelectedItem.Text) + + ' If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" Fecha Inicio : {0}", txtFechaI.Text.ToDate.ToShortDateString) + ' If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin : {0}", txtFechaF.Text.ToDate.ToShortDateString) + + ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + ' Dim FechaI, FechaF As String + ' FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text) + ' FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text) + + ' Dim params As New List(Of ReportParameter) + ' params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) + ' params.Add(New ReportParameter("FechaInicio", FechaI)) + ' params.Add(New ReportParameter("FechaFin", FechaF)) + ' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) + ' params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + ' params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) + ' If Imagen.Exists Then + ' params.Add(New ReportParameter("LogoPath", logouri)) + ' Else + ' params.Add(New ReportParameter("LogoPath", "")) + ' End If + ' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", Now.ToDateTime.ToShortDateString)) + ' Else + ' Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) + ' End If + 'End Sub +#End Region + Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click + CargaDatos() + End Sub + + 'Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click + ' GvDatos.ExportToExcel("Reporte de Remisiones por Facturar" & Now.ToShortDateString) + 'End Sub +End Class diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index c98f83d31..07bac883c 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -1813,7 +1813,7 @@ Partial Class Ventas 'ImgCerrarTerminoCorte.Attributes.Add("OnClick", "$('#DivTerminarCorte').hide();") 'ImgCerrarIE.Attributes.Add("OnClick", "$('#DivIngresoEgreso').hide();")DdlTipoComprobante 'ImgCerrarEstadoCaja.Attributes.Add("OnClick", "$('#DivEstadoCaja').hide();") - TabAlmacen.Enabled = UsuarioActual.Empresa.UsaInventarios Or UsuarioActual.Empresa.Funcionalidad(567) = "1" + TabAlmacen.Enabled = UsuarioActual.Empresa.UsaInventarios TxtPorDescP.Attributes.Add("onKeyUp", "CalculaDescuento();") TxtDescP.Attributes.Add("onKeyUp", "CalculaDescuento();") TxtCantidadPyME.Attributes.Add("onkeypress", "cambiaFoco('TxtPrecioPyME')") @@ -4426,10 +4426,14 @@ Partial Class Ventas If CveVenta > 0 Then DivAlmacen.Visible = False Else + Dim DTAlmacen As DataTable ddlAlmacen.Items.Clear() - ddlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero}") - ddlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1")) - ddlAlmacen.SelectedValue = "-1" + 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.DataBind() If GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero}").Rows.Count > 0 Then ddlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) @@ -6193,7 +6197,7 @@ Partial Class Ventas End If If GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 AndAlso ddlAlmacen.SelectedValue.ToEntero() <= 0 Then - Alert("Tiene que seleccionar un almacen", TipoMensaje.MsgAdvertencia) + Alert("Tiene que seleccionar un almacén para la salida de almacén", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -10332,7 +10336,7 @@ Partial Class Ventas Dim OcurrioError As Boolean = False Try - If (UsuarioActual.Empresa.UsaInventarios Or UsuarioActual.Empresa.Funcionalidad(567) = "1") AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then + If UsuarioActual.Empresa.UsaInventarios AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then If RemisionesLista.Count > 0 Then For Each CveRemision As Integer In RemisionesLista @@ -14841,8 +14845,9 @@ Partial Class Ventas If (CveAlmacenEntrada > 0 AndAlso CveTipoAlmacen <> 1) Or RemisionesLista.Count = 0 Then 'Con remisiones parciales ignoramos las surtidas ya realizadas Dim MovDetalle As New DataTable - + Dim AplicaMovimientoDetalleEntrada As Boolean = False If RemisionesLista.Count > 0 Then + AplicaMovimientoDetalleEntrada = True MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND TieneSalidaxFactura IS NULL")) Else MovDetalle = DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}") @@ -14851,8 +14856,9 @@ Partial Class Ventas If ErrorList.Count = 0 AndAlso MovDetalle.Rows.Count > 0 Then Dim CveMovimientoSalidaPorTraspaso As Integer = -1 + 'Le damos salida de apartado por traspaso - CveMovimientoSalidaPorTraspaso = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 8, CveMoneda, CveRemision) + CveMovimientoSalidaPorTraspaso = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenSalida, 8, CveMoneda, CveRemision, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada) If Not CveMovimientoSalidaPorTraspaso > 0 Then OcurrioError = True @@ -14989,7 +14995,7 @@ Partial Class Ventas Return Not OcurrioError End Function - Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1) As Integer + Private Function GenerarMovimientoAlmacen(ByRef ObjInventario As ClsInventarios, DtMovDetalle As DataTable, CveAlmacen As Integer, ConceptoEntrada As Integer, CveMoneda As Integer, CveVenta As Integer, Optional MovimientoPrePoliza As Boolean = False, Optional ByRef ObjConta As ClsContabilidad = Nothing, Optional CveMovimientoRelacionado As Integer = -1, Optional AplicaMovimientoDetalleEntrada As Boolean = False) As Integer Dim OcurrioError As Boolean = False Dim ContadorMovtosDetalles = 0 @@ -15033,7 +15039,13 @@ Partial Class Ventas Exit For End If - If ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, SerieLote:=SerieLote, CveVentaDetalle:=CveVentaDetalle) Then + 'CUANDO SEA REMISION FACTURADA DEBE RELACIONAR LOS NUEVOS MOVIMIENTOS POR EL DETALLE + Dim CveMovimientoDetalleEntrada As Integer = -1 + If AplicaMovimientoDetalleEntrada Then + CveMovimientoDetalleEntrada = MovDet("CveMovimientoDetalle").ToString.ToEntero + End If + + If ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, SerieLote:=SerieLote, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada) Then ContadorMovtosDetalles += 1 Else OcurrioError = True @@ -17559,40 +17571,42 @@ Partial Class Ventas Private Sub LbCancelarDocumento_Click(sender As Object, e As EventArgs) Handles LbCancelarDocumento.Click - If VentaSaldoAlmacen <> 0 Then - Alert("El pedido no se puede cancelar ya que tiene movimientos de almacén.
    Nota: Primero hay que hacer la devolución al almacén", TipoMensaje.MsgAdvertencia) - Else - If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then - Dim sb As New StringBuilder() - sb.Append("La factura se encuentra en el siguiente estatus del SAT:
    ") + 'If VentaSaldoAlmacen <> 0 Then + ' Alert("El pedido no se puede cancelar ya que tiene movimientos de almacén.
    Nota: Primero hay que hacer la devolución al almacén", TipoMensaje.MsgAdvertencia) + 'Else - Dim TotalT As Decimal = TxtTotal.Text.ToDecimal - Dim RFCReceptor As String = LblRFC.Text.Trim - Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True) - If Vigencia IsNot Nothing Then - If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then - Alert("Esta factura no es cancelable.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - If String.IsNullOrEmpty(Vigencia.EsCancelable) Then - sb.Append("No encontrado
    ") - Else - sb.AppendFormat("{0}
    ", Vigencia.EsCancelable) - End If + 'End If + + If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Dev", "Egs") Then + Dim sb As New StringBuilder() + sb.Append("La factura se encuentra en el siguiente estatus del SAT:
    ") + + Dim TotalT As Decimal = TxtTotal.Text.ToDecimal + Dim RFCReceptor As String = LblRFC.Text.Trim + Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True) + If Vigencia IsNot Nothing Then + If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then + Alert("Esta factura no es cancelable.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + If String.IsNullOrEmpty(Vigencia.EsCancelable) Then + sb.Append("No encontrado
    ") Else - sb.Append("No encontrado
    ") + sb.AppendFormat("{0}
    ", Vigencia.EsCancelable) End If - - sb.Append("Está seguro de cancelar el documento?.") - - LblCancelarDocumento.Text = sb.ToString() - - RegistraScript("$('#ModalCancelarDocumento').modal();") - UpCancelarDocumento.Update() - 'Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnCancelarDocumentoConfirmar()", TextoConfirmacion:="    Si    ", TextoCancelacion:="    No    ") Else - CancelarDocumento() + sb.Append("No encontrado
    ") End If + + sb.Append("Está seguro de cancelar el documento?.") + + LblCancelarDocumento.Text = sb.ToString() + + RegistraScript("$('#ModalCancelarDocumento').modal();") + UpCancelarDocumento.Update() + + Else + CancelarDocumento() End If End Sub