From e9b7cdd0ecfb6d8a154a50f97375b54fd54f81b1 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 9 Dec 2020 09:43:15 -0700 Subject: [PATCH 01/41] -- porcentajeiva, conceptos cancelacion --- App_Code/Modelos.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 2a0131d71..9c2df14e1 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -2886,7 +2886,7 @@ Namespace Modelos Next - DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto"}) + DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"}) If DT.Rows.Count > 0 Then 'Se agrega movimiento separado por la cuenta de ventas (ER) @@ -2919,7 +2919,7 @@ Namespace Modelos ' CveCuentaContabilizacion = 0 'End If - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then ErrorPrepoliza = True Else ObjFactura.SeGuardoPrePoliza = True @@ -2961,7 +2961,7 @@ Namespace Modelos End If - DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto"}) + DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"}) If DT.Rows.Count > 0 Then 'Se agrega movimiento separado por la cuenta de ventas (ER) @@ -3006,7 +3006,7 @@ Namespace Modelos ' CveCuentaContabilizacion = 0 'End If - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then ErrorPrepoliza = True Else ObjFactura.SeGuardoPrePoliza = True From 453fcb4781399d992beb868ed5bb8f1c69efd0d1 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Wed, 9 Dec 2020 17:20:51 -0700 Subject: [PATCH 02/41] Contratos --- App_Code/ClsInventarios.vb | 9 +- .../RepEstadoResultadosHorizontal.aspx | 72 ++++- .../RepEstadoResultadosHorizontal.aspx.vb | 2 +- Contratos/ContratoObra.aspx | 4 + Contratos/ContratoObra.aspx.vb | 280 ++++++++++-------- 5 files changed, 233 insertions(+), 134 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 61f19b032..7496b1bf9 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1309,8 +1309,14 @@ Public Class ClsInventarios Retorno = True End If Catch Ex1 As SqlException + If Ex1.Message.Contains("50019") Then Me.OnError(" El producto no tiene existencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + + ElseIf Ex1.Message.Contains("CK_Inv_MovimientosDetalle_MetodoInventario") Then + + Me.OnError("El movimiento debe de tener una Serie.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Else If Ex1.Message.Contains("50021") Then Me.OnError(" El producto ingresado previamente.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) @@ -1437,7 +1443,7 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetMovimientosTransitorios(CveAlmacenDestino As Integer, CveTipoAlmacenDestino As Integer, CveAlmacenTransitorio As Integer, CveUsuarioResponsable As Integer, Folio As Integer, CveEmpresa As Integer) As Boolean + Public Function GetMovimientosTransitorios(CveAlmacenDestino As Integer, CveTipoAlmacenDestino As Integer, CveAlmacenTransitorio As Integer, CveUsuarioResponsable As Integer, Folio As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_MovimientosTransitoriosGet") @@ -1448,6 +1454,7 @@ Public Class ClsInventarios .Add("@Folio", SqlDbType.Int).Value = Folio .Add("@CveUsuarioResponsable", SqlDbType.Int).Value = CveUsuarioResponsable .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario End With Try SqlAdapter.Fill(Data) diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx b/Contabilidad2/RepEstadoResultadosHorizontal.aspx index 3b9cb9c02..b30462cd0 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx @@ -1,4 +1,4 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultadosHorizontal.aspx.vb" Inherits="Contabilidad_RepEstadoResultadosHorizontal" %> +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEstadoResultadosHorizontal.aspx.vb" Inherits="Contabilidad_RepEstadoResultadosHorizontal" EnableEventValidation="false" %> @@ -1048,6 +1048,28 @@ + + + + + + + + + + + + + + + + + + + + + + <%-- @@ -1120,6 +1142,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + <%-- @@ -1192,6 +1238,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb index bb9bbfec4..5a89787b7 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb @@ -1821,7 +1821,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Row = DtGastosSubProyectoH.NewRow - If DtGastosSubProyectoH.Rows.Count > 0 Then + If DtGastosSubProyectoH.Rows.Count > 1 Then IndexData = 0 diff --git a/Contratos/ContratoObra.aspx b/Contratos/ContratoObra.aspx index 78eed7830..56c505e65 100644 --- a/Contratos/ContratoObra.aspx +++ b/Contratos/ContratoObra.aspx @@ -2793,10 +2793,14 @@ + + + + diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index 5d5d25493..e04960ae0 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -4129,13 +4129,31 @@ Partial Class Contratos_ContratoObra DTCargaPresupuesto = CargaPreSupuestoExcel() If DTCargaPresupuesto.Rows.Count > 0 Then - ' ProcesaDatosCargaPresupuesto(DTCargaPresupuesto) + ProcesaDatosCargaPresupuesto(DTCargaPresupuesto) Else Alert("No se encintraron partidas en el documento", TipoMensaje.MsgAdvertencia) End If End Sub + Protected Sub BtnDecargaFormato_Click(sender As Object, e As EventArgs) + + + + Dim FI As New IO.FileInfo($"{Extensiones.DirectorioBaseEmpresas}\Empresas\Grales\Formatos\FormatoPresupuestoObra.xlsx") + + + If FI.Exists Then + + Response.ContentType = "application/octet-stream" + Response.AppendHeader("Content-Disposition", $"attachment; filename=FormatoPresupuestoObra.xlsx") + Response.TransmitFile(FI.FullName) + Response.End() + + End If + + + End Sub Private Function CargaPreSupuestoExcel() As DataTable @@ -4183,179 +4201,179 @@ Partial Class Contratos_ContratoObra End Function - 'Private Sub ProcesaDatosCargaPresupuesto(DTPresupuesto As DataTable) + Private Sub ProcesaDatosCargaPresupuesto(DTPresupuesto As DataTable) - ' Dim DTPS = New DataTable - ' DTPS.Columns.Add("CveContratoDetalle", GetType(Integer)) - ' DTPS.Columns.Add("Cantidad", GetType(Double)) - ' DTPS.Columns.Add("CantidadContratada", GetType(Double)) - ' DTPS.Columns.Add("CveUM", GetType(Integer)) - ' DTPS.Columns.Add("UM", GetType(String)) - ' DTPS.Columns.Add("CveClasificacion", GetType(Integer)) - ' DTPS.Columns.Add("Clasificacion", GetType(String)) - ' DTPS.Columns.Add("CvePS", GetType(Integer)) - ' DTPS.Columns.Add("PS", GetType(String)) - ' DTPS.Columns.Add("CodigoPS", GetType(String)) - ' DTPS.Columns.Add("PU", GetType(Double)) - ' DTPS.Columns.Add("Total", GetType(Double)) - ' DTPS.Columns.Add("CveTipoPresupuesto", GetType(Integer)) - ' DTPS.Columns.Add("PermitirAvance", GetType(Integer)) - ' DTPS.Columns.Add("PermitirEstimacion", GetType(Integer)) - ' DTPS.Columns.Add("UsuarioAvance", GetType(Integer)) - ' DTPS.Columns.Add("Cantidad_Original", GetType(Double)) - ' DTPS.Columns.Add("PU_Original", GetType(Double)) - ' DTPS.Columns.Add("Total_Original", GetType(Double)) - ' DTPS.Columns.Add("NoIdentificacion", GetType(String)) - ' DTPS.Columns.Add("LimitarCantidad", GetType(Integer)) - ' DTPS.Columns.Add("OCInterna", GetType(String)) - ' DTPS.Columns.Add("Observacion", GetType(String)) + Dim DTPS = New DataTable + DTPS.Columns.Add("CveContratoDetalle", GetType(Integer)) + DTPS.Columns.Add("Cantidad", GetType(Double)) + DTPS.Columns.Add("CantidadContratada", GetType(Double)) + DTPS.Columns.Add("CveUM", GetType(Integer)) + DTPS.Columns.Add("UM", GetType(String)) + DTPS.Columns.Add("CveClasificacion", GetType(Integer)) + DTPS.Columns.Add("Clasificacion", GetType(String)) + DTPS.Columns.Add("CvePS", GetType(Integer)) + DTPS.Columns.Add("PS", GetType(String)) + DTPS.Columns.Add("CodigoPS", GetType(String)) + DTPS.Columns.Add("PU", GetType(Double)) + DTPS.Columns.Add("Total", GetType(Double)) + DTPS.Columns.Add("CveTipoPresupuesto", GetType(Integer)) + DTPS.Columns.Add("PermitirAvance", GetType(Integer)) + DTPS.Columns.Add("PermitirEstimacion", GetType(Integer)) + DTPS.Columns.Add("UsuarioAvance", GetType(Integer)) + DTPS.Columns.Add("Cantidad_Original", GetType(Double)) + DTPS.Columns.Add("PU_Original", GetType(Double)) + DTPS.Columns.Add("Total_Original", GetType(Double)) + DTPS.Columns.Add("NoIdentificacion", GetType(String)) + DTPS.Columns.Add("LimitarCantidad", GetType(Integer)) + DTPS.Columns.Add("OCInterna", GetType(String)) + DTPS.Columns.Add("Observacion", GetType(String)) - ' Dim RowNoEncontrados As String = "" + Dim RowNoEncontrados As String = "" - ' For Each DrowPS As DataRow In DTPresupuesto.Rows + For Each DrowPS As DataRow In DTPresupuesto.Rows - ' Dim StrArray() As String = GetPS("PS", DrowPS("PS").ToString).Split("|"c) - ' Dim CvePS As Integer - ' Dim CveUM As Integer + Dim StrArray() As String = GetPS("PS", DrowPS("PS").ToString).Split("|"c) + Dim CvePS As Integer + Dim CveUM As Integer - ' If StrArray.Length > 0 Then - ' If CBool(StrArray(0)) = True Then - ' CvePS = StrArray(1).ToEntero - ' Else - ' RowNoEncontrados &= StrArray(1) & "<\BR>" - ' End If - ' End If + If StrArray.Length > 0 Then + If CBool(StrArray(0)) = True Then + CvePS = StrArray(1).ToEntero + Else + RowNoEncontrados &= StrArray(1) & "<\BR>" + End If + End If - ' If CvePS > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 Then + If CvePS > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 Then - ' CveUM = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveUnidadMedida", "").ToString.ToEntero + CveUM = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveUnidadMedida", "").ToString.ToEntero - ' Dim Row As DataRow = DTPS.NewRow() - ' Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble - ' Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble - ' Row("CveUM") = CveUM - ' Row("UM") = "" - ' Row("CveClasificacion") = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveClasificacion", "").ToString.ToEntero - ' Row("Clasificacion") = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = '{ Row("CveClasificacion").ToString }'").ToString - ' Row("CvePS") = CvePS - ' Row("PS") = DrowPS("PS").ToString - ' Row("CodigoPS") = DrowPS("PS").ToString - ' Row("PU") = DrowPS("PU").ToString.ToDouble - ' Row("Total") = DrowPS("Cantidad").ToString.ToDouble * DrowPS("PU").ToString.ToDouble + Dim Row As DataRow = DTPS.NewRow() + Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble + Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble + Row("CveUM") = CveUM + Row("UM") = "" + Row("CveClasificacion") = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveClasificacion", "").ToString.ToEntero + Row("Clasificacion") = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = '{ Row("CveClasificacion").ToString }'").ToString + Row("CvePS") = CvePS + Row("PS") = DrowPS("PS").ToString + Row("CodigoPS") = DrowPS("PS").ToString + Row("PU") = DrowPS("PU").ToString.ToDouble + Row("Total") = DrowPS("Cantidad").ToString.ToDouble * DrowPS("PU").ToString.ToDouble - ' Select Case TipoCargaPresupuesto - ' Case EnumTipoCargaPresupuesto.Ventas - ' Row("CveTipoPresupuesto") = 2 - ' Exit Select - ' Case EnumTipoCargaPresupuesto.Control - ' Row("CveTipoPresupuesto") = 1 - ' Exit Select - ' Case Else - ' Row("CveTipoPresupuesto") = 1 - ' End Select + Select Case TipoCargaPresupuesto + Case EnumTipoCargaPresupuesto.Ventas + Row("CveTipoPresupuesto") = 2 + Exit Select + Case EnumTipoCargaPresupuesto.Control + Row("CveTipoPresupuesto") = 1 + Exit Select + Case Else + Row("CveTipoPresupuesto") = 1 + End Select - ' Row("NoIdentificacion") = "" - ' Row("OCInterna") = "" - ' Row("LimitarCantidad") = 0 - ' Row("Observacion") = "" + Row("NoIdentificacion") = "" + Row("OCInterna") = "" + Row("LimitarCantidad") = 0 + Row("Observacion") = "" - ' DTPS.Rows.Add(Row) + DTPS.Rows.Add(Row) - ' End If - ' Next + End If + Next - ' Dim ErrorProceso = False - ' Dim ObjContratos As New ClsContratos - ' Dim TotalRow As Double = 0 - ' ObjContratos.IniciaTransacSQL() + Dim ErrorProceso = False + Dim ObjContratos As New ClsContratos + Dim TotalRow As Double = 0 + ObjContratos.IniciaTransacSQL() - ' For Each Row As DataRow In DTPS.Rows + For Each Row As DataRow In DTPS.Rows - ' If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, Convert.ToBoolean(Row("LimitarCantidad")), Row("OCInterna").ToString, Observacion:=Row("Observacion").ToString) Then + If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, Convert.ToBoolean(Row("LimitarCantidad")), Row("OCInterna").ToString, Observacion:=Row("Observacion").ToString) Then - ' If Autorizado Then - ' Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU")) - ' guardarBitacora(msj) - ' End If + If Autorizado Then + Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU")) + guardarBitacora(msj) + End If - ' Dim NrowTmpDT As DataRow = TmpDT.NewRow + Dim NrowTmpDT As DataRow = TmpDT.NewRow - ' NrowTmpDT("Cantidad") = Row("Cantidad") - ' NrowTmpDT("CantidadContratada") = Row("CantidadContratada") - ' NrowTmpDT("CveUM") = Row("CveUM") - ' NrowTmpDT("UM") = Row("UM") - ' NrowTmpDT("CveClasificacion") = Row("CveClasificacion") - ' NrowTmpDT("Clasificacion") = Row("Clasificacion") - ' NrowTmpDT("CvePS") = Row("CvePS") - ' NrowTmpDT("PS") = Row("PS") - ' NrowTmpDT("CodigoPS") = Row("CodigoPS") - ' NrowTmpDT("PU") = Row("PU") - ' NrowTmpDT("Total") = Row("Total") - ' NrowTmpDT("CveTipoPresupuesto") = Row("CveTipoPresupuesto") - ' NrowTmpDT("NoIdentificacion") = Row("NoIdentificacion") - ' NrowTmpDT("OCInterna") = Row("OCInterna") - ' NrowTmpDT("LimitarCantidad") = Row("LimitarCantidad") - ' NrowTmpDT("Observacion") = Row("Observacion") + NrowTmpDT("Cantidad") = Row("Cantidad") + NrowTmpDT("CantidadContratada") = Row("CantidadContratada") + NrowTmpDT("CveUM") = Row("CveUM") + NrowTmpDT("UM") = Row("UM") + NrowTmpDT("CveClasificacion") = Row("CveClasificacion") + NrowTmpDT("Clasificacion") = Row("Clasificacion") + NrowTmpDT("CvePS") = Row("CvePS") + NrowTmpDT("PS") = Row("PS") + NrowTmpDT("CodigoPS") = Row("CodigoPS") + NrowTmpDT("PU") = Row("PU") + NrowTmpDT("Total") = Row("Total") + NrowTmpDT("CveTipoPresupuesto") = Row("CveTipoPresupuesto") + NrowTmpDT("NoIdentificacion") = Row("NoIdentificacion") + NrowTmpDT("OCInterna") = Row("OCInterna") + NrowTmpDT("LimitarCantidad") = Row("LimitarCantidad") + NrowTmpDT("Observacion") = Row("Observacion") - ' NrowTmpDT("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle") + NrowTmpDT("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle") - ' TmpDT.Rows.Add(NrowTmpDT) - ' TmpDT.AcceptChanges() + TmpDT.Rows.Add(NrowTmpDT) + TmpDT.AcceptChanges() - ' TotalRow = TotalRow + NrowTmpDT("Total").ToString.ToDouble - ' Else - ' ErrorProceso = True - ' Exit For - ' End If - ' Next + TotalRow = TotalRow + NrowTmpDT("Total").ToString.ToDouble + Else + ErrorProceso = True + Exit For + End If + Next - ' If ErrorProceso Then - ' ObjContratos.RollBack() - ' Alert("Se presento un error al cargar el presupuesto.", TipoMensaje.MsgError) - ' Else + If ErrorProceso Then + ObjContratos.RollBack() + Alert("Se presento un error al cargar el presupuesto.", TipoMensaje.MsgError) + Else - ' ObjContratos.Commit() - ' Alert("Presupuesto Cargado correctamente") + ObjContratos.Commit() + Alert("Presupuesto Cargado correctamente") - ' Select Case TipoCargaPresupuesto - ' Case EnumTipoCargaPresupuesto.Ventas - ' CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2")) - ' UpGV.Update() - ' Exit Select - ' Case EnumTipoCargaPresupuesto.Control - ' CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1")) - ' UpGVInsumos.Update() - ' Exit Select - ' Case Else + Select Case TipoCargaPresupuesto + Case EnumTipoCargaPresupuesto.Ventas + CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2")) + UpGV.Update() + Exit Select + Case EnumTipoCargaPresupuesto.Control + CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1")) + UpGVInsumos.Update() + Exit Select + Case Else - ' End Select + End Select - ' LbTotalGeneral.Text = (LbTotalGeneral.Text.ToDouble + TotalRow).ToString.FormatoNumero - ' LblImporte.Text = LbTotalGeneral.Text - ' UpGral.Update() + LbTotalGeneral.Text = (LbTotalGeneral.Text.ToDouble + TotalRow).ToString.FormatoNumero + LblImporte.Text = LbTotalGeneral.Text + UpGral.Update() - ' End If + End If - ' ObjContratos.Dispose() + ObjContratos.Dispose() - ' If RowNoEncontrados.Length > 0 Then - ' Alert($"Productos no encontrados
{RowNoEncontrados} ") - ' End If + If RowNoEncontrados.Length > 0 Then + Alert($"Productos no encontrados
{RowNoEncontrados} ") + End If - 'End Sub + End Sub From 15e6608bbf47ec88925a172a5f51ffa482e945b3 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 9 Dec 2020 19:53:13 -0700 Subject: [PATCH 03/41] txtps de txt a textarea --- Ventas/ProductosServicios.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index 7a5c4faa1..d83ba7ada 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -132,7 +132,7 @@
- + From 100ac0754035f6b16e93f3bcb9e50998097fe32b Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 9 Dec 2020 19:53:27 -0700 Subject: [PATCH 04/41] usacomplementarias --- Bancos/ProveedoresAbonar.aspx.vb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index d8325a81b..c16a3ca10 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -446,7 +446,7 @@ Partial Class Bancos_ProveedoresAbonar HlSaldarCuentasSinPagar.Visible = True End If - If UsuarioActual.CveEmpresa = 119 And CveUsuarioProgramo <> -1 Then + If UsuarioActual.CveEmpresa.Contiene(119, 158) And CveUsuarioProgramo <> -1 Then LnkPDFSolicitud.Visible = True LnkExcelSolicitud.Visible = True End If @@ -942,6 +942,9 @@ Partial Class Bancos_ProveedoresAbonar Dim TipoCambioGeneral As Decimal = 0 Dim tipoCambioCompraValuacion As Decimal = 1 + Dim UsaComplementariaBancos As Boolean = If(UsuarioActual.CveEmpresa.Contiene(119, 158), True, False) + Dim UsaComplementariaProveedores As Boolean = If(UsuarioActual.CveEmpresa.Contiene(119, 158), True, False) + Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False) Dim TipoCambioFluctuacion As Decimal = 1 @@ -1046,7 +1049,7 @@ Partial Class Bancos_ProveedoresAbonar ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}" IdCtaContable = IdCtaContComplementaria CveCuenta = CveCuentaProveedorExtranjera - If ImporteMovimiento <> 0 AndAlso (UsuarioActual.CveEmpresa = 119 Or IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos + If ImporteMovimiento <> 0 AndAlso (UsaComplementariaProveedores Or IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos importeMX = ImporteMovimiento If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0.00D, Referencia, CveConceptoComplementaria, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioCompraValuacion - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompraValuacion, CveCuenta:=CveCuentaComplementaria) Then MsgError = "No se pudo insertar la póliza" @@ -2034,7 +2037,7 @@ Partial Class Bancos_ProveedoresAbonar If (Not DivTarjeta.Visible Or DdlTarjeta.SelectedValue.ToEntero = -1) Then If TipoCambioPago > 1 AndAlso CveMoneda = 2 Then - If UsuarioActual.CveEmpresa = 119 Or (CveCuentaBancariaComplementaria > 0 OrElse IdCuentaBancariaComplementaria > 0) Then + If UsaComplementariaBancos Or (CveCuentaBancariaComplementaria > 0 OrElse IdCuentaBancariaComplementaria > 0) Then If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES TipoCambioPago = TxtTCDolares.Text.ToDecimal ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then @@ -3121,6 +3124,7 @@ Partial Class Bancos_ProveedoresAbonar Dim CveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero Dim FechaCompra As Date = gr.DataKey("Fecha").ToDate Dim CveSubProyecto As Integer = gr.DataKey("CveSubProyecto").ToEntero + Dim UsaComplementariaProveedores As Boolean = If(UsuarioActual.CveEmpresa.Contiene(119, 158), True, False) Dim CveConceptoContablePago As Integer = 17 If gr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoContablePago = 308 'cuando es acreedor @@ -3141,7 +3145,7 @@ Partial Class Bancos_ProveedoresAbonar CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ProveedoresAbonar/Saldar", 98, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, TxtFechaIncobrable.Text.ToDate, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If CveMoneda > 1 AndAlso (IdCtaContComplementaria > 0 Or UsuarioActual.CveEmpresa = 119) Then + If CveMoneda > 1 AndAlso (IdCtaContComplementaria > 0 Or UsaComplementariaProveedores) Then IdCtaContable = IdCtaContComplementaria CveCuenta = CveCuentaProveedorExtranjera If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, 0.00D, gr.DataKey("SerieFolio").ToString, CveConceptoContableComplementaria, ConceptoPartida, Now, IdCtaContable:=IdCtaContable, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Round(Saldo * TCCompra - Saldo, 2, MidpointRounding.AwayFromZero), ImporteME:=Saldo, TipoCambio:=TCCompra, CveCuenta:=CveCuentaComplementaria) Then From 218e4773628a0656d8da2c907db4be0201079cf6 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 10 Dec 2020 11:40:32 -0700 Subject: [PATCH 05/41] -- complementarias 158 --- Compras/Compras.aspx.vb | 42 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index b3be5f8a9..fb272a042 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -4604,19 +4604,18 @@ Partial Class Compras_Compras CveEstatusFactura = 6 End If 'hay amortización directa como descuento. RMF Temporal - If UsuarioActual.CveEmpresa = 119 Then - 'If LblAmortizacion.Text.ToDouble > 0 AndAlso TxtDescuento.Text.ToDouble = 0 Then - ' TxtDescuento.Text = LblAmortizacion.Text - ' LblAmortizacion.Text = "0.00" - 'End If - 'o si el descuento es igual a la amortizacion - 'If LblAmortizacion.Text.ToDouble = TxtDescuento.Text.ToDouble Then - ' TxtDescuento.Text = LblAmortizacion.Text - ' LblAmortizacion.Text = "0.00" - 'End If + 'If LblAmortizacion.Text.ToDouble > 0 AndAlso TxtDescuento.Text.ToDouble = 0 Then + ' TxtDescuento.Text = LblAmortizacion.Text + ' LblAmortizacion.Text = "0.00" + 'End If + + 'o si el descuento es igual a la amortizacion + 'If LblAmortizacion.Text.ToDouble = TxtDescuento.Text.ToDouble Then + ' TxtDescuento.Text = LblAmortizacion.Text + ' LblAmortizacion.Text = "0.00" + 'End If - End If 'si el registro es manual, toma el mismo dato If CveFactura <= 0 Then TotalOriginal = TxtTotal.Text.ToDecimal @@ -5030,7 +5029,7 @@ Partial Class Compras_Compras Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" - If UsuarioActual.CveEmpresa = 119 AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0 Or DdlTipoComprobante.SelectedValue = "Ant") Then + If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0 Or DdlTipoComprobante.SelectedValue = "Ant") Then AutoConta = False End If @@ -6897,7 +6896,7 @@ Partial Class Compras_Compras If Not RegistroCuentaPuente AndAlso Not ChkNCInvNC.Checked Then 'GASTO - If UsuarioActual.CveEmpresa = 119 Then + If UsuarioActual.CveEmpresa.Contiene(119, 158) Then DT = TmpDT Else DT = TmpDT.FiltraParametros("ISNULL(AplicaCostoIndirecto,0) <> 1") @@ -7034,6 +7033,7 @@ Partial Class Compras_Compras End If Case 5 'Proveedores If CveTipoConcepto = 2 Then ConceptoContable = 305 'cuando es acreedor + Dim UsaComplementaria As Boolean = UsuarioActual.CveEmpresa.Contiene(119, 158) If tipoCambioActual <> 1 Then Select Case ConceptoContable Case 5 @@ -7059,7 +7059,7 @@ Partial Class Compras_Compras Else IdCtaContable = CtaProveedorComplementaria CveCuenta = CveCuentaProveedorComplementaria - If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then 'Cuando tiene complementaria lo dividimos en dos Then + If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 OrElse UsaComplementaria) Then 'Cuando tiene complementaria lo dividimos en dos Then importeMN = importeMovimiento If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, CveConceptoContableComplementaria, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True @@ -15228,7 +15228,7 @@ Partial Class Compras_Compras 'SI PUEDE RECIBIR POR OC Y COMPRA ' si usa almacen, si tiene activado que reciba por OC, y que si la compra tipo Proveedor. que lo muestre - If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then + If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then DivOCVinculaInv.Visible = True End If @@ -15270,7 +15270,7 @@ Partial Class Compras_Compras 'PROMOCIONES LtOCPromocion.Text = StrPromos.ToString - If LtOCPromocion.Text.Length > 0 And UsuarioActual.CveEmpresa = 119 Then + If LtOCPromocion.Text.Length > 0 And UsuarioActual.CveEmpresa.Contiene(119, 158) Then DivOCPromocion.Visible = True End If @@ -15544,12 +15544,6 @@ Partial Class Compras_Compras 'If DdlOCVinculaInv.SelectedValue.ToEntero = 237 And Not CveFlete > 0 Then Alert("Necesita vincular un flete si selecciona Factura de Flete", TipoMensaje.MsgAdvertencia) : Exit Sub 'If DdlOCVinculaInv.SelectedValue.ToEntero = 240 And Not CveImportacion > 0 Then Alert("Necesita vincular una Importación si selecciona Factura de Importación", TipoMensaje.MsgAdvertencia) : Exit Sub - 'If UsuarioActual.CveEmpresa = 119 And DdlTipoComprobante.SelectedValue = "Fac" Then - ' If Not VerificarProductosCompraConOC() Then - ' Exit Sub - ' End If - 'End If - Dim SubTotalGV = 0.0D Dim Amortizacion As Decimal = TmpDT.SUMD("Total") If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then @@ -15612,7 +15606,7 @@ Partial Class Compras_Compras 'SI PUEDE RECIBIR POR OC Y COMPRA - If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then + If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then If DdlOCVinculaInv.SelectedValue.ToEntero <= 0 Then Alert("El campo Tipo de recepción almacén es necesario. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) @@ -17275,7 +17269,7 @@ Partial Class Compras_Compras LblAmortizacion.Text = "0.00" End If - If UsuarioActual.CveEmpresa = 119 AndAlso TieneAmortizacion Then + If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso TieneAmortizacion Then Amortizacion = LblAmortizacion.Text.Trim.ToDecimal TxtSubTotal.Text = (TxtSubTotal.Text.ToDouble + Amortizacion).ToString End If From 7ef47b8bacaaea729fcccf28e9037cce2aa2d8e9 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 10 Dec 2020 23:05:19 -0700 Subject: [PATCH 06/41] -- existencias ps, el parametro de Excluyetransitorios --- App_Code/ClsInventarios.vb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index e2d1d8327..b89221914 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1875,7 +1875,7 @@ Public Class ClsInventarios Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha, Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1, - Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1) As Decimal + Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional ExcluyeTransitorios As Integer = -1) As Decimal Dim Retorno As Decimal = -1 If FechaMovto = "-1" Then @@ -1900,6 +1900,7 @@ Public Class ClsInventarios .Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado .Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir .Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados + .Add("@ExcluyeTransitorios", SqlDbType.Int).Value = ExcluyeTransitorios .Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes .Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output @@ -1927,7 +1928,7 @@ Public Class ClsInventarios Optional FechaMovto As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional Caducidad As Date = MinFecha, Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1, - Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean + Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional ExcluyeTransitorios As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_ExistenciasGet") @@ -1948,6 +1949,7 @@ Public Class ClsInventarios .Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado .Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir .Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados + .Add("@ExcluyeTransitorios", SqlDbType.Int).Value = ExcluyeTransitorios .Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes .Add("@TopSelect", SqlDbType.Int).Value = TopSelect From 7e3785aabaf8468edfd9c96970688dcac06085a3 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 10 Dec 2020 23:05:34 -0700 Subject: [PATCH 07/41] mas alta el popup existencia --- Site.master | 1416 +++++++++++++++++++++++++-------------------------- 1 file changed, 708 insertions(+), 708 deletions(-) diff --git a/Site.master b/Site.master index 5c6489dad..30390b077 100644 --- a/Site.master +++ b/Site.master @@ -1,672 +1,672 @@ -<%@ Master Language="VB" CodeFile="Site.master.vb" Inherits="Site" %> - -<%@ Import Namespace="System.Web.Optimization" %> - - - - - - Sistema de Información Gerencial - - - - - - - <%: Scripts.Render("~/bundles/modernizr") %> - <%: Styles.Render("~/Content/AjaxControlToolkit/Styles/Bundle") %> - - - <%-- - - --%> - <%: Styles.Render("~/Metronic/assets/global/css/css") %> - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - <%--Site Scripts--%> - - - - <%: Scripts.Render("~/bundles/scripts") %> - - - - -
- -
- - - - -
-
- - -
- - -
- -
- - - -
-
- -
-
-

- - -

-
+<%@ Master Language="VB" CodeFile="Site.master.vb" Inherits="Site" %> + +<%@ Import Namespace="System.Web.Optimization" %> + + + + + + Sistema de Información Gerencial + + + + + + + <%: Scripts.Render("~/bundles/modernizr") %> + <%: Styles.Render("~/Content/AjaxControlToolkit/Styles/Bundle") %> + + + <%-- + + --%> + <%: Styles.Render("~/Metronic/assets/global/css/css") %> + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + <%--Site Scripts--%> + + + + <%: Scripts.Render("~/bundles/scripts") %> + + + + +
+ +
+ + + + +
+
+ + +
+ + +
+ +
+ + + +
+
+ +
+
+

+ + +

+
-
-
-
- - - -
-
-
-
- -
-
- - -
- - -
-
-
- - -
-
-
-
- - - - -
-
- -
-
- -
- - - - <%-- MODAL SOPORTE --%> - <%-- --%> - <%-- END MODAL SOPORTE --%> - - - - - - <%----%> - - - +
+
+
+ + + +
+
+
+
+ +
+
+ + +
+ + +
+
+
+ + +
+
+
+
+ + + + +
+
+ +
+
+ +
+ + + + <%-- MODAL SOPORTE --%> + <%-- --%> + <%-- END MODAL SOPORTE --%> + + + + + + <%----%> + + + @@ -723,44 +723,44 @@
- - - - - - - - - <%: Scripts.Render("~/Metronic/assets/global/scripts/JS") %> - - - - - - - - - - + + + + + + + + + <%: Scripts.Render("~/Metronic/assets/global/scripts/JS") %> + + + + + + + + + + From 8601facfd90148a0b45460d58533702363629b4f Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 10 Dec 2020 23:06:14 -0700 Subject: [PATCH 08/41] mas alto el modal --- Inventarios/PopUpExistenciasAlmacen.aspx | 4 ++-- Inventarios/PopUpExistenciasAlmacen.aspx.vb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Inventarios/PopUpExistenciasAlmacen.aspx b/Inventarios/PopUpExistenciasAlmacen.aspx index b618d6320..3588e3237 100644 --- a/Inventarios/PopUpExistenciasAlmacen.aspx +++ b/Inventarios/PopUpExistenciasAlmacen.aspx @@ -45,7 +45,7 @@ -
+
@@ -138,7 +138,7 @@
-
+
diff --git a/Inventarios/PopUpExistenciasAlmacen.aspx.vb b/Inventarios/PopUpExistenciasAlmacen.aspx.vb index 9e7fbd992..08d54fcc4 100644 --- a/Inventarios/PopUpExistenciasAlmacen.aspx.vb +++ b/Inventarios/PopUpExistenciasAlmacen.aspx.vb @@ -100,7 +100,7 @@ Partial Class Inventarios_Default If ValidarFiltrosSeleccionados() OrElse CvePS > 0 Then Dim ObjInventarios As New ClsInventarios() If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), - ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, TopSelect:=100) Then + ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, ExcluyeTransitorios:=1, TopSelect:=100) Then Dim dr As Data.DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") If dr IsNot Nothing Then From ce8c6cc9df5b5e238e13729c21aafe123c9d1d2c Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 11 Dec 2020 11:52:33 -0700 Subject: [PATCH 09/41] -- en la agrupacion por compra, que se visualice el concepto de provision --- Compras/ProveedoresAuxiliar.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compras/ProveedoresAuxiliar.aspx.vb b/Compras/ProveedoresAuxiliar.aspx.vb index 529a6887d..41bcfe68c 100644 --- a/Compras/ProveedoresAuxiliar.aspx.vb +++ b/Compras/ProveedoresAuxiliar.aspx.vb @@ -83,7 +83,7 @@ Partial Class Compras_ProveedoresAuxiliar If ObjConta.GetProveedoresAuxiliar(DdlProveeedores.SelectedValue.ToEntero, -1, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, DdlOpcion.SelectedValue.ToEntero, DdlTipoProveedor.SelectedValue.ToEntero, DdlOpcionContabilizable.SelectedValue.ToEntero) Then If DdlOpcion.SelectedValue.ToEntero = 2 Then - GvP.DataSource = ObjConta.DtResultados.FiltraParametros($" IIF(ISNULL(CveConceptoContable,0) = 5 AND Importe >= 0,0,1) = 1 ") + GvP.DataSource = ObjConta.DtResultados '.FiltraParametros($" IIF(ISNULL(CveConceptoContable,0) in (5,311) AND Importe >= 0,0,1) = 1 ") 'excluye las provisiones Else GvP.DataSource = ObjConta.DtResultados End If From 17348ffe57bb112e5d1268029eb6f53a3300656e Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Fri, 11 Dec 2020 12:46:26 -0700 Subject: [PATCH 10/41] Contratos --- App_Code/ClsContratos.vb | 16 +- App_Code/ClsPaginas.vb | 37 ++++ App_Code/ClsRH.vb | 45 ++-- Contratos/ContratoObra.aspx.vb | 315 ++++++++++++++++++++-------- Inventarios/TraspasoAlmacen.aspx.vb | 4 +- 5 files changed, 309 insertions(+), 108 deletions(-) diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index 2f6dc4b60..81bfc0d90 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -1007,14 +1007,15 @@ Public Class ClsContratos End Try Return Retorno - End Function - - - + End Function + + + #End Region - + #Region "CONTRATOS DETALLE" - Public Function AddContratosDetalle(CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, CveTipoPresupuesto As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String, Optional Observacion As String = "") As Boolean + Public Function AddContratosDetalle(CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, CveTipoPresupuesto As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String, + Optional Observacion As String = "", Optional CveRubro As Integer = -1, Optional CveActividad As Integer = -1, Optional CveSubTipoActivoFijo As Integer = -1) As Boolean Dim Retorno = False DataAdapter("PA_Con_ContratosDetalleAdd") @@ -1029,6 +1030,9 @@ Public Class ClsContratos .Add("@OCInterna", SqlDbType.VarChar).Value = OCInterna .Add("@LimitarCantidad", SqlDbType.Bit).Value = If(LimitarCantidad, 1, 0) .Add("@Observacion", SqlDbType.VarChar).Value = Observacion + .Add("@CveRubro", SqlDbType.Int).Value = CveRubro + .Add("@CveActividad", SqlDbType.Int).Value = CveActividad + .Add("@CveSubTipoActivoFijo", SqlDbType.Int).Value = CveSubTipoActivoFijo 'NoIdentificacion End With diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 850cbb1c6..be81c310e 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -634,6 +634,8 @@ Public Class ClsPaginas Application("GlobalDTEmpresas") = value End Set End Property + + Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa) @@ -664,6 +666,41 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property + + + + + Property GlobalDTRHActividades(CveEmpresa As Integer) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTRHActividades-{0}", CveEmpresa) + 'sino existe, recarga los datos + If Application(AppNombre) Is Nothing Then + + Dim ObjRH As New ClsRH + If ObjRH.GetActividades(CveEmpresa) Then Application(AppNombre) = ObjRH.DtResultados + ObjRH.Dispose() + + End If + + If CveEmpresa <> -1 Then + Dim Str As New StringBuilder + Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) + GlobalDTRHActividades = Dv.ToTable + Dv.Dispose() + Else + GlobalDTRHActividades = DirectCast(Application(AppNombre), DataTable) + End If + + + + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTRHActividades-{0}", CveEmpresa) + Application(AppNombre) = value + End Set + End Property + Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTClasificaciones2-{0}", CveEmpresa) diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index de7538cf9..66e53ec8a 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -6865,21 +6865,40 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo OnError("Ocurrió un error al eliminar el checador", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno - End Function + End Function #End Region - - - 'Public msgsError As New StringBuilder() - 'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "") - ' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional)) - ' msgsError.AppendLine(Mensaje) - ' msgsError.Append("
") - ' 'Alert(Obj, Mensaje, TipoMensaje.MsgError) - ' 'If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional)) - 'End Sub - + +#Region " A C T I V I D A D E S" + + + Public Function GetActividades(CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_RH_ActividadesGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el listado de checadores", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + End Function +#End Region + + + 'Public msgsError As New StringBuilder() + 'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "") + ' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional)) + ' msgsError.AppendLine(Mensaje) + ' msgsError.Append("
") + ' 'Alert(Obj, Mensaje, TipoMensaje.MsgError) + ' 'If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional)) + 'End Sub + #Region " IDisposable Support " - ' IDisposable + ' IDisposable Protected Overridable Sub Dispose(ByVal disposing As Boolean) 'If msgsError.ToString().Length > 0 Then ' Alert(msgsError.ToString(), TipoMensaje.MsgError) diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index e04960ae0..15bce85a9 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -596,6 +596,16 @@ Partial Class Contratos_ContratoObra TmpDT.Columns.Add("LimitarCantidad", GetType(Integer)) TmpDT.Columns.Add("OCInterna", GetType(String)) TmpDT.Columns.Add("Observacion", GetType(String)) + + TmpDT.Columns.Add("CveRubro", GetType(Integer)) + TmpDT.Columns.Add("CveActividad", GetType(Integer)) + TmpDT.Columns.Add("CveSubTipoActivoFijo", GetType(Integer)) + + TmpDT.Columns.Add("Rubro", GetType(String)) + TmpDT.Columns.Add("Actividad", GetType(String)) + TmpDT.Columns.Add("SubTipoActivoFijo", GetType(String)) + + End Sub Protected Sub Limpiar() TxtNumeroContrato.Text = "" @@ -4126,27 +4136,58 @@ Partial Class Contratos_ContratoObra Protected Sub BtnCargaPresupuesto_Click(sender As Object, e As EventArgs) Dim DTCargaPresupuesto As New DataTable - DTCargaPresupuesto = CargaPreSupuestoExcel() + Dim DTCargaPresupuestoInsumos As New DataTable + Dim DTCargaPresupuestoManoObra As New DataTable + Dim DTCargaPresupuestoFlotillas As New DataTable + + + If TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas Then + DTCargaPresupuesto = CargaPreSupuestoExcel("Presupuesto") + + + If DTCargaPresupuesto.Rows.Count > 0 Then + ProcesaDatosCargaPresupuesto(DTCargaPresupuesto, Nothing, Nothing) + Else + Alert("No se encintraron partidas en el documento", TipoMensaje.MsgAdvertencia) + End If + - If DTCargaPresupuesto.Rows.Count > 0 Then - ProcesaDatosCargaPresupuesto(DTCargaPresupuesto) Else - Alert("No se encintraron partidas en el documento", TipoMensaje.MsgAdvertencia) + + DTCargaPresupuesto = CargaPreSupuestoExcel("Insumos") + DTCargaPresupuestoManoObra = CargaPreSupuestoExcel("ManoObra") + DTCargaPresupuestoFlotillas = CargaPreSupuestoExcel("Flotillas") + + ProcesaDatosCargaPresupuesto(DTCargaPresupuesto, DTCargaPresupuestoManoObra, DTCargaPresupuestoFlotillas) + End If + TxtModalCargaPresupuesto.Text = "" + End Sub Protected Sub BtnDecargaFormato_Click(sender As Object, e As EventArgs) - Dim FI As New IO.FileInfo($"{Extensiones.DirectorioBaseEmpresas}\Empresas\Grales\Formatos\FormatoPresupuestoObra.xlsx") + If TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas Then + FI = New IO.FileInfo($"{Extensiones.DirectorioBaseEmpresas}\Empresas\Grales\Formatos\FormatoPresupuestoObra.xlsx") + Else + FI = New IO.FileInfo($"{Extensiones.DirectorioBaseEmpresas}\Empresas\Grales\Formatos\FormatoPresupuestoObraInterno.xlsx") + End If + If FI.Exists Then Response.ContentType = "application/octet-stream" - Response.AppendHeader("Content-Disposition", $"attachment; filename=FormatoPresupuestoObra.xlsx") + + If TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas Then + Response.AppendHeader("Content-Disposition", $"attachment; filename=FormatoPresupuestoObra.xlsx") + Else + Response.AppendHeader("Content-Disposition", $"attachment; filename=FormatoPresupuestoObraInterno.xlsx") + End If + Response.TransmitFile(FI.FullName) Response.End() @@ -4156,7 +4197,7 @@ Partial Class Contratos_ContratoObra End Sub - Private Function CargaPreSupuestoExcel() As DataTable + Private Function CargaPreSupuestoExcel(Hoja As String) As DataTable Dim FileExtension As String = "-1" Dim Filesgral As List(Of Archivo) = TxtModalCargaPresupuesto.getfiles().Archivos @@ -4178,7 +4219,7 @@ Partial Class Contratos_ContratoObra tempArray = fileItem.filename.ToString().Split("-".ToCharArray()) SpreadsheetInfo.SetLicense(Extensiones.SerialGemBoxSpreadsheet) Dim workbook = ExcelFile.Load(fileItem.FileUrl) - Dim worksheet = workbook.Worksheets(0) + Dim worksheet = workbook.Worksheets(Hoja) DTPS = worksheet.CreateDataTable(New CreateDataTableOptions() With { .ColumnHeaders = True, @@ -4190,7 +4231,7 @@ Partial Class Contratos_ContratoObra Next - TxtModalCargaPresupuesto.Text = "" + RegistraScript("$('#ModalUploadPresupuesto').modal('hide')") @@ -4201,7 +4242,25 @@ Partial Class Contratos_ContratoObra End Function - Private Sub ProcesaDatosCargaPresupuesto(DTPresupuesto As DataTable) + Private Sub ProcesaDatosCargaPresupuesto(DTPresupuesto As DataTable, DTCargaPresupuestoManoObra As DataTable, DTCargaPresupuestoFlotillas As DataTable) + + + If Not DTPresupuesto Is Nothing Then + DTPresupuesto.CaseSensitive = False + End If + + If Not DTCargaPresupuestoManoObra Is Nothing Then + DTCargaPresupuestoManoObra.CaseSensitive = False + End If + + If Not DTCargaPresupuestoFlotillas Is Nothing Then + DTCargaPresupuestoFlotillas.CaseSensitive = False + End If + + + + + Dim DTPS = New DataTable DTPS.Columns.Add("CveContratoDetalle", GetType(Integer)) @@ -4228,65 +4287,141 @@ Partial Class Contratos_ContratoObra DTPS.Columns.Add("OCInterna", GetType(String)) DTPS.Columns.Add("Observacion", GetType(String)) + DTPS.Columns.Add("CveRubro", GetType(Integer)) + DTPS.Columns.Add("CveActividad", GetType(Integer)) + DTPS.Columns.Add("CveSubTipoActivoFijo", GetType(Integer)) + + DTPS.Columns.Add("Rubro", GetType(String)) + DTPS.Columns.Add("Actividad", GetType(String)) + DTPS.Columns.Add("SubTipoActivoFijo", GetType(String)) + Dim RowNoEncontrados As String = "" - For Each DrowPS As DataRow In DTPresupuesto.Rows + If Not DTPresupuesto Is Nothing Then + For Each DrowPS As DataRow In DTPresupuesto.Rows - Dim StrArray() As String = GetPS("PS", DrowPS("PS").ToString).Split("|"c) - Dim CvePS As Integer - Dim CveUM As Integer + Dim StrArray() As String = GetPS("PS", DrowPS("Producto").ToString).Split("|"c) + Dim CvePS As Integer + Dim CveUM As Integer - If StrArray.Length > 0 Then - If CBool(StrArray(0)) = True Then - CvePS = StrArray(1).ToEntero - Else - RowNoEncontrados &= StrArray(1) & "<\BR>" + If StrArray.Length > 0 Then + If CBool(StrArray(0)) = True Then + CvePS = StrArray(1).ToEntero + Else + RowNoEncontrados &= StrArray(1) & "<\BR>" + End If End If - End If - - If CvePS > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 Then - - CveUM = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveUnidadMedida", "").ToString.ToEntero - - Dim Row As DataRow = DTPS.NewRow() - Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble - Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble - Row("CveUM") = CveUM - Row("UM") = "" - Row("CveClasificacion") = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveClasificacion", "").ToString.ToEntero - Row("Clasificacion") = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = '{ Row("CveClasificacion").ToString }'").ToString - Row("CvePS") = CvePS - Row("PS") = DrowPS("PS").ToString - Row("CodigoPS") = DrowPS("PS").ToString - Row("PU") = DrowPS("PU").ToString.ToDouble - Row("Total") = DrowPS("Cantidad").ToString.ToDouble * DrowPS("PU").ToString.ToDouble - - - Select Case TipoCargaPresupuesto - Case EnumTipoCargaPresupuesto.Ventas - Row("CveTipoPresupuesto") = 2 - Exit Select - Case EnumTipoCargaPresupuesto.Control - Row("CveTipoPresupuesto") = 1 - Exit Select - Case Else - Row("CveTipoPresupuesto") = 1 - End Select - - - Row("NoIdentificacion") = "" - Row("OCInterna") = "" - Row("LimitarCantidad") = 0 - Row("Observacion") = "" - - DTPS.Rows.Add(Row) - - End If - Next + If CvePS > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 Then + + + + CveUM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $" UnidadMedida = '{ DrowPS("UnidadMedida").ToString.Trim }' OR Abreviatura = '{ DrowPS("UnidadMedida").ToString.Trim }'").ToEntero + + If CveUM <= 0 Then + CveUM = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveUnidadMedida", "").ToString.ToEntero + End If + + + Dim Row As DataRow = DTPS.NewRow() + Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble + Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble + Row("CveUM") = CveUM + Row("UM") = "" + Row("CveClasificacion") = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("CveClasificacion", "").ToString.ToEntero + Row("Clasificacion") = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = '{ Row("CveClasificacion").ToString }'").ToString + Row("CvePS") = CvePS + Row("PS") = DrowPS("Producto").ToString + Row("CodigoPS") = DrowPS("Producto").ToString + Row("PU") = DrowPS("PU").ToString.ToDouble + Row("Total") = DrowPS("Cantidad").ToString.ToDouble * DrowPS("PU").ToString.ToDouble + + + + + Select Case TipoCargaPresupuesto + Case EnumTipoCargaPresupuesto.Ventas + + Row("CveTipoPresupuesto") = 2 + Row("CveRubro") = 1 + Row("CveActividad") = -1 + Row("CveSubTipoActivoFijo") = -1 + + Exit Select + Case EnumTipoCargaPresupuesto.Control + Row("CveTipoPresupuesto") = 1 + Row("CveRubro") = 2 + Row("CveActividad") = -1 + Row("CveSubTipoActivoFijo") = -1 + Exit Select + Case Else + Row("CveTipoPresupuesto") = 1 + Row("CveActividad") = -1 + Row("CveSubTipoActivoFijo") = -1 + End Select + + + Row("NoIdentificacion") = "" + Row("OCInterna") = "" + Row("LimitarCantidad") = 0 + Row("Observacion") = "" + + DTPS.Rows.Add(Row) + + End If + Next + + End If + + + + If Not DTCargaPresupuestoManoObra Is Nothing Then + + + For Each DrowPS As DataRow In DTCargaPresupuestoManoObra.Rows + + Dim CveActividad As Integer = 0 + + CveActividad = GlobalDTRHActividades(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveActividad", $" Actividad = '{ DrowPS("Actividad").ToString.Trim }'").ToEntero + + If CveActividad > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 Then + + Dim Row As DataRow = DTPS.NewRow() + Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble + Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble + Row("CveUM") = -1 + Row("UM") = "" + Row("CveClasificacion") = -1 + Row("Clasificacion") = "" + Row("CvePS") = -1 + Row("PS") = DrowPS("Actividad").ToString + Row("CodigoPS") = DrowPS("Actividad").ToString + Row("PU") = DrowPS("PU").ToString.ToDouble + Row("Total") = DrowPS("Cantidad").ToString.ToDouble * DrowPS("PU").ToString.ToDouble + + Row("CveTipoPresupuesto") = 2 + Row("CveRubro") = 3 + Row("CveActividad") = CveActividad + Row("CveSubTipoActivoFijo") = -1 + + Row("NoIdentificacion") = "" + Row("OCInterna") = "" + Row("LimitarCantidad") = 0 + Row("Observacion") = "" + + DTPS.Rows.Add(Row) + + End If + Next + + End If + + If Not DTCargaPresupuestoFlotillas Is Nothing Then + + End If Dim ErrorProceso = False Dim ObjContratos As New ClsContratos @@ -4295,10 +4430,12 @@ Partial Class Contratos_ContratoObra For Each Row As DataRow In DTPS.Rows - If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, Convert.ToBoolean(Row("LimitarCantidad")), Row("OCInterna").ToString, Observacion:=Row("Observacion").ToString) Then + If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, + Row("NoIdentificacion").ToString, Convert.ToBoolean(Row("LimitarCantidad")), Row("OCInterna").ToString, Observacion:=Row("Observacion").ToString, CveRubro:=Row("CveRubro").ToString.ToEntero, + CveActividad:=Row("CveActividad").ToString.ToEntero, CveSubTipoActivoFijo:=Row("CveSubTipoActivoFijo").ToString.ToEntero) Then If Autorizado Then - Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU")) + Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con rubro {4} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU"), Row("CveRubro")) guardarBitacora(msj) End If @@ -4322,6 +4459,14 @@ Partial Class Contratos_ContratoObra NrowTmpDT("LimitarCantidad") = Row("LimitarCantidad") NrowTmpDT("Observacion") = Row("Observacion") + NrowTmpDT("CveRubro") = Row("CveRubro") + NrowTmpDT("CveActividad") = Row("CveActividad") + NrowTmpDT("CveSubTipoActivoFijo") = Row("CveSubTipoActivoFijo") + + NrowTmpDT("Rubro") = Row("Rubro") + NrowTmpDT("Actividad") = Row("Actividad") + NrowTmpDT("SubTipoActivoFijo") = Row("SubTipoActivoFijo") + NrowTmpDT("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle") @@ -4606,42 +4751,38 @@ Partial Class Contratos_ContratoObra Con.Dispose() - If DTDatos.Rows.Count > 0 Then + Try + If DTDatos.Rows.Count > 0 Then - Dim CantidadAvance As Decimal = DTDatos.Rows(0)("Cantidad").ToString.ToDecimal - Dim ImporteAvance As Decimal = DTDatos.Rows(0)("AvanceImporte").ToString.ToDecimal - Dim TotalAvancePorcentaje As Decimal = If(ImporteAvance > 0, (ImporteAvance * 100 / TotalAvanceVentas).RoundSQL(2), 0) + Dim CantidadAvance As Decimal = DTDatos.Rows(0)("Cantidad").ToString.ToDecimal + Dim ImporteAvance As Decimal = DTDatos.Rows(0)("AvanceImporte").ToString.ToDecimal + Dim TotalAvancePorcentaje As Decimal = If(ImporteAvance > 0, (ImporteAvance * 100 / TotalAvanceVentas).RoundSQL(2), 0) - Dim CantidadInterno As Decimal = DTDatos.Rows(0)("CantidadInterno").ToString.ToDecimal - Dim ImporteInterno As Decimal = DTDatos.Rows(0)("ImporteInterno").ToString.ToDecimal - Dim TotalFaltantePorcentaje As Decimal = If(ImporteInterno > 0, (ImporteInterno * 100 / TotalAvanceInterno).RoundSQL(2), 0) + Dim CantidadInterno As Decimal = DTDatos.Rows(0)("CantidadInterno").ToString.ToDecimal + Dim ImporteInterno As Decimal = DTDatos.Rows(0)("ImporteInterno").ToString.ToDecimal + Dim TotalFaltantePorcentaje As Decimal = If(ImporteInterno > 0, (ImporteInterno * 100 / TotalAvanceInterno).RoundSQL(2), 0) - LtlAvanceImporte.Text = $"$ { ImporteAvance.ToString("###,###,###.00") }" - LtlAvanceImporteProcentaje1.Text = $"{TotalAvancePorcentaje.ToString("###.00")} %" - LtlAvanceImporteProcentaje2.Text = $"{TotalAvancePorcentaje.ToString("###.00")}%" - SPAvance1.Attributes.Add("style", $"width:{TotalAvancePorcentaje.ToString.ToEntero}%") + LtlAvanceImporte.Text = $"$ { ImporteAvance.ToString("###,###,###.00") }" + LtlAvanceImporteProcentaje1.Text = $"{TotalAvancePorcentaje.ToString("###.00")} %" + LtlAvanceImporteProcentaje2.Text = $"{TotalAvancePorcentaje.ToString("###.00")}%" + SPAvance1.Attributes.Add("style", $"width:{TotalAvancePorcentaje.ToString.ToEntero}%") - LtlAvanceInternoImporte.Text = $"$ {DTDatos.Rows(0)("ImporteInterno").ToString.ToDecimal.ToString("###,###,###.00")}" - LtlAvanceInternoImportePorcentaje1.Text = $"{TotalFaltantePorcentaje.ToString("###.00")} %" - LtlAvanceInternoImportePorcentaje2.Text = $"{TotalFaltantePorcentaje.ToString("###.00")}%" - SPFaltante.Attributes.Add("style", $"width:{TotalFaltantePorcentaje.ToString.ToEntero}%") + LtlAvanceInternoImporte.Text = $"$ {DTDatos.Rows(0)("ImporteInterno").ToString.ToDecimal.ToString("###,###,###.00")}" + LtlAvanceInternoImportePorcentaje1.Text = $"{TotalFaltantePorcentaje.ToString("###.00")} %" + LtlAvanceInternoImportePorcentaje2.Text = $"{TotalFaltantePorcentaje.ToString("###.00")}%" + SPFaltante.Attributes.Add("style", $"width:{TotalFaltantePorcentaje.ToString.ToEntero}%") - End If + End If + + Catch ex As Exception + + End Try - 'Dim TotalContratos As Decimal = DTDatos.SUM("Importe") - 'Dim TotalAvance As Decimal = DTDatos.SUM("AvanceImporte") - 'Dim TotalFaltante As Decimal = TotalContratos - TotalAvance - 'Dim TotalAvancePorcentaje As Decimal = ((TotalAvance * 100) / TotalContratos).RoundAD(2) - 'Dim TotalFaltantePorcentaje As Decimal = (100 - TotalAvancePorcentaje).RoundAD(2) - - - ' LtlGrafNumeroContratos.Text = NumeroContratos.ToString - 'LtlGrafTotal.Text = TotalContratos.ToString("###,###,###.00") DVGraficas.Visible = True diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 434eaf4fb..4af10e301 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -1525,7 +1525,7 @@ Partial Class Inventarios_TraspasoAlmacen FolioBusqueda = If(TxtFolioRecepcion.Text = "", -1, TxtFolioRecepcion.Text.ToEntero) Dim ObjInventarios As New ClsInventarios - If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, -1, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, FolioBusqueda, UsuarioActual.CveEmpresa) Then + If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, -1, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, FolioBusqueda, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then Dtt = ObjInventarios.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4")) Else Alert("Ocurrió un error al consultar los movimientos transitorios. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia) @@ -1820,7 +1820,7 @@ Partial Class Inventarios_TraspasoAlmacen Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL()) '' verifica que no se halla recibido previamente, si ya se recibió da salida - If ObjInventario.GetMovimientosTransitorios(CveAlmacenDestino, -1, CveAlmacenTransitorio, -1, FolioBusqueda, UsuarioActual.CveEmpresa) Then + If ObjInventario.GetMovimientosTransitorios(CveAlmacenDestino, -1, CveAlmacenTransitorio, -1, FolioBusqueda, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then Dtt = ObjInventario.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4"), "", {"CveMovimientoDetalle", "Codigo", "Cantidad"}) If Dtt IsNot Nothing AndAlso Dtt.FiltraParametros("Cantidad < 0").Rows.Count > 0 Then From 9c6039c77d28778225f6d952f10667292fe9e5db Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Fri, 11 Dec 2020 13:56:32 -0700 Subject: [PATCH 11/41] Rep Compras Detalle cambio de fecha --- App_Code/ClsContratos.vb | 3 ++- Compras/RepComprasDetalle.aspx.vb | 7 +++++-- Contratos/ContratoObra.aspx.vb | 21 ++++++++++++--------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index 81bfc0d90..09656d558 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -1015,7 +1015,7 @@ Public Class ClsContratos #Region "CONTRATOS DETALLE" Public Function AddContratosDetalle(CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, CveTipoPresupuesto As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String, - Optional Observacion As String = "", Optional CveRubro As Integer = -1, Optional CveActividad As Integer = -1, Optional CveSubTipoActivoFijo As Integer = -1) As Boolean + Optional Observacion As String = "", Optional CveRubro As Integer = -1, Optional CveActividad As Integer = -1, Optional CveSubTipoActivoFijo As Integer = -1, Optional Dias As Integer = -1) As Boolean Dim Retorno = False DataAdapter("PA_Con_ContratosDetalleAdd") @@ -1033,6 +1033,7 @@ Public Class ClsContratos .Add("@CveRubro", SqlDbType.Int).Value = CveRubro .Add("@CveActividad", SqlDbType.Int).Value = CveActividad .Add("@CveSubTipoActivoFijo", SqlDbType.Int).Value = CveSubTipoActivoFijo + .Add("@Dias", SqlDbType.Int).Value = Dias 'NoIdentificacion End With diff --git a/Compras/RepComprasDetalle.aspx.vb b/Compras/RepComprasDetalle.aspx.vb index e7a5e5439..9e2776116 100644 --- a/Compras/RepComprasDetalle.aspx.vb +++ b/Compras/RepComprasDetalle.aspx.vb @@ -291,7 +291,10 @@ Partial Class Compras_RepComprasDetalle FechaICaptura = If(IsDate(TxtFechaICaptura.Text.Trim()), TxtFechaICaptura.Text.Trim(), "-1") FechaFCaptura = If(IsDate(TxtFechaFCaptura.Text.Trim()), TxtFechaFCaptura.Text.Trim(), "-1") - + Dim AnioMes As String = If(FechaF <> "-1", "-1", IfNull(Request("AnioMes"), "-1").ToString()) + + + If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then TCEspecifico = TxtEspecifico.Text.ToDouble Else @@ -301,7 +304,7 @@ Partial Class Compras_RepComprasDetalle Dim SubProyectos As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString Dim TipoGasto As String = IIf(DdlTipoGasto.GetSelectedValuesM = "", "-1", DdlTipoGasto.GetSelectedValuesM).ToString - If ObjCompras.GetRepComprasDetalle(DdlGrupo.SelectedValue.ToEntero, IfNull(Request("Anio"), Now.Year).ToString.ToEntero, IfNull(Request("Mes"), "-1").ToString.ToEntero, IfNull(Request("AnioMes"), "-1").ToString(), IfNull(Request("Fecha"), "-1").ToString(), + If ObjCompras.GetRepComprasDetalle(DdlGrupo.SelectedValue.ToEntero, IfNull(Request("Anio"), Now.Year).ToString.ToEntero, IfNull(Request("Mes"), "-1").ToString.ToEntero, AnioMes, IfNull(Request("Fecha"), "-1").ToString(), DdlProveedores.SelectedValue.ToEntero, CveMoneda, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, DDlUsuarioCaptura.SelectedValue.ToEntero, IfNull(Request("NumeroRemesa"), "-1").ToString.ToEntero, IfNull(Request("CveUsuarioRemesa"), "-1").ToString.ToEntero, FechaICaptura, FechaFCaptura, IfNull(Request("FechaCaptura"), "-1").ToString, SubProyectos, DdlTipoDocto.SelectedValue, UsuarioActual.CveEmpresa, diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index 15bce85a9..a6c87309f 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -595,8 +595,9 @@ Partial Class Contratos_ContratoObra TmpDT.Columns.Add("NoIdentificacion", GetType(String)) TmpDT.Columns.Add("LimitarCantidad", GetType(Integer)) TmpDT.Columns.Add("OCInterna", GetType(String)) - TmpDT.Columns.Add("Observacion", GetType(String)) - + TmpDT.Columns.Add("Observacion", GetType(String)) + + TmpDT.Columns.Add("CveRubro", GetType(Integer)) TmpDT.Columns.Add("CveActividad", GetType(Integer)) TmpDT.Columns.Add("CveSubTipoActivoFijo", GetType(Integer)) @@ -605,6 +606,8 @@ Partial Class Contratos_ContratoObra TmpDT.Columns.Add("Actividad", GetType(String)) TmpDT.Columns.Add("SubTipoActivoFijo", GetType(String)) + TmpDT.Columns.Add("Dias", GetType(Integer)) + End Sub Protected Sub Limpiar() @@ -2204,9 +2207,6 @@ Partial Class Contratos_ContratoObra End If - - - If ObjContratos.GetReporteContratosAvancesDetalleControl(CveContrato, UsuarioActual.CveEmpresa) Then GvDatosAvanceControl.DataSource = ObjContratos.DtResultados @@ -4294,6 +4294,7 @@ Partial Class Contratos_ContratoObra DTPS.Columns.Add("Rubro", GetType(String)) DTPS.Columns.Add("Actividad", GetType(String)) DTPS.Columns.Add("SubTipoActivoFijo", GetType(String)) + DTPS.Columns.Add("Dias", GetType(Integer)) Dim RowNoEncontrados As String = "" @@ -4327,6 +4328,7 @@ Partial Class Contratos_ContratoObra Dim Row As DataRow = DTPS.NewRow() + Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble Row("CveUM") = CveUM @@ -4339,9 +4341,6 @@ Partial Class Contratos_ContratoObra Row("PU") = DrowPS("PU").ToString.ToDouble Row("Total") = DrowPS("Cantidad").ToString.ToDouble * DrowPS("PU").ToString.ToDouble - - - Select Case TipoCargaPresupuesto Case EnumTipoCargaPresupuesto.Ventas @@ -4349,6 +4348,7 @@ Partial Class Contratos_ContratoObra Row("CveRubro") = 1 Row("CveActividad") = -1 Row("CveSubTipoActivoFijo") = -1 + Row("Dias") = 0 Exit Select Case EnumTipoCargaPresupuesto.Control @@ -4356,11 +4356,13 @@ Partial Class Contratos_ContratoObra Row("CveRubro") = 2 Row("CveActividad") = -1 Row("CveSubTipoActivoFijo") = -1 + Row("Dias") = 0 Exit Select Case Else Row("CveTipoPresupuesto") = 1 Row("CveActividad") = -1 Row("CveSubTipoActivoFijo") = -1 + Row("Dias") = 0 End Select @@ -4406,6 +4408,7 @@ Partial Class Contratos_ContratoObra Row("CveRubro") = 3 Row("CveActividad") = CveActividad Row("CveSubTipoActivoFijo") = -1 + Row("Dias") = DrowPS("Dias").ToString.ToEntero Row("NoIdentificacion") = "" Row("OCInterna") = "" @@ -4432,7 +4435,7 @@ Partial Class Contratos_ContratoObra If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, Convert.ToBoolean(Row("LimitarCantidad")), Row("OCInterna").ToString, Observacion:=Row("Observacion").ToString, CveRubro:=Row("CveRubro").ToString.ToEntero, - CveActividad:=Row("CveActividad").ToString.ToEntero, CveSubTipoActivoFijo:=Row("CveSubTipoActivoFijo").ToString.ToEntero) Then + CveActividad:=Row("CveActividad").ToString.ToEntero, CveSubTipoActivoFijo:=Row("CveSubTipoActivoFijo").ToString.ToEntero, Dias:=Row("Dias").ToString.ToEntero) Then If Autorizado Then Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con rubro {4} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU"), Row("CveRubro")) From 7a0ce67ee5c3a282af68782f33e9d071d7590844 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Fri, 11 Dec 2020 20:43:57 -0700 Subject: [PATCH 12/41] Contratos --- App_Code/ClsContratos.vb | 10 +- App_Code/ClsRH.vb | 29 ++- Contratos/ContratoObra.aspx | 60 +++-- Contratos/ContratoObra.aspx.vb | 442 ++++++++++++++++++++++----------- 4 files changed, 376 insertions(+), 165 deletions(-) diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index 09656d558..e7b9a2971 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -1014,6 +1014,7 @@ Public Class ClsContratos #End Region #Region "CONTRATOS DETALLE" + Public Function AddContratosDetalle(CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, CveTipoPresupuesto As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String, Optional Observacion As String = "", Optional CveRubro As Integer = -1, Optional CveActividad As Integer = -1, Optional CveSubTipoActivoFijo As Integer = -1, Optional Dias As Integer = -1) As Boolean Dim Retorno = False @@ -1049,7 +1050,8 @@ Public Class ClsContratos End Function - Public Function UpdateContratosDetalle(CveContratoDetalle As Integer, CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String, Optional Observacion As String = "") As Boolean + Public Function UpdateContratosDetalle(CveContratoDetalle As Integer, CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String, + Optional Observacion As String = "", Optional CveRubro As Integer = -1, Optional CveActividad As Integer = -1, Optional CveSubTipoActivoFijo As Integer = -1, Optional Dias As Integer = -1) As Boolean Dim Retorno = False DataAdapter("PA_Con_ContratosDetalleUpdate") @@ -1063,7 +1065,11 @@ Public Class ClsContratos .Add("@NoIdentificacion", SqlDbType.VarChar).Value = NoIdentificacion .Add("@OCInterna", SqlDbType.VarChar).Value = OCInterna .Add("@LimitarCantidad", SqlDbType.Bit).Value = If(LimitarCantidad, 1, 0) - .Add("@Observacion", SqlDbType.VarChar).Value = Observacion + .Add("@Observacion", SqlDbType.VarChar).Value = Observacion + .Add("@CveRubro", SqlDbType.Int).Value = CveRubro + .Add("@CveActividad", SqlDbType.Int).Value = CveActividad + .Add("@CveSubTipoActivoFijo", SqlDbType.Int).Value = CveSubTipoActivoFijo + .Add("@Dias", SqlDbType.Int).Value = Dias End With diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 66e53ec8a..9d5bfabce 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1359,6 +1359,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Public Property CveUniforme As Integer + Public Property CveActividad As Integer + Public ReadOnly Property DtResultados() As DataTable Get @@ -6881,10 +6883,35 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo SqlAdapter.Fill(Data) Retorno = True Catch ex As Exception - OnError("Ocurrió un error al obtener el listado de checadores", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener el listado de actividades ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return Retorno End Function + + + Public Function AddActividades(Actividad As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + + CveActividad = -1 + Dim Retorno As Boolean = False + DataAdapter("PA_RH_ActividadesAdd") + With SqlAdapter.SelectCommand.Parameters + .Add("@Actividad", SqlDbType.VarChar).Value = Actividad + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveActividad", SqlDbType.Int).Direction = ParameterDirection.Output + End With + Try + SqlAdapter.Fill(Data) + + CveActividad = SqlAdapter.SelectCommand.Parameters("@CveActividad").Value.ToString.ToEntero + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el listado de ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + End Function + + #End Region diff --git a/Contratos/ContratoObra.aspx b/Contratos/ContratoObra.aspx index 56c505e65..ef3d982e3 100644 --- a/Contratos/ContratoObra.aspx +++ b/Contratos/ContratoObra.aspx @@ -942,7 +942,7 @@
@@ -997,6 +997,13 @@ + + + + + + + @@ -2696,7 +2703,15 @@
- <%--
- - -
--%> - - <%--
- - -
--%> - - -
+
-
+
- - +
-
+
@@ -2744,10 +2746,28 @@
+ + + +
+ + + + + +
+ +
+ + + + +
-
+
+
diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index a6c87309f..f627ea687 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -1490,10 +1490,14 @@ Partial Class Contratos_ContratoObra Row("LimitarCantidad") = False 'If(ChkLimitarVenta.Checked, 1, 0) Row("Observacion") = "" 'TxtObservacionesDetalles.Text + Row("CveRubro") = 1 + + + Dim ObjContratos As New ClsContratos - If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, False, "", Observacion:=Row("Observacion").ToString) Then + If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, False, "", Observacion:=Row("Observacion").ToString, CveRubro:=1) Then If Autorizado Then Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU")) @@ -1548,7 +1552,7 @@ Partial Class Contratos_ContratoObra Dim ObjContratos As New ClsContratos - If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, NoIdentificacion, False, "", Observaciones) Then + If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, NoIdentificacion, False, "", Observaciones, CveRubro:=1) Then If Autorizado Then Dim msj As String = String.Format("Se realizaron los siguientes cambios, el Presupuesto Interno se modificó: {1} {0} {2:C2} a {3} {0} {4:C2}", @@ -1809,25 +1813,59 @@ Partial Class Contratos_ContratoObra Dim Row As DataRow = TmpDT.NewRow() Row("Cantidad") = TxtCantidadInsumos.Text.ToDouble.FormatoNumero Row("CantidadContratada") = TxtCantidadInsumos.Text.ToDouble.FormatoNumero - Row("CveUM") = DdlUMInsumos.SelectedValue.ToEntero - Row("UM") = DdlUMInsumos.SelectedItem - Row("CveClasificacion") = DdlClasificacionAddInsumos.SelectedValue - Row("Clasificacion") = DdlClasificacionAddInsumos.SelectedItem - Row("CvePS") = DdlProductowsInsumos.SelectedValue.ToEntero - Row("PS") = DdlProductowsInsumos.SelectedText - Row("CodigoPS") = DdlProductowsInsumos.SelectedText + Row("PU") = TxtPUInsumos.Text.ToDouble.FormatoNumero Row("Total") = (TxtCantidadInsumos.Text.ToDouble * TxtPUInsumos.Text.ToDouble).FormatoNumero Row("CveTipoPresupuesto") = 1 Row("NoIdentificacion") = "" 'TxtNoIdentificacionvInsumos.Text.Trim Row("LimitarCantidad") = False + Row("CveRubro") = DdlRubro.SelectedValue.ToEntero + Row("Rubro") = DdlRubro.SelectedItem.Text + + If DdlRubro.SelectedValue.ToEntero = 3 Then + Row("CveActividad") = DdlActividades.SelectedValue.ToEntero + Row("Actividad") = DdlActividades.SelectedItem.Text + Row("Dias") = TxtDias.Text.ToEntero + Row("CveSubTipoActivoFijo") = -1 + + + Row("CveUM") = -1 + Row("UM") = "" + Row("CveClasificacion") = -1 + Row("Clasificacion") = "" + Row("CvePS") = -1 + Row("PS") = DdlActividades.SelectedItem.Text + Row("CodigoPS") = DdlActividades.SelectedItem.Text + + Else + Row("CveActividad") = -1 + Row("Actividad") = "" + Row("CveSubTipoActivoFijo") = -1 + Row("Dias") = 0 + + + Row("CveUM") = DdlUMInsumos.SelectedValue.ToEntero + Row("UM") = DdlUMInsumos.SelectedItem + Row("CveClasificacion") = DdlClasificacionAddInsumos.SelectedValue + Row("Clasificacion") = DdlClasificacionAddInsumos.SelectedItem + Row("CvePS") = DdlProductowsInsumos.SelectedValue.ToEntero + Row("PS") = DdlProductowsInsumos.SelectedText + Row("CodigoPS") = DdlProductowsInsumos.SelectedText + + + + End If + + Dim ObjContratos As New ClsContratos - If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, False, "") Then - If Autorizado Then - Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU")) - guardarBitacora(msj) - End If + If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, False, "", + CveRubro:=Row("CveRubro").ToString.ToEntero, CveActividad:=Row("CveActividad").ToString.ToEntero, CveSubTipoActivoFijo:=Row("CveSubTipoActivoFijo").ToString.ToEntero, Dias:=Row("Dias").ToString.ToEntero) Then + 'If Autorizado Then + ' Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU")) + ' guardarBitacora(msj) + 'End If + Row("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle") TmpDT.Rows.Add(Row) Dim TotalRow = Row("Total").ToString.ToDouble @@ -1856,22 +1894,34 @@ Partial Class Contratos_ContratoObra Dim Cantidad, PU As Double Dim CvePS, CveUM As Integer - 'Dim NoIdentificacion As String = "" - 'Dim LimitarCantidad As Boolean + + Dim CveRubro As Integer = DdlRubro.SelectedValue.ToEntero + + Dim CveActividad As Integer = -1 + Dim CveSubTipoActivoFijo As Integer = -1 + Dim Dias As Integer = 0 + + If CveRubro = 3 Then + + CveActividad = DdlActividades.SelectedValue.ToEntero + Dias = TxtDias.Text.ToEntero + + CvePS = -1 + CveUM = -1 + Else + CvePS = DdlProductowsInsumos.SelectedValue.ToEntero + CveUM = DdlUMInsumos.SelectedValue.ToEntero + End If + Cantidad = TxtCantidadInsumos.Text.ToDouble PU = TxtPUInsumos.Text.ToDouble - CvePS = DdlProductowsInsumos.SelectedValue.ToEntero - CveUM = DdlUMInsumos.SelectedValue.ToEntero - 'NoIdentificacion = TxtNoIdentificacionvInsumos.Text.Trim - 'LimitarCantidad = If(ChkLimitarInsumos.Checked, True, False) + Dim row = TmpDT.Select(String.Format(" CveContratoDetalle={0}", CveContratoDetalleEditar))(0) - - Dim ObjContratos As New ClsContratos - If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, "", False, "") Then + If ObjContratos.UpdateContratosDetalle(CveContratoDetalleEditar, CveContrato, CvePS, Cantidad, PU, UsuarioActual.CveUsuario, "", False, "", CveRubro:=CveRubro, CveActividad:=CveActividad, CveSubTipoActivoFijo:=CveSubTipoActivoFijo, Dias:=Dias) Then If Autorizado Then Dim msj As String = String.Format("Se realizaron los siguientes cambios, el Presupuesto Interno se modificó: {1} {0} {2:C2} a {3} {0} {4:C2}", @@ -4018,17 +4068,10 @@ Partial Class Contratos_ContratoObra Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) LimpiarModalVentas() - 'CveContratoDetalle,CveUM,CvePS,Cantidad,PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad - CveContratoDetalleEditar = GvRow.DataKey("CveContratoDetalle").ToEntero - - 'TxtOCInterna.Text = GvRow.DataKey("OCInterna") TxtCantidad.Text = GvRow.DataKey("CantidadContratada").ToDouble.ToString - 'ChkLimitarVenta.Checked = Boolean.Parse(GvRow.DataKey("LimitarCantidad")) - - 'TxtNoIdentificacionv.Text = GvRow.DataKey("NoIdentificacion").ToDouble.ToString DdlClasificacionAdd.SelectedValueExist(GvRow.DataKey("CveClasificacion").ToEntero) DdlProductows.txtText.Value = GvRow.DataKey("PS").ToString @@ -4050,14 +4093,17 @@ Partial Class Contratos_ContratoObra RegistraScript("$('#ModalVentasAddPS').modal('show')") End Sub Protected Sub LnkEditarPresupuestoControlDetalle_Click(sender As Object, e As EventArgs) + Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) + + Dim CveRubro As Integer = gvRow.DataKey("CveRubro").ToEntero + LimpiarModalControl() CveContratoDetalleEditar = gvRow.DataKey("CveContratoDetalle").ToEntero TxtCantidadInsumos.Text = gvRow.DataKey("CantidadContratada").ToDouble.ToString - 'ChkLimitarInsumos.Checked = Boolean.Parse(gvRow.DataKey("LimitarCantidad")) - ' TxtNoIdentificacionvInsumos.Text = gvRow.DataKey("NoIdentificacion") + DdlClasificacionAddInsumos.SelectedValueExist(gvRow.DataKey("CveClasificacion").ToEntero) @@ -4069,16 +4115,42 @@ Partial Class Contratos_ContratoObra DdlUMInsumos.DataBind() DdlUMInsumos.SelectedValueExist(gvRow.DataKey("CveUM").ToDouble.ToString) - - TxtPUInsumos.Text = gvRow.DataKey("PU").ToDouble.ToString + DdlRubro.SelectedValueExist(gvRow.DataKey("CveRubro").ToString) + + If CveRubro = 3 Then + + DVDias.Visible = True + DVActividadesRH.Visible = True + + DVClasificacion.Visible = False + DVPS.Visible = False + DVUM.Visible = False + + DdlActividades.SelectedValueExist(gvRow.DataKey("CveActividad")) + TxtDias.Text = gvRow.DataKey("Dias") + Else + DVDias.Visible = False + DVActividadesRH.Visible = False + + DVClasificacion.Visible = True + DVPS.Visible = True + DVUM.Visible = True + + DdlActividades.SelectedValueExist(-1) + TxtDias.Text = "0" + + End If + ModalControlPSAdd = False ChkContinualAgregandoControl.Visible = False ChkContinualAgregandoControl.Checked = False + UpModalControlAddPS.Update() + RegistraScript("$('#ModalControlAddPS').modal('show')") End Sub @@ -4108,7 +4180,12 @@ Partial Class Contratos_ContratoObra End Sub Private Sub LimpiarModalControl() + DdlActividades.Items.Clear() + DdlActividades.DataSource = GlobalDTRHActividades(UsuarioActual.CveEmpresa) + DdlActividades.DataBind() + + DdlActividades.Items.Insert(0, New ListItem("Seleccione una", "-1")) TxtCantidadInsumos.Text = "" 'ChkLimitarInsumos.Checked = False @@ -4120,6 +4197,21 @@ Partial Class Contratos_ContratoObra DdlUMInsumos.SelectedValueExist(-1) TxtPUInsumos.Text = "" + DdlRubro.SelectedValue = "2" + ' DdlRubro_SelectedIndexChanged(Nothing, Nothing) + + + DVClasificacion.Visible = True + DVPS.Visible = True + DVUM.Visible = True + + DVDias.Visible = False + DVActividadesRH.Visible = False + + TxtDias.Text = "" + DdlActividades.SelectedValueExist(-1) + + If ModalControlPSAdd = True Then LtlModalControlPSTitulo.Text = "Agregar Producto Presupuesto Control" @@ -4142,8 +4234,8 @@ Partial Class Contratos_ContratoObra If TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas Then - DTCargaPresupuesto = CargaPreSupuestoExcel("Presupuesto") + DTCargaPresupuesto = CargaPreSupuestoExcel("Presupuesto") If DTCargaPresupuesto.Rows.Count > 0 Then ProcesaDatosCargaPresupuesto(DTCargaPresupuesto, Nothing, Nothing) @@ -4151,7 +4243,6 @@ Partial Class Contratos_ContratoObra Alert("No se encintraron partidas en el documento", TipoMensaje.MsgAdvertencia) End If - Else DTCargaPresupuesto = CargaPreSupuestoExcel("Insumos") @@ -4257,6 +4348,7 @@ Partial Class Contratos_ContratoObra DTCargaPresupuestoFlotillas.CaseSensitive = False End If + Dim ErrorProceso = False @@ -4372,7 +4464,8 @@ Partial Class Contratos_ContratoObra Row("Observacion") = "" DTPS.Rows.Add(Row) - + Else + ErrorProceso = True End If Next @@ -4380,44 +4473,77 @@ Partial Class Contratos_ContratoObra - If Not DTCargaPresupuestoManoObra Is Nothing Then + If Not DTCargaPresupuestoManoObra Is Nothing And Not ErrorProceso Then For Each DrowPS As DataRow In DTCargaPresupuestoManoObra.Rows Dim CveActividad As Integer = 0 + Dim Actividad As String - CveActividad = GlobalDTRHActividades(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveActividad", $" Actividad = '{ DrowPS("Actividad").ToString.Trim }'").ToEntero - If CveActividad > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 Then + If DrowPS("Actividad").ToString.Trim.Length > 0 Then + GlobalDTRHActividades(UsuarioActual.CveEmpresa) = Nothing + CveActividad = GlobalDTRHActividades(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveActividad", $" Actividad = '{ DrowPS("Actividad").ToString.Trim }'").ToEntero - Dim Row As DataRow = DTPS.NewRow() - Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble - Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble - Row("CveUM") = -1 - Row("UM") = "" - Row("CveClasificacion") = -1 - Row("Clasificacion") = "" - Row("CvePS") = -1 - Row("PS") = DrowPS("Actividad").ToString - Row("CodigoPS") = DrowPS("Actividad").ToString - Row("PU") = DrowPS("PU").ToString.ToDouble - Row("Total") = DrowPS("Cantidad").ToString.ToDouble * DrowPS("PU").ToString.ToDouble + If CveActividad <= 0 Then - Row("CveTipoPresupuesto") = 2 - Row("CveRubro") = 3 - Row("CveActividad") = CveActividad - Row("CveSubTipoActivoFijo") = -1 - Row("Dias") = DrowPS("Dias").ToString.ToEntero - Row("NoIdentificacion") = "" - Row("OCInterna") = "" - Row("LimitarCantidad") = 0 - Row("Observacion") = "" + Dim ObjRH As New ClsRH() - DTPS.Rows.Add(Row) + If ObjRH.AddActividades(DrowPS("Actividad").ToString.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + CveActividad = ObjRH.CveActividad + + If CveActividad <= 0 Then + ErrorProceso = True + End If + + GlobalDTRHActividades(UsuarioActual.CveEmpresa) = Nothing + + Else + ErrorProceso = True + End If + + ObjRH.Dispose() + + End If + + + If CveActividad > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 And Not ErrorProceso Then + + Actividad = GlobalDTRHActividades(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Actividad", $" CveActividad = {CveActividad}") + + Dim Row As DataRow = DTPS.NewRow() + Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble + Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble + Row("CveUM") = -1 + Row("UM") = "Actividad RH" + Row("CveClasificacion") = -1 + Row("Clasificacion") = "" + Row("CvePS") = -1 + Row("PS") = Actividad + Row("CodigoPS") = Actividad + Row("PU") = DrowPS("PU").ToString.ToDouble + Row("Total") = DrowPS("Cantidad").ToString.ToDouble * DrowPS("PU").ToString.ToDouble + + Row("CveTipoPresupuesto") = 1 + Row("CveRubro") = 3 + Row("CveActividad") = CveActividad + Row("CveSubTipoActivoFijo") = -1 + Row("Dias") = DrowPS("Dias").ToString.ToEntero + + Row("NoIdentificacion") = "" + Row("OCInterna") = "" + Row("LimitarCantidad") = 0 + Row("Observacion") = "" + + DTPS.Rows.Add(Row) + + End If End If + + Next End If @@ -4426,101 +4552,114 @@ Partial Class Contratos_ContratoObra End If - Dim ErrorProceso = False - Dim ObjContratos As New ClsContratos - Dim TotalRow As Double = 0 - ObjContratos.IniciaTransacSQL() - - For Each Row As DataRow In DTPS.Rows - If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, - Row("NoIdentificacion").ToString, Convert.ToBoolean(Row("LimitarCantidad")), Row("OCInterna").ToString, Observacion:=Row("Observacion").ToString, CveRubro:=Row("CveRubro").ToString.ToEntero, - CveActividad:=Row("CveActividad").ToString.ToEntero, CveSubTipoActivoFijo:=Row("CveSubTipoActivoFijo").ToString.ToEntero, Dias:=Row("Dias").ToString.ToEntero) Then + If Not ErrorProceso Then - If Autorizado Then - Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con rubro {4} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU"), Row("CveRubro")) - guardarBitacora(msj) + Dim ObjContratos As New ClsContratos + Dim TotalRow As Double = 0 + ObjContratos.IniciaTransacSQL() + + For Each Row As DataRow In DTPS.Rows + + If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, + Row("NoIdentificacion").ToString, Convert.ToBoolean(Row("LimitarCantidad")), Row("OCInterna").ToString, Observacion:=Row("Observacion").ToString, CveRubro:=Row("CveRubro").ToString.ToEntero, + CveActividad:=Row("CveActividad").ToString.ToEntero, CveSubTipoActivoFijo:=Row("CveSubTipoActivoFijo").ToString.ToEntero, Dias:=Row("Dias").ToString.ToEntero) Then + + If Autorizado Then + Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con rubro {4} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU"), Row("CveRubro")) + guardarBitacora(msj) + End If + + Dim NrowTmpDT As DataRow = TmpDT.NewRow + + + NrowTmpDT("Cantidad") = Row("Cantidad") + NrowTmpDT("CantidadContratada") = Row("CantidadContratada") + NrowTmpDT("CveUM") = Row("CveUM") + NrowTmpDT("UM") = Row("UM") + NrowTmpDT("CveClasificacion") = Row("CveClasificacion") + NrowTmpDT("Clasificacion") = Row("Clasificacion") + NrowTmpDT("CvePS") = Row("CvePS") + + + NrowTmpDT("PS") = Row("PS") + NrowTmpDT("CodigoPS") = Row("CodigoPS") + + + + + NrowTmpDT("PU") = Row("PU") + NrowTmpDT("Total") = Row("Total") + NrowTmpDT("CveTipoPresupuesto") = Row("CveTipoPresupuesto") + NrowTmpDT("NoIdentificacion") = Row("NoIdentificacion") + NrowTmpDT("OCInterna") = Row("OCInterna") + NrowTmpDT("LimitarCantidad") = Row("LimitarCantidad") + NrowTmpDT("Observacion") = Row("Observacion") + + NrowTmpDT("CveRubro") = Row("CveRubro") + NrowTmpDT("CveActividad") = Row("CveActividad") + NrowTmpDT("CveSubTipoActivoFijo") = Row("CveSubTipoActivoFijo") + + NrowTmpDT("Rubro") = Row("Rubro") + NrowTmpDT("Actividad") = Row("Actividad") + NrowTmpDT("SubTipoActivoFijo") = Row("SubTipoActivoFijo") + + + NrowTmpDT("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle") + + TmpDT.Rows.Add(NrowTmpDT) + TmpDT.AcceptChanges() + + TotalRow = TotalRow + NrowTmpDT("Total").ToString.ToDouble + Else + ErrorProceso = True + Exit For End If - - Dim NrowTmpDT As DataRow = TmpDT.NewRow + Next - NrowTmpDT("Cantidad") = Row("Cantidad") - NrowTmpDT("CantidadContratada") = Row("CantidadContratada") - NrowTmpDT("CveUM") = Row("CveUM") - NrowTmpDT("UM") = Row("UM") - NrowTmpDT("CveClasificacion") = Row("CveClasificacion") - NrowTmpDT("Clasificacion") = Row("Clasificacion") - NrowTmpDT("CvePS") = Row("CvePS") - NrowTmpDT("PS") = Row("PS") - NrowTmpDT("CodigoPS") = Row("CodigoPS") - NrowTmpDT("PU") = Row("PU") - NrowTmpDT("Total") = Row("Total") - NrowTmpDT("CveTipoPresupuesto") = Row("CveTipoPresupuesto") - NrowTmpDT("NoIdentificacion") = Row("NoIdentificacion") - NrowTmpDT("OCInterna") = Row("OCInterna") - NrowTmpDT("LimitarCantidad") = Row("LimitarCantidad") - NrowTmpDT("Observacion") = Row("Observacion") - - NrowTmpDT("CveRubro") = Row("CveRubro") - NrowTmpDT("CveActividad") = Row("CveActividad") - NrowTmpDT("CveSubTipoActivoFijo") = Row("CveSubTipoActivoFijo") - - NrowTmpDT("Rubro") = Row("Rubro") - NrowTmpDT("Actividad") = Row("Actividad") - NrowTmpDT("SubTipoActivoFijo") = Row("SubTipoActivoFijo") - - - NrowTmpDT("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle") - - TmpDT.Rows.Add(NrowTmpDT) - TmpDT.AcceptChanges() - - TotalRow = TotalRow + NrowTmpDT("Total").ToString.ToDouble + If ErrorProceso Then + ObjContratos.RollBack() + Alert("Se presento un error al cargar el presupuesto.", TipoMensaje.MsgError) Else - ErrorProceso = True - Exit For + + ObjContratos.Commit() + Alert("Presupuesto Cargado correctamente") + + + Select Case TipoCargaPresupuesto + Case EnumTipoCargaPresupuesto.Ventas + CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2")) + UpGV.Update() + Exit Select + Case EnumTipoCargaPresupuesto.Control + CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1")) + UpGVInsumos.Update() + Exit Select + Case Else + + End Select + + LbTotalGeneral.Text = (LbTotalGeneral.Text.ToDouble + TotalRow).ToString.FormatoNumero + LblImporte.Text = LbTotalGeneral.Text + UpGral.Update() + End If - Next + ObjContratos.Dispose() - If ErrorProceso Then - ObjContratos.RollBack() - Alert("Se presento un error al cargar el presupuesto.", TipoMensaje.MsgError) - Else - - ObjContratos.Commit() - Alert("Presupuesto Cargado correctamente") - - - Select Case TipoCargaPresupuesto - Case EnumTipoCargaPresupuesto.Ventas - CargaGVPresupuestos(TmpDT.FiltraParametros("CveTipoPresupuesto=2")) - UpGV.Update() - Exit Select - Case EnumTipoCargaPresupuesto.Control - CargaGVPresupuestosInsumos(TmpDT.FiltraParametros("CveTipoPresupuesto=1")) - UpGVInsumos.Update() - Exit Select - Case Else - - End Select - - LbTotalGeneral.Text = (LbTotalGeneral.Text.ToDouble + TotalRow).ToString.FormatoNumero - LblImporte.Text = LbTotalGeneral.Text - UpGral.Update() End If - ObjContratos.Dispose() - If RowNoEncontrados.Length > 0 Then Alert($"Productos no encontrados
{RowNoEncontrados} ") End If + + End Sub @@ -4784,10 +4923,6 @@ Partial Class Contratos_ContratoObra End Try - - - - DVGraficas.Visible = True UpGrafica.Update() @@ -4797,6 +4932,29 @@ Partial Class Contratos_ContratoObra + Protected Sub DdlRubro_SelectedIndexChanged(sender As Object, e As EventArgs) + + + If DdlRubro.SelectedValue.ToEntero = 3 Then + DVDias.Visible = True + DVActividadesRH.Visible = True + + DVClasificacion.Visible = False + DVPS.Visible = False + DVUM.Visible = False + Else + DVDias.Visible = False + DVActividadesRH.Visible = False + + DVClasificacion.Visible = True + DVPS.Visible = True + DVUM.Visible = True + + End If + + UpModalControlAddPS.Update() + + End Sub End Class From a380977f663203949c30e9513e4f8e3f47dbe912 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Sat, 12 Dec 2020 12:15:27 -0700 Subject: [PATCH 13/41] Compras viaticos solo mostrar personal activo --- Compras/Compras.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index fb272a042..af6b2a37b 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1314,7 +1314,7 @@ Partial Class Compras_Compras Dim ObjPersonal As New ClsRH ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa) DdlPersonal.DataSource = ObjPersonal.DtResultados - DdlPersonalReembolso.DataSource = ObjPersonal.DtResultados + DdlPersonalReembolso.DataSource = ObjPersonal.DtResultados.FiltraParametros("CveEstatusPersonal = 1") ObjPersonal.Dispose() DdlPersonal.DataBind() DdlPersonalReembolso.DataBind() From 388b7fbb27b03d21b7b04d120b7ef23f4311e94e Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Sat, 12 Dec 2020 17:45:05 -0700 Subject: [PATCH 14/41] retirando cambios en el inventario fisico --- Inventarios/InventarioFisicoDetalle.aspx.vb | 60 ++++++++++----------- Inventarios/RepAnomalias.aspx.vb | 3 +- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/Inventarios/InventarioFisicoDetalle.aspx.vb b/Inventarios/InventarioFisicoDetalle.aspx.vb index a5abf5a98..a3a248298 100644 --- a/Inventarios/InventarioFisicoDetalle.aspx.vb +++ b/Inventarios/InventarioFisicoDetalle.aspx.vb @@ -328,37 +328,37 @@ Partial Class Inventarios_InventarioFisicoDetalle End If FechaCaducidad = If(TxtFechaCaducidad.Text.Length > 0, TxtFechaCaducidad.Text, MinFecha.ToString) End If - If AplicaSeccion Then - Dim ObjInv As New ClsInventarios - Dim SeccionesAlmacenDelProducto As New DataTable - If ObjInv.GetProductosServiciosAlmacenSeccion(CveProducto, -1, -1, UsuarioActual.CveEmpresa) Then - SeccionesAlmacenDelProducto = ObjInv.DtResultados.FiltraParametros(String.Format("CveAlmacen IN ({0})", CveAlmacenes)) - End If - 'Dim SeccionesAlmacenDelProducto As DataTable = (UsuarioActual.CveEmpresa, -1, CveProducto) '.FiltraParametros(String.Format("CveAlmacen IN ({0})", CveAlmacenes)) - 'Alert(SeccionesAlmacenDelProducto.Rows.Count.ToString) - If SeccionesAlmacenDelProducto.Rows.Count = 1 Then - CveSeccionAlmacen = SeccionesAlmacenDelProducto.FiltroPrimeroValor("CveSeccionAlmacen") - Else - divSeccion.Visible = AplicaSeccion - If DdlSeccionAlmacen.Items.Count = 0 Then - DdlSeccionAlmacen.DataSource = SeccionesAlmacenDelProducto - DdlSeccionAlmacen.DataBind() - DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1")) - End If + 'If AplicaSeccion Then + ' Dim ObjInv As New ClsInventarios + ' Dim SeccionesAlmacenDelProducto As New DataTable + ' If ObjInv.GetProductosServiciosAlmacenSeccion(CveProducto, -1, -1, UsuarioActual.CveEmpresa) Then + ' SeccionesAlmacenDelProducto = ObjInv.DtResultados.FiltraParametros(String.Format("CveAlmacen IN ({0})", CveAlmacenes)) + ' End If + ' 'Dim SeccionesAlmacenDelProducto As DataTable = (UsuarioActual.CveEmpresa, -1, CveProducto) '.FiltraParametros(String.Format("CveAlmacen IN ({0})", CveAlmacenes)) + ' 'Alert(SeccionesAlmacenDelProducto.Rows.Count.ToString) + ' If SeccionesAlmacenDelProducto.Rows.Count = 1 Then + ' CveSeccionAlmacen = SeccionesAlmacenDelProducto.FiltroPrimeroValor("CveSeccionAlmacen") + ' Else + ' divSeccion.Visible = AplicaSeccion + ' If DdlSeccionAlmacen.Items.Count = 0 Then + ' DdlSeccionAlmacen.DataSource = SeccionesAlmacenDelProducto + ' DdlSeccionAlmacen.DataBind() + ' DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1")) + ' End If - If DdlSeccionAlmacen.SelectedValue = "-1" Then - RfvSeccionAlmacen.Enabled = True - RfvSeccionAlmacen.Visible = True - RfvSeccionAlmacen.SetFocusOnError = True - RfvSeccionAlmacen.Validate() - RfvSeccionAlmacen.ValidationGroup = " " - Exit Sub - End If - CveSeccionAlmacen = DdlSeccionAlmacen.SelectedValue.ToEntero - End If - ObjInv.Dispose() - SeccionAlmacen = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("SeccionAlmacen", String.Format("CveSeccionAlmacen = {0}", CveSeccionAlmacen)) - End If + ' If DdlSeccionAlmacen.SelectedValue = "-1" Then + ' RfvSeccionAlmacen.Enabled = True + ' RfvSeccionAlmacen.Visible = True + ' RfvSeccionAlmacen.SetFocusOnError = True + ' RfvSeccionAlmacen.Validate() + ' RfvSeccionAlmacen.ValidationGroup = " " + ' Exit Sub + ' End If + ' CveSeccionAlmacen = DdlSeccionAlmacen.SelectedValue.ToEntero + ' End If + ' ObjInv.Dispose() + ' SeccionAlmacen = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("SeccionAlmacen", String.Format("CveSeccionAlmacen = {0}", CveSeccionAlmacen)) + 'End If RFVSerie.ValidationGroup = "GrpIngresar" RFVSerie.Enabled = False diff --git a/Inventarios/RepAnomalias.aspx.vb b/Inventarios/RepAnomalias.aspx.vb index 12433a1ec..57f6afc1a 100644 --- a/Inventarios/RepAnomalias.aspx.vb +++ b/Inventarios/RepAnomalias.aspx.vb @@ -194,9 +194,10 @@ Partial Class Inventarios_RepAnomalias e.Row.Cells(8).Text = "0" End If - If e.Row.Cells(7).Text = MinFecha Then + If e.Row.Cells(7).Text = MinFecha.ToString Then e.Row.Cells(7).Text = "" End If + e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1 End If From 66d671bc0f4cca250589f939f8b8ce6805572144 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Mon, 14 Dec 2020 12:00:45 -0700 Subject: [PATCH 15/41] Ventas contratos Egresos --- Compras/ReembolsosComprobaciones.aspx.vb | 49 ++++++++++++++---------- Ventas/Ventas.aspx | 4 +- Ventas/Ventas.aspx.vb | 14 +++++-- vwd.webinfo | 4 ++ 4 files changed, 45 insertions(+), 26 deletions(-) diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index f5d83d58c..4b00fbc2c 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -93,33 +93,40 @@ Partial Class Compras_ReembolsosComprobaciones Dim ObjPersonal As New ClsRH ObjPersonal.GetPersonal(-1, UsuarioActual.CveEmpresa) - DdlPersonal.DataSource = ObjPersonal.DtResultados.FiltraParametros("CveEstatusPersonal = 1") - ObjPersonal.Dispose() - DdlPersonal.DataBind() - CargaTipoTransaccion() - - If UsuarioActual.Empresa.Funcionalidad(506) = "1" Then - CbPermitirExcedente.Visible = True + If UsuarioActual.CveEmpresa.Contiene(119, 158) Then + DdlPersonal.DataSource = ObjPersonal.DtResultados Else - CbPermitirExcedente.Visible = False + DdlPersonal.DataSource = ObjPersonal.DtResultados.FiltraParametros("CveEstatusPersonal = 1") End If - If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then - rowComisiones.Visible = True + + ObjPersonal.Dispose() + DdlPersonal.DataBind() + + CargaTipoTransaccion() + + If UsuarioActual.Empresa.Funcionalidad(506) = "1" Then + CbPermitirExcedente.Visible = True + Else + CbPermitirExcedente.Visible = False + End If + + If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then + rowComisiones.Visible = True + End If + + If UsuarioActual.CveEmpresa = 119 Then + ChkReembolsarSinBancos.Visible = True + End If + + TxtFechaPrePoliza.Text = Date.Now.ToShortDateString + + 'CargaCuentasDiferencia() + + 'TableDiferencia.Visible = False End If - If UsuarioActual.CveEmpresa = 119 Then - ChkReembolsarSinBancos.Visible = True - End If - - TxtFechaPrePoliza.Text = Date.Now.ToShortDateString - - 'CargaCuentasDiferencia() - - 'TableDiferencia.Visible = False - End If - End Sub #Region " FILTROS " diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 08553cbad..4dc1dfa02 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -2822,9 +2822,9 @@
- - <%----%> + +
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 215665354..063add67b 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -9115,7 +9115,7 @@ Partial Class Ventas ObjFactura.NumeroPersonas = 0 - If ObjFactura.TipoDocto = "Ant" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Ing" And DdlContratosModal.SelectedValue.ToEntero > 0 Then + If ObjFactura.TipoDocto = "Ant" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Ing" And DdlContratosModal.SelectedValue.ToEntero > 0 Or ObjFactura.TipoDocto = "Egs" And DdlContratosModal.SelectedValue.ToEntero > 0 Then CveContrato = DdlContratosModal.SelectedValue.ToEntero End If @@ -16384,6 +16384,10 @@ Partial Class Ventas Dim TotalCalculableImpuestosIVA As Decimal = 0 PU = PU.RoundAD(6) ' el precio unitario puede llevar hasta 6 decimales permitidos + If Not TmpDT.Columns.Contains("RetIVA") Then + TmpDT.Columns.Add("RetIVA", GetType(Decimal)) + End If + Row = TmpDT.NewRow() Row("CveProyecto") = CveProyecto Row("Proyecto") = Proyecto @@ -16510,7 +16514,11 @@ Partial Class Ventas Row("IVA") = Row("PorcentajeIVA") Row("ImporteIVA") = (Row("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundAD(NumeroDecimales) Row("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundAD(NumeroDecimales) + + + Row("RetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundAD(NumeroDecimales) + Row("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundAD(NumeroDecimales) Row("PorcentajeRetIVA") = ClienteRetIVA Row("PorcentajeRetISR") = ClienteRetISR @@ -28702,11 +28710,11 @@ Partial Class Ventas Alert("Se selecciono un contrato de obra, para continuar seleccione una estimación.", TipoMensaje.MsgAdvertencia) End If - ElseIf DdlTipoComprobante.SelectedValue = "Ant" Then + ElseIf DdlTipoComprobante.SelectedValue = "Ant" Or DdlTipoComprobante.SelectedValue = "Egs" Then Respuesta = True Else Alert("Tipo de documento no valido para contratos de obra.", TipoMensaje.MsgAdvertencia) - Respuesta = True + Respuesta = False End If Else diff --git a/vwd.webinfo b/vwd.webinfo index ce767c892..02418376d 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -140,6 +140,10 @@ + + + + From 164d37d7df3ab87cee9194563b483db51a362fda Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Mon, 14 Dec 2020 19:40:27 -0700 Subject: [PATCH 16/41] Contatos Compras --- App_Code/ClsCompras.vb | 12 ++++---- Compras/Compras.aspx | 61 +++++++++++++++++++++++++++++++++++++++++ Compras/Compras.aspx.vb | 52 ++++++++++++++++++++++++++++++++++- 3 files changed, 119 insertions(+), 6 deletions(-) diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 0fe3e20d1..277667dc0 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -195,7 +195,8 @@ Public Class ClsCompras AplicaNotaCredito As Boolean, Observaciones As String, CveEstatusCompra As Integer, CvePrePoliza As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional IdPoliza As Integer = -1, Optional CveOC As Integer = -1, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, Optional NumeroReembolso As String = "-1", Optional CveProveedorSucursal As Integer = -1, Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Double = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1, - Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Double = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1) As Boolean + Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Double = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1, + Optional CveContrato As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -246,6 +247,7 @@ Public Class ClsCompras .Add("@TotalOriginal", SqlDbType.Money).Value = TotalOriginal .Add("@CveTipoConcepto", SqlDbType.Int).Value = CveTipoConcepto .Add("@CveFactura", SqlDbType.Int).Value = CveFactura + .Add("@CveContrato", SqlDbType.Int).Value = CveContrato End With Try @@ -267,10 +269,9 @@ Public Class ClsCompras Return Retorno End Function Public Function UpdateCompra(Descripcion As String, FolioSecundario As String, FechaVencimiento As Date, AplicaNotaCredito As Boolean, Observaciones As String, CveEstatusCompra As Integer, - Descuento As Double, SubTotal As Double, IVA As Double, Total As Double, CveUsuario As Integer, - CveCompra As Integer, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, - Optional CveProveedorSucursal As Integer = -1, Optional PorcentajeIVA As Double = 0, - Optional NumeroReembolso As String = "", Optional CveTipoCompra As Integer = -1, Optional NoDeducible As Boolean = False, Optional CveFactura As Integer = -1) As Boolean + Descuento As Double, SubTotal As Double, IVA As Double, Total As Double, CveUsuario As Integer, CveCompra As Integer, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, + Optional CveProveedorSucursal As Integer = -1, Optional PorcentajeIVA As Double = 0, Optional NumeroReembolso As String = "", Optional CveTipoCompra As Integer = -1, Optional NoDeducible As Boolean = False, + Optional CveFactura As Integer = -1, Optional CveContrato As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -297,6 +298,7 @@ Public Class ClsCompras .Add("@CveTipoCompra", SqlDbType.Int).Value = CveTipoCompra .Add("@NoDeducible", SqlDbType.Bit).Value = NoDeducible .Add("@CveFactura", SqlDbType.Int).Value = CveFactura + .Add("@CveContrato", SqlDbType.Int).Value = CveContrato End With Try diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index d0118d925..b5bfea7dd 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -80,6 +80,17 @@ + + + + +
  • + Contratos +
  • + +
    +
    + @@ -5134,10 +5145,60 @@
    + + + + + + + +
    + + + diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index af6b2a37b..596aa860d 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1165,6 +1165,26 @@ Partial Class Compras_Compras End Set End Property + + Private Property CveContratoObra As Integer + Get + If ViewState("CveContratoObra") Is Nothing Then + Return -1 + Else + Return ViewState("CveContratoObra").ToString.ToEntero + End If + End Get + Set(value As Integer) + ViewState("CveContratoObra") = value + End Set + End Property + + + + + + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then 'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip") @@ -1186,6 +1206,7 @@ Partial Class Compras_Compras CveConceptoContableAlmacen = 0 EsNoDeducible = False CveTipoConcepto = 1 + CargaContratos() '******** Prorrateo ******************************************** If UsuarioActual.Empresa.Funcionalidad(117) <> "" Then btnProrateo.Visible = True @@ -1442,6 +1463,8 @@ Partial Class Compras_Compras DivEsNoDeducible.Visible = True DivActualizarVincular.Visible = True + 'LiAccionesContratos.Visible = False + Else ViewState("CveProveedor") = -1 @@ -4636,7 +4659,7 @@ Partial Class Compras_Compras TxtRedondeo.Text.ToDouble, TxtTotal.Text.ToDouble, TxtFecha.Text.Trim.ToDate, DdlMoneda.SelectedValue.ToEntero, TipoCambio, TxtFechaPago.Text.Trim.ToDate, ChkAplicaNotaCredito.Checked, TxtObsFact.Text.Trim, CveEstatusFactura, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, IdPoliza, CveCajaChica:=CveCajaChica, CvePersonal:=CvePersonal, NumeroReembolso:=NumeroReembolso, CveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, AplicoPromocion:=ChkOCPromocion.Checked, PorcentajeIVA:=PorcentajeIVA, CveMetodoPago:=CveMetodoPago, CveRetIVAConcepto:=If(DdlRetIVAConcepto.Items.Count > 0, DdlRetIVAConcepto.SelectedValue.ToEntero, -1), CveConceptoContableAlmacen:=CveConceptoContableAlmacen, - CveRetISRConcepto:=If(DdlRetISRConcepto.Items.Count > 0, DdlRetISRConcepto.SelectedValue.ToEntero, -1), NoDeducible:=EsNoDeducible, CveTipoCompra:=DdlTipoCompra.SelectedValue.ToEntero, TotalOriginal:=TotalOriginal, CveTipoConcepto:=CveTipoConcepto) Then + CveRetISRConcepto:=If(DdlRetISRConcepto.Items.Count > 0, DdlRetISRConcepto.SelectedValue.ToEntero, -1), NoDeducible:=EsNoDeducible, CveTipoCompra:=DdlTipoCompra.SelectedValue.ToEntero, TotalOriginal:=TotalOriginal, CveTipoConcepto:=CveTipoConcepto, CveContrato:=CveContratoObra) Then ViewState("CveCompra") = ObjCompras.CveCompra If ObjCompras.DtResultados.Rows.Count > 0 Then ViewState("CompraFolio") = ObjCompras.DtResultados.Rows(0)("vFolio").ToString @@ -16597,12 +16620,19 @@ Partial Class Compras_Compras Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs) + LiAccionesContratos.Visible = False If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then If DdlTipoComprobante.SelectedValue = "NC" Then DivReembolso.Visible = False RBLPago.Items(2).Enabled = False + + + If Not CveCompra > 0 Then + LiAccionesContratos.Visible = True + End If + Else DivReembolso.Visible = True RBLPago.Items(2).Enabled = True @@ -16626,6 +16656,8 @@ Partial Class Compras_Compras End If + + UpAccionesContratos.Update() UPCondicionesPago.Update() End Sub @@ -20441,6 +20473,24 @@ Partial Class Compras_Compras End If Return True End Function + + + Private Sub CargaContratos() + DdlContrato.DataSource = GlobalDTContratos.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveContratoTipo IN(30,31) ") + DdlContrato.DataBind() + DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1")) + End Sub + + Protected Sub BtnModalContratos_Click(sender As Object, e As EventArgs) + + RegistraScript("$('#DvModalContratos').modal('hide');") + CveContratoObra = DdlContrato.SelectedValue.ToEntero + + + End Sub + Protected Sub LnkContratos_Click(sender As Object, e As EventArgs) + RegistraScript("$('#DvModalContratos').modal('show');") + End Sub End Class Public Class MMensajeDevolucion From b332d9b83d6e278db778dd3d0ed18c80d48fb214 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Tue, 15 Dec 2020 15:18:02 -0700 Subject: [PATCH 17/41] ClientesAbonar --- Ventas/ClientesAbonar.aspx | 12 ++++++++++-- Ventas/ClientesAbonar.aspx.vb | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx index b3a9d6d14..6887e39d7 100644 --- a/Ventas/ClientesAbonar.aspx +++ b/Ventas/ClientesAbonar.aspx @@ -261,7 +261,7 @@ @@ -358,7 +358,15 @@ CveVenta - + + + + + + + Complemento Pago + + diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 98735344f..8b4334e83 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -636,6 +636,17 @@ Partial Class Ventas_ClientesAbonar e.Row.FCCheckBox("Chk").Visible = False End If + + If e.Row.DBCampo("CveVenta").ToEntero > 0 Then + If e.Row.DataKey("ClaveMetodoPagoSAT") = "PUE" Then + e.Row.FCLinkButton("LnkComplemento").Text = "" + e.Row.FCLinkButton("LnkComplemento").CssClass = "text-danger" + End If + Else + e.Row.FCLinkButton("LnkComplemento").Visible = False + End If + + End If End Sub @@ -2505,6 +2516,18 @@ Partial Class Ventas_ClientesAbonar 'For i = 0 To CveVentas.Count - 1 Dim ObjBancos As New ClsBancos + + + If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, If(CveIESustitucion > 0, 2, 1), UsuarioActual.CveEmpresa, -1) Then + If Not ObjBancos.DtResultados.Rows.Count > 0 Then + ObjBancos.Dispose() + Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia) + Return "" + End If + End If + + + ObjBancos.IniciaTransacSQL() If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=If(CveIESustitucion > 0, True, False)) Then From 16a192aafa890a9364e4402cc181728541c18b3b Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 15 Dec 2020 16:52:50 -0700 Subject: [PATCH 18/41] -- columna procentajeiva, que afectaba la visualizacion del total el reporte y otros renglones --- Empresas/Grales/Formatos/RepIVA.rpt | Bin 147456 -> 147456 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Empresas/Grales/Formatos/RepIVA.rpt b/Empresas/Grales/Formatos/RepIVA.rpt index a9b34948e79bda72fe952c5f39c2834944c64f5a..299e52f3a338c6f94c00626bf994d6aeb897ca2b 100644 GIT binary patch delta 20860 zcmaf(V{m3q^yl-$wmq>i(Zsefv29GuC$??d*2JFJwrz9s``7NP-KsseK6TE$-PN~W zbXWEF^zrqD@%4p?Wdgv(G2_7?06;(xzkzR2#00GX#Dg9nunc87&n^P=6NbNi!Yybp zpfJH53MI*$Bk(P z7jGj8?dvnea2lWs_^dPF2h>C31B4*IJOBB9Oh9bE0RbWU2K*Z~5KfR^-(KJw`z}l) z!1u)di~o-ad$XH+0Yu3eER4QOk8lP14qIcV4$@>xxMaR4Xv$z78L4kD4Bs@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BSsfV*F*T3?tTgi{X6ue0N+FY4m}@g z`2_zU&;$>4et)Rzzx8K^`!K_M5dMSyJQMzFCH~*qzeW(+--tHZA4D7HLAVdXd(h7Z z5rGg-XuyW3=nro`Altd)AnJdy*tCCG>_5Z*%VLu}Z2o74l734MhNJ(fd~;7v{034@ zmf*lad}jcsfc{;a9DMf>$uWZu{;87?WS@S;0{-j&H5VX`S;0i01_h4aptMm?`#*u^ z(1&mQa~LQflyratER29~fk!~Vf5|NVN3Zz5WETIES8VYgH;W(c6fi#6#1E$~%>kB2 NfVseT#1A3<{{ZZtbgTdX From 8c984b7d3dbedaf585644c6593bfa62df324bc6e Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 15 Dec 2020 16:53:19 -0700 Subject: [PATCH 19/41] -- seguir registrando --- Contabilidad/PlantillasPolizasDetalle.aspx | 26 +++++++++++++++---- Contabilidad/PlantillasPolizasDetalle.aspx.vb | 11 +++++--- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/Contabilidad/PlantillasPolizasDetalle.aspx b/Contabilidad/PlantillasPolizasDetalle.aspx index c4351d6ed..34fb74f4f 100644 --- a/Contabilidad/PlantillasPolizasDetalle.aspx +++ b/Contabilidad/PlantillasPolizasDetalle.aspx @@ -229,16 +229,21 @@
    - + + + + +
    - + + - + + diff --git a/Contabilidad/PlantillasPolizasDetalle.aspx.vb b/Contabilidad/PlantillasPolizasDetalle.aspx.vb index 282658576..8b5143a0e 100644 --- a/Contabilidad/PlantillasPolizasDetalle.aspx.vb +++ b/Contabilidad/PlantillasPolizasDetalle.aspx.vb @@ -231,9 +231,14 @@ Partial Class Contabilidad_PlantillasPolizasDetalle If CvePlantillaPoliza > 0 Then If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal) Then TxtOrden.Text = "" - updatatos() - Alert("El nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion) - UpTitulos.Update() + If Not ChkSeguirAgregando.Checked Then + updatatos() + Alert("El nuevo Registro se guardó correctamente.", TipoMensaje.MsgInformacion) + Else + RegistraScript(String.Format("$('#{0}').modal();", "divAgregarSucursal")) + UpModal.Update() + End If + Else ErrorDetalle = True End If From f0ce66af6591a2e362af95d8105e0f23e2fb5636 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 15 Dec 2020 16:53:30 -0700 Subject: [PATCH 20/41] mejoras parametro --- Inventarios/Consignaciones.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/Consignaciones.aspx.vb b/Inventarios/Consignaciones.aspx.vb index 8da1e3b5e..43ef04fd9 100644 --- a/Inventarios/Consignaciones.aspx.vb +++ b/Inventarios/Consignaciones.aspx.vb @@ -1235,7 +1235,7 @@ Partial Class Inventarios_Consignaciones Dim ObjInventarios As New ClsInventarios Dim Dt As DataTable = Nothing - If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, 4, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, If(TxtFolioRecepcion.Text = "", -1, TxtFolioRecepcion.Text.ToEntero), UsuarioActual.CveEmpresa) Then + If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, 4, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, If(TxtFolioRecepcion.Text = "", -1, TxtFolioRecepcion.Text.ToEntero), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then Dt = ObjInventarios.DtResultados Else Alert("Ocurrió un error al consultar los movimientos transitorios. Por favor vuelva a intentar.", TipoMensaje.MsgError) From eea21a3c2d4043452252dcbab35a1336b55941a5 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 15 Dec 2020 16:53:43 -0700 Subject: [PATCH 21/41] texto de destino/devolucion --- Inventarios/EntradasSalidas.aspx | 2 +- Inventarios/EntradasSalidas.aspx.vb | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index 5ab3e99df..7128c409a 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -260,7 +260,7 @@
    diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index cb2f16ade..47d5174c7 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -728,7 +728,13 @@ Partial Class Inventarios_EntradasSalidas TxtObservaciones.Text = Mov.Observaciones TxtResponsable.Text = Mov.Recibio - If Mov.CveAlmacenDestino > 0 Then divDestino.Visible = True : LtlAlmacenDestino.Text = Mov.AlmacenDestino + If Mov.CveAlmacenDestino > 0 Then + divDestino.Visible = True + LtlAlmacenDestino.Text = Mov.AlmacenDestino + If DtMov.Rows(0)("Origen").ToString = "1" Then + LblDestino.Text = "Origen:" + End If + End If CveMovimientoRelacionado = Mov.CveMovimientoRelacionado FolioRelacionado = Mov.FolioRelacionado From 8e84982a17b4a37794e989284152e264f633ba34 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 15 Dec 2020 16:53:58 -0700 Subject: [PATCH 22/41] modal de comparativo --- Contabilidad/RepIVA.aspx | 6 +++--- Contabilidad/RepIVA.aspx.cs | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Contabilidad/RepIVA.aspx b/Contabilidad/RepIVA.aspx index 2418a9532..1d8e59b17 100644 --- a/Contabilidad/RepIVA.aspx +++ b/Contabilidad/RepIVA.aspx @@ -298,14 +298,14 @@
    -
    Esquema Nuevo:
    +
    ProForma:
    From c4a74c9216ad8f4bf64fa59765aaa7f7b6499e04 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 16 Dec 2020 16:33:45 -0700 Subject: [PATCH 31/41] Revert "-- clonar producto, actualizar global de ps" This reverts commit 7c02807c4e77eae0e308a7063a087e988b02a556. --- App_Code/Timbrado.vb | 604 ------------ .../Cancelacion/cancelacion.wsdl | 369 -------- Compras/Compras.aspx.vb | 6 +- Empresas/141/Formatos/Cotizacion.rdlc | 553 ++++++----- Empresas/141/Formatos/Factura.rdlc | 863 +++++++++--------- Empresas/141/Formatos/RepPS.rdlc | 9 +- Ventas/ProductosServicios.aspx.vb | 3 - Ventas/RepComisionesJAM.aspx | 2 +- 8 files changed, 761 insertions(+), 1648 deletions(-) delete mode 100644 App_WebReferences/Cancelacion/cancelacion.wsdl diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index afbac5a8a..e4cda96bc 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -653,12 +653,6 @@ Public Class Timbrado Dim Ret As String = TimbrarFacturaGoCFDIv33(Ventas, UsuarioActual, CvePACEspecial) If Ret <> "" Then MensajeErrorCFDI = Ret Retorno = If(Ret = "", True, False) - Case 5 - - Dim Ret As String = TimbrarFacturaProdigiav33(Ventas, UsuarioActual, CvePACEspecial) - If Ret <> "" Then MensajeErrorCFDI = Ret - Retorno = If(Ret = "", True, False) - End Select @@ -2191,604 +2185,6 @@ Public Class Timbrado GuardaLogTimbrado(swTiempo.ToString, CvePACEspecial) Return Retorno End Function - - Public Function TimbrarFacturaProdigiav33(Ventas As Modelos.Factura, UsuarioActual As Usuario, Optional CvePACEspecial As Integer = -1) As String - If CvePACEspecial = -1 Then - CvePACEspecial = UsuarioActual.Empresa.CvePAC - End If - Dim sw As New Diagnostics.Stopwatch - Dim swmili As Long = 0 - Dim swTiempo As New StringBuilder - sw.Start() - Dim Retorno As String = "" - Dim ObjCFDITimbre As CFDITimbre = Ventas.Timbre - ' 'Sucursal matriz de la empresa - Dim ArchivoLLave As String = String.Format("{0}Certificados\{1}", UsuarioActual.Empresa.Ruta, UsuarioActual.Empresa.ArchivoKey) - Dim ArchivoCertificado As String = String.Format("{0}Certificados\{1}", UsuarioActual.Empresa.Ruta, UsuarioActual.Empresa.ArchivoCer) - Dim UsuarioServicio As String = If(CvePACEspecial = 2, UsuarioActual.Empresa.RFC, "rene.molina@adsistemas.mx") - Dim ClaveServicio As String = If(CvePACEspecial = 2, UsuarioActual.Empresa.RFC.ToLower, "rene2018") - Dim Clave As String = UsuarioActual.Empresa.ContraseñaKey - Dim EmisorRFC As String = UsuarioActual.Empresa.RFC - Dim UrlServicio As String = "" ' Produccion - Dim RutaArchivo As String = String.Format("{0}XML\{1}\", UsuarioActual.Empresa.Ruta, Ventas.TipoDocto) - Dim NombreArchivoXML As String = ObjCFDITimbre.Comprobante.SerieFolio - Dim SubTotal As Decimal = 0 - Dim TimbraProduccion As Boolean = True - If Not Directory.Exists(RutaArchivo) Then Directory.CreateDirectory(RutaArchivo) - Select Case CvePACEspecial - Case 2 - UrlServicio = "http://generacfdi.com.mx/rvltimbrado/service1.asmx?WSDL" 'productivo - Case 4 - 'UrlServicio = "http://juancalderon-001-site1.ftempurl.com/timbrado.asmx?WSDL" - UrlServicio = "http://alterno.gofac.com.mx/cfdi/timbrado.asmx?WSDL" ' alterno - End Select - - If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 Then - - EmisorRFC = "AAA010101AAA" - ArchivoLLave = $"{UsuarioActual.Empresa.Ruta}Certificados\CSD01_AAA010101AAA.key" - ArchivoCertificado = $"{UsuarioActual.Empresa.Ruta}Certificados\CSD01_AAA010101AAA.cer" - Clave = "12345678a" - TimbraProduccion = False - Select Case CvePACEspecial - Case 2 - UsuarioServicio = "fgomez" - ClaveServicio = "12121212" - UrlServicio = "http://generacfdi.com.mx/rvltimbrado/service1.asmx?WSDL" '"http://108.60.211.43/rvltimbrado/service1.asmx" - Case 4 - UsuarioServicio = "UserTest" - ClaveServicio = "1234567890" - UrlServicio = "http://juancalderon-001-site1.ftempurl.com/timbrado.asmx?WSDL" - End Select - End If - -#Region "Valida" - If Not File.Exists(ArchivoCertificado) Then - Alert("El archivo de certificado no existe", TipoMensaje.MsgError) - Return "El archivo de certificado no existe" - End If - If Not File.Exists(ArchivoLLave) Then - Alert("El archivo de llave privada no existe", TipoMensaje.MsgError) - Return "El archivo de llave privada no existe" - End If - If UsuarioActual.Empresa.ContraseñaKey = "" Then - Alert("La clave no puede ser vacía", TipoMensaje.MsgError) - Return "La clave no puede ser vacía" - End If -#End Region - -#Region "Variables" - Dim llaveByte As Byte(), certByte As Byte() - Dim llaveBase64 As String, certBase64 As String - Dim cfdi As New GoFac.GoCfdi() - Dim complemento As String = "" - Dim complementoConcepto As String = "" - -#End Region - -#Region "Verifica" - Try - llaveByte = System.IO.File.ReadAllBytes(ArchivoLLave) - llaveBase64 = Convert.ToBase64String(llaveByte) - Catch ex As Exception - Alert($"Error al leer la llave privada: {ex.Message}", TipoMensaje.MsgError) - Return "Error al leer la llave privada" - End Try - - - Try - certByte = System.IO.File.ReadAllBytes(ArchivoCertificado) - certBase64 = Convert.ToBase64String(certByte) - Catch ex As Exception - Alert($"Error al leer el certificado: {ex.Message}", TipoMensaje.MsgError) - Return "Error al leer el certificado" - - End Try -#End Region - - - sw.Stop() - swTiempo.AppendFormat("Verificado : ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds) - swmili = sw.ElapsedMilliseconds - sw.Start() - - ' cfdi.saltarValidacion("bNtMuvZockPVhEjaPj0E") - ' cfdi.Decimales = 4 -#Region "Certificado" - cfdi.CertificadoArchivo(ArchivoCertificado) -#End Region - - - sw.Stop() - swTiempo.AppendFormat("Certificado : ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds) - swmili = sw.ElapsedMilliseconds - sw.Start() - -#Region "Comprobante" - - cfdi.Comprobante33( - ObjCFDITimbre.Comprobante.Serie, - ObjCFDITimbre.Comprobante.Folio, - ObjCFDITimbre.Comprobante.Fecha.ToString("yyyy-MM-ddTHH:mm:ss"), - ObjCFDITimbre.Comprobante.FormadePago, - ObjCFDITimbre.Comprobante.CondicionesdePago, - ObjCFDITimbre.Comprobante.Subtotal, - ObjCFDITimbre.Comprobante.Descuentos, - ObjCFDITimbre.Comprobante.Moneda, - ObjCFDITimbre.Comprobante.TipoCambio.ToString, - ObjCFDITimbre.Comprobante.Total, - ObjCFDITimbre.Comprobante.TipoComprobante, - ObjCFDITimbre.Comprobante.MetodoPago, - ObjCFDITimbre.Comprobante.LugarExpedicion, - ObjCFDITimbre.Comprobante.Confirmacion) - - If ObjCFDITimbre.CFDIRelacionados.TipoRelacion <> "" Then - cfdi.CfdiRelacionados(ObjCFDITimbre.CFDIRelacionados.TipoRelacion) - For Each uid As String In ObjCFDITimbre.CFDIRelacionados.UUID - cfdi.CfdiRelacionado(uid) - Next - End If -#Region "Emisor" - ' cfdi.agregarCfdiRelacionados() - cfdi.Emisor(EmisorRFC, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal) - -#End Region - -#Region "Receptor" - - cfdi.Receptor(ObjCFDITimbre.Receptor.RFC, ObjCFDITimbre.Receptor.Nombre, ObjCFDITimbre.Receptor.ResidenciaFiscal, ObjCFDITimbre.Receptor.NumeroRegistroTributario, ObjCFDITimbre.Receptor.UsoCFDI) - -#End Region - -#End Region - -#Region "Conceptos" - - 'Nodo conceptos, se agregan los PS - - If ObjCFDITimbre.Conceptos IsNot Nothing AndAlso ObjCFDITimbre.Conceptos.Count > 0 Then - For Each concep As CFDIConceptos In ObjCFDITimbre.Conceptos - cfdi.Concepto(concep.ClaveProdServ, concep.Noidentificacion, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Descripcion, concep.ValorUnitario, concep.Importe, concep.Descuento) - For Each imp As CFDIConceptosImpuestos In concep.Impuestos - If imp.TrasladooRetencion = "T" Then - cfdi.ImpuestoConceptoTraslado(imp.Base, imp.Impuesto, imp.TipoFactor, imp.TasaOCuota, imp.Importe) - Else - cfdi.ImpuestoConceptoRetenido(imp.Base, imp.Impuesto, imp.TipoFactor, imp.TasaOCuota, imp.Importe) - End If - Next - If concep.CuentaPredial <> "" Then cfdi.CuentaPredial(concep.CuentaPredial) - If concep.NumeroPedimento <> "" Then cfdi.InformacionAduanera(concep.NumeroPedimento) - Next - End If - -#End Region - - If ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("I", "E") Then - -#Region "Impuestos" - 'SI NO ES FACTURA EN 0 AGREGA LOS IMPUESTOS - If Ventas.Total <> 0 OrElse (ObjCFDITimbre.TotalImpuestosRetenidos > 0 OrElse ObjCFDITimbre.TotalImpuestosTrasladados > 0) Then - cfdi.Impuestos(ObjCFDITimbre.TotalImpuestosRetenidos, ObjCFDITimbre.TotalImpuestosTrasladados) - End If -#End Region -#Region " Traslados y Retenciones" - - - If ObjCFDITimbre.Retenciones.Sum(Function(x) x.Importe) > 0 Then - ''se acumulan los importes - For Each Ret In ObjCFDITimbre.Retenciones - cfdi.Retencion(Ret.Impuesto, Ret.Importe) - Next - End If - - ''se acumulan los importes - For Each Tras In ObjCFDITimbre.Traslados - cfdi.Traslado(Tras.Impuesto, Tras.TipoFactor, Tras.TasaOCuota, Tras.Importe) - Next -#End Region - -#Region "Impuestos Locales" - - If ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe) > 0 OrElse ObjCFDITimbre.TrasladosLocales.Sum(Function(x) x.Importe) > 0 Then - - cfdi.ImpuestosLocales(ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe), ObjCFDITimbre.TrasladosLocales.Sum(Function(x) x.Importe)) - - For Each ret As CFDIRetencionesLocales In ObjCFDITimbre.RetencionesLocales - If ret.Importe > 0 Then - cfdi.RetencionLocal(ret.ImpuestoLocalRetenido, ret.TasaRetencion, ret.Importe) - End If - Next - - For Each ret As CFDITrasladosLocales In ObjCFDITimbre.TrasladosLocales - If ret.Importe > 0 Then - cfdi.TrasladoLocal(ret.ImpuestoLocalTraslado, ret.TasaTraslado, ret.Importe) - End If - Next - End If - - If Ventas.CveComplementoTimbrado > 0 Then - - Select Case Ventas.CveComplementoTimbrado - Case 5 'INE Proceso Ordinario Directivo Estatal" - cfdi.Ine11("Ordinario", "Directivo Estatal", "0") - - cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, "") - cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad) - Case 6 'INE Proceso Ordinario Ejecutivo Estatal" - cfdi.Ine11("Ordinario", "Ejecutivo Estatal", "0") - - cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, "") - cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad) - Case 7 'INE Proceso Ordinario Ejecutivo Nacional" - - cfdi.Ine11("Ordinario", "Ejecutivo Nacional", Ventas.ComplementoINE.INEIdContabilidad.ToString) - Case 8 'INE PreCampaña - cfdi.Ine11(Ventas.ComplementoINE.INETipoProceso, "", "0") - - cfdi.IneEntidad(Ventas.ComplementoINE.INEEntidad, Ventas.ComplementoINE.INETipoComite) - cfdi.IneContabilidad(Ventas.ComplementoINE.INEIdContabilidad) - End Select - - End If - - - -#End Region - - -#Region "Comercio Exterior" - - If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto Then - If ObjCFDITimbre.Complementos.ComercioExterior11 IsNot Nothing Then - - 'DATOS GENERALES - cfdi.ComercioExterior11(ObjCFDITimbre.Complementos.ComercioExterior11.MotivoTraslado, - ObjCFDITimbre.Complementos.ComercioExterior11.TipoOperacion, - ObjCFDITimbre.Complementos.ComercioExterior11.ClavedePedimento, - ObjCFDITimbre.Complementos.ComercioExterior11.CertificadoOrigen, - ObjCFDITimbre.Complementos.ComercioExterior11.NumCertificadoOrigen, - ObjCFDITimbre.Complementos.ComercioExterior11.NumeroExportadorConfiable, - ObjCFDITimbre.Complementos.ComercioExterior11.Incoterm, - ObjCFDITimbre.Complementos.ComercioExterior11.Subdivision, - ObjCFDITimbre.Complementos.ComercioExterior11.Observaciones, - ObjCFDITimbre.Complementos.ComercioExterior11.TipoCambioUSD, - ObjCFDITimbre.Complementos.ComercioExterior11.TotalUSD) - 'EMISOR - cfdi.ComercioExterior11Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CURP)) - cfdi.ComercioExterior11Domicilio(ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Calle, - ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroExterior, - ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroInterior, - ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Colonia, - ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Localidad, - ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Referencia, - ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Municipio, - ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Estado, - ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais, - ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.CP) - 'RECEPTOR - cfdi.ComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumRegIdTrib) - cfdi.ComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Calle, - ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroExterior, - ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.NumeroInterior, - ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Colonia, - ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Localidad, - ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Referencia, - ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Municipio, - ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Estado, - ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.Pais, - ObjCFDITimbre.Complementos.ComercioExterior11.Receptor.CP) - cfdi.ComercioExterior11Destinatario(ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Nombre, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Calle, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.NumeroInterior, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Colonia, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Localidad, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Referencia, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Municipio, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Estado, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.Pais, - ObjCFDITimbre.Complementos.ComercioExterior11.Destinatario.CP) - 'MERCANCIAS - If ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias.Count > 0 Then - For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior11.Mercancias - cfdi.ComercioExterior11Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares) - If concep.DescripcionesEspecificas.Marca <> "" Then - cfdi.ComercioExterior11MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca, - concep.DescripcionesEspecificas.Modelo, - concep.DescripcionesEspecificas.SubModelo, - concep.DescripcionesEspecificas.NumeroSerie) - End If - Next - - End If - - - End If - End If - -#End Region - - - End If - -#Region "Complemento Pago" - - If ObjCFDITimbre.Comprobante.TipoComprobante = "P" Then - - cfdi.Pago(ObjCFDITimbre.ComplementoPagos.FechaPago.ToString("yyyy-MM-ddTHH:mm:ss"), - ObjCFDITimbre.ComplementoPagos.FormaDePagoP, - ObjCFDITimbre.ComplementoPagos.MonedaP, - ObjCFDITimbre.ComplementoPagos.TipoCambioP, - ObjCFDITimbre.ComplementoPagos.Monto, - ObjCFDITimbre.ComplementoPagos.NumOperacion, - ObjCFDITimbre.ComplementoPagos.RfcEmisorCtaOrd, - ObjCFDITimbre.ComplementoPagos.NomBancoOrdExt, - ObjCFDITimbre.ComplementoPagos.CtaOrdenante, - ObjCFDITimbre.ComplementoPagos.RfcEmisorCtaBen, - ObjCFDITimbre.ComplementoPagos.CtaBeneficiario, - ObjCFDITimbre.ComplementoPagos.TipoCadPago, - ObjCFDITimbre.ComplementoPagos.CertPago, - ObjCFDITimbre.ComplementoPagos.CadPago, - ObjCFDITimbre.ComplementoPagos.SelloPago) - - - If ObjCFDITimbre.ComplementoPagos.DocumentosRelacionados.Count > 0 Then - - - For Each doc As CFDIComplementoPagosDocsRelacionados In ObjCFDITimbre.ComplementoPagos.DocumentosRelacionados - cfdi.PagoDoctoRelacionado(doc.IdDocumento, - doc.Serie, - doc.Folio, - doc.MonedaDR, - doc.TipoCambioDR, - doc.MetodoDePagoDR, - doc.NumParcialidad, - doc.ImpSaldoAnt, - doc.ImpPagado, - doc.ImpSaldoInsoluto) - - Next - - 'Estos impuestos aplicarían para anticipos - If ObjCFDITimbre.ComplementoPagos.TotalImpuestosRetenidos > 0 OrElse ObjCFDITimbre.ComplementoPagos.TotalImpuestosTrasladados > 0 Then - - cfdi.PagoImpuestos(ObjCFDITimbre.ComplementoPagos.TotalImpuestosRetenidos, ObjCFDITimbre.ComplementoPagos.TotalImpuestosTrasladados) - If (ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(x) x.TrasladooRetencion = "R").Count > 0 Then - For Each Ret As CFDIConceptosImpuestos In (ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(x) x.TrasladooRetencion = "R") - cfdi.PagoRetencion(Ret.Impuesto, Ret.Importe) - Next - End If - If (ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(x) x.TrasladooRetencion = "T").Count > 0 Then - For Each Tra As CFDIConceptosImpuestos In (ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(x) x.TrasladooRetencion = "T") - cfdi.PagoTraslado(Tra.Impuesto, Tra.TipoFactor, Tra.TasaOCuota, Tra.Importe) - Next - End If - - End If - - - - End If - - End If -#End Region - - - -#Region "Nomina12" - If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then - - 'cfdi.Esquema.AgregarEsquema("http://www.sat.gob.mx/nomina12 http://www.sat.gob.mx/sitio_internet/cfd/nomina/nomina12.xsd") - cfdi.Nomina12(ObjCFDITimbre.Nomina.TipoNomina, ObjCFDITimbre.Nomina.FechaPago.ToString("yyyy-MM-dd"), ObjCFDITimbre.Nomina.FechaInicio.ToDate().ToString("yyyy-MM-dd"), ObjCFDITimbre.Nomina.FechaFin.ToDate().ToString("yyyy-MM-dd"), ObjCFDITimbre.Nomina.NumDiasPagados, If(ObjCFDITimbre.Nomina.Percepciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Percepciones.Count > 0, ObjCFDITimbre.Nomina.TotalPercepciones, 0), If(ObjCFDITimbre.Nomina.Deducciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Deducciones.Count > 0, ObjCFDITimbre.Nomina.TotalDeducciones, 0), If(ObjCFDITimbre.Nomina.OtrosPagos IsNot Nothing AndAlso ObjCFDITimbre.Nomina.OtrosPagos.Count > 0, ObjCFDITimbre.Nomina.TotalOtrosPagos, 0)) - - cfdi.Nomina12Emisor(ObjCFDITimbre.Emisor.CURP, If(ObjCFDITimbre.Nomina.Receptor.TipoContrato = "99", "", ObjCFDITimbre.Emisor.RegistroPatronal), ObjCFDITimbre.Emisor.RFC) - - If UsuarioActual.Empresa.UsaAC Then cfdi.Nomina12EntidadSNCF("IF", 90) - - -#Region "Receptor" - - cfdi.Nomina12Receptor(ObjCFDITimbre.Nomina.Receptor.CURP, - ObjCFDITimbre.Nomina.Receptor.NSS, - ObjCFDITimbre.Nomina.Receptor.FechaInicioContrato.ToDate().ToString("yyyy-MM-dd"), - ObjCFDITimbre.Nomina.Receptor.Antiguedad, - ObjCFDITimbre.Nomina.Receptor.TipoContrato, - ObjCFDITimbre.Nomina.Receptor.Sindicalizado, - ObjCFDITimbre.Nomina.Receptor.CodigoTipoJornada, - ObjCFDITimbre.Nomina.Receptor.CodigoRegimenContratacion, - ObjCFDITimbre.Nomina.Receptor.CodigoEmpleado, - ObjCFDITimbre.Nomina.Receptor.Departamento, - ObjCFDITimbre.Nomina.Receptor.Puesto, - ObjCFDITimbre.Nomina.Receptor.CodigoRiesgoPuesto, - If(ObjCFDITimbre.Nomina.TipoNomina = "E", "99", ObjCFDITimbre.Nomina.Receptor.TipoPeriodo), - ObjCFDITimbre.Nomina.Receptor.CodigoBanco, - ObjCFDITimbre.Nomina.Receptor.NumeroCuenta, - ObjCFDITimbre.Nomina.Receptor.SBC, - ObjCFDITimbre.Nomina.Receptor.SDI, - ObjCFDITimbre.Nomina.Receptor.CodigoEntidadFederativa) - 'cfdi.Nomina12SubContratacion("", "0") - 'cfdi.agregarNominaPercepcionesPercepcionAccionesOTitulos12("100", "200"); - 'cfdi.agregarNominaPercepcionesSeparacionIndemnizacion12("100", "10", "1000", "100", "50"); - 'cfdi.agregarNominaPercepcionesJubilacionPensionRetiro12("50", "100", "10", "100", "0"); - - - End If -#End Region - If ObjCFDITimbre.Nomina IsNot Nothing Then - - If ObjCFDITimbre.Nomina.Percepciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Percepciones.Count > 0 Then - cfdi.Nomina12Percepciones(ObjCFDITimbre.Nomina.TotalSueldos, ObjCFDITimbre.Nomina.TotalIndemnizacion, ObjCFDITimbre.Nomina.TotalJubilacion, ObjCFDITimbre.Nomina.TotalPercepcionesGravado, ObjCFDITimbre.Nomina.TotalPercepcionesExento) - For Each percep As CFDINominaPercepciones In ObjCFDITimbre.Nomina.Percepciones - cfdi.Nomina12Percepcion(percep.TipoPercepcion, percep.Clave, percep.Concepto, Math.Round(percep.ImporteGravado, 2), Math.Round(percep.ImporteExento, 2)) - Next - End If - - 'deducciones al final - If ObjCFDITimbre.Nomina.Deducciones IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Deducciones.Count > 0 Then - cfdi.Nomina12Deducciones(ObjCFDITimbre.Nomina.TotalDeduccionesOtras, Math.Round(ObjCFDITimbre.Nomina.TotalDeduccionesImpuestosRetenidos, 2)) - For Each deduc As CFDINominaDeducciones In ObjCFDITimbre.Nomina.Deducciones - cfdi.Nomina12Deduccion(deduc.TipoDeduccion, deduc.Clave, deduc.Concepto, Math.Round(deduc.Importe, 2)) - Next - End If - - If ObjCFDITimbre.Nomina.HorasExtras IsNot Nothing AndAlso ObjCFDITimbre.Nomina.HorasExtras.Count > 0 Then - For Each HoraExtra As CFDINominaHorasExtras In ObjCFDITimbre.Nomina.HorasExtras - cfdi.Nomina12HorasExtra(HoraExtra.Dias.ToEntero, HoraExtra.TipoHoras, HoraExtra.HorasExtra, HoraExtra.ImportePagado) - Next - End If - - If ObjCFDITimbre.Nomina.Incapacidades IsNot Nothing AndAlso ObjCFDITimbre.Nomina.Incapacidades.Count > 0 Then - For Each Incap As CFDINominaIncapacidades In ObjCFDITimbre.Nomina.Incapacidades - cfdi.Nomina12Incapacidad(Incap.DiasIncapacidad.ToEntero, Incap.TipoIncapacidad, Incap.Importe) - Next - End If - - If ObjCFDITimbre.Nomina.OtrosPagos IsNot Nothing Then - ' cfdi.agregarNominaOtrosPagosOtroPago12("002", "002", "Subsidio", "10.00"); - ' cfdi.agregarNominaOtrosPagosOtroPagoSubsidioAlEmpleo12("10.00"); - If ObjCFDITimbre.Nomina.OtrosPagos IsNot Nothing AndAlso ObjCFDITimbre.Nomina.OtrosPagos.Count > 0 Then - For Each otpag As CFDINominaOtrosPagos In ObjCFDITimbre.Nomina.OtrosPagos - cfdi.Nomina12OtroPago(otpag.TipoOtroPago, otpag.Clave, otpag.Concepto, otpag.Importe) - If otpag.TipoOtroPago = "002" Then - cfdi.Nomina12SubsidioAlEmpleo(otpag.Subsidiocausado) - End If - - Next - End If - End If - End If -#End Region - - sw.Stop() - swTiempo.AppendFormat("Armado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds) - swmili = sw.ElapsedMilliseconds - sw.Start() -#Region "Genera XML" - Dim ArchivoGenerado As Boolean = False - Try - cfdi.GenerarXMLB64(llaveBase64, Clave) - ArchivoGenerado = True - Catch ex As Exception - Retorno = cfdi.MensajeError - If Retorno = "" OrElse IsNothing(Retorno) Then - Retorno = $"llaveBase64 ={llaveBase64}
    Clave ={Clave}
    {ex.ToString()}" - End If - MensajeErrorCFDI = Retorno - End Try - -#End Region - sw.Stop() - swTiempo.AppendFormat("Genera: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds) - swmili = sw.ElapsedMilliseconds - sw.Start() - -#Region "Timbra" - If ArchivoGenerado Then - - 'cfdi.TimbrarCfdi(UsuarioServicio, ClaveServicio, UrlServicio, TimbraProduccion) - - 'sw.Stop() - 'swTiempo.AppendFormat("Timbrado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds) - 'swmili = sw.ElapsedMilliseconds - 'sw.Start() - 'Verifica el error - 'If cfdi.CodigoError = 0 Then - - ' Dim FolioFiscal As String - - ' UUID = cfdi.UUID - ' FolioFiscal = cfdi.UUID 'obtenerAtributo(cfdi.XmlTimbrado, "TimbreFiscalDigital", "UUID") 'XmlDoc.DocumentElement("cfdi:Complemento").FirstChild.Attributes("UUID").InnerText - - ' If FolioFiscal <> "" Then - - ' cfdi.EscribirXML(cfdi.Xml, RutaArchivo, NombreArchivoXML) - - ' sw.Stop() - ' swTiempo.AppendFormat("Guardado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds) - ' swmili = sw.ElapsedMilliseconds - ' sw.Start() - - ' If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then - - ' 'Actualiza Estatus Factura - ' If Ventas.CveVenta > 0 Then - - ' Using ObjVentas As New ClsVentas() - - ' If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=CvePACEspecial) Then - ' Retorno = "" - ' Else - ' Retorno = "Error" - ' End If - ' End Using - - ' 'Genero la addenda Ford - ' If Ventas.Cliente.Ford_GSDB <> "" Then - - ' Dim RutaCadena As String = String.Format("{0}{1}.xml", RutaArchivo, NombreArchivoXML) 'If(UsuarioActual.Empresa.FacturaProduccion, String.Format("{0}XML\{1}\{2}.xml", Ruta, Ventas.SerieFolio), String.Format("{0}XML\{1}\{2}.xml", Ruta, Ventas.TipoDocto, Ventas.SerieFolio)) - - ' Dim FolioFactura As String = "" - ' If UsuarioActual.CveEmpresa = 8 Then FolioFactura = Ventas.Folio.ToString ' sogo, pordefault manda el folio de la factura - ' GeneraAddendaFord(RutaCadena, FolioFactura, Ventas.FordASN, Ventas.FordGSDB) - - ' End If - - ' End If - - ' If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then - ' Using ObjNomina2 As New ClsNominas() - - ' If ObjNomina2.UpdateEstatusNomNominas(3, CvePACEspecial, FolioFiscal, "", ("01/01/2000").ToDate, ObjCFDITimbre.Nomina.CveNomina, 0, 0, 0, 0, 0) Then - ' Retorno = "" - ' Else - ' Retorno = "Error" - ' End If - ' End Using - ' End If - - ' If ObjCFDITimbre.Comprobante.TipoComprobante = "T" Then - ' Using ObjInv As New ClsInventarios() - ' If ObjInv.UpdateMovimientoTimbrado(Ventas.Inv_CveMovimiento, 1, FolioFiscal, MinFecha) Then - ' Retorno = "" - ' Else - ' Retorno = "Error" - ' End If - ' End Using - ' End If - ' End If - - ' If Not IO.Directory.Exists($"{UsuarioActual.Empresa.Ruta}CBB\") Then IO.Directory.CreateDirectory($"{UsuarioActual.Empresa.Ruta}CBB\") - - ' Try - ' Dim RutaCBB As String = $"{UsuarioActual.Empresa.Ruta}CBB\{ObjCFDITimbre.Comprobante.SerieFolio}.jpg" - ' Dim b As Byte() = cfdi.QrCode($"?re={UsuarioActual.Empresa.RFC}&rr={ObjCFDITimbre.Receptor.RFC}&tt={String.Format("{0,12:F6}", ObjCFDITimbre.Comprobante.Total).Trim()}&id={FolioFiscal}") - ' File.WriteAllBytes(RutaCBB, b) - ' Catch ex As Exception - ' OnError("Ocurrió un error al generar el QR", ex) - ' End Try - ' Retorno = "" - ' Else - ' Retorno = "No se pudo timbrar ante el SAT. UUID no generado." - ' End If - ' sw.Stop() - ' swTiempo.AppendFormat("Actualizado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds) - ' swmili = sw.ElapsedMilliseconds - ' sw.Start() - - 'Else - ' Retorno = cfdi.MensajeError - ' MensajeErrorCFDI = cfdi.MensajeError - ' If cfdi.Xml <> "" Then cfdi.EscribirXML(cfdi.Xml, RutaArchivo, NombreArchivoXML) - - 'End If - End If - -#End Region - GuardaLogTimbrado(swTiempo.ToString, CvePACEspecial) - Return Retorno - End Function - Public Sub GuardaLogTimbrado(Str As String, CvePAC As Integer) Dim ArchivoW As StreamWriter Dim strLineaTMP As String diff --git a/App_WebReferences/Cancelacion/cancelacion.wsdl b/App_WebReferences/Cancelacion/cancelacion.wsdl deleted file mode 100644 index 12503b338..000000000 --- a/App_WebReferences/Cancelacion/cancelacion.wsdl +++ /dev/null @@ -1,369 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Cancela un Cfdi en pruebas - - - - - Obtiene el estatus de un Cfdi en producción - - - - - Obtiene el estatus de un Cfdi en pruebas - - - - - Obtiene los Uuid pendientes de aceptar/rechazar de un Receptor (Producción) - - - - - Obtiene los Uuid pendientes de aceptar/rechazar de un Receptor (Pruebas) - - - - - Acepta/Rechaza una solicitud pendiente de cancelación (Producción) - - - - - Acepta/Rechaza una solicitud pendiente de cancelación (Pruebas) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 998d47301..596aa860d 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6882,7 +6882,7 @@ Partial Class Compras_Compras End If - If UsuarioActual.CveEmpresa.Contiene(119, 158) Then + If UsuarioActual.CveEmpresa.Contiene(119) Then Dim ContienePSNeteoBonif As Boolean = False For Each Dr As DataRow In TmpDT.Rows If Dr("CveClasificacion").ToString.ToEntero.Contiene(20319) Or DdlTipoCompra.SelectedValue.ToEntero = 11 Then 'clasificación de Bonificación, no se incluirá en el neteo @@ -7017,7 +7017,7 @@ Partial Class Compras_Compras End If Dim usacomplementariaProveedor As Boolean = False - usacomplementariaProveedor = If(tipoCambioActual > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158), True, False) + usacomplementariaProveedor = If(tipoCambioActual > 1 AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119), True, False) If usacomplementariaProveedor AndAlso DdlTipoComprobante.SelectedValue = "Ant" Then 'importeMovimiento @@ -8395,7 +8395,7 @@ Partial Class Compras_Compras 'CUANDO ES REEMBOLSO COMPROBACION Y CAJA CHICA - If UsuarioActual.CveEmpresa.Contiene(1, 119, 158) AndAlso TxtNumeroReembolso.Text.Trim <> "" AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0) Then + If UsuarioActual.CveEmpresa.Contiene(1, 119) AndAlso TxtNumeroReembolso.Text.Trim <> "" AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0) Then If ObjCompras.GetComprobacion(DdlPersonalReembolso.SelectedValue.ToEntero, DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero, TxtNumeroReembolso.Text.Trim, UsuarioActual.CveEmpresa) Then Dim CvePreComprobacion As Integer If ObjCompras.DtResultados.Rows.Count = 0 Then diff --git a/Empresas/141/Formatos/Cotizacion.rdlc b/Empresas/141/Formatos/Cotizacion.rdlc index 67f6d1a19..0b05ae519 100644 --- a/Empresas/141/Formatos/Cotizacion.rdlc +++ b/Empresas/141/Formatos/Cotizacion.rdlc @@ -1525,11 +1525,117 @@ 2pt + + true + true + true + + + + + Folio Fiscal: + + + + =Parameters!FolioFiscal.Value + + + + + + + =Parameters!FechaCertificacion.Value + + + + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + true true true + + + + No. de Serie del Certificado del CSD: + + + + =Parameters!CertificadoContribuyente.Value + + + + @@ -1672,7 +1778,7 @@ 0.25136cm 0.74611cm 13.82025cm - 10 + 11 @@ -1705,7 +1811,7 @@ 14.07729cm 0.57354cm 2.90753cm - 11 + 12 @@ -1740,7 +1846,7 @@ 0.26772cm 0.52062cm 9.72441cm - 12 + 13 @@ -1778,7 +1884,7 @@ 1.68221cm 1.05328cm 17.71415cm - 13 + 14 =IIF((Sum(IIF(Fields!CveClasificacion.Value = 20345,1,0), "DsOC") > 0),false,true) @@ -1910,7 +2016,7 @@ 0.22108cm 2.03224cm 20.79751cm - 14 + 15 @@ -1940,7 +2046,7 @@ 0.19009cm 0.05496cm 20.88652cm - 15 + 16 @@ -1952,6 +2058,21 @@ 2pt + + Embedded + ID5 + FitProportional + 11.02339cm + 0.17151cm + 0.96488cm + 3.75909cm + 17 + + + + true true @@ -1979,7 +2100,7 @@ 0.19008cm 0.40655cm 12.88812cm - 16 + 18 @@ -1990,6 +2111,51 @@ 2pt + + Embedded + ID4 + FitProportional + 11.02339cm + 4.34941cm + 0.91769cm + 3.03541cm + 19 + + + + + + Embedded + ID1 + FitProportional + 11.02339cm + 7.56121cm + 0.97656cm + 4.16281cm + 20 + + + + + + Embedded + ID6 + FitProportional + 11.02339cm + 11.90634cm + 1.01184cm + 3.76809cm + 21 + + + + Embedded ID3 @@ -1998,7 +2164,7 @@ 15.67443cm 0.93046cm 5.37042cm - 17 + 22 @@ -2030,7 +2196,61 @@ 15.67443cm 0.50299cm 5.42547cm - 18 + 23 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Ord. Compra: + + + + =Parameters!OC.Value + + + + + + + @@ -2048,7 +2268,61 @@ - Pago: + Tipo de Comprobante:I Ingreso,Moneda: + + + + =Parameters!MonedaAbreviatura.Value + + + + , Uso de CFDI: + + + + =Parameters!UsoCFDI.Value + + + + , Forma de Pago: + + + + =Parameters!FormaPago.Value + + + + , Método de Pago: @@ -2156,7 +2430,7 @@ 6.24049in 0.21875in 0.94607in - 20 + 26 @@ -2191,7 +2465,7 @@ 6.24048in 0.21875in 0.94607in - 21 + 27 @@ -2226,7 +2500,7 @@ 6.24048in 0.21875in 0.94607in - 22 + 28 @@ -2261,7 +2535,7 @@ 6.24048in 0.21875in 0.94607in - 23 + 29 @@ -2297,7 +2571,7 @@ 6.24048in 0.21875in 0.94607in - 24 + 30 @@ -2333,7 +2607,7 @@ 7.18656in 0.21875in 0.98426in - 25 + 31 @@ -2368,7 +2642,7 @@ 7.18656in 0.20486in 0.98425in - 26 + 32 @@ -2403,7 +2677,7 @@ 7.18656in 0.19899in 0.98425in - 27 + 33 @@ -2439,7 +2713,7 @@ 7.18656in 0.19284in 0.98425in - 28 + 34 @@ -2475,7 +2749,7 @@ 7.18656in 0.19596in 0.98425in - 29 + 35 @@ -2510,7 +2784,7 @@ 4.32565cm 0.82021cm 7.93893cm - 30 + 36 @@ -2540,7 +2814,7 @@ 0.19009cm 0.05496cm 20.88652cm - 31 + 37 @@ -2552,84 +2826,6 @@ 2pt - - true - true - - - - - Este documento es una cotización sin efectos fiscales ni tampoco es un comprobante de pago - - - - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Screenshot_2 - FitProportional - 10.94818cm - 0.22202cm - 0.95717cm - 4.40152cm - 33 - - - - - - Embedded - Screenshot_3 - FitProportional - 10.94818cm - 6.07789cm - 0.92189cm - 3.75114cm - 34 - - - - - - Embedded - Screenshot_4 - FitProportional - 10.97239cm - 11.40131cm - 0.93296cm - 3.82833cm - 35 - - - - 15.93202cm + + + + + + + + Sahuaro (662) 2161471 - Solidaridad (662) 216-0935 - Palo Verde (662) 4363254 - Progreso (662) 3105781 - Quiroga (662) 261- 0838 - Caborca (637) 3724214 - Magdalena (632) 322-4080 + + + + + + + + + Nogales (631) 319-0093 - Cananea (645) 332 20 40 - Guaymas (622) 222-2417 - Obregón (644)412-2002 Obregón II (644) 413-1543- Obregón III (644) 4134501 - Navojoa (642) 422-9852 + + + + + + + + + Sinaloa: Los Mochis (668) 817-0209 - Los Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Tierra Blanca (667) 716-6997 - Sanalona (667) 713-667 + + + + + + + + + Tres Ríos (667) 455-4621 - Mazatlán (669) 910-2122 - Baja California: Tijuana1 (664) 622-5221 - Tijuana3 (664) 626-2615 - Rosarito (661) 612-4461 - Mexicali (686) 567-6102 - Mexicali3 (686) 326 02 79 + + + + + + + + + Tecate (665) 5212080 - Ensenada (646) 172-4075 - Ensenada2 (646) 176-2703 - Baja California Sur: La Paz (612) 146-3656 - La Paz 2 (612) 121-3185 - Los Cabos (624) 688 3552 + + + + + + + Textbox4 + 9.91718cm + 0.22108cm + 2.03224cm + 20.79751cm + + + 2pt + 2pt + 2pt + 2pt + + @@ -477,10 +612,11 @@ true - 6.06618in + 6.31618in 0.06752in 1.42169in 8.23953in + 1 @@ -1275,7 +1411,7 @@ 0.09836in 0.36206in 8.16629in - 1 + 2 @@ -1297,11 +1433,11 @@ Textbox5 - 8.32309cm + 9.27559cm 0.28014cm 0.05496cm 20.88652cm - 2 + 3 @@ -1345,11 +1481,11 @@ Textbox1 - 8.41332cm + 9.36582cm 2.01402cm 0.51608cm 19.15264cm - 3 + 4 @@ -1368,7 +1504,7 @@ 1.15361cm 2.413cm 2.75323cm - 4 + 5 @@ -1448,7 +1584,7 @@ 4.32565cm 2.70968cm 7.93893cm - 5 + 6 @@ -1528,7 +1664,7 @@ 12.68838cm 2.70968cm 5.11312cm - 6 + 7 @@ -1562,7 +1698,7 @@ 18.23008cm 0.96018cm 2.79101cm - 7 + 8 @@ -1598,7 +1734,7 @@ 18.23008cm 0.6cm 2.79101cm - 8 + 9 @@ -1649,7 +1785,7 @@ 18.23008cm 0.86903cm 2.79101cm - 9 + 10 @@ -1740,7 +1876,7 @@ 0.28014cm 1.09007cm 9.71199cm - 10 + 11 @@ -1820,7 +1956,7 @@ 10.06268cm 0.7927cm 9.71199cm - 11 + 12 @@ -2001,7 +2137,7 @@ 0.25136cm 0.74611cm 13.82025cm - 12 + 13 @@ -2034,7 +2170,7 @@ 14.07729cm 0.57354cm 2.90753cm - 13 + 14 @@ -2068,11 +2204,11 @@ Textbox4 - 5.8751cm + 6.1926cm 1.74571cm 1.05328cm 17.71415cm - 14 + 15 =IIF((Sum(IIF(Fields!CveClasificacion.Value = 20345,1,0), "DsOC") > 0),false,true) @@ -2086,142 +2222,6 @@ 2pt - - true - true - true - - - - - Sonora: Veracruz (662) 210-0041 - Morelos (662) 211-0805 - Colosio (662) 2608088 - Colosio2 (662) 1189939 - Reforma (662) 213-8724 - Perisur (662) 254-4849 - Rodríguez (662) 213-0388 - - - - - - - - - Sahuaro (662) 2161471 - Solidaridad (662) 216-0935 - Palo Verde (662) 4363254 - Progreso (662) 3105781 - Quiroga (662) 261- 0838 - Caborca (637) 3724214 - Magdalena (632) 322-4080 - - - - - - - - - Nogales (631) 319-0093 - Cananea (645) 332 20 40 - Guaymas (622) 222-2417 - Obregón (644)412-2002 Obregón II (644) 413-1543- Obregón III (644) 4134501 - Navojoa (642) 422-9852 - - - - - - - - - Sinaloa: Los Mochis (668) 817-0209 - Los Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Tierra Blanca (667) 716-6997 - Sanalona (667) 713-667 - - - - - - - - - Tres Ríos (667) 455-4621 - Mazatlán (669) 910-2122 - Baja California: Tijuana1 (664) 622-5221 - Tijuana3 (664) 626-2615 - Rosarito (661) 612-4461 - Mexicali (686) 567-6102 - Mexicali3 (686) 326 02 79 - - - - - - - - - Tecate (665) 5212080 - Ensenada (646) 172-4075 - Ensenada2 (646) 176-2703 - Baja California Sur: La Paz (612) 146-3656 - La Paz 2 (612) 121-3185 - Los Cabos (624) 688 3552 - - - - - - - Textbox4 - 8.96468cm - 0.22108cm - 2.03224cm - 20.79751cm - 15 - - - 2pt - 2pt - 2pt - 2pt - - true true @@ -2237,7 +2237,7 @@ Textbox5 - 12.60759cm + 13.24259cm 0.24983cm 0.05496cm 20.88652cm @@ -2253,57 +2253,6 @@ 2pt - - Embedded - ID3 - FitProportional - 21.4598cm - 0.28014cm - 0.93046cm - 5.37042cm - 17 - - - - - - true - true - - - - - DESCARGA NUESTRA NUEVA APLICACIÓN - - - - - - - Textbox60 - 19.12502cm - 0.28014cm - 0.6882cm - 20.71217cm - 18 - - - 2pt - 2pt - 2pt - 2pt - - true true @@ -2346,7 +2295,7 @@ 17.09066cm 0.64028cm 3.90165cm - 19 + 17 @@ -2509,11 +2458,11 @@ Textbox4 - 12.76838cm + 13.40338cm 0.16383cm 2.44366cm 15.51057cm - 20 + 18 @@ -2544,11 +2493,11 @@ Textbox19 - 5.01303in + 5.26303in 6.21617in 0.17708in 0.94607in - 21 + 19 @@ -2579,11 +2528,11 @@ Textbox19 - 5.2055in + 5.4555in 6.21616in 0.17966in 0.94607in - 22 + 20 @@ -2614,11 +2563,11 @@ Textbox19 - 5.40449in + 5.65449in 6.21616in 0.18819in 0.94607in - 23 + 21 @@ -2649,11 +2598,11 @@ Textbox19 - 5.61074in + 5.86074in 6.22658in 0.17119in 0.94607in - 24 + 22 @@ -2685,11 +2634,11 @@ Textbox19 - 5.80137in + 6.05137in 6.237in 0.19596in 0.94607in - 25 + 23 @@ -2721,11 +2670,11 @@ Textbox42 - 5.03803in + 5.28803in 7.16224in 0.17708in 0.98426in - 26 + 24 @@ -2756,11 +2705,11 @@ Textbox42 - 5.2305in + 5.4805in 7.16224in 0.17966in 0.98425in - 27 + 25 @@ -2791,11 +2740,11 @@ Textbox42 - 5.42949in + 5.67949in 7.17266in 0.18819in 0.98425in - 28 + 26 @@ -2827,11 +2776,11 @@ Textbox42 - 5.63574in + 5.88574in 7.17266in 0.17119in 0.98425in - 29 + 27 @@ -2863,11 +2812,11 @@ Textbox42 - 5.82637in + 6.07637in 7.18308in 0.19596in 0.98425in - 30 + 28 @@ -2904,7 +2853,7 @@ 6.75122cm 0.82021cm 5.51336cm - 31 + 29 @@ -2930,11 +2879,11 @@ Textbox5 - 15.2826cm + 15.9176cm 0.10579cm 0.05496cm 20.88652cm - 32 + 30 @@ -2946,55 +2895,6 @@ 2pt - - true - true - true - - - - - ** SI LAS LLANTAS NO SON INSTALADAS EN ECONOLLANTAS PIERDE SU GARANTÍA DE FABRICA ** - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - true true @@ -3003,7 +2903,7 @@ - < ** Toda corrección de los datos del comprobante debera efectuarse a más tardar tres dias despues de su expedición. ** > + < ** Toda corrección de los datos del comprobante debera efectuarse a más tardar tres dias despues de su expedición. ** > + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + Embedded + rockblade + FitProportional + 12.06211cm + 6.5919cm + 0.62223cm + 4.03523cm 34 + + + + + + Embedded + yokohama2 + FitProportional + 12.06211cm + 0.58737cm + 0.62223cm + 4.03523cm + 35 + + + + + + Embedded + mastercraft + FitProportional + 12.12228cm + 17.02729cm + 0.62223cm + 4.03523cm + 36 + + + + + + Embedded + coopertires + FitProportional + 12.18225cm + 11.79701cm + 0.62223cm + 4.03523cm + 37 + + + + + + true + true + true + + + + + ESTAS LLANTAS SOLO TENDRAN GARANTÍA DE POR VIDA CONTRA DEFECTO DE FABRICA. +*SI LAS LLANTAS NO SON INSTALADAS EN ECONOLLANTAS PIERDE SU GARANTÍA DE FABRICA*. + + + + =IIF(IIF((Sum(IIF(Fields!CveClasificacion.Value = 20345,1,0), "DsOC") = 0) and (Sum(IIF(Fields!CveClasificacion.Value = 20342 or Fields!CveClasificacion.Value = 20341,1,0), "DsOC") > 0),false,true),"","<br/>**EL CLIENTE NO ACEPTA PÓLIZA DE SEGURO**") + HTML + + + + + + + + + PARA UNA OPTIMA DURACION DE SUS LLANTAS, ESTAS DEBEN ALINEARSE BALANCEARSE Y ROTAR CADA 6 MESES O 1O MIL KILOMETROS. + + + + PARA HACER VALIDA UNA RECLAMACIÓN DEBERAN CUMPLIR CON EL ANTERIOR REQUISITO + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + ID3 + FitProportional + 22.13416cm + 0.22725cm + 0.93046cm + 5.37042cm + 39 + + + + + + true + true + + + + + DESCARGA NUESTRA NUEVA APLICACIÓN + + + + + + + Textbox60 + 19.79938cm + 0.22725cm + 0.6882cm + 20.71217cm + 40 @@ -3038,11 +3176,11 @@ =System.Convert.FromBase64String(Parameters!QRDescarga.Value) image/png FitProportional - 8.0685in - 6.67743in + 8.33399in + 6.65661in 0.6035in 0.78275in - 35 + 41 @@ -3091,11 +3229,11 @@ Textbox60 - 19.5698cm - 0.28014cm + 20.24416cm + 0.22725cm 1.49135cm 5.37042cm - 36 + 42 @@ -3106,68 +3244,6 @@ 2pt - - true - true - - - - - - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - Black - 2pt - 2pt - 2pt - 2pt - - true true @@ -3246,11 +3322,11 @@ Textbox60 - 19.5698cm - 7.45145cm + 20.24416cm + 7.39856cm 2.45709cm 6.56105cm - 39 + 43 @@ -3285,11 +3361,11 @@ Textbox60 - 19.56002cm - 14.67145cm + 20.23438cm + 14.61856cm 1.46939cm 6.32076cm - 40 + 44 @@ -3300,68 +3376,24 @@ 2pt - - Embedded - rockblade - FitProportional - 11.19428cm - 5.58835cm - 0.86918cm - 4.08628cm - 41 + + + Start + + true + 19.90494cm + 0cm + 3.07798cm + 21.09991cm + 45 - - - Embedded - yokohama2 - FitProportional - 11.33186cm - 0.58737cm - 0.65751cm - 4.35272cm - 42 - - - - - - Embedded - mastercraft - FitProportional - 11.30011cm - 17.06617cm - 0.93972cm - 3.99634cm - 43 - - - - - - Embedded - coopertires - FitProportional - 11.33186cm - 10.33489cm - 0.65751cm - 6.09184cm - 44 - - - - + - 22.57045cm + 23.17899cm diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 8277745fb..18dbbe908 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -2853,8 +2853,6 @@ Partial Class ProductosyServicios ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) > 0 Then 'Alert(String.Format("Error al agregar el nuevo producto en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa"))) - - GlobalDTPSSimplificado(Franquicia) = Nothing Return True End If @@ -2874,7 +2872,6 @@ Partial Class ProductosyServicios ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) Then - GlobalDTPSSimplificado(Franquicia) = Nothing Return True End If diff --git a/Ventas/RepComisionesJAM.aspx b/Ventas/RepComisionesJAM.aspx index f3ef9926b..cf06867b3 100644 --- a/Ventas/RepComisionesJAM.aspx +++ b/Ventas/RepComisionesJAM.aspx @@ -86,7 +86,7 @@
    -
    ProForma:
    +
    Esquema Nuevo:
    From 1682cd0f755c81d4669c3ae7eb7b8f5359e8a874 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 17 Dec 2020 10:02:39 -0700 Subject: [PATCH 32/41] -- orden rin/medida --- Inventarios/KardexAlmacenHorizontal.aspx | 1 + 1 file changed, 1 insertion(+) diff --git a/Inventarios/KardexAlmacenHorizontal.aspx b/Inventarios/KardexAlmacenHorizontal.aspx index f96654277..767cf5d47 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx +++ b/Inventarios/KardexAlmacenHorizontal.aspx @@ -194,6 +194,7 @@ +
    From 91b692867681213d28c6a816772678e5f5dec0e5 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 17 Dec 2020 10:02:50 -0700 Subject: [PATCH 33/41] filtro de aplicaventa en ps --- Ventas/PV.aspx.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 152d2e3cc..791e4e1d0 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -2700,6 +2700,8 @@ Partial Class PV Objeto.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue) 'Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString) Objeto.ddlWS.Attributes.Add("data-cveclasificacion", "-1") + Objeto.ddlWS.Attributes.Add("data-aplicaparaventa", "1") + If AplicaAlmacen Then Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas") Else From 020ee48910e7657c6f4a67ec836166969dbd8682 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 17 Dec 2020 10:16:51 -0700 Subject: [PATCH 34/41] -- productos de NC por pronto pago --- Ventas/ClientesAbonar.aspx.vb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 8b4334e83..4a8e19e4e 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -2082,8 +2082,13 @@ Partial Class Ventas_ClientesAbonar Dim SubProyecto = DrSubProyecto("SubProyecto").ToString Dim Proyecto = DrSubProyecto("Proyecto").ToString - Dim CveSATNC = "84111506" - Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1).FiltroPrimero("") + Dim CveSATNC As Integer + Dim ArrayNC As String() = UsuarioActual.Empresa.Funcionalidad(591).Split(",".ToCharArray()) + Dim NCBonificacion As Integer = 0 + If ArrayNC.Length > 6 Then 'CONCEPTO DE PRONTO PAGO + CveSATNC = ArrayNC(6).ToEntero() + End If + Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveSATNC, AplicaParaVenta:=1).FiltroPrimero("") For Each Dr As DataRow In DtImpuestos.Rows AgregaTempDTNC(ObjFacturaDevolucion.DtDetalle, DrPS("CvePS").ToString.ToEntero, DrPS("PS").ToString, DrPS("Codigo").ToString, DrPS("PSCodigo").ToString, DrPS("CveTipoPS").ToString.ToEntero, DrPS("Inv_CveMetodoInventario").ToString.ToEntero, From 49178fb0267da1938917c61a4824ee4bdba28d43 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 17 Dec 2020 10:17:34 -0700 Subject: [PATCH 35/41] -- renglon 4 de acumulados --- Ventas/Clientes.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 55ce1f097..a01b7bf92 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -9141,7 +9141,7 @@ Partial Class Clientes End If Dim ImporteBonificacion As Decimal = 0 - If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) AndAlso ObjAcum.DtResultados.Rows.Count > 0 Then + If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) AndAlso ObjAcum.DtResultados.Rows.Count >= 4 Then GvUsadosResumen.DataSource = ObjAcum.DtResultados ImporteBonificacion = ObjAcum.DtResultados.Rows(4)("Valor").ToString().ToDecimal() End If From 5c50de629dba399a5f8b898217719e5579773c77 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 17 Dec 2020 15:04:34 -0700 Subject: [PATCH 36/41] Cambios en NC --- App_Code/ClsAcumuladores.vb | 4 +- App_Code/Modelos.vb | 2 +- Ventas/Ventas.aspx | 35 ++--- Ventas/Ventas.aspx.vb | 278 +++++++++++++++++++++++++++++++----- 4 files changed, 264 insertions(+), 55 deletions(-) diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index d7134d6b8..c37e75652 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -898,7 +898,7 @@ Public Class ClsAcumuladores End Function #End Region - Public Function DistribuidorMovtosAdd(CveCliente As Integer, Cantidad As Integer, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer, + Public Function DistribuidorMovtosAdd(CveCliente As Integer, Cantidad As Decimal, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer, CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String, Optional CveMovimiento As Integer = -1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -907,7 +907,7 @@ Public Class ClsAcumuladores With SqlAdapter.SelectCommand.Parameters .Add("@CveCliente", SqlDbType.Int).Value = CveCliente - .Add("@Cantidad", SqlDbType.Int).Value = Cantidad + .Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad .Add("@CveTamaño", SqlDbType.Int).Value = CveTamaño .Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto .Add("@CveVenta", SqlDbType.Int).Value = CveVenta diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 2a0131d71..bbe9ae2b3 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -5129,7 +5129,7 @@ Namespace Modelos For Each RowUsado As DataRow In DtPSVirtual.Rows Dim CvePS = RowUsado("CvePS").ToString().ToEntero() Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble() - Dim PU As Decimal = RowUsado("PUOriginal").ToString().ToDecimal() + Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal() Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero() If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1) Then diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 08553cbad..ccd51ab6e 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -4570,7 +4570,7 @@
    Contrato:
    - +
    Moneda:
    @@ -6038,6 +6038,15 @@

    -
    -
    -
    -
    - - -
    -
    -
    @@ -7235,13 +7235,14 @@ TxtImporte.value = FormatoNumero(Saldo, 2); } } else { - if (SaldoMaximoUtilizable > 0) { - TxtImporte.value = ""; - Chk.checked = false; - } else { - TxtImporte.value = FormatoNumero(Saldo, 2); - } - + TxtImporte.value = ""; + Chk.checked = false; + //if (SaldoMaximoUtilizable > 0) { + // TxtImporte.value = ""; + // Chk.checked = false; + //} else { + // TxtImporte.value = FormatoNumero(Saldo, 2); + //} } } else { diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 215665354..70a6134cf 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2721,7 +2721,7 @@ Partial Class Ventas ImgOtrosConceptos.Visible = False TrFormaEntrega.Visible = False TabDetalleVentas.Visible = False - TabE.Visible = False + 'TabE.Visible = False LnkOCs.Visible = False GvPS.Columns(8).Visible = False TrEdit.Visible = True @@ -3526,6 +3526,8 @@ Partial Class Ventas End If End If + CalculaUsados() + CalculaTotalesVenta() LbAgregar.Visible = False UpPS.Update() @@ -5690,7 +5692,7 @@ Partial Class Ventas DivVentasUsados.Visible = True Dim ObjClientes As New ClsClientes - If ObjClientes.GetHistorialVentas(CveCliente, 1000, CveClienteSucursal:=-1, TipoDocto:="Ing", CveEstatusFactura:=-1, FechaI:=Now.AddMonths(-1)) Then + If ObjClientes.GetHistorialVentas(CveCliente, CveClienteSucursal:=-1, TipoDocto:="Ing", CveEstatusFactura:=-1, FechaI:=Now.AddMonths(-1)) Then DdlVentaUsado.DataSource = ObjClientes.DtResultados.FiltraParametros("UsadoMarcado = 0") End If ObjClientes.Dispose() @@ -5789,7 +5791,7 @@ Partial Class Ventas UpFacturasRelacionadas.Update() End Sub Protected Sub CreaTmpFacturasRelacionadas() - If CveVenta <= 0 Then + If CveVenta <= 0 OrElse EsCreaApartirDe Then Me.TmpDTFacturasRelacionadas = New DataTable() Me.TmpDTFacturasRelacionadas.Columns.Add(New DataColumn("CveVenta", GetType(Integer))) Me.TmpDTFacturasRelacionadas.Columns.Add(New DataColumn("SerieFolio", GetType(String))) @@ -5797,7 +5799,7 @@ Partial Class Ventas End If End Sub Protected Sub LnkAgregarFacturaRelacionada_Click(sender As Object, e As EventArgs) - If CveVenta <= 0 Then + If CveVenta <= 0 OrElse EsCreaApartirDe Then If Me.TmpDTFacturasRelacionadas Is Nothing Then CreaTmpFacturasRelacionadas() End If @@ -5827,7 +5829,7 @@ Partial Class Ventas End Sub Protected Sub BtnAgregarFacturasRelaciondas_Click(sender As Object, e As EventArgs) - If CveVenta <= 0 Then + If CveVenta <= 0 OrElse EsCreaApartirDe Then If Me.TmpDTFacturasRelacionadas Is Nothing OrElse Me.TmpDTFacturasRelacionadas.Rows.Count = 0 Then Me.AplicaRelacionManual = False Alert("No hay facturas para relacionar", TipoMensaje.MsgAdvertencia) @@ -7002,7 +7004,7 @@ Partial Class Ventas End If If (CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot") AndAlso Not AplicaDevolucion Then - If e.Row.DBCampo("CveConcepto").ToEntero() = 3 Then CveAlmacenDevolucion = e.Row.DBCampo("CveAlmacen").ToEntero() + If e.Row.DBCampo("CveConcepto").ToEntero().Contiene(3, 40) Then CveAlmacenDevolucion = e.Row.DBCampo("CveAlmacen").ToEntero() e.Row.FCCheckBox("cbInv").Visible = False End If @@ -8197,7 +8199,7 @@ Partial Class Ventas 'MUESTA ALERT OK ' si es elrol 1165-Ventas,EMp:80, o la empresa 119, recarga ventas, para seguir registrando-. - Dim Liga = If(UsuarioActual.CveRol = 1165 Or UsuarioActual.CveEmpresa = 119, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", If(CveEmpresaCRM > 0, $"document.location.href=""/CRM/EmpresaCRM.aspx?CveEmpresaCRM={CveEmpresaCRM}"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}&Opt=3"";")) + Dim Liga = If(UsuarioActual.CveRol = 1165 Or UsuarioActual.CveEmpresa = 119, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", If(CveEmpresaCRM > 0, $"document.location.href=""/CRM/EmpresaCRM.aspx?CveEmpresaCRM={CveEmpresaCRM}"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}&Opt=2"";")) Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga) MensajeAlert.Clear() @@ -9677,7 +9679,7 @@ Partial Class Ventas If ObjFolios.GetFolios(TipoDoctoConsulta, UsuarioActual.CveEmpresa) Then Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue)) If DT.Rows.Count > 0 Then - ObjFactura.Serie = DT.Rows(0)("Serie").ToString() + ObjFacturaDevolucion.Serie = DT.Rows(0)("Serie").ToString() End If DT.Dispose() End If @@ -10736,9 +10738,34 @@ Partial Class Ventas 'SI SE FACTURA UNA RNC SE MUESTRA If UsuarioActual.CveEmpresa = 140 AndAlso factura.TipoDocto = "Egs" Then If Row("CveVentaDetalleRNC").ToString().ToEntero() > 0 Then + If Not ObjVentas.AddVentaDetalleRNCFacturada(Row("CveVentaDetalleRNC").ToString().ToEntero(), ObjVentas.CveVentaDetalle, Row("Cantidad").ToString().ToDecimal()) Then ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.") End If + + 'SI SE FACTURAN RNC DE CARGO, SE AGREGA EL CONCEPTO DE ACREDITAMIENTO + If ClienteEsDistribuidor AndAlso RblRNCTipo.SelectedValue = "1" Then + Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL()) + + Dim CvePSCargo As Integer = -1 + For Each RNC In ListaRemisionesNC + CvePSCargo = RNC.DtDetalle.FiltroPrimeroValor("CvePS", $"CveVentaDetalle={Row("CveVentaDetalleRNC").ToString()}").ToEntero() + If CvePSCargo > 0 Then + Exit For + End If + Next + + Dim CveTamanio As Integer = GlobalDTAcumTamaños().FiltroPrimeroValor("CveTamaño", $"CvePSCargo={CvePSCargo}").ToEntero() + + If CveTamanio > 0 Then + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Row("Cantidad").ToString().ToDecimal(), CveTamanio, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "") Then + ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.") + Exit For + End If + End If + + End If + End If End If @@ -14666,7 +14693,7 @@ Partial Class Ventas 'MUESTA Alert OK 'MensajeAlert.Append("El Documento se generó correctamente") - Dim Liga = If(UsuarioActual.CveRol = 1165, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}&Opt=3"";") + Dim Liga = If(UsuarioActual.CveRol = 1165, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}&Opt=2"";") Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga) TrEmitir.Visible = False @@ -15728,7 +15755,13 @@ Partial Class Ventas TrVistaPrevia.Visible = True UpFacturar.Update() Else - Alert("No tiene registrados Folios para " & DdlTipoComprobante.SelectedItem.Text & " en esta sucursal.", TipoMensaje.MsgAdvertencia) + + If DdlTipoComprobante.Items.Count > 0 Then + Alert("No tiene registrados Folios para " & DdlTipoComprobante.SelectedItem.Text & " en esta sucursal.", TipoMensaje.MsgAdvertencia) + Else + Alert("No tiene permisos para generar ningun tipo de documento.", TipoMensaje.MsgAdvertencia) + End If + TrEmitir.Visible = False TrVistaPrevia.Visible = False BtnCrearApartirDe.Enabled = False @@ -17718,6 +17751,7 @@ Partial Class Ventas DtRemConceptosSurtidos = Nothing Dim TieneMovimientosSinCosto As Boolean = False + Dim TieneMovimientosContrato As Boolean = False 'Obtenemos los movimientos detalle If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then @@ -17755,6 +17789,8 @@ Partial Class Ventas TieneMovimientosSinCosto = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen=26") > 0 + TieneMovimientosContrato = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen IN (11)") > 0 + For Each dr As DataRow In DtMovimientos.Rows 'Obtenemos los Movimientos de salida If ObjInventario.GetMovimientos(dr("CveMovimiento").ToString().ToEntero(), ConceptoMovimiento, -1, UsuarioActual.CveEmpresa) Then @@ -17777,7 +17813,12 @@ Partial Class Ventas If TieneMovimientosSinCosto Then MovDetalle = DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}") Else - MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND (TieneSalidaxFactura IS NULL OR SaldoAlmacen > 0)")) + If TieneMovimientosContrato Then + MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}")) + Else + MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND (TieneSalidaxFactura IS NULL OR SaldoAlmacen > 0)")) + End If + End If Else MovDetalle = DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}") @@ -17831,10 +17872,6 @@ Partial Class Ventas 'Le damos salida normal If ConSalida AndAlso Not OcurrioError Then - If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then - OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura, ObjConta:=ObjConta) - End If - If Not OcurrioError Then GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenParaSalida, CveConceptoSalidaAlmacen, CveMoneda, ObjFactura.CveVenta, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0 @@ -17842,6 +17879,10 @@ Partial Class Ventas OcurrioError = True Exit For End If + + If Not OcurrioError AndAlso UsuarioActual.Empresa.Funcionalidad(573) = "1" Then + OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura, ObjConta:=ObjConta) + End If End If End If @@ -18215,26 +18256,43 @@ Partial Class Ventas Dim CveConceptoMovimientoVirtual As Integer = 37 Dim DtPSVirtual As DataTable = Nothing Dim DtTamanios As DataTable = Nothing - Dim CveMovimientoEntradaDev As Integer = -1 - Dim CveSubProyecto As Integer = -1 + Dim CveMovimientoReferencia As Integer = -1 + 'SI LA REMISION SE SURTIO CON USADOS UTILIZAR ESTE MOVIMIENTO If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then - Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ((CveTipoAlmacen = 24 AND CveConcepto = 2) OR (CveTipoAlmacen = 1 AND CveConcepto = 8)) AND CveVenta > 0") + Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND (CveTipoAlmacen = 24 AND CveConcepto = 2) AND CveVenta > 0") If RowMovimiento IsNot Nothing Then - CveMovimientoEntradaDev = RowMovimiento("CveMovimiento").ToString().ToEntero() + CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero() Dim tCveAlmacen = RowMovimiento("CveAlmacen").ToString().ToEntero() - CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {tCveAlmacen}").ToEntero() CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero() - - Else - OcurrioError = True End If Else OcurrioError = True End If - If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoEntradaDev, UsuarioActual.CveEmpresa) Then + + 'SI NO SE SURTIO LA REMSION CON USADOS, UTILIZAR EL MOVIMIENTO DE SALIDA DEL INGRESO + If CveMovimientoReferencia <= 0 Then + If ObjInventario.GetInv_Mov(ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then + Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ( (CveTipoAlmacen = 1 AND CveConcepto = 3) OR (CveTipoAlmacen = 10 AND CveConcepto = 40) ) AND CveVenta > 0") + + If RowMovimiento IsNot Nothing Then + CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero() + Dim tCveAlmacen = RowMovimiento("CveAlmacen").ToString().ToEntero() + CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero() + + Else + OcurrioError = True + End If + + Else + OcurrioError = True + End If + End If + + + If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then DtPSVirtual = ObjInventario.DtResultados.Copy() Else OcurrioError = True @@ -18242,13 +18300,13 @@ Partial Class Ventas If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then - CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV", CveMovimientoRelacionado:=CveMovimientoEntradaDev) + CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV", CveMovimientoRelacionado:=CveMovimientoReferencia) If CveMovimientoVirtual > 0 Then For Each RowUsado As DataRow In DtPSVirtual.Rows Dim CvePS = RowUsado("CvePS").ToString().ToEntero() Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble() - Dim PU As Decimal = RowUsado("PU").ToString().ToDecimal() + Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal() Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero() If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1) Then @@ -18318,6 +18376,123 @@ Partial Class Ventas OcurrioError = True End Try + Return Not OcurrioError + + End Function + Private Function GenerarMovimientoAlmacenVirtualConsignacion(CveVenta As Integer, CveAlmacenContrato As Integer, ByRef ObjInventario As ClsInventarios, ObjFactura As Modelos.Factura, Optional ByRef ObjConta As ClsContabilidad = Nothing) As Boolean + Dim OcurrioError As Boolean = False + + If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then + Try + Dim CveMovimientoVirtual As Integer = -1 + Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenContrato).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero() + + Dim CveConceptoMovimientoVirtual As Integer = 37 + Dim DtPSVirtual As DataTable = Nothing + Dim DtTamanios As DataTable = Nothing + Dim CveMovimientoReferencia As Integer = -1 + Dim CveSubProyecto As Integer = -1 + + + If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then + Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ((CveTipoAlmacen = 24 AND CveConcepto = 2) OR (CveTipoAlmacen = 17 AND CveConcepto = 8)) AND CveVenta > 0") + + If RowMovimiento IsNot Nothing Then + CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero() + Else + OcurrioError = True + End If + + Else + OcurrioError = True + End If + + If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then + DtPSVirtual = ObjInventario.DtResultados.Copy() + Else + OcurrioError = True + End If + + If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then + + CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV", CveMovimientoRelacionado:=CveMovimientoReferencia) + + If CveMovimientoVirtual > 0 Then + For Each RowUsado As DataRow In DtPSVirtual.Rows + Dim CvePS = RowUsado("CvePS").ToString().ToEntero() + Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble() + Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal() + Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero() + + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1) Then + OcurrioError = True + Exit For + End If + Next + Else + OcurrioError = True + End If + + 'Agregamos las PrePolizas + If Not OcurrioError Then + If CveMovimientoVirtual > 0 Then + 'OcurrioError = Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoInventario, CveAlmacen) + If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then + Dim DtCostos = ObjInventario.DtResultados.Copy + Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}) + Dim IdCtaContable As Integer = 0 + Dim CveCuenta As Integer = 0 + Dim ValorInventario As Decimal + Dim TotalCostoAcumulado As Decimal = 0D + Dim Cont As Integer = 1 + Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL + + For Each RowInv As DataRow In DtCostosDistinct.Rows + ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL + IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() + CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() + TotalCostoAcumulado += ValorInventario + + 'cuando es el último movimiento y hay diferencias en los importes + If Cont = DtCostosDistinct.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then + ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado) + End If + + Try + 'If ValorInventario <> 0 Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then + OcurrioError = True + Exit For + End If + 'End If + Catch ex As Exception + OcurrioError = True + Alert("Error inesperado (15148). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError) + End Try + Cont += 1 + Next + + If Not OcurrioError Then + IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacenVirtual)).ToEntero() + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then + OcurrioError = True + End If + End If + Else + OcurrioError = True + End If + End If + End If + + End If + + Catch ex As Exception + OnError("Ocurrió un error al generar el almacen virtual.", ex) + OcurrioError = True + End Try + End If + + Return Not OcurrioError End Function @@ -22349,7 +22524,7 @@ Partial Class Ventas Dim CveUnidad As Integer Dim Cantidad As Double Dim Existencia As Double - For Each Dr As DataRow In TmpDT.Rows + For Each Dr As DataRow In TmpDT.FiltraParametros("CveTipoPS=2").Rows CveProducto = Dr("CvePS").ToString().ToEntero() CveUnidad = Dr("CveUM").ToString().ToEntero() Cantidad = Dr("Cantidad").ToString().ToDouble @@ -22443,6 +22618,11 @@ Partial Class Ventas End If + If Not GenerarMovimientoAlmacenVirtualConsignacion(factura.CveVenta, CveAlmacenExistenciasContrato, ObjInventario, factura, ObjConta) Then + Return False + End If + + Return True End Function @@ -23910,10 +24090,18 @@ Partial Class Ventas If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2) DivSMU.Visible = True - HdnSaldoMaximoUsados.Value = RowUsadosNC("ValorConImpuestos").ToString() - LtlSMU.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2) + + Dim SaldoMaximo As Decimal = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal() + If SaldoMaximo > 0 Then + HdnSaldoMaximoUsados.Value = RowUsadosNC("ValorConImpuestos").ToString() + LtlSMU.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2) + Else + HdnSaldoMaximoUsados.Value = "0" + LtlSMU.Text = "0" + End If + Else - DivSMU.Visible = False + 'DivSMU.Visible = False HdnSaldoMaximoUsados.Value = "0" LtlSMU.Text = "0" End If @@ -23953,8 +24141,15 @@ Partial Class Ventas DivSMU.Visible = True Dim FacUsado As New Modelos.Factura(UsuarioActual, CveVentaUsado, UsuarioActual.CveEmpresa) Dim SaldoMaximoUsados As Decimal = FacUsado.DtDetalle.SUM("Total", "EsCargo = True").ToDecimal() + FacUsado.DtDetalle.SUM("ImporteIVA", "EsCargo = True").ToDecimal() - HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString() - LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsados) + + If SaldoMaximoUsados > 0 Then + HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString() + LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsados) + Else + HdnSaldoMaximoUsados.Value = "0" + LtlSMU.Text = "0" + End If + Else Dim ObjAcum As New ClsAcumuladores If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then @@ -23963,7 +24158,7 @@ Partial Class Ventas HdnSaldoMaximoUsados.Value = RowUsadosNC("ValorConImpuestos").ToString() LtlSMU.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2) Else - DivSMU.Visible = False + 'DivSMU.Visible = False HdnSaldoMaximoUsados.Value = "0" LtlSMU.Text = "0" End If @@ -23995,9 +24190,14 @@ Partial Class Ventas GvDescNCBonificaciones.DataBind() Dim SaldoMaximoUsados As Decimal = Me.TmpDT.SUM("Total", "EsCargo = True").ToDecimal() + Me.TmpDT.SUM("ImporteIVA", "EsCargo = True").ToDecimal() + If SaldoMaximoUsados > 0 Then + LblSaldoMaximoUsados.Text = String.Format("{0:N2}", SaldoMaximoUsados) + HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString() + Else + HdnSaldoMaximoUsados.Value = "0" + LtlSMU.Text = "0" + End If - LblSaldoMaximoUsados.Text = String.Format("{0:N2}", SaldoMaximoUsados) - HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString() UpDescNC.Update() End Sub @@ -27301,6 +27501,13 @@ Partial Class Ventas BloqueaCondiconesPago() + + DivDdlFacturaRela.Visible = True + BtnAgregarFacturasRelaciondas.Visible = True + DdlTipoRelacionARelacionar.Enabled = True + + GvFacturasRelacionadas.Columns(2).Visible = True + UpnTools.Update() UpCliente.Update() UpParametros.Update() @@ -27313,6 +27520,7 @@ Partial Class Ventas UpEstatus.Update() UpParametros.Update() UpINV.Update() + UpFacturasRelacionadas.Update() End Sub #End Region From 3efa6e6af000edf6ea4349ba96fb8e3229e98797 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 17 Dec 2020 15:05:20 -0700 Subject: [PATCH 37/41] Cambios en virtuales --- Inventarios/EntregaAlmacen.aspx.vb | 2 +- Inventarios/RecepcionAlmacen.aspx.vb | 62 ++++++++++++- Inventarios/TraspasoAlmacen.aspx.vb | 132 +++++++++++++-------------- 3 files changed, 126 insertions(+), 70 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 1ec5937e6..d0f0ebb22 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -2709,7 +2709,7 @@ Partial Class Inventarios_EntregaAlmacen For Each RowUsado As DataRow In DtPSVirtual.Rows Dim CvePS = RowUsado("CvePS").ToString().ToEntero() Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble() - Dim PU As Decimal = RowUsado("PU").ToString().ToDecimal() + Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal() Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero() If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU) Then diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 579a324c4..682d9e172 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -2377,7 +2377,7 @@ Partial Class Inventarios_RecepcionAlmacen Dim CveVendedorActual = -1 Dim CveClienteActual = -1 - Dim CveAlmacenDestino = CveAlmacen + Dim CveAlmacenDestino = CveAlmacenDevolucionProveedor Dim CveSeccionDestino As Integer = -1 'For Each RowAlmacen As DataRow In DtAlmacenesDevolucion.FiltraParametros("", DistinctColumns:={"CveAlmacenOrignal"}).Rows @@ -2884,6 +2884,66 @@ Partial Class Inventarios_RecepcionAlmacen End If Next End If + + If SumarImporteUsados Then + If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) Then + ImporteIngresoAdicional = ObjInventario.DtResultados.SUMD("TotalOriginal") + End If + End If + + Else + If RealizarMovimientoVirtual Then + + Dim DtPSVirtual As New DataTable("DtTamanios") + + Dim CveMovimientoRef As Integer = -1 + If RealizarTraspasoAlmacenDevolucion Then + CveMovimientoRef = CveMovimientoSalidaTraspaso + Else + CveMovimientoRef = CveMovimiento + End If + + If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoRef, UsuarioActual.CveEmpresa) Then + DtPSVirtual = ObjInventario.DtResultados + End If + + If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then + + Dim CveTipoAlmacenFiltro As Integer = 24 + + Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero()).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero() + + CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, 13, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoRef, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/VD") + + If CveMovimientoVirtual > 0 Then + FolioVirtual = ObjInventario.Folio + + For Each RowUsado As DataRow In DtPSVirtual.Rows + Dim CvePS = RowUsado("CvePS").ToString().ToEntero() + Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal() + Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal() + Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero() + + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + ErrorMovInv = True + Exit For + End If + Next + + If SumarImporteUsados Then + If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) Then + ImporteIngresoAdicional = ObjInventario.DtResultados.SUMD("TotalOriginal") + End If + End If + + Else + ErrorMovInv = True + End If + + Else + ErrorMovInv = True + End If + End If End If End If diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 434eaf4fb..baac711d5 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -882,13 +882,13 @@ Partial Class Inventarios_TraspasoAlmacen dtvirtual = ObjInventario.DtResultados If dtvirtual.Rows.Count > 0 Then - CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida) + CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida) FolioVirtualSalida = ObjInventario.Folio For Each RowVirtual As DataRow In dtvirtual.Rows Dim CvePS = RowVirtual("CvePS").ToString().ToEntero() Dim CantidadUsado As Double = RowVirtual("Cantidad").ToString().ToDouble() - Dim PU As Decimal = RowVirtual("PU").ToString().ToDecimal() + Dim PU As Decimal = RowVirtual("Cargo").ToString().ToDecimal() Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero() If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualSalida, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then @@ -899,7 +899,7 @@ Partial Class Inventarios_TraspasoAlmacen End If Else ErrorMovInv = True - End If + End If End If AlmacenEntrada = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero) @@ -933,27 +933,23 @@ Partial Class Inventarios_TraspasoAlmacen If Not ChkTransitorio.Checked Then 'SI NO ES TRANSITORIO SE HACE LA RECEPCION DE INMEDIATO If Not ErrorMovInv Then - 'VIRTUAL ENTRADA If RealizarMovimientoVirtual Then - 'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenDestino.SelectedValue}").ToEntero() - 'SI EL ALMACEN DESTINO ES DE APOPYO LOGISTICO EL ALMACEN VIRTUAL DEBE SER DE APOYO LOGISTICO - Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveSubProyectoOrigen).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero() Dim dtvirtual As DataTable = Nothing If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then dtvirtual = ObjInventario.DtResultados If dtvirtual.Rows.Count > 0 Then ''hay que verificar que se se tengan movimeintos por registrar - CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/S3") + CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtualEntrada, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/S3") FolioVirtualEntrada = ObjInventario.Folio For Each RowVirtual As DataRow In dtvirtual.Rows Dim CvePS = RowVirtual("CvePS").ToString().ToEntero() Dim CantidadUsado As Double = RowVirtual("Cantidad").ToString().ToDouble() - Dim PU As Decimal = RowVirtual("PU").ToString().ToDecimal() + Dim PU As Decimal = RowVirtual("Cargo").ToString().ToDecimal() Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero() If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualEntrada, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then @@ -965,70 +961,70 @@ Partial Class Inventarios_TraspasoAlmacen Else ErrorMovInv = True - End If - End If - Dim Concepto As String = TxtObservaciones.Text - If Concepto = "" Then Concepto = "Traspaso" - 'AGREGAMOS PREPOLIZAS TRASPASO DIRECTO: - If Not ErrorMovInv Then - Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then - - Dim resultado As DataTable = ObjInventario.DtResultados - Dim importe As Decimal = resultado.SUMD("Total").RoundSQL - 'Dim IdCtaContableSalida As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue.ToEntero)).ToEntero - 'Dim IdCtaContableEntrada As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenDestino.SelectedValue.ToEntero)).ToEntero - Dim Contabilizable As Boolean = True - - If IdCtaContableOrigen = IdCtaContableDestino And TipoAlmacenDestino <> 26 Then Contabilizable = False - - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=importe) Then - ErrorMovInv = True - End If - - 'si el tipo de almacen de entrada es Almacen sin costo, se registra al costo, la salida. - If TipoAlmacenOrigen <> 26 AndAlso TipoAlmacenDestino = 26 Then - - Dim tCveClasificacion As Integer = DtMovimientos.MAX("CveClasificacion").ToEntero - Dim dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=tCveClasificacion).FiltroPrimero("") - Dim IdCuentaCostos As Integer = -1 - If dr IsNot Nothing Then - IdCuentaCostos = dr("IdCuentaCostos").ToString.ToEntero End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 69, TxtObservaciones.Text, Fecha, IdCuentaCostos, -1, CveClasificacion:=tCveClasificacion, CveSubProyecto:=CveSubProyectoOrigen, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=importe) Then + End If + Dim Concepto As String = TxtObservaciones.Text + If Concepto = "" Then Concepto = "Traspaso" + 'AGREGAMOS PREPOLIZAS TRASPASO DIRECTO: + If Not ErrorMovInv Then + Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then + + Dim resultado As DataTable = ObjInventario.DtResultados + Dim importe As Decimal = resultado.SUMD("Total").RoundSQL + 'Dim IdCtaContableSalida As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue.ToEntero)).ToEntero + 'Dim IdCtaContableEntrada As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenDestino.SelectedValue.ToEntero)).ToEntero + Dim Contabilizable As Boolean = True + + If IdCtaContableOrigen = IdCtaContableDestino And TipoAlmacenDestino <> 26 Then Contabilizable = False + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=importe) Then + ErrorMovInv = True + End If + + 'si el tipo de almacen de entrada es Almacen sin costo, se registra al costo, la salida. + If TipoAlmacenOrigen <> 26 AndAlso TipoAlmacenDestino = 26 Then + + Dim tCveClasificacion As Integer = DtMovimientos.MAX("CveClasificacion").ToEntero + Dim dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=tCveClasificacion).FiltroPrimero("") + Dim IdCuentaCostos As Integer = -1 + If dr IsNot Nothing Then + IdCuentaCostos = dr("IdCuentaCostos").ToString.ToEntero + End If + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 69, TxtObservaciones.Text, Fecha, IdCuentaCostos, -1, CveClasificacion:=tCveClasificacion, CveSubProyecto:=CveSubProyectoOrigen, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=importe) Then + ErrorMovInv = True + End If + Contabilizable = False + importe = 0 + End If + + If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableDestino, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable, ImporteMX:=importe) Then + ErrorMovInv = True + End If + End If + End If + End If + Else + If Not ErrorMovInv Then + Dim Concepto As String = TxtObservaciones.Text + If Concepto = "" Then Concepto = "Traspaso" + Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen2", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then + + Dim resultado As DataTable = ObjInventario.DtResultados + Dim importe As Decimal = resultado.SUMD("Total").RoundSQL + Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorio.SelectedValue.ToEntero)).ToEntero + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then ErrorMovInv = True End If - Contabilizable = False - importe = 0 - End If - If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableDestino, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable, ImporteMX:=importe) Then - ErrorMovInv = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then + ErrorMovInv = True + End If End If End If End If - End If - Else - If Not ErrorMovInv Then - Dim Concepto As String = TxtObservaciones.Text - If Concepto = "" Then Concepto = "Traspaso" - Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen2", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then - - Dim resultado As DataTable = ObjInventario.DtResultados - Dim importe As Decimal = resultado.SUMD("Total").RoundSQL - Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorio.SelectedValue.ToEntero)).ToEntero - - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then - ErrorMovInv = True - End If - - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then - ErrorMovInv = True - End If - End If - End If - End If @@ -1945,7 +1941,7 @@ Partial Class Inventarios_TraspasoAlmacen For Each RowVirtual As DataRow In dtvirtual.Rows Dim CvePS = RowVirtual("CvePS").ToString().ToEntero() Dim CantidadUsado As Decimal = RowVirtual("Cantidad").ToString().ToDecimal() - Dim PU As Decimal = RowVirtual("PU").ToString().ToDecimal() + Dim PU As Decimal = RowVirtual("Cargo").ToString().ToDecimal() Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero() If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualEntrada, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then @@ -2851,7 +2847,7 @@ Partial Class Inventarios_TraspasoAlmacen Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) - Dim excelFile As ExcelFile = excelFile.Load(flatFilePath) + Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath) Dim unnamed As Integer = 0 Dim cols As Integer From 8212c08c89dfac18eed7dafff127aaf2ebe5dd92 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 17 Dec 2020 15:06:50 -0700 Subject: [PATCH 38/41] Cambios API Econo --- Ashx/E141.ashx | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx index 51b154202..ca6e8c319 100644 --- a/Ashx/E141.ashx +++ b/Ashx/E141.ashx @@ -49,7 +49,7 @@ Public Class E141 : Implements IHttpHandler Public ReadOnly Property TokenAutorizacion As String Get If EsProduccion Then - Return "$2y$10$8Mk3YeIkJESilIwD.U5dG.SsA4JloycJKbaGls8TNEw/AKBE1qane" + Return "$2y$10$EZlXnFrhUc4aRVwjy5/v0.3JPdFNjyeANDc64YXJ5eHD8pMsv93Q." Else Return "$2y$10$8Mk3YeIkJESilIwD.U5dG.SsA4JloycJKbaGls8TNEw/AKBE1qane" End If @@ -59,7 +59,7 @@ Public Class E141 : Implements IHttpHandler Public ReadOnly Property URLBase As String Get If EsProduccion Then - Return "https://econollantas-pruebas.fidelityapps.mx" + Return "https://services.fidelityapps.mx/" Else Return "https://econollantas-pruebas.fidelityapps.mx/" End If @@ -92,28 +92,31 @@ Public Class E141 : Implements IHttpHandler Else context.Response.ContentType = "text/html" - Dim FiltrarTodos = If(context.Request("FiltrarTodos") = Nothing, "", context.Request("FiltrarTodos").ToString()) + If Not String.IsNullOrEmpty(Metodo) Then + Dim FiltrarTodos = If(context.Request("FiltrarTodos") = Nothing, "", context.Request("FiltrarTodos").ToString()) - Dim respuesta As Boolean = False + Dim respuesta As Boolean = False - 'TAREAS PROGRAMADAS - Select Case Metodo - Case "CrearActualizarProductos" - respuesta = CrearActualizarProductos(If(FiltrarTodos = "1", True, False)) - Case "ActualizarPrecios" - respuesta = ActualizarPrecios(If(FiltrarTodos = "1", True, False)) - Case "ActualizarExistencias" - respuesta = ActualizarExistencias() - Case "ActualizarVendedores" - respuesta = ActualizarVendedores(If(FiltrarTodos = "1", True, False)) - End Select + 'TAREAS PROGRAMADAS + Select Case Metodo + Case "CrearActualizarProductos" + respuesta = CrearActualizarProductos(If(FiltrarTodos = "1", True, False)) + Case "ActualizarPrecios" + respuesta = ActualizarPrecios(If(FiltrarTodos = "1", True, False)) + Case "ActualizarExistencias" + respuesta = ActualizarExistencias() + Case "ActualizarVendedores" + respuesta = ActualizarVendedores(If(FiltrarTodos = "1", True, False)) + End Select - If respuesta Then - retorno = "True" - Else - retorno = "False" + If respuesta Then + retorno = "True" + Else + retorno = "False" + End If End If + End If context.Response.Write(retorno) @@ -202,7 +205,7 @@ Public Class E141 : Implements IHttpHandler Using httpClient = New HttpClient() httpClient.Timeout = New TimeSpan(0, 5, 0) Using request = New HttpRequestMessage(HttpMethod.Post, New Uri(url)) - request.Headers.Add("token", TokenAutorizacion) + request.Headers.Add("X-PUBLIC-AUTH", TokenAutorizacion) Using content = New StringContent(payload, Encoding.UTF8, "application/json") request.Content = content @@ -607,7 +610,7 @@ Public Class E141 : Implements IHttpHandler End Select If VendedorData.Length > 4 Then - Nombre = String.Concat(VendedorData(VendedorData.Length - 1), " ", VendedorData(VendedorData.Length)) + Nombre = String.Concat(VendedorData(VendedorData.Length - 2), " ", VendedorData(VendedorData.Length - 1)) Apellido = String.Concat(VendedorData(0), " ", VendedorData(1)) End If From 9947c5b92a9583c416e83b0666ff13343c8a1119 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 17 Dec 2020 15:07:12 -0700 Subject: [PATCH 39/41] aplica para venta --- Ventas/PV.aspx.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 152d2e3cc..da4fa3f72 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -2705,6 +2705,7 @@ Partial Class PV Else Objeto.ddlWS.Attributes.Add("data-pagina", "-1") End If + Objeto.ddlWS.Attributes.Add("data-aplicaparaventa", "1") Objeto.ddlWS.Attributes.Add("data-Estatus", "1") End If End Sub From bec6a562d69c3e51fcc8faea1d24df87c1f8b921 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 17 Dec 2020 15:07:25 -0700 Subject: [PATCH 40/41] Cambios en saldos de usados --- Ventas/Clientes.aspx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index b168f7b82..2f20bd2b4 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -4179,8 +4179,10 @@ AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"> - - + + + + @@ -4290,7 +4292,7 @@ --%> - + From 624c6e1df10367468c8496fc187465779c8ae5de Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 17 Dec 2020 15:20:08 -0700 Subject: [PATCH 41/41] -- cambios en obtener la cuenta --- Contabilidad/PlantillasPolizasDetalle.aspx | 3 +-- Contabilidad/PlantillasPolizasDetalle.aspx.vb | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Contabilidad/PlantillasPolizasDetalle.aspx b/Contabilidad/PlantillasPolizasDetalle.aspx index 34fb74f4f..294b70ce4 100644 --- a/Contabilidad/PlantillasPolizasDetalle.aspx +++ b/Contabilidad/PlantillasPolizasDetalle.aspx @@ -251,8 +251,6 @@