From c229cac60bc724e28e6702fbcad6144ef7e028be Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 17 May 2022 11:13:40 -0700 Subject: [PATCH 01/48] =?UTF-8?q?correcci=C3=B3n=20de=20liga?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inicio.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inicio.aspx b/Inicio.aspx index 5a586ad33..f4aa36e37 100644 --- a/Inicio.aspx +++ b/Inicio.aspx @@ -614,7 +614,7 @@
- MOTOBATERIAS AMERICA + MOTOBATERIAS AMERICA
From afeaaa4641aa91faebe25f56875850824420b5a0 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 17 May 2022 16:37:05 -0700 Subject: [PATCH 02/48] -- mejoras en error de combo concepto --- Contabilidad/RegPrePolizaS.aspx | 10 +- Contabilidad/RegPrePolizaS.aspx.vb | 185 ++++++++++------------------- 2 files changed, 65 insertions(+), 130 deletions(-) diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index 68914892e..cfc98f3ab 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -359,7 +359,7 @@
@@ -477,7 +477,7 @@
+ DataKeyNames="CvePrePolizaDetalle,IdMov, CveConceptoContable, IdCtaContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,EsMonedaExtranjera,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC,ImporteME,Cargo,Abono" Width="100%" > Movimiento @@ -740,14 +740,14 @@
-
-
Concepto:
+
Con Admin:
- + +
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 8c3721346..c5fd7b7f2 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -61,10 +61,15 @@ Partial Class ContabilidadC_RegPrePolizaS Public Property DrConceptoContable As DataRow Get - Return CType(ViewState("ArregloMovs"), DataRow) + If ViewState("DrConceptoContable") IsNot Nothing Then + Return CType(ViewState("DrConceptoContable"), DataRow) + Else + Return Nothing + End If + End Get Set(value As DataRow) - ViewState("ArregloMovs") = value + ViewState("DrConceptoContable") = value End Set End Property @@ -397,97 +402,18 @@ Partial Class ContabilidadC_RegPrePolizaS .Add("PorcentajeImpuesto", Type.GetType("System.Decimal")) .Add("Modificado", Type.GetType("System.Boolean")) .Add("EsComplementaria", Type.GetType("System.Boolean")) + .Add("EsMonedaExtranjera", Type.GetType("System.Boolean")) .Add("TC", Type.GetType("System.Decimal")) - End With - If Not DtMovimientos.Columns.Contains("Cargo") Then DtMovimientos.Columns.Add("Cargo", Type.GetType("System.Decimal")) DtMovimientos.Columns.Add("Abono", Type.GetType("System.Decimal")) End If - DtMovimientos.AcceptChanges() End Sub - - 'Private Sub CargaNomina() - ' Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero - ' Dim ObjNomina As New ClsNominas - ' Dim ObjConta As New ClsContabilidad - - ' Dim Dt As DataTable = Nothing - ' Dim Cuenta As String = "" - ' Dim Concepto As String = "" - ' Dim IdCuenta As Integer = 0 - ' Dim TipoMovto As Integer - ' Dim CveConcepto As Integer - ' Dim CodigoCuenta As String = "" - ' Dim NombreCuenta As String = "" - ' Dim Referencia As String = "" - ' Dim EsComodin As Integer = 0 - ' DtMovimientos.Clear() - - ' If ObjNomina.GetProvisionNomina(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, UsuarioActual.CveEmpresa) Then - ' Dt = ObjNomina.DtResultados - - ' For Each drt As DataRow In Dt.Rows - ' Dim dr As DataRow = DtMovimientos.NewRow - - ' If drt("NombreCompleto").ToString = "" AndAlso ObjConta.GetRetCuenta(31, UsuarioActual.CveEmpresa) Then - ' CveConcepto = 98 - ' Cuenta = "Nominas por Pagar" - ' IdCuenta = ObjConta.DtResultados(0)("IdCtaContable").ToString.ToEntero - ' Concepto = "Pago Nomina" - ' Referencia = "Pago Nomina" - ' Else - ' Concepto = drt("NombreCompleto") - ' Referencia = "" - ' CveConcepto = drt("CveConceptoContable").ToString.ToEntero - ' Cuenta = drt("ConceptoContable").ToString - ' IdCuenta = drt("IdCtaContable").ToString.ToEntero - ' End If - - ' Dim drr As DataRow = DtCuentasContables.FiltroPrimero($"Id={IdCuenta}") - ' CodigoCuenta = If(drr IsNot Nothing, drr("CuentaFormato").ToString(), "") - ' NombreCuenta = If(drr IsNot Nothing, drr("Nombre").ToString(), "") - - ' TipoMovto = drt("TipoMovto") - - ' If TipoMovto = 0 Then - ' dr("Cargo") = Math.Abs(drt("Importe").ToString.ToDecimal) - ' dr("Abono") = 0 - ' Else - ' dr("Cargo") = 0 - ' dr("Abono") = Math.Abs(drt("Importe").ToString.ToDecimal) - ' End If - - ' dr("IdCuenta") = IdCuenta - ' dr("CodigoCuenta") = CodigoCuenta & "
" & NombreCuenta - ' dr("Cuenta") = Cuenta - ' dr("Concepto") = Concepto - ' dr("Descripcion") = Concepto - ' dr("Referencia") = Referencia - ' dr("TipoMovto") = TipoMovto - ' dr("EsComodin") = EsComodin - ' dr("CveConcepto") = CveConcepto - ' dr("CveProveedor") = "-1" - ' dr("CveSubProyecto") = drt("CveSubProyecto") - ' dr("CvePersonal") = drt("CvePersonal") - ' dr("CveClasificacion") = drt("CveClasificacion") - ' dr("CveTipoGasto") = drt("CveTipoGasto") - - ' DtMovimientos.Rows.Add(dr) - ' Next - - ' GvMov.DataSource = DtMovimientos - ' GvMov.DataBind() - ' UPMovs.Update() - ' End If - - 'End Sub - Private Sub CargaPrePoliza() BtnEliminar.Visible = True LblEncabezado.Text = "Edición de Póliza" @@ -864,16 +790,7 @@ Partial Class ContabilidadC_RegPrePolizaS IdCuenta = 0 CodigoCuenta = "" NombreCuenta = "" - 'If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables - ' Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString)) - ' If drr IsNot Nothing Then - ' IdCuenta = drt("IdCtaContable").ToString.ToEntero - ' CodigoCuenta = drr("CuentaFormato").ToString() - ' NombreCuenta = drr("Nombre").ToString() - ' 'Cuenta = drr("Nombre").ToString() - ' End If - ' EsComodin = 0 - 'End If + Dim dr As DataRow = DtMovimientos.NewRow @@ -894,7 +811,7 @@ Partial Class ContabilidadC_RegPrePolizaS dr("MultipleSubProyecto") = drt("MultipleSubProyecto") dr("CveCuenta") = drt("CveCuenta") dr("EsComplementaria") = drt("EsComplementaria") - 'dr("FolioPoliza") = 0 'drt("FolioPoliza") + dr("EsMonedaExtranjera") = drt("EsMonedaExtranjera") DtMovimientos.Rows.Add(dr) Next @@ -1100,19 +1017,17 @@ Partial Class ContabilidadC_RegPrePolizaS TmpAbono = TmpAbono + Importe TipoMovto = True - If gvr.DataKey("EsComplementaria") = "True" Then - ImporteME = gvr.FCTextBox("TxtAbonoME").Text.ToDecimal - TipoCambio = gvr.FCTextBox("TipoCambio").Text.ToDecimal - End If + If gvr.DataKey("EsComplementaria") = "True" Then ImporteME = gvr.FCTextBox("TxtAbonoME").Text.ToDecimal + If gvr.DataKey("EsMonedaExtranjera") = "True" Then TipoCambio = gvr.FCTextBox("TC").Text.ToDecimal + Else Importe = gvr.DataKey("Abono").ToDecimal TmpAbono = TmpAbono + Importe TipoMovto = True - If gvr.DataKey("EsComplementaria") = "True" Then - ImporteME = gvr.DataKey("MonedaExtranjera").ToDecimal - TipoCambio = gvr.DataKey("TipoCambio").ToDecimal - End If + If gvr.DataKey("EsComplementaria") = "True" Then ImporteME = gvr.DataKey("ImporteME").ToDecimal + If gvr.DataKey("EsMonedaExtranjera") = "True" Then TipoCambio = gvr.DataKey("TC").ToDecimal + End If Else If TipoGrid = 0 Then 'gvmov @@ -1120,22 +1035,16 @@ Partial Class ContabilidadC_RegPrePolizaS TmpCargo = TmpCargo + Importe TipoMovto = False - If gvr.DataKey("EsComplementaria") = "True" Then - ImporteME = gvr.FCTextBox("TxtCargoME").Text.ToDecimal - TipoCambio = gvr.FCTextBox("TxtTC").Text.ToDecimal - End If + If gvr.DataKey("EsComplementaria") = "True" Then ImporteME = gvr.FCTextBox("TxtAbonoME").Text.ToDecimal + If gvr.DataKey("EsMonedaExtranjera") = "True" Then TipoCambio = gvr.FCTextBox("TC").Text.ToDecimal Else Importe = gvr.DataKey("Cargo").ToDecimal TmpCargo = TmpCargo + Importe TipoMovto = False - If gvr.DataKey("EsComplementaria") = "True" Then - ImporteME = gvr.DataKey("MonedaExtranjera").ToDecimal - TipoCambio = gvr.DataKey("TipoCambio").ToDecimal - End If + If gvr.DataKey("EsComplementaria") = "True" Then ImporteME = gvr.DataKey("ImporteME").ToDecimal + If gvr.DataKey("EsMonedaExtranjera") = "True" Then TipoCambio = gvr.DataKey("TC").ToDecimal End If - - End If If Not gvr.DataKey("CveConceptoContable").Contiene("30", "10") Then ' 30-bancos, 10-anticipos proveedores @@ -1153,16 +1062,19 @@ Partial Class ContabilidadC_RegPrePolizaS End If If Importe <> 0 Then Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero + Dim tReferencia, tConcepto As String + Dim tCveSubProyecto, tCveTipoGasto As Integer - Dim tReferencia As String = gvr.DataKey("Referencia") - Dim tConcepto As String = gvr.DataKey("Concepto") - Dim tCveSubProyecto As Integer = gvr.DataKey("CveSubProyecto").ToEntero - Dim tCveTipoGasto As Integer = gvr.DataKey("CveTipoGasto").ToEntero If TipoGrid = 0 Then 'gvmov tReferencia = gvr.FCLiteral("LtlReferencia").Text tConcepto = gvr.FCTextBox("TxtConcepto").Text tCveSubProyecto = gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero tCveTipoGasto = gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero + Else + tReferencia = gvr.DataKey("Referencia") + tConcepto = gvr.DataKey("Concepto") + tCveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero + tCveTipoGasto = gvr.DataKey("CveTipoGasto").ToEntero End If If ObjMov.AddPrePolizasDetalle(CvePrePolizaInsertada, TipoMovto, Importe, tReferencia, gvr.DataKey("CveConceptoContable").ToEntero, tConcepto, @@ -1199,7 +1111,6 @@ Partial Class ContabilidadC_RegPrePolizaS MsgError = $"Error {ex.Message}" End Try - If ContRegInsertados = 0 Then MsgError = $"No se insertaron registros (Revise que los importes de los registros contengan valores)" End If @@ -1414,6 +1325,7 @@ Partial Class ContabilidadC_RegPrePolizaS Private Sub CargaConceptosContablesE() DdlConceptosContablesE.DataSource = GlobalDTContaConceptosContables(-1) DdlConceptosContablesE.DataBind() + DdlConceptosContablesE.Items.Insert(0, New ListItem(" - ", "-1")) End Sub Private Sub CargaSubProyectoE() DdlSubProyectoE.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) @@ -1603,23 +1515,24 @@ Partial Class ContabilidadC_RegPrePolizaS End Sub Private Sub CargaClientesE() DdlClientesE.setEsWebService(True) + DdlClientesE.Attributes.Add("data-metodo", "getcliente") - DdlClientesE.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) - DdlClientesE.DataBind() + 'DdlClientesE.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) + 'DdlClientesE.DataBind() ' DdlClientes.Items.Insert(0, New ListItem(" - ", "-1")) End Sub Private Sub CargaVentasE(CveCliente As Integer, Optional CveMoneda As Integer = -1) DvModalconceptoVenta.Visible = True - Dim ObjVentas As New ClsVentas - + DdlVentasE.DataSource = Nothing DdlVentasE.ClearSelection() + + Dim ObjVentas As New ClsVentas If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1", CveCliente, -1, -1, -1, "-1", "-1", "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then If CveMoneda = 2 Then DdlVentasE.DataSource = ObjVentas.DtResultados.FiltraParametros("CveMoneda = 2") Else DdlVentasE.DataSource = ObjVentas.DtResultados.FiltraParametros("CveMoneda = 1") End If - DdlVentasE.DataBind() DdlVentasE.Items.Insert(0, New ListItem(" - ", "-1")) Else @@ -1657,7 +1570,12 @@ Partial Class ContabilidadC_RegPrePolizaS End Sub Private Function CargaValidacionesConcepto() As Boolean - Dim Retorno As Boolean = true + Dim Retorno As Boolean = True + + If DdlConceptosContablesE.SelectedValue <= 0 Then + Alert("No se ha especificado el concepto", TipoMensaje.ToastAdventencia) + Return False + End If If DrConceptoContable IsNot Nothing Then Dim AplicaComplementaria = Boolean.Parse(DrConceptoContable("EsComplementaria").ToString) @@ -1716,6 +1634,15 @@ Partial Class ContabilidadC_RegPrePolizaS If DdlComprasE.Visible = True AndAlso DdlComprasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlComprasE.SelectedItem.ToString() If DdlVentasE.Visible = True AndAlso DdlVentasE.SelectedValue.ToEntero > 0 Then dr("FolioFactura") = DdlVentasE.SelectedItem.ToString() dr("Modificado") = True + dr("TC") = TxtTipoCambio.Text.ToDecimal + + If DrConceptoContable IsNot Nothing Then + dr("EsComplementaria") = DrConceptoContable("EsComplementaria") + dr("EsMonedaExtranjera") = DrConceptoContable("EsMonedaExtranjera") + + If dr("EsMonedaExtranjera") = "True" Then dr("ImporteME") = TxtME.Text.ToDecimal + + End If If DdlPorcentajeIVAE.Visible Then dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal @@ -1735,7 +1662,7 @@ Partial Class ContabilidadC_RegPrePolizaS UpTotalCargo.Update() UpTotalAbono.Update() If Not ChkSeguir.Checked Then RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal") - + Alert("Concepto Registrado", TipoMensaje.ToastInformacion) Else Dim CvePrePolizaDetalle As Integer = GvPrePoliza.DataKeys(IndiceGrid).Value.ToString.ToEntero @@ -1775,14 +1702,22 @@ Partial Class ContabilidadC_RegPrePolizaS dr("TC") = TxtTipoCambio.Text.ToDecimal + If DrConceptoContable IsNot Nothing Then + dr("EsComplementaria") = DrConceptoContable("EsComplementaria") + dr("EsMonedaExtranjera") = DrConceptoContable("EsMonedaExtranjera") + + If dr("EsMonedaExtranjera") = "True" Then dr("ImporteME") = TxtME.Text.ToDecimal + + End If + dr("PorcentajeImpuesto") = DdlPorcentajeIVAE.SelectedValue.ToDecimal If TxtCargoE.Text <> "" Then dr("Cargo") = TxtCargoE.Text.ToDecimal - dr("Abono") = "".ToDecimal + dr("Abono") = 0 Else dr("Abono") = TxtAbonoE.Text.ToDecimal - dr("Cargo") = "".ToDecimal + dr("Cargo") = 0 End If DtMovimientos.AcceptChanges() From 7ddb3ff16ec65e2fef43a72cf20147cbd02d0ed8 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 19 May 2022 10:07:44 -0700 Subject: [PATCH 03/48] =?UTF-8?q?--=20mejora=20en=20carga=20de=20excel=20f?= =?UTF-8?q?ormateado=20con=20c=C3=B3digos=20=C3=BAnicos=20E141?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/RecepcionAlmacen.aspx.vb | 231 +++++++++++++++++---------- 1 file changed, 147 insertions(+), 84 deletions(-) diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 8893506f5..3d38484e1 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -4864,7 +4864,13 @@ Partial Class Inventarios_RecepcionAlmacen Dim file As Archivo = TxtExcel.getfiles().Archivos(0) Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.path Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb", "xls"), "EXCEL", "CSV") - CargarArchivoExcel(Directorio, file.filename) + + If Tipo = "CSV" AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'empresa de acumuladores + CargaArchivoCSV(Directorio, file.filename, HLFolio.Text) + Else + CargarArchivoExcel(Directorio, file.filename) + End If + Else Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError) End If @@ -4903,93 +4909,97 @@ Partial Class Inventarios_RecepcionAlmacen Exit Sub End If - - dt.TableName = "Datos" - Dim ProductosNoCargados As New StringBuilder() - Dim RowsCargados As Integer = 0 - Dim RowsNoCargados As Integer = 0 - Dim NoPSConSerie As Integer = 0 - - If CveCompraSurtir > 0 Then - 'DtRecepcion - Try - 'Dim DtPS As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa) - 'If(dt.Columns.Contains("PorcentajeIVA"), Round(Row("PorcentajeIVA").ToString.ToDecimal, 4), 0) - For Each RowExcel As DataRow In dt.Rows - If RowExcel("Código").ToString() <> "" Then - - Dim RowPS = DtInv.FiltroPrimero(String.Format("Codigo='{0}'", RowExcel("Código").ToString())) - - If RowPS IsNot Nothing AndAlso RowPS("CvePS").ToString().ToEntero() > 0 Then - - Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero() - Dim CveUnidadMedida As Integer = RowPS("CveUM").ToString().ToEntero() - CvePSSerie = CveProducto - CveConsecSerie = DtInv.FiltroPrimeroValor("Consec", "CvePS=" & CvePSSerie).ToEntero - - Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal() - Dim Serie As String = RowExcel("Serie").ToString() - Dim Lote As String = "" '= RowExcel("Lote").ToString() - Dim FechaCaducidad As Date = MinFecha '= If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate) - Dim Observaciones As String = "" '= If(dt.Columns.Contains("Observaciones"), RowExcel("Observaciones").ToString, "").ToString - LbCantidad.Text = Cantidad.ToString - - Dim Valido As Boolean = True - - If RowPS("AplicaSerie").ToString() = "True" And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then - Valido = False - Alert($"El producto '{RowPS("PS")}' requiere 'Serie'", TipoMensaje.MsgAdvertencia) - ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString()) - End If - - If RowPS("AplicaSerie").ToString() = "True" AndAlso Not String.IsNullOrEmpty(Serie.Trim()) Then - NoPSConSerie = NoPSConSerie + 1 - End If - - - If Valido Then - CveConsecSerie = RowPS("Consec").ToString.ToEntero - AgregaSerie(RowExcel("Serie").ToString, 1) - - 'AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(Not String.IsNullOrEmpty(Serie), Serie, ""), Lote:=Lote, FechaCaducidad:=FechaCaducidad, Limpia:=False) - RowsCargados = RowsCargados + 1 - Else - RowsNoCargados = RowsNoCargados + 1 - ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString()) - End If - - Else - RowsNoCargados = RowsNoCargados + 1 - ProductosNoCargados.AppendFormat("{0},", RowExcel("Producto").ToString()) - End If - End If - Next - Catch ex As Exception - OnError("Ocurrió un error al cargar los productos." & ProductosNoCargados.ToString(), ex) - Finally - - Dim MensajeFinal As New StringBuilder() - If RowsNoCargados = 0 AndAlso RowsCargados > 0 Then - MensajeFinal.Append("Los productos se cargaron correctamente.

") - End If - If RowsCargados > 0 Then - MensajeFinal.Append("Se cargaron " & RowsCargados & " productos correctamente.") - End If - If RowsNoCargados > 0 Then - MensajeFinal.Append("No se pudieron cargar " & RowsNoCargados & " productos.
Los siguientes productos no se pudieron cargar: " & ProductosNoCargados.ToString()) - End If - - Alert(MensajeFinal.ToString()) - - End Try - Else - Alert("No hay seleccionada compra", TipoMensaje.MsgError) - End If - + ProcesaExcel(dt) End If End Sub + Private Function ProcesaExcel(dt As DataTable) As Boolean + dt.TableName = "Datos" + Dim ProductosNoCargados As New StringBuilder() + Dim RowsCargados As Integer = 0 + Dim RowsNoCargados As Integer = 0 + Dim NoPSConSerie As Integer = 0 + + If CveCompraSurtir > 0 Then + + Try + + For Each RowExcel As DataRow In dt.Rows + If RowExcel("Código").ToString() <> "" Then + + Dim RowPS = DtInv.FiltroPrimero(String.Format("Codigo='{0}'", RowExcel("Código").ToString())) + + If RowPS IsNot Nothing AndAlso RowPS("CvePS").ToString().ToEntero() > 0 Then + + Dim CveProducto As Integer = RowPS("CvePS").ToString().ToEntero() + Dim CveUnidadMedida As Integer = RowPS("CveUM").ToString().ToEntero() + CvePSSerie = CveProducto + CveConsecSerie = DtInv.FiltroPrimeroValor("Consec", "CvePS=" & CvePSSerie).ToEntero + + Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal() + Dim Serie As String = RowExcel("Serie").ToString() + Dim Lote As String = "" + Dim FechaCaducidad As Date = MinFecha + Dim Observaciones As String = "" + LbCantidad.Text = Cantidad.ToString + + Dim Valido As Boolean = True + + If RowPS("AplicaSerie").ToString() = "True" And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then + Valido = False + Alert($"El producto '{RowPS("PS")}' requiere 'Serie'", TipoMensaje.MsgAdvertencia) + ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString()) + End If + + If RowPS("AplicaSerie").ToString() = "True" AndAlso Not String.IsNullOrEmpty(Serie.Trim()) Then + NoPSConSerie = NoPSConSerie + 1 + End If + + + If Valido Then + CveConsecSerie = RowPS("Consec").ToString.ToEntero + AgregaSerie(RowExcel("Serie").ToString, 1) + + 'AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(Not String.IsNullOrEmpty(Serie), Serie, ""), Lote:=Lote, FechaCaducidad:=FechaCaducidad, Limpia:=False) + RowsCargados = RowsCargados + 1 + Else + RowsNoCargados = RowsNoCargados + 1 + ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString()) + End If + + Else + RowsNoCargados = RowsNoCargados + 1 + ProductosNoCargados.AppendFormat("{0},", RowExcel("Producto").ToString()) + End If + End If + Next + Catch ex As Exception + OnError("Ocurrió un error al cargar los productos." & ProductosNoCargados.ToString(), ex) + Finally + + Dim MensajeFinal As New StringBuilder() + If RowsNoCargados = 0 AndAlso RowsCargados > 0 Then + MensajeFinal.Append("Los productos se cargaron correctamente.

") + End If + If RowsCargados > 0 Then + MensajeFinal.Append("Se cargaron " & RowsCargados & " productos correctamente.") + End If + If RowsNoCargados > 0 Then + MensajeFinal.Append("No se pudieron cargar " & RowsNoCargados & " productos.
Los siguientes productos no se pudieron cargar: " & ProductosNoCargados.ToString()) + End If + + Alert(MensajeFinal.ToString()) + + End Try + Else + Alert("No hay seleccionada compra", TipoMensaje.MsgError) + End If + + Return True + + End Function + Protected Sub LbDescargarExcelConceptos_Click(sender As Object, e As EventArgs) DescargarFormato() End Sub @@ -5024,6 +5034,59 @@ Partial Class Inventarios_RecepcionAlmacen End Sub + + Private Sub CargaArchivoCSV(Ruta As String, FileName As String, Optional FolioFactura As String = "") + + 'Create a DataTable. + Dim dt As New DataTable() + + dt.Columns.AddRange(New DataColumn(9) {New DataColumn("CodBarra", GetType(String)), + New DataColumn("OVenta", GetType(String)), + New DataColumn("Factura", GetType(String)), + New DataColumn("FechaFac", GetType(String)), + New DataColumn("Pallet", GetType(String)), + New DataColumn("CodigoJCI", GetType(String)), + New DataColumn("Producto", GetType(String)), + New DataColumn("Serie", GetType(String)),'CodigoUnico + New DataColumn("Cantidad", GetType(Integer)), + New DataColumn("Código", GetType(String))}) + FolioFactura = FolioFactura.Replace("-", "") + + 'Read the contents of CSV file. + Dim csvData As String = File.ReadAllText(Ruta & FileName) + Dim CodigoUnico As String = "CU no escaneado" 'texto constante para determinar que no se leyó + + Dim r As Integer = 1 + 'Execute a loop over the rows. + For Each row As String In csvData.Split(ControlChars.Lf) + + If r > 2 Then ' si es la segundo renglon + If Not String.IsNullOrEmpty(row) Then + Dim i As Integer = 0 + Dim rr As String() = row.Split(","c) + + If CodigoUnico <> rr(7).Trim AndAlso (FolioFactura = "" OrElse FolioFactura = rr(2).Trim) Then + dt.Rows.Add() + dt.Rows(dt.Rows.Count - 1)("CodBarra") = rr(0).Trim + dt.Rows(dt.Rows.Count - 1)("OVenta") = rr(1).Trim + dt.Rows(dt.Rows.Count - 1)("Factura") = rr(2).Trim + dt.Rows(dt.Rows.Count - 1)("FechaFac") = rr(3).Trim + dt.Rows(dt.Rows.Count - 1)("Pallet") = rr(4).Trim + dt.Rows(dt.Rows.Count - 1)("CodigoJCI") = rr(5).Trim + dt.Rows(dt.Rows.Count - 1)("Producto") = rr(6).Trim + dt.Rows(dt.Rows.Count - 1)("Serie") = rr(7).Trim + dt.Rows(dt.Rows.Count - 1)("Cantidad") = 1 + dt.Rows(dt.Rows.Count - 1)("Código") = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Codigo", String.Format("Codigo2 = '{0}'", rr(5).Trim)) + + End If + End If + End If + r += 1 + Next + + ProcesaExcel(dt) + + End Sub #End Region Private Function GuardaDocumentoBitacora(ObjEventoBitacora As ClsOIEventos, CveMovimiento As Integer) As Boolean From fa0819dbe56446daa893167f09296da1649cf8dc Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 19 May 2022 10:08:25 -0700 Subject: [PATCH 04/48] =?UTF-8?q?--=20se=20agreg=C3=B3=20simplificaci?= =?UTF-8?q?=C3=B3n=20--=20se=20limpiaron=20codigos=20comentados?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx.vb | 145 ++-------------------------------------- 1 file changed, 7 insertions(+), 138 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index c9753e346..30969863e 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -5081,31 +5081,6 @@ Partial Class Compras_Compras Next - ''[IPP] COMENTADO A MIRAS DE ELIMINAR 21-FEBRERO-2018 - ''VERIFICA SI TIENE DESCUENTO (AMORTIZACION) - 'If TxtDescuento.Text.ToDouble > 0 Then - ' DescuentoConIVA = TxtDescuento.Text.ToDecimal * 1.16D - - ' 'Valida que el descuento con iva cuadre en los totales - ' If Math.Abs(DescuentoConIVA - (Importe - TxtTotal.Text.ToDecimal)) < 0.02 Then - ' DescuentoConIVA = Importe - TxtTotal.Text.ToDecimal - ' ElseIf DescuentoConIVA <> (Importe - TxtTotal.Text.ToDecimal) Then - ' ErrorACMEnsaje.Append(" - Valida que el descuento con iva cuadre en los totales ") - ' ErrorAC = True - ' End If - - ' 'actualizo el idcuenta del presupuesto - ' If ObjContaAC.AddMovimiento(IdPoliza, tIdContaProveedor, True, MultiplicadorNC * (Importe - DescuentoConIVA), "", ConceptoRenglon, 0, Fecha, "") Then - ' 'agrego a la cuenta contable anticipos - ' If Not ObjContaAC.AddMovimiento(IdPoliza, CtaProveedorAnticipos, True, MultiplicadorNC * DescuentoConIVA, "", ConceptoRenglon, 0, Fecha, "") Then - ' ErrorACMEnsaje.Append(" - actualizo el idcuenta del presupuesto ObjContaAC.AddMovimiento 1") - ' ErrorAC = True - ' End If - ' Else - ' ErrorACMEnsaje.Append(" - actualizo el idcuenta del presupuesto ObjContaAC.AddMovimiento 2") - ' ErrorAC = True - ' End If - 'Else 'actualizo el idcuenta del presupuesto Importe = TxtTotal.Text.ToDecimal If Not ObjContaAC.AddMovimiento(IdPoliza, tIdContaProveedor, True, MultiplicadorNC * (If(ArrAnticipos.Count > 0, ImporteAnticipo, Importe)), "", ConceptoRenglon, 0, Fecha, "") Then @@ -5505,20 +5480,12 @@ Partial Class Compras_Compras Next End If Next - End If - - If AplicarCostoIndirecto(ObjInventario, ObjCompras) Then ErrorMovInv = True End If - 'Else - ' Alert("El tipo de cambio no esta actualizado. Por favor comuniquese con un asistente SIG.", TipoMensaje.MsgError) - ' ErrorMovInv = True - 'End If - End If '*************************************************** P R I M E R A P A R T E C O M P R A S ************************************************************************************************************************************************************************************************************************************************************************************************** @@ -5661,12 +5628,6 @@ Partial Class Compras_Compras Dim CveCompraCapital As Integer = -1 Dim CveCompraInteres As Integer = -1 - 'Dim ImporteCapital As Decimal = 0 - ' Dim ImporteCapitalIVA As Decimal = 0 - - 'Dim ImporteInteres As Decimal = 0 - ' Dim ImporteInteresIVA As Decimal = 0 - ' Dim ImporteIEMensualidad As Decimal = ObjIE.DtResultados.FiltroPrimeroValor("ImporteIE", $"CveCreditoDetalle = {CveCreditoDetalleTemp}").ToDecimal CreditoEstatus = ObjIE.DtResultados.FiltroPrimeroValor("Estatus", $"CveCreditoDetalle = {CveCreditoDetalleTemp}").ToEntero @@ -5685,7 +5646,6 @@ Partial Class Compras_Compras Capital = Ambos Interes = Ambos - End If If Capital > 0 Then @@ -5695,8 +5655,6 @@ Partial Class Compras_Compras CveCompraInteres = CveCompra End If - - If (CveCompraCapital > 0 And CveCompraInteres > 0) And EstusTemp = 2 Then If EstusTemp = 2 Then EstusTemp = 3 @@ -5715,9 +5673,6 @@ Partial Class Compras_Compras ImporteInteres:=Interes) Then ErrorCredito = True End If - 'ObjIE.UpdateCreditosDetalle(CveCreditoDetalle, "01/01/2000".ToDate, -1, -1, -1, -1, -1, -1, Estatus) - - Else ErrorCredito = True @@ -5756,8 +5711,6 @@ Partial Class Compras_Compras IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeIVA).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero End If - - '********************** Variables '********************** '****** Pagos @@ -5864,8 +5817,6 @@ Partial Class Compras_Compras Dim importeRetISRxAcreditar As Decimal = 0 importeRetISRxAcreditar = TxtRetISR.Text.ToDecimal - - '****** Movimientos Independientes 'Pago Proveedores (17) @@ -6276,17 +6227,6 @@ Partial Class Compras_Compras End If End If - - 'Codigo anterior - 'If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then - ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero - ''End If - - 'If DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then - ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero - 'End If - - 'Agregamos el Opuesto del 22 -> 15 If importeMovimiento <> 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ConceptoContableContra, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then @@ -6414,34 +6354,8 @@ Partial Class Compras_Compras End If End If - 'Case 244 'RetISR Acreditable Terceros y Arrendamiento - ' If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then - ' If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then - ' importeMovimiento = importeRetISRAcreditable - ' importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador - ' If CtaProveedorRetISR > 0 Then - ' IdCtaContable = CtaProveedorRetISR - ' ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then - ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero - ' Else - ' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjConta.DtResultados.Rows.Count > 0 Then - ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero - ' End If - ' End If - ' End If - ' 'Agregamos el Opuesto del 244 -> 243 - ' If importeMovimiento <> 0 Then - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 243, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then - ' ErrorPrepoliza = True - ' End If - ' End If - ' If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" - ' End If - ' End If Case 64 'Ganancia - CveSubProyectoInsertar = CveSubProyecto If CveSubProyectoInsertar <= 0 Then ErrorPrepoliza = True @@ -6482,30 +6396,7 @@ Partial Class Compras_Compras Else importeMovimiento = 0 End If - 'Case 285 'Ret IVA 6% Servicios - ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero - - ' 'If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then - ' ' If ObjConta.DtResultados.Rows.Count > 0 Then - ' ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - ' ' End If - ' 'End If - - - ' If DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then - - ' If CveMoneda = 2 Then - ' importeMN = TxtRetIVA.Text.ToDecimal * TxtTC.Text.ToDecimal - ' Else - ' importeMN = TxtRetIVA.Text.ToDecimal - ' importeMovimiento = TxtRetIVA.Text.ToDecimal - - ' End If - - ' Else - ' importeMovimiento = 0 - ' End If Case 6 'Compra Dim AgregaMercanciaInventario As Boolean = UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 140, 145, 141, 152, 153, 154, 158, 159, 160, 161, 162, 163) AndAlso UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" @@ -6916,8 +6807,6 @@ Partial Class Compras_Compras End If Next - - 'la diferencia se va aplicar sobre los 'Dim diferenciaTransito As Decimal = ImporteTransito - importeMN.RoundSQL @@ -6967,12 +6856,9 @@ Partial Class Compras_Compras End If End If - - End If End If - If UsuarioActual.CveEmpresa.Contiene(119) Then Dim ContienePSNeteoBonif As Boolean = False For Each Dr As DataRow In TmpDT.Rows @@ -7150,15 +7036,11 @@ Partial Class Compras_Compras End If - - End If - Next End If End If - 'LIMPIA importeMovimiento = 0 IdCtaContable = 0 @@ -7199,12 +7081,6 @@ Partial Class Compras_Compras End If End If - 'If CveCompraRefacturacion > 0 Then - ' importeMovimiento = 0 - ' importeMN = 0 - ' End If - - Case 59 'Documentos importeMovimiento = importeCreditos importeMN = importeMovimiento * tipoCambioActual * Multiplicador @@ -7356,8 +7232,6 @@ Partial Class Compras_Compras End If End If - - 'ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaTemp) End If Next @@ -7707,12 +7581,8 @@ Partial Class Compras_Compras End If End If End If - - End If - - '** PRUEBA CUANDO SE AMORTIZA NC ANTES DE QUE SE REGISTRE NO DEBE TENER CONCEPTO 19 ** JM 01/06/2017 SE HIZO ESTO PARA LA FACTURA HRFA-8012831 DE VIGILANCIA '[IPP] NC NO DEBE REGISTRAR IMPUESTOS EN AMORTIZACIÓN 27/Agosto/2018 Dim tConceptoContable As Integer @@ -8418,8 +8288,6 @@ Partial Class Compras_Compras End If - - 'VALIDAR ERRORES If ErrorAC OrElse ErrorPrepoliza OrElse ErrorPrepolizaDescuadre OrElse ErrorDetalles OrElse ErrorMovDev OrElse ErrorMovtosCxP OrElse ErrorMovtosRetIVA OrElse ErrorMovtosRetISR OrElse ErrorMovtosEstimaciones OrElse ErrorMovtosIE OrElse ErrorMovtosIVA OrElse ErrorMovInv OrElse TieneError OrElse ErrorAF OrElse ErrorOC OrElse ErrorBitacora OrElse ErrorAddAcarreos OrElse ErrorCreditosCompra Then If ErrorDetalles Then @@ -8491,8 +8359,6 @@ Partial Class Compras_Compras MsgAccionAceptar = "location.href =""Compras.aspx""" End If - - 'CUANDO ES REEMBOLSO COMPROBACION Y CAJA CHICA If UsuarioActual.CveEmpresa.Contiene(1, 119, 141) 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 @@ -8517,8 +8383,6 @@ Partial Class Compras_Compras End If - - 'AJUSTA POLIZA If IdPoliza > 0 Then PolizaFolio = ObjContaAC.Folio @@ -8540,6 +8404,11 @@ Partial Class Compras_Compras Msg.AppendFormat($"
Recibir mercancía de entrega directa.") End If + If Not TieneError AndAlso Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then + TieneError = True + Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError) + End If + If Not TieneError Then ObjCompras.Commit() If ObjContaAC IsNot Nothing Then ObjContaAC.Commit() @@ -18897,7 +18766,7 @@ Partial Class Compras_Compras CompruebaAgregar() End If - Alert("SubProyectos cambiados correctamente", TipoMensaje.MsgInformacion) + Alert("SubProyectos cambiados correctamente", TipoMensaje.ToastInformacion) End Sub @@ -18926,7 +18795,7 @@ Partial Class Compras_Compras CompruebaAgregar() End If - Alert("Los tipos de gastos han sido cambiados correctamente", TipoMensaje.MsgInformacion) + Alert("Los tipos de gastos han sido cambiados correctamente", TipoMensaje.ToastInformacion) End Sub From c1966878241ffe03a9458694da7008d97d435161 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 19 May 2022 10:09:05 -0700 Subject: [PATCH 05/48] =?UTF-8?q?mejora=20en=20tipos=20de=20p=C3=B3liza?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/Devoluciones.aspx.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs index ad11e336e..dfbffe5c3 100644 --- a/Bancos/Devoluciones.aspx.cs +++ b/Bancos/Devoluciones.aspx.cs @@ -385,6 +385,7 @@ public partial class Bancos_Devoluciones : ClsPaginas int CveConceptoContableBanco = 30; int CveConceptoContableDevolucion = 0; int CvePlantillaPoliza = 0; + int CveTipoPoliza = 1;// tipo ingreso int CvePrePoliza = 0; int CveMoneda = get_GlobalDTBancosCuentas(-1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero()}").ToEntero(); int FolioFijo = 0; @@ -403,6 +404,7 @@ public partial class Bancos_Devoluciones : ClsPaginas CveConceptoContableDevolucion = 92; CvePlantillaPoliza = 7; TipoMovtoDevolucion = false; + CveTipoPoliza = 2; //tipo egreso break; case "2": PagueseA = DdlProveedores.SelectedText.ToString(); @@ -431,7 +433,7 @@ public partial class Bancos_Devoluciones : ClsPaginas // DATOS PREPOLIZA if ( DdlTipoTransanccion.SelectedValue == "1" && UsuarioActual.CveEmpresa != 119) FolioFijo = TxtFolio.Text.ToEntero(); - CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE Devoluciones", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), 1, TxtFechaDocumento.Text.ToDate(), TxtObservaciones.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransanccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: ObjMov.ObtenerTipoPoliza(DdlTipoTransanccion.SelectedValue, "-1", UsuarioActual.CveEmpresa)); + CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE Devoluciones", CvePlantillaPoliza, TxtImporte.Text.Trim().ToDouble(), TxtImporte.Text.Trim().ToDouble(), 1, TxtFechaDocumento.Text.ToDate(), TxtObservaciones.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo: FolioFijo, ReglaFolioPoliza: ObjComp.ObtenerReglaFolio(DdlTipoTransanccion.SelectedValue, null, UsuarioActual.CveEmpresa), CveTipoPoliza: CveTipoPoliza); if (CvePrePoliza > 0) { From a723bd8200093ef0a1c7ff5e7171b7ce4056e112 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 19 May 2022 10:09:52 -0700 Subject: [PATCH 06/48] =?UTF-8?q?--=20mejora=20en=20tipos=20de=20p=C3=B3li?= =?UTF-8?q?za=20--=20filtra=20las=20tipotransacci=C3=B3n=20activas=20--=20?= =?UTF-8?q?se=20acti=C3=B3=20ot=20gastos/ingresos=20funcionaldiad=20590?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/IE.aspx.vb | 56 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 12 deletions(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 1c2ca9a0c..e34d14c39 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -700,6 +700,13 @@ Partial Class Bancos_IE TxtImporte.Attributes.Add("onkeypress", "javascript: return false;") End If + If Request("Opcion") IsNot Nothing AndAlso Request("Opcion") = "INGPC" Then + If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then + DivOtrosIngresosEgresos.Visible = True + End If + + End If + If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSCREDITO") Then LblPagueseA.Text = "" @@ -1844,18 +1851,18 @@ Partial Class Bancos_IE Private Sub CargaTipoTransaccion(Optional Tipo As String = "") Dim dt As DataTable If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSSINFACT", "EGSCREDITO") Then - dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs'") + dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs' AND Estatus = 1") LtlTitulo.Text = "Egreso Por Comprobar" RBL.Items.Remove(RBL.Items.FindByValue("C")) ElseIf Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "DEV" Then - dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Ing'") + dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Ing' AND Estatus = 1 ") LtlTitulo.Text = If(Request("Opcion").ToString = "INGPC", "Ingreso por comprobar", "Devolución") LblPagueseA.Text = "Recibido de:" RBL.SelectedValue = "C" Anexo.Visible = True ElseIf Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "INGPC" Then - dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Ing'") + dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Ing' AND Estatus = 1") LtlTitulo.Text = If(Request("Opcion").ToString = "INGPC", "Ingreso por comprobar", "Devolución") LblPagueseA.Text = "Recibido de:" RBL.SelectedValue = "C" @@ -1865,13 +1872,13 @@ Partial Class Bancos_IE RBL.Items.Remove(RBL.Items.FindByValue("FE")) ElseIf Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "ANTC" Then - dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Ing'") + dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Ing' AND Estatus = 1 ") LtlTitulo.Text = "Anticipo de Cliente" LblPagueseA.Text = "Recibido de:" Anexo.Visible = True RBL.Items.Remove(RBL.Items.FindByValue("P")) : RBL.Items.Remove(RBL.Items.FindByValue("FE")) : RBL.Items.Remove(RBL.Items.FindByValue("DD")) : RBL.Items.Remove(RBL.Items.FindByValue("AC")) : RBL.Items.Remove(RBL.Items.FindByValue("DP")) ElseIf Opcion = "DevDinV" Then ' DEVOLUCION DINERO NC-VENTAS - dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs'") + dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs' AND Estatus = 1 ") LtlTitulo.Text = "Devolución dinero" RBL.SelectedValue = "C" RBL.Enabled = False @@ -1879,20 +1886,17 @@ Partial Class Bancos_IE dt = GlobalDTTipoTransacciones End If - - If Opcion = "DevDinC" AndAlso Request("P") IsNot Nothing AndAlso Request("P").Length > 0 Or Opcion = "DevDinC" AndAlso Masivonotas Then - DdlTipoTransaccion.DataSource = dt.FiltraParametros("Tipo = 'Ing' ") + DdlTipoTransaccion.DataSource = dt.FiltraParametros("Tipo = 'Ing' AND Estatus = 1 ") Else DdlTipoTransaccion.DataSource = dt End If If Tipo.Length > 0 Then DdlTipoTransaccion.Items.Clear() - DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros($"Tipo = '{Tipo}' AND EstatusTexto = 'Activo' ") + DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros($"Tipo = '{Tipo}' AND Estatus = 1 ") End If - DdlTipoTransaccion.DataBind() DdlTipoTransaccion.Items.Insert(0, New ListItem("Seleccione Tipo Movimiento", "-1")) RBL_SelectedIndexChanged(RBL, Nothing) @@ -2584,6 +2588,7 @@ Partial Class Bancos_IE Dim CveConceptoContable As Integer = 30 Dim CveConceptoCompra As Integer = 10 Dim CveCreditoDetalle As Integer = -1 + Dim tCveTipoPoliza As Integer = 2 Dim CIF As Decimal = 0 Dim CvePlantillaPoliza As Integer = 3 Dim CvePrePoliza As Integer = 0 @@ -2667,9 +2672,11 @@ Partial Class Bancos_IE CvePlantillaPoliza = 92 End If + Dim AgregaPolizaSaldoInicial As Boolean = False 'Cuando es Egreso sin factura, se registra una compra tipo anticipo If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "EGSSINFACT" Then + tCveTipoPoliza = 2 Select Case RBL.SelectedValue Case "P" 'Proveedores If CveProveedor > 0 Then @@ -2710,6 +2717,7 @@ Partial Class Bancos_IE If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "INGPC" Then HdnProvPorIVA.Value = "0" CvePlantillaPoliza = 6 + tCveTipoPoliza = 1 Select Case RBL.SelectedValue Case "DD" ' Deudores Diversos If CveProveedor > 0 Then @@ -2792,7 +2800,7 @@ Partial Class Bancos_IE End If If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa <> 119 Then FolioFijo = ObjIE.Folio.ToEntero 'cheque - CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE " + If(Request("Opcion") IsNot Nothing, Request("Opcion").ToString, "") + " " + RBL.SelectedValue, CvePlantillaPoliza, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, tCveMoneda, TxtFechaDocumento.Text.ToDate, PagueseA, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa)) + CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE " + If(Request("Opcion") IsNot Nothing, Request("Opcion").ToString, "") + " " + RBL.SelectedValue, CvePlantillaPoliza, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, tCveMoneda, TxtFechaDocumento.Text.ToDate, PagueseA, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=tCveTipoPoliza) 'valida prepoliza If CvePrePoliza > 0 Then @@ -2873,6 +2881,30 @@ Partial Class Bancos_IE Dim importeMX As Decimal Dim Multiplicador As Integer + Dim tCveSubProyecto As Integer = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveSubProyecto).FiltroPrimeroValor("CveSubProyecto").ToEntero + + 'OTROS INGRESOS/EGRESOS + Dim TCC As Decimal = 1 + If TxtTipoCambio.Text.Trim.ToDecimal > 0 Then TCC = TxtTipoCambio.Text.Trim.ToDecimal + + Dim ImporteOtros As Decimal = TxtOtrosIngresosEgresos.Text.ToDecimal * TCC + If ImporteOtros <> 0 Then + Dim TipoMovtoIE As Boolean = False + Dim CveConcIE As Integer = 78 + If ImporteOtros > 0 Then + TipoMovtoIE = True : ImporteOtros = Math.Abs(ImporteOtros) + CveConcIE = 78 + Else + TipoMovtoIE = False : ImporteOtros = Math.Abs(ImporteOtros) + CveConcIE = 211 + End If + + Dim OtConcepto As String = PagueseA & " $" & TxtOtrosIngresosEgresos.Text.ToDecimal.FormatoNumero + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, ImporteOtros, PagueseA, CveConcIE, OtConcepto, Now, -1, -1, CveIE, CveCliente:=CveCliente, ImporteMX:=ImporteOtros, CveSubProyecto:=tCveSubProyecto, ImporteME:=0) Then + MsgError = "Ocurrió un error al registrar el asiento de pago de devolución" + Exit Select + End If + End If If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then @@ -2929,7 +2961,7 @@ Partial Class Bancos_IE Case 66 If RBL.SelectedValue = "C" AndAlso CveCliente > 0 Then - importeMovimiento = TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal + importeMovimiento = TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal - TxtOtrosIngresosEgresos.Text.ToDecimal importeMX = importeMovimiento 'Agregamos el IVA From 7db78e9719c4649c7a458e728b5449a2a0a03f8e Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 19 May 2022 10:10:21 -0700 Subject: [PATCH 07/48] =?UTF-8?q?--=20c=C3=B3digo=20temporal,=20para=20que?= =?UTF-8?q?=20permita=20m=C3=A1s=20de=204=20meses=20hacia=20atr=C3=A1s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/ProveedoresAbonar.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 387ed4951..cdd2e3557 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -333,7 +333,7 @@ Partial Class Bancos_ProveedoresAbonar If UsuarioActual.TienePermisoProceso(98) Then PermiteModificarImporte = False End If - Calendario.StartDate = Now.AddMonths(-4) + Calendario.StartDate = Now.AddMonths(-8) 'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes If UsuarioActual.TienePermisoProceso(105) Then Calendario.StartDate = Now From 136bd3f75fe9373dfde9d8ca63ecd3f15cd7c478 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 19 May 2022 10:10:57 -0700 Subject: [PATCH 08/48] que redondee siempre a 2 decimales, importe --- App_Code/ClsContabilidad.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 7c08d813d..254a7c886 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -939,7 +939,7 @@ Public Class ClsContabilidad .Add("@CvePrePolizaOriginal", SqlDbType.Int).Value = CvePrePolizaOriginal .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable .Add("@TipoMovto", SqlDbType.Bit).Value = TipoMovimiento - .Add("@Importe", SqlDbType.Money).Value = If(CveConceptoContable = 30, Importe, Math.Round(Importe, 2)) + .Add("@Importe", SqlDbType.Money).Value = Math.Round(Importe, 2) .Add("@ImporteMX", SqlDbType.Money).Value = Math.Round(ImporteMX, 2) .Add("@ImporteME", SqlDbType.Money).Value = Math.Round(ImporteME, 3) .Add("@TC", SqlDbType.Decimal).Value = TipoCambio From db7e11cfd289727cf4e99cb4665dd45d310f2f6b Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 19 May 2022 10:11:36 -0700 Subject: [PATCH 09/48] =?UTF-8?q?se=20coment=C3=B3=20que=20no=20se=20autog?= =?UTF-8?q?enere=20la=20Entrega?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/RepEntregaAlmacenRuta.aspx.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Inventarios/RepEntregaAlmacenRuta.aspx.cs b/Inventarios/RepEntregaAlmacenRuta.aspx.cs index a58cccd61..229e939f5 100644 --- a/Inventarios/RepEntregaAlmacenRuta.aspx.cs +++ b/Inventarios/RepEntregaAlmacenRuta.aspx.cs @@ -537,11 +537,11 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas { CveTimbre = ObjGenerales.AddGralTimbre("Tra", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: true); } - //regenero el timbre - if (TimbreTipoDocto == "Ent") - { - CveTimbre = ObjGenerales.AddGralTimbre("Ent", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: true); - } + ////regenero el timbre + //if (TimbreTipoDocto == "Ent") + //{ + // CveTimbre = ObjGenerales.AddGralTimbre("Ent", CveSubProyecto, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen: CveEntregaAlmacen, AplicaCP: true); + //} ProcesoOK = true; } } From 3567d81dfd7a960b03aef5dbad174f212ba83f48 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 19 May 2022 10:12:20 -0700 Subject: [PATCH 10/48] =?UTF-8?q?--=20mejora=20en=20mandar=20llamar=20cone?= =?UTF-8?q?xi=C3=B3n=20a=20contpaq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 302d66ca7..fcff19b3c 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -8808,7 +8808,7 @@ Partial Class Ventas 'CONTABILIDAD AUTOMATICA Y AC - If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then + If UsuarioActual.Empresa.UsaAC AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa) ObjContPaq.IniciaTransacSQL() End If From 958be2204c1a49d6f99c2825391cfa54aca7082a Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 19 May 2022 10:20:24 -0700 Subject: [PATCH 11/48] =?UTF-8?q?--=20consideraci=C3=B3n=20para=20conta=20?= =?UTF-8?q?contpaq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/Modelos.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 7a6893c9d..6a540ade6 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -759,7 +759,7 @@ Namespace Modelos If ObjContPaqTransac IsNot Nothing Then ObjContPaq = ObjContPaqTransac Else - If UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1" Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1") Then ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa) End If End If @@ -5095,7 +5095,7 @@ Namespace Modelos Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL()) Dim ObjAC As ClsContPAQi = Nothing - If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200) = "1" Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.Funcionalidad(200) = "1") Then ObjAC = New ClsContPAQi(UsuarioActual.Empresa) : ObjAC.IniciaTransacSQL() End If From f21fb602bfecf5b23228213eaf7068e0d6c47add Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 19 May 2022 10:21:29 -0700 Subject: [PATCH 12/48] -- mejora en manejo de conta contpaq --- OC/OC.aspx.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index ea04c720e..ee136e7bb 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -2549,7 +2549,8 @@ Partial Class OC Dim ObjConta As New ClsContabilidad(OC.IniciaTransacSQL()) Dim ObjVentas As New ClsVentas(OC.IniciaTransacSQL()) Dim Conta As ClsContPAQi = Nothing - If (UsuarioActual.Empresa.UsaAC AndAlso VerificaPresupuesto) Or UsuarioActual.Empresa.Funcionalidad(200) = "1" Then + + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ((UsuarioActual.Empresa.UsaAC AndAlso VerificaPresupuesto) Or UsuarioActual.Empresa.Funcionalidad(200) = "1") Then Conta = New ClsContPAQi(UsuarioActual.Empresa) Conta.IniciaTransacSQL() End If From cc40fb3f4b50857073907984635ad6dc2e33bde5 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 19 May 2022 16:57:38 -0700 Subject: [PATCH 13/48] =?UTF-8?q?--=20mejora=20conexi=C3=B3n=20contpaqi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inicio.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb index c7073fe77..644f1ede8 100644 --- a/Inicio.aspx.vb +++ b/Inicio.aspx.vb @@ -156,7 +156,7 @@ Partial Class Inicio LtlTitulo.Text = "Sistema Integral de Información Gluyas" End If - If UsuarioActual.Empresa.UsaContabilidad Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaContabilidad Then Dim ObjPolizas As New ClsContPAQi(UsuarioActual.Empresa) If ObjPolizas.GetPolizasCuadre() And ObjPolizas.DtResultados.Rows.Count > 0 Then Dim ObjNotificacion = ItemNotificaciones(String.Format("Polizas de cuadre {0}", ObjPolizas.DtResultados.Rows.Count), Ico:="icon-calculator", Tipo:="warning", Link:="/Contabilidad/RepPolizasCuadre.aspx") From bff141f556c05ecc91d8776a1461fc3a7289d487 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Fri, 20 May 2022 06:49:30 -0700 Subject: [PATCH 14/48] --- App_Code/ClsNominas.vb | 4 +- Ashx/SIGWeb.ashx | 3 +- Compras/Compras.aspx.vb | 16 +- Compras/PopUpVerFactura.aspx.vb | 25 +- GPS/EmbarqueManifiesto2.rdlc | 7902 +++++++++++++++++++++++++++++++ SAT/SolicitudesNominaSat.aspx | 1 + vwd.webinfo | 2 + 7 files changed, 7937 insertions(+), 16 deletions(-) create mode 100644 GPS/EmbarqueManifiesto2.rdlc diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 6eb54e465..b20d213f2 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -3139,7 +3139,7 @@ Public Class ClsNominas Return retorno End Function - Public Function PA_AGRO_Embarque_ManifiestoGet(cveSubproyecto As Int32, cveUsuario As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32) As Boolean + Public Function EmbarqueManifiestoGet(cveSubproyecto As Int32, cveUsuario As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32) As Boolean Dim retorno As Boolean = False DataAdapter("PA_AGRO_Embarque_ManifiestoGet", CommandType.StoredProcedure) addParameters("@CveSubproyecto", SqlDbType.Int, cveSubproyecto) @@ -3150,7 +3150,7 @@ Public Class ClsNominas Return retorno End Function - Public Function PA_Agro_Embarque_PalletGet(cvePallet As Int32, cveCultivo As Int32, cveCultivoVariedad As Int32, cveEnvase As Int32, cveEtiqueta As Int32, cveEtiquetasporTarima As Int32, cveFormatoImpresion As Int32, cveTamaño As Int32, cveTipoTarima As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32, cveTemporada As Int32, Optional agrupado As Boolean = False) As Boolean + Public Function EmbarquePalletGet(cvePallet As Int32, cveCultivo As Int32, cveCultivoVariedad As Int32, cveEnvase As Int32, cveEtiqueta As Int32, cveEtiquetasporTarima As Int32, cveFormatoImpresion As Int32, cveTamaño As Int32, cveTipoTarima As Int32, cveEmpresa As Int32, cveEmbarqueManifiesto As Int32, cveTemporada As Int32, Optional agrupado As Boolean = False) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Agro_Embarque_PalletGet", CommandType.StoredProcedure) addParameters("@CvePallet", SqlDbType.Int, cvePallet) diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 6a595d10c..c5ba7c563 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -1527,8 +1527,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Dim xmlarchivos As System.Xml.Linq.XDocument = New System.Xml.Linq.XDocument() Dim xfolder As XElement = New XElement("folder") For Each urfile In System.IO.Directory.GetFiles(directorio) - Dim xfile As New XElement("archivo", urfile) + Dim xfile As New XElement("archivo", "") xfile.SetAttributeValue("EXT", Path.GetExtension(urfile)) + xfile.SetAttributeValue("urlfile", urfile) xfolder.Add(xfile) Next diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index c9753e346..75c065a2f 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1290,7 +1290,13 @@ Partial Class Compras_Compras If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then DVCultivosCuadro.Visible = True DdlSubProyecto.AutoPostBack = True - DdlCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyecto.SelectedValue}") + + GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa) = Nothing + Dim extrafiltro = "Estatus=1 AND " + If Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then + extrafiltro = "" + End If + DdlCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"{extrafiltro} CveSubProyecto = {DdlSubProyecto.SelectedValue}") DdlCultivosCuadro.DataBind() DdlCultivosCuadro.Items.Insert(0, New ListItem("Seleccione uno", "-1")) @@ -18057,9 +18063,13 @@ Partial Class Compras_Compras End If If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then - + GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa) = Nothing + Dim extrafiltro = "Estatus=1 AND " + If Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then + extrafiltro = "" + End If DdlCultivosCuadro.Items.Clear() - DdlCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($" CveSubProyecto = {DdlSubProyecto.SelectedValue}") + DdlCultivosCuadro.DataSource = GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa).FiltraParametros($"{extrafiltro} CveSubProyecto = {DdlSubProyecto.SelectedValue}") DdlCultivosCuadro.DataBind() DdlCultivosCuadro.Items.Insert(0, New ListItem("Seleccione uno", "-1")) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 96ccb4953..3f6642efb 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -258,7 +258,7 @@ Partial Class PopUpVerFactura 'noPallet = "000001" 'Variedad = "Golden" Using objnom As New ClsNominas - If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then + If objnom.EmbarqueManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then Dim row As DataRow = objnom.DtResultados.Rows(0) NoEmbarque = row("NoEmbarque").ToString() Cliente = row("Cliente").ToString() @@ -293,12 +293,13 @@ Partial Class PopUpVerFactura 'End If - If objnom.PA_Agro_Embarque_PalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1, True) And objnom.DtResultados.Rows.Count > 0 Then + If objnom.EmbarquePalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1, True) And objnom.DtResultados.Rows.Count > 0 Then NoPallets = objnom.DtResultados.SUM("NoPallets").ToString() NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2") NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0") tablaReporte = objnom.DtResultados + End If End If 'Remolque 1 12-TF-5E' }, { cveCamion: 2, placa: 'Remolque 2 15-TF-7f @@ -308,7 +309,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Cliente", Cliente)) params.Add(New ReportParameter("Direccion", Direccion)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("SubProyecto", SubProyecto)) + params.Add(New ReportParameter("SubProyecto", SubProyecto.ToUpper())) params.Add(New ReportParameter("AgenciaAduanalUSA", AgenciaAduanalUSA)) params.Add(New ReportParameter("AgenciaAduanalMEX", AgenciaAduanalMEX)) params.Add(New ReportParameter("Temperatura", Temperatura)) @@ -345,7 +346,11 @@ Partial Class PopUpVerFactura lrds.Add(rds) '"Empresas/Grales/Formatos/EquiposGPS.rdlc" '"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc" - ImprimirPDF("GPS/EmbarqueManifiesto.rdlc", lrds, params, "Manifesto", Content_Disposition:="Inline") + Dim rutardlc = "GPS/EmbarqueManifiesto.rdlc" + If Not IsNothing(tablaReporte.FiltroPrimero("TipoManifiesto=1")) Then + rutardlc = "GPS/EmbarqueManifiesto2.rdlc" + End If + ImprimirPDF(rutardlc, lrds, params, "Manifesto", Content_Disposition:="Inline") End Sub Private Sub imprimirManifiestoRemision(cveEmbarqueManifiesto As Integer) @@ -394,7 +399,7 @@ Partial Class PopUpVerFactura 'noPallet = "000001" 'Variedad = "Golden" Using objnom As New ClsNominas - If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then + If objnom.EmbarqueManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then Dim row As DataRow = objnom.DtResultados.Rows(0) NoEmbarque = row("NoEmbarque").ToString() Cliente = row("Cliente").ToString() @@ -440,7 +445,7 @@ Partial Class PopUpVerFactura 'End If - If objnom.PA_Agro_Embarque_PalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then + If objnom.EmbarquePalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then NoPallets = objnom.DtResultados.Rows.Count.ToString() NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2") NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0") @@ -549,7 +554,7 @@ Partial Class PopUpVerFactura 'noPallet = "000001" 'Variedad = "Golden" Using objnom As New ClsNominas - If objnom.PA_AGRO_Embarque_ManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then + If objnom.EmbarqueManifiestoGet(-1, -1, -1, cveEmbarqueManifiesto) And objnom.DtResultados.Rows.Count > 0 Then Dim row As DataRow = objnom.DtResultados.Rows(0) NoEmbarque = row("NoEmbarque").ToString() Cliente = row("Cliente").ToString() @@ -595,7 +600,7 @@ Partial Class PopUpVerFactura 'End If - If objnom.PA_Agro_Embarque_PalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then + If objnom.EmbarquePalletGet(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, cveEmbarqueManifiesto, -1) And objnom.DtResultados.Rows.Count > 0 Then NoPallets = objnom.DtResultados.Rows.Count.ToString() NoKgManifiesto = objnom.DtResultados.SUM("Peso").ToString("N2") NoBultos = objnom.DtResultados.SUM("NoCajas").ToString("N0") @@ -686,7 +691,7 @@ Partial Class PopUpVerFactura 'noPallet = "000001" 'Variedad = "Golden" Using objnom As New ClsNominas - If objnom.PA_Agro_Embarque_PalletGet(cvePallet, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1) And objnom.DtResultados.Rows.Count > 0 Then + If objnom.EmbarquePalletGet(cvePallet, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1) And objnom.DtResultados.Rows.Count > 0 Then Dim row As DataRow = objnom.DtResultados.Rows(0) Envase = row("Envase").ToString() Tamano = row("Tamaño").ToString() @@ -756,7 +761,7 @@ Partial Class PopUpVerFactura 'Cultivo = "Tomate" 'noPallet = "000001" Using objnom As New ClsNominas - If objnom.PA_Agro_Embarque_PalletGet(cvePallet, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1) And objnom.DtResultados.Rows.Count > 0 Then + If objnom.EmbarquePalletGet(cvePallet, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1) And objnom.DtResultados.Rows.Count > 0 Then Dim row As DataRow = objnom.DtResultados.Rows(0) Envase = row("Envase").ToString() Tamano = row("Tamaño").ToString() diff --git a/GPS/EmbarqueManifiesto2.rdlc b/GPS/EmbarqueManifiesto2.rdlc new file mode 100644 index 000000000..33784c191 --- /dev/null +++ b/GPS/EmbarqueManifiesto2.rdlc @@ -0,0 +1,7902 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + 74f8a171-24f1-4404-809e-ec2e098f1907 + + + + + + DataSet3 + /* Local Query */ + + + + NoPallets + System.Int + + + NoCajas + System.Int + + + Peso + System.Decimal + + + Etiqueta + System.String + + + Envase + System.String + + + Cultivo + System.String + + + Manifiesto + System.String + + + CultivoVariedad + System.String + + + + DataSet3 + C:\Users\jesus\Documents\Visual Studio 2015\WebSites\WebSite2\App_Code\DataSet3.xsd + DataTable1 + + + + + + + + + + + + + + + 2.59615cm + + + 2.45032cm + + + 2.13282cm + + + 2.37094cm + + + + + 0.6cm + + + + + true + true + + + + + FARMER PACKER CAMPO + + + + Textbox11 + + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + 0.6cm + + + + + true + true + + + + + Manifiesto N° + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!NoEmbarque.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Empaque + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Fecha Embarque: + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + Hora Salida: + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + =Parameters!Fecha.Value + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + =Parameters!Hora.Value + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + F. F. Registration N° + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + <USDA REGISTRATION> + + + + + + + Textbox25 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + 0.3175cm + 9.78675cm + 3cm + 9.55022cm + + + + + + Embedded + logojam + FitProportional + 0.20354cm + 0.19717cm + 2.79646cm + 4.89479cm + 1 + + + + + + + + + 1.97083cm + + + 4.15334cm + + + 0.38333cm + + + 2.68521cm + + + 5.07938cm + + + + + 0.6cm + + + + + true + true + + + + + =Parameters!NoBultos.Value + + + + + + + Textbox4 + + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Bultos Manifestados + + + + + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!NoKgManifiesto.Value + + + + + + + Textbox8 + + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Kgs. Manifestados + + + + + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38833cm + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Parameters!NoPallets.Value + + + + + + + Textbox6 + + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Pallets Manifestados + + + + + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + 19.44425cm + 3.27925cm + 1.58833cm + 14.27209cm + 2 + + + + + + + + + 2.60646cm + + + 2.39354cm + + + 2.07667cm + + + 2.07667cm + + + 0.38333cm + + + 2.92334cm + + + 1.97084cm + + + 2.31479cm + + + 2.34125cm + + + + + 0.6cm + + + + + true + true + + + + + ORIGEN / SHIPPER + + + + + + + Textbox264 + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + DESTINO / CONSIGNE + + + + + + + Textbox269 + + 1.5pt + + + Black + + 1.5pt + + + Black + + 1.5pt + + + Black + + 1.5pt + + + Black + + 1.5pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + 0.6cm + + + + + true + true + + + + + Embarcador: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + AGROPECUARIA JAM, S.A. DE C.V. + + + + + + + Textbox256 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Distribuidor: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Cliente.Value + + + + + + + Textbox261 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.6cm + + + + + true + true + + + + + Direccion: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CARR. A BAHIA DE KINO KM12 + + + + + + + Textbox247 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Domic.: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Direccion.Value + + + + + + + Textbox252 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.6cm + + + + + true + true + + + + + Ciudad: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + HERMOSILLO, SONORA + + + + + + + Textbox238 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Lugar: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox243 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.6cm + + + + + true + true + + + + + Reg. Fed. Con.: + + + + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + AJA9809264V2 + + + + + + + Textbox229 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Reg. Fed. Con.: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox234 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Mercado: + + + + + + + Textbox55 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Mercado.Value + + + + + + + Textbox60 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.30896cm + + + + + true + true + + + + + + + + + + + + Textbox177 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox178 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox179 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox180 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox182 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox183 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox184 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox217 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TRANSPORTE / TRANSPORTATION + + + + + + + Textbox132 + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 9 + + + + + + + + + + + + + + 0.6cm + + + + + true + true + + + + + Linea de Trans: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!LineaTransportacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Reg. Fed. Con.: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.6cm + + + + + true + true + + + + + Chofer: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Chofer.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + N° de Factura: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!NoFactura.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Medio: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Trailer + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!NumeroTrailer.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Temperatura: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Temperatura.Value + + + + °F + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + N° Placa Camion: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!CamPlaca.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Marca: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Camion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + N° de Caja: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Remolque1.Value + + + + + + + Textbox9 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Placa Caja: + + + + + + + Textbox158 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Rem1Placa.Value + + + + + + + Textbox10 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + SCAC: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!SCAC.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Longitud Caja: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!LongitudCaja.Value + + + + + + + Textbox163 + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + + + + + + + + Textbox223 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + CAAT: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!CAAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + N° Sello CTPAT + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox191 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.6cm + + + + + true + true + + + + + Anticipo Flete: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Flete: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0.00 + + + + + + + Textbox196 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Sellos de Seguridad: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox199 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.6cm + + + + + true + true + + + + + Observaciones: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + FARMER PACKER + + + + =Parameters!SubProyecto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox207 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox208 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox226 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + GGN: + + + + + + + Textbox209 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Permiso.Value + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox215 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox216 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox227 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.2825cm + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + AGENCIA ADUANAL MEXICANA / MEXICAN CUSTOM + + + + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + AGENCIA ADUANAL AMERICANA / U.S. CUSTOM + + + + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + 0.6cm + + + + + true + true + + + + + A. Ad. Mexico + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!AgenciaAduanalMEX.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + A. Ad. Mexico + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!AgenciaAduanalUSA.Value + + + + + + + Textbox370 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.6cm + + + + + true + true + + + + + Reg. Fed. Con.: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Reg. Fed. Con.: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox379 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox380 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox381 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Domicilio: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Domicilio: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox388 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox389 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox390 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Lugar: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Lugar: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox397 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox398 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox399 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Cod. Postal: + + + + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + + + + + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cod. Postal: + + + + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox406 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox407 + + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox408 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.36187cm + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox415 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox416 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox417 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3.49239cm + 0.25008cm + 13.55333cm + 19.08689cm + 3 + + + + + + + + + 1.73271cm + + + 1.68042cm + + + 5.85895cm + + + 3.10853cm + + + 3.16148cm + + + 3.5448cm + + + + + 0.6cm + + + + + true + true + + + + + Pallets + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Bultos + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tarima + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Etiqueta + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Envase + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + + Black + + 2pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Fields!NoPallets.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!NoCajas.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Manifiesto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Etiqueta.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Envase.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Campo + + + + =Parameters!SubProyecto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + After + + + + + + Before + + + + DataSet1 + 17.30058cm + 0.25008cm + 1.8cm + 19.08689cm + 4 + + + + + + 8.28054in + - - - - - - - - Camelia, #346, Col.:Luis Encinas, - - - - - - - - - C.P. 83138 Hermosillo - - - - - - - - - + R.F.C ENO970305TL4 + + true + true + + + + + Nombre: + + + + + + + + + + + + + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + true @@ -4792,11 +4833,11 @@ Textbox19 - 1.37495in - 5.662in - 0.23161in - 2.24597in - 16 + 1.38745in + 5.61883in + 0.2092in + 2.26391in + 18 - 22.89117cm + 23.58967cm + + VERSION 3.3 + + - ="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) + ="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) HTML @@ -2939,10 +2945,10 @@ Textbox90 - 1.88947cm - 6.75122cm - 0.82021cm - 5.51336cm + 1.77125cm + 7.90108cm + 0.78cm + 4.3635cm 31 - - true - true - true - - - - - < ** 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 - - Database =System.Convert.FromBase64String(Parameters!QRDescarga.Value) image/png FitProportional - 9.9935in + 9.3435in 6.67743in 0.6035in 0.78275in - 35 + 34 @@ -3130,11 +3098,11 @@ Textbox60 - 24.4593cm + 22.8083cm 0.28014cm 1.49135cm 5.37042cm - 36 + 35 @@ -3160,11 +3128,11 @@ Textbox5 - 20.69665cm + 19.7759cm 0.14007cm 0.05496cm 20.88652cm - 37 + 36 @@ -3191,11 +3159,11 @@ Textbox5 - 27.44203cm + 25.69578cm 0.28014cm 0.05496cm 20.88652cm - 38 + 37 @@ -3285,11 +3253,11 @@ Textbox60 - 24.4593cm + 22.8083cm 7.45145cm 2.45709cm 6.56105cm - 39 + 38 @@ -3324,11 +3292,11 @@ Textbox60 - 24.44952cm + 22.79852cm 14.67145cm 1.46939cm 6.32076cm - 40 + 39 @@ -3363,11 +3331,11 @@ Textbox15 - 8.42892cm + 7.98442cm 1.15361cm 1.05791cm 19.15078cm - 41 + 40 =IIF((Sum(IIF(Fields!CveClasificacion.Value = 20345,1,0), "DsOC") > 0),false,true) @@ -3832,11 +3800,11 @@ true - 20.92547cm + 19.97297cm 0.13424cm 2.25247cm 20.89818cm - 42 + 41 =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) @@ -3853,15 +3821,27 @@ - Acepto ajuste + Acepto ajuste - _______________________ + ____________________ + + + + - + true + true true - VERSION 3.3 + < ** Toda corrección de los datos del comprobante debera efectuarse a más tardar tres dias despues de su expedición. ** > @@ -3925,12 +3908,12 @@ - Textbox5 - 23.28377cm - 17.70088cm - 0.6cm - 3.32021cm - 45 + Textbox4 + 9.73684cm + 0.20617cm + 0.44183cm + 20.83436cm + 44 @@ -3942,7 +3925,7 @@ - 27.49699cm + 25.75074cm @@ -1349,7 +1349,7 @@ - Productos que sobran + Productos que faltan @@ -3033,8 +3033,8 @@ =Parameters!LogoPath.Value FitProportional 0.12943cm - 2.25453cm - 4.18606cm + 2.25804cm + 3.29186cm 4 - =Parameters!NombreEmpresa.Value - Textbox1 - 4.49188cm + 3.53938cm 0.6cm - 13.51378cm + 17.07793cm 5 @@ -3104,7 +3099,7 @@ @@ -3116,9 +3111,9 @@ Textbox2 0.90456cm - 4.55144cm + 3.59894cm 0.66174cm - 11.39711cm + 17.01837cm 6 + true @@ -3387,6 +3388,10 @@ SerieLote System.String + + + Serie + System.String CantidadAlmacen @@ -3436,6 +3441,10 @@ SerieLote System.String + + Serie + System.String + CantidadAlmacen System.Double From f7df6c7d0ce20b09e52b93fd88222d68852b3cdd Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 25 May 2022 20:46:04 -0700 Subject: [PATCH 38/48] =?UTF-8?q?--=20actualizaci=C3=B3n=20e=20reteciones?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsCompras.vb | 43 +++++----- Compras/Compras.aspx.vb | 177 ++++------------------------------------ 2 files changed, 39 insertions(+), 181 deletions(-) diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 7a782d020..5750cf281 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -3302,30 +3302,31 @@ Public Class ClsCompras - Public Function GetComprasPrepolizasRetIvaRetISRActualiza(CveCompra As Integer, CveRetIVAConcepto As Integer, CveRetISRConcepto As Integer) As Boolean + 'Public Function GetComprasPrepolizasRetIvaRetISRActualiza(CveCompra As Integer, CveRetIVAConcepto As Integer, CveRetISRConcepto As Integer) As Boolean + ' Dim Retorno As Boolean = False + ' DataAdapter("PA_Comp_ComprasPrepolizasRetIvaRetISRActualizaGet") + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveCompra", SqlDbType.Int).Value = CveCompra + ' .Add("@CveRetIVAConcepto", SqlDbType.Int).Value = CveRetIVAConcepto + ' .Add("@CveRetISRConcepto", SqlDbType.Int).Value = CveRetISRConcepto + ' End With + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al Obtener los datos de retención de IVA y retención ISR.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + ' Return Retorno + 'End Function + + + Public Function UpdateComprasRetencionesUpdate(CveConceptoRetIVA As Integer, CveConceptoRetISR As Integer, CveCompra As Integer) As Boolean Dim Retorno As Boolean = False - DataAdapter("PA_Comp_ComprasPrepolizasRetIvaRetISRActualizaGet") + DataAdapter("PA_Comp_ComprasRetencionesUpdate") With SqlAdapter.SelectCommand.Parameters + .Add("@CveConceptoRetIVA", SqlDbType.Int).Value = CveConceptoRetIVA + .Add("@CveConceptoRetISR", SqlDbType.Int).Value = CveConceptoRetISR .Add("@CveCompra", SqlDbType.Int).Value = CveCompra - .Add("@CveRetIVAConcepto", SqlDbType.Int).Value = CveRetIVAConcepto - .Add("@CveRetISRConcepto", SqlDbType.Int).Value = CveRetISRConcepto - End With - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al Obtener los datos de retención de IVA y retención ISR.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - Return Retorno - End Function - - - Public Function UpdateComprasPrepolizasRetIvaRetISRActualiza(CvePrePolizaDetalle As Integer, CveConceptoContable As Integer) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Comp_ComprasPrepolizasRetIvaRetISRActualizaUpdate") - With SqlAdapter.SelectCommand.Parameters - .Add("@CvePrePolizaDetalle", SqlDbType.Int).Value = CvePrePolizaDetalle - .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable End With Try SqlAdapter.Fill(Data) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 2819d7784..00ffa0661 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -2616,8 +2616,6 @@ Partial Class Compras_Compras HFDiferenciaCompra.Value = TxtTotal.Text - - TotalGeneral = dr("Total").ToString.ToDouble CveMoneda = dr("CveMoneda").ToString.ToEntero DdlValidadaSAT.SelectedValue = "Si" @@ -5998,7 +5996,7 @@ Partial Class Compras_Compras importeMovimiento = TxtTotal.Text.ToDecimal 'TmpDT.SUM("Total", String.Format("ISNULL(TipoAF, 0) <> 2 And ISNULL(CveAlmacen, 0) = 0 And ISNULL(AplicaCostoIndirecto, 0) <> 1 And CveClasificacion = {0} And CveSubProyecto = {1} And ISNULL(CveTipoGasto, 0) = {2} Then", Row2("CveClasificacion").ToString.ToEntero, Row2("CveSubProyecto").ToString.ToEntero, Row2("CveTipoGasto").ToString.ToEntero)).ToString.ToDecimal importeMN = importeMovimiento * tipoCambioActual * Multiplicador 'CLASIFICACION - If Row2("CveClasificacion").ToString.ToEntero > 0 Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso Row2("CveClasificacion").ToString.ToEntero > 0 Then If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero @@ -6133,7 +6131,7 @@ Partial Class Compras_Compras ConceptoContable = 288 End If - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero End If @@ -6145,7 +6143,7 @@ Partial Class Compras_Compras IdCtaIva = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0) Dim ttConceptoContable As Integer = 14 - If ObjConta.GetRetCuenta(ttConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaIva > 0 Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ttConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaIva > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaIva = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero End If @@ -6171,7 +6169,7 @@ Partial Class Compras_Compras If chkImportacion.Checked Then ConceptoContable = 287 End If - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero End If @@ -6208,7 +6206,7 @@ Partial Class Compras_Compras If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" PorcentajeImpuesto = PorcentajeIVA IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0) - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero End If @@ -6221,7 +6219,7 @@ Partial Class Compras_Compras importeMovimiento = ImporteIEPSxAcreditar importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero End If @@ -10376,162 +10374,21 @@ Partial Class Compras_Compras End If + If Retorno AndAlso (CveRetIVAConceptoOriginal <> DdlRetIVAConcepto.SelectedValue.ToEntero OrElse CveRetISRConceptoOriginal <> DdlRetISRConcepto.SelectedValue.ToEntero) Then + Dim tCveConceptoIVA, tCveConceptoISR As Integer - If Retorno AndAlso (CveRetIVAConceptoOriginal <> DdlRetIVAConcepto.SelectedValue.ToEntero Or CveRetISRConceptoOriginal <> DdlRetISRConcepto.SelectedValue.ToEntero) Then - If ObjCompra.GetComprasPrepolizasRetIvaRetISRActualiza(CveCompra, CveRetIVAConceptoOriginal, CveRetISRConceptoOriginal) Then - - Dim DTPRePolizaDesbloquedo As DataTable = ObjCompra.DtResultados.FiltraParametros("", "", {"CvePrePoliza", "Bloqueado"}) - Dim DTPRePolizaDes As DataTable = ObjCompra.DtResultados - - If DTPRePolizaDesbloquedo IsNot Nothing Then - - For Each dr1 As DataRow In DTPRePolizaDesbloquedo.Rows - - If Boolean.Parse(dr1("Bloqueado").ToString) Then - - If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then - Retorno = False - End If - - End If - - - Next - - If Retorno Then - - For Each dr2 As DataRow In DTPRePolizaDes.Rows - - Dim CveConceptoContableOriginal As Integer = dr2("CveConceptoContable").ToString.ToEntero - Dim CveConceptoContableNuvo As Integer = -1 - - If dr2("Tipo").ToString = "IVA" Then - - Select Case DdlRetIVAConcepto.SelectedValue.ToEntero - Case 1 - - If CveConceptoContableOriginal.Contiene(184, 186, 249, 286) Then - CveConceptoContableNuvo = 15 - ElseIf CveConceptoContableOriginal.Contiene(183, 185, 248, 285) Then - CveConceptoContableNuvo = 22 - End If - - Exit Select - Case 2 - - If CveConceptoContableOriginal.Contiene(22, 186, 249, 286) Then - CveConceptoContableNuvo = 184 - ElseIf CveConceptoContableOriginal.Contiene(15, 185, 248, 285) Then - CveConceptoContableNuvo = 183 - End If - - Exit Select - Case 3 - - If CveConceptoContableOriginal.Contiene(22, 184, 249, 286) Then - CveConceptoContableNuvo = 186 - ElseIf CveConceptoContableOriginal.Contiene(15, 183, 248, 285) Then - CveConceptoContableNuvo = 187 - End If - - Exit Select - Case 4 - - If CveConceptoContableOriginal.Contiene(22, 184, 186, 286) Then - CveConceptoContableNuvo = 249 - ElseIf CveConceptoContableOriginal.Contiene(15, 183, 185, 285) Then - CveConceptoContableNuvo = 248 - End If - - Exit Select - Case 5 - - If CveConceptoContableOriginal.Contiene(22, 184, 186, 249) Then - CveConceptoContableNuvo = 286 - ElseIf CveConceptoContableOriginal.Contiene(15, 183, 185, 248) Then - CveConceptoContableNuvo = 285 - End If - - Exit Select - End Select - - - - End If - - If dr2("Tipo").ToString = "ISR" Then - Select Case DdlRetISRConcepto.SelectedValue.ToEntero - Case 1 - - If CveConceptoContableOriginal.Contiene(244, 328) Then - CveConceptoContableNuvo = 23 - ElseIf CveConceptoContableOriginal.Contiene(243, 327) Then - CveConceptoContableNuvo = 16 - End If - - Exit Select - Case 2 - - If CveConceptoContableOriginal.Contiene(23, 328) Then - CveConceptoContableNuvo = 244 - ElseIf CveConceptoContableOriginal.Contiene(16, 327) Then - CveConceptoContableNuvo = 243 - End If - - Exit Select - Case 3 - - If CveConceptoContableOriginal.Contiene(23, 244) Then - CveConceptoContableNuvo = 328 - ElseIf CveConceptoContableOriginal.Contiene(16, 243) Then - CveConceptoContableNuvo = 327 - End If - - Exit Select - End Select - End If - - - If Not (CveConceptoContableNuvo > 0 AndAlso ObjCompra.UpdateComprasPrepolizasRetIvaRetISRActualiza(dr2("CvePrePolizaDetalle").ToString.ToEntero, CveConceptoContableNuvo)) Then - Retorno = False - If CveConceptoContableNuvo <= 0 Then - Alert("Se presento un error al asiganar el nuevo concepto de retención", TipoMensaje.MsgAdvertencia) - End If - Exit For - End If - - - Next - - For Each dr1 As DataRow In DTPRePolizaDesbloquedo.Rows - - If Boolean.Parse(dr1("Bloqueado").ToString) Then - If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, True) Then - Retorno = False - End If - End If - - Next - - If Retorno Then - - If CveRetIVAConceptoOriginal > 0 Then - CveRetIVAConceptoOriginal = DdlRetIVAConcepto.SelectedValue.ToEntero - End If - - If CveRetISRConceptoOriginal > 0 Then - CveRetISRConceptoOriginal = DdlRetISRConcepto.SelectedValue.ToEntero - End If - - End If - End If - - Else - Retorno = False - End If + If CveRetIVAConceptoOriginal <> DdlRetIVAConcepto.SelectedValue.ToEntero Then tCveConceptoIVA = DdlRetIVAConcepto.SelectedValue.ToEntero + If CveRetISRConceptoOriginal <> DdlRetISRConcepto.SelectedValue.ToEntero Then tCveConceptoISR = DdlRetISRConcepto.SelectedValue.ToEntero + If ObjCompra.UpdateComprasRetencionesUpdate(tCveConceptoIVA, tCveConceptoISR, CveCompra) Then + If tCveConceptoIVA > 0 Then CveRetIVAConceptoOriginal = tCveConceptoIVA + If tCveConceptoISR > 0 Then CveRetISRConceptoOriginal = tCveConceptoISR + Else + Retorno = False + Alert("Se presento un error al asignar el nuevo concepto de retención", TipoMensaje.MsgAdvertencia) End If + End If From bb01dfe24147abbb60e5f82b3b74bb4a00c2c919 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 25 May 2022 20:46:18 -0700 Subject: [PATCH 39/48] personalizar, codigo barras --- Ventas/CatPS.aspx | 3 +++ Ventas/CatPS.aspx.vb | 1 + 2 files changed, 4 insertions(+) diff --git a/Ventas/CatPS.aspx b/Ventas/CatPS.aspx index 5ddf0304b..c84f3f58a 100644 --- a/Ventas/CatPS.aspx +++ b/Ventas/CatPS.aspx @@ -225,6 +225,7 @@ + @@ -301,6 +302,8 @@ + + diff --git a/Ventas/CatPS.aspx.vb b/Ventas/CatPS.aspx.vb index a4a87b343..2629abead 100644 --- a/Ventas/CatPS.aspx.vb +++ b/Ventas/CatPS.aspx.vb @@ -117,6 +117,7 @@ Partial Class CatPS GvDatos.Columns(11).Visible = ChkClasificacion2.Checked GvDatos.Columns(12).Visible = ChkMarca.Checked GvDatos.Columns(13).Visible = ChkVentaMinima.Checked + GvDatos.Columns(14).Visible = ChkCodigoBarras.Checked CargaDatos() OrdenaDatos() From cb97f9d0b7373c4ca43b2da054b0e73e5397658b Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 25 May 2022 20:46:38 -0700 Subject: [PATCH 40/48] activar clasif2 --- Ventas/ProductosServicios.aspx.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index a29a4ce98..ebebe8f8b 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -325,6 +325,7 @@ Partial Class ProductosyServicios DivPSAdicionalVigencia.Visible = True divCodigo2.Visible = True divLitraje.Visible = True + DivClasificacion2.Visible = True CargaPSAdicionalesVigencias() End If @@ -341,7 +342,7 @@ Partial Class ProductosyServicios CargaCombosSeccionAlmacen() - If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then 'emisión 4.0 + If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then 'emisión 4.0 DivObjetoImpuesto.Visible = True DdlObjetoImpuesto.DataSource = GlobalDTSATObjetosImpuestos DdlObjetoImpuesto.DataBind() From 76d972e63a5983fe54c36e5a47bd77d0f913ee1c Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 25 May 2022 20:47:07 -0700 Subject: [PATCH 41/48] -- opcion 2 en la funcionalidad 350, para no timbrar pero si ver los datos de clientes --- Ventas/Clientes.aspx.vb | 6 +++--- Ventas/PV.aspx.vb | 2 +- Ventas/Ventas.aspx.vb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 0f23a71bf..fbe2b19e6 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -753,7 +753,7 @@ Partial Class Clientes DivRetIVA.Visible = False End If - If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then + If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then divRegimen.Visible = True End If @@ -2082,7 +2082,7 @@ Partial Class Clientes End Sub Private Sub CargaComboCFDI() Dim RegimenFiscalCliente = DdlRegimenFiscal.SelectedValue.ToString() - If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then + If Not UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then RegimenFiscalCliente = "-1" End If @@ -10213,7 +10213,7 @@ Partial Class Clientes DVRegimenSociedad.Visible = False DivRazonSocial2.Attributes.Add("class", "col-md-12") - If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350) = "1" Then + If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then DivRazonSocial2.Attributes.Add("class", "col-md-8") DVRegimenSociedad.Visible = True diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index dd24d323b..a4d00d997 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -8319,7 +8319,7 @@ Partial Class PV DVRegimenSociedad.Visible = False DivRazonSocial2.Attributes.Add("class", "col-md-12") - If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350) = "1" Then + If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then DivRazonSocial2.Attributes.Add("class", "col-md-8") DVRegimenSociedad.Visible = True diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 2cc4a6b2d..47a5e569d 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -34050,7 +34050,7 @@ Partial Class Ventas DVRegimenSociedad.Visible = False DivRazonSocial2.Attributes.Add("class", "col-md-12") - If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350) = "1" Then + If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then DivRazonSocial2.Attributes.Add("class", "col-md-8") DVRegimenSociedad.Visible = True From 9806b9d506ebbde751c282528c38a82afc3520ec Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 25 May 2022 20:47:40 -0700 Subject: [PATCH 42/48] -- quitar el encode, en el rfc --- App_Code/ClsValidaCFDi.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsValidaCFDi.vb b/App_Code/ClsValidaCFDi.vb index 66d701fa5..c236c5bbb 100644 --- a/App_Code/ClsValidaCFDi.vb +++ b/App_Code/ClsValidaCFDi.vb @@ -62,8 +62,8 @@ Public Class ClsValidaCFDi Public Function Verificar(FolioFiscal As String, RFCEmisor As String, RFCReceptor As String, Optional Importe As Decimal = 0.00) As Integer Me.LFolioFiscal = HttpUtility.UrlEncode(FolioFiscal) - Me.LRFCEmisor = HttpUtility.UrlEncode(RFCEmisor) - Me.LRFCReceptor = HttpUtility.UrlEncode(RFCReceptor) + Me.LRFCEmisor = RFCEmisor + Me.LRFCReceptor = RFCReceptor Me.LImporte = Importe VerificaCFDI() From 331aa6715a2c7ff2c6291137d8b0c7955c9b755b Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 25 May 2022 21:11:45 -0700 Subject: [PATCH 43/48] Compras Anticipos retenciones, PopUp Ver facturas logos, Clspaginas Logos --- App_Code/ClsPaginas.vb | 20 +- Compras/Compras.aspx.vb | 340 ++++++++++++++++++++++++++------ Compras/PopUpVerFactura.aspx.vb | 208 ++++++------------- 3 files changed, 353 insertions(+), 215 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 6f76a4dcb..a910c4a2d 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7114,7 +7114,9 @@ Public Class ClsPaginas Else LogoRuta = String.Format("{0}Formatos\Logo.png", UsuarioActual.Empresa.Ruta) If File.Exists(LogoRuta) Then - LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + 'LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + LogoRuta = String.Format("file://{0}", LogoRuta) + End If End If @@ -8991,14 +8993,16 @@ Public Class ClsPaginas 'LOGO Dim LogoRuta As String = "" - LogoRuta = String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta) - If File.Exists(LogoRuta) Then + 'LogoRuta = String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta) - If File.Exists(LogoRuta) Then - LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - End If - 'POR EMPRESA - params.Add(New ReportParameter("LogoPath", LogoRuta)) + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + + If Imagen.Exists Then + 'If File.Exists(LogoRuta) Then + ' LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + 'End If + ''POR EMPRESA + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 2819d7784..a56876f88 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6322,6 +6322,7 @@ Partial Class Compras_Compras Case 15 'RetIVA X Acreditar Honorarios/Serv. Prof. If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero() > 0 Then + Dim Funcionalidad As Integer = 0 If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then Funcionalidad = 307 @@ -6362,6 +6363,7 @@ Partial Class Compras_Compras Case 23 'RetISR Acreditable If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero > 0 Then + Dim funcionalidad As Integer = 0 Dim ConceptoContableContra As Integer = 0 @@ -6406,6 +6408,7 @@ Partial Class Compras_Compras Case 16 'Ret ISR X Acreditar If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero > 0 Then + Dim funcionalidad As Integer = 0 If DdlRetISRConcepto.SelectedValue.ToEntero = 1 Then funcionalidad = 315 @@ -6432,6 +6435,7 @@ Partial Class Compras_Compras End If End If End If + End If End If @@ -8810,6 +8814,8 @@ Partial Class Compras_Compras Private Sub GuardaAnticipos(ByRef ObjComprasParametro As ClsCompras, ByRef ObjContaParametro As ClsContabilidad) + + Dim CveSubProyectoAnticipo As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", "CveSubProyecto > 0").ToEntero 'SI YA VIENE LOS OBJETOS DE CLASE TOMA LOS DE PARAMETROS Dim ObjCompra As ClsCompras Dim ObjConta As ClsContabilidad @@ -8922,11 +8928,14 @@ Partial Class Compras_Compras Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False) ImporteMovimiento = 0 IdCtaContable = 0 - Dim Concepto As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text) + + + + Dim Concepto As String = String.Format("{0} F:{1}-{2}", HplProveedor.Text, TxtSerie.Text, TxtFolio.Text) Dim importeMN As Decimal = 0 Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1) Dim PorcentajeImpuesto As Decimal = 0 - Dim ConceptoPartida As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text) + Dim ConceptoPartida As String = String.Format("{0} F:{1}-{2}", HplProveedor.Text, TxtSerie.Text, TxtFolio.Text) Select Case ConceptoContable @@ -8946,10 +8955,10 @@ Partial Class Compras_Compras If DdlMoneda.SelectedValue.ToEntero <> 1 Then IdCtaContable = CtaProveedorAnticiposExtranjera - If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, "", ConceptoContable, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra) Then + If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, ConceptoPartida, ConceptoContable, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra, CveSubProyecto:=CveSubProyectoAnticipo) Then IdCtaContable = CtaProveedorAnticiposComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeMN - ImporteMovimiento, "", 266, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN - ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeMN - ImporteMovimiento, ConceptoPartida, 266, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN - ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 Exit Select End If @@ -8962,7 +8971,7 @@ Partial Class Compras_Compras IdCtaContable = CtaProveedorAnticipos If ImporteMovimiento <> 0 Then PorcentajePago = ImporteMovimiento / TxtTotal.Text.ToDecimal - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, "", ConceptoContable, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCompraAmortizacion:=CveCompra) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, ConceptoPartida, ConceptoContable, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCompraAmortizacion:=CveCompra, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 End If End If @@ -8986,9 +8995,9 @@ Partial Class Compras_Compras If DdlMoneda.SelectedValue.ToEntero <> 1 Then IdCtaContable = CtaProveedorExtranjera - If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, ConceptoPartida, ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra) Then + If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, ConceptoPartida, ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra, CveSubProyecto:=CveSubProyectoAnticipo) Then IdCtaContable = CtaProveedorComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeMN - ImporteMovimiento, ConceptoPartida, 235, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN - ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeMN - ImporteMovimiento, ConceptoPartida, 235, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN - ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioNC, CveCompraAmortizacion:=CveCompra, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 Exit Select End If @@ -9000,7 +9009,7 @@ Partial Class Compras_Compras IdCtaContable = CtaProveedor If ImporteMovimiento <> 0 Then PorcentajePago = ImporteMovimiento / TxtTotal.Text.ToDecimal - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, ConceptoPartida, ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCompraAmortizacion:=CveCompra) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, ConceptoPartida, ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCompraAmortizacion:=CveCompra, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 End If End If @@ -9038,7 +9047,7 @@ Partial Class Compras_Compras If usacomplementariaAnticipo Then IdCtaContable = CtaProveedorAnticiposComplementaria ImporteAntMN = TipoCambioAnt * ImporteAnt - ImporteAnt - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteAnt, "", 266, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, ImporteMX:=ImporteAntMN, ImporteME:=ImporteAnt, TipoCambio:=TipoCambioAnt) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteAnt, ConceptoPartida, 266, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, ImporteMX:=ImporteAntMN, ImporteME:=ImporteAnt, TipoCambio:=TipoCambioAnt, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 End If ImporteAntMN = ImporteAnt @@ -9048,7 +9057,7 @@ Partial Class Compras_Compras IdCtaContable = CtaProveedorAnticiposExtranjera End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteAnt, "", ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, CvePrePolizaOriginal:=CvePrePolizaNueva, ImporteME:=If(tipoCambio = 1, 0, ImporteAnt), CveCompraAmortizacion:=CveCompraNC) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteAnt, ConceptoPartida, ConceptoContable, ConceptoPartida, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteAntMN, CvePrePolizaOriginal:=CvePrePolizaNueva, ImporteME:=If(tipoCambio = 1, 0, ImporteAnt), CveCompraAmortizacion:=CveCompraNC, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 End If @@ -9097,7 +9106,7 @@ Partial Class Compras_Compras If ImporteMovimiento <> 0 Then PorcentajePago = ImporteMovimiento / TxtTotal.Text.ToDecimal - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, "", ConceptoContable, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCompraAmortizacion:=CveCompraNC) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, "", ConceptoContable, "", Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCompraAmortizacion:=CveCompraNC, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 End If End If @@ -9131,13 +9140,13 @@ Partial Class Compras_Compras If DdlMoneda.SelectedValue.ToEntero <> 1 Then IdCtaContable = CtaProveedorExtranjera - If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=TipoCambio17) Then + If ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=TipoCambio17, CveSubProyecto:=CveSubProyectoAnticipo) Then Dim CveConceptoContableComplementaria As Integer = 206 If CveTipoConcepto = 2 Then CveConceptoContableComplementaria = 310 'cuando es acreedor IdCtaContable = CtaProveedorComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeMN - ImporteMovimiento, Concepto, CveConceptoContableComplementaria, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN - ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=TipoCambio17) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, importeMN - ImporteMovimiento, Concepto, CveConceptoContableComplementaria, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN - ImporteMovimiento, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=ImporteMovimiento, TipoCambio:=TipoCambio17, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 Exit Select End If @@ -9148,7 +9157,7 @@ Partial Class Compras_Compras Else IdCtaContable = CtaProveedor If ImporteMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(TipoCambio17 = 1, 0, ImporteMovimiento)) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveCompraAmortizacion:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(TipoCambio17 = 1, 0, ImporteMovimiento), CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 Exit For End If @@ -9214,14 +9223,37 @@ Partial Class Compras_Compras End If Case 15 'RetIVA x Acreditar Honorarios/Serv. Prof. If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then + 'If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV") Then If DdlRetIVAConcepto.Items.Count > 0 Then - If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then - ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) - importeMN = ImporteMovimiento * tipoCambio + TipoMovimiento = If(TipoMovimiento, False, True) + Dim Funcionalidad As Integer = 0 + If CveRetIVAConceptoOriginal = 1 Then + Funcionalidad = 307 + ConceptoContable = 15 + ElseIf CveRetIVAConceptoOriginal = 2 Then + Funcionalidad = 309 + ConceptoContable = 183 + ElseIf CveRetIVAConceptoOriginal = 3 Then + Funcionalidad = 311 + ConceptoContable = 185 + ElseIf CveRetIVAConceptoOriginal = 4 Then + Funcionalidad = 313 + ConceptoContable = 248 + ElseIf CveRetIVAConceptoOriginal = 5 Then + Funcionalidad = 578 + ConceptoContable = 285 + End If + + ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) + importeMN = ImporteMovimiento * tipoCambio + + If tipoCambio > 1 Then Concepto += $" TC{tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}" + + If UsuarioActual.Empresa.TipoContabilidad = 2 Then If CtaProveedorRetIVA > 0 Then IdCtaContable = CtaProveedorRetIVA - ElseIf UsuarioActual.Empresa.Funcionalidad(307).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(307).ToEntero + ElseIf UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero Else If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjConta.DtResultados.Rows.Count > 0 Then @@ -9230,40 +9262,130 @@ Partial Class Compras_Compras End If End If End If + + + + + 'If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then + ' ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) + ' importeMN = ImporteMovimiento * tipoCambio + ' If CtaProveedorRetIVA > 0 Then + ' IdCtaContable = CtaProveedorRetIVA + ' ElseIf UsuarioActual.Empresa.Funcionalidad(307).ToEntero > 0 Then + ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(307).ToEntero + ' Else + ' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + ' If ObjConta.DtResultados.Rows.Count > 0 Then + ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + ' End If + ' End If + ' End If + 'End If + + + + End If End If Case 22 'RetIVA Acreditable Honorarios/Serv. Prof. If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then + 'If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV") Then If DdlRetIVAConcepto.Items.Count > 0 AndAlso DdlRetIVAConcepto.SelectedValue.ToEntero > 0 Then + + + TipoMovimiento = If(TipoMovimiento, False, True) + Dim Funcionalidad As Integer = 0 - If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then - Funcionalidad = 307 - ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 2 Then + Dim ConceptoContableContra As Integer = 0 + + If CveRetIVAConceptoOriginal = 1 Then + Funcionalidad = 308 + ConceptoContable = 22 + ConceptoContableContra = 15 + ElseIf CveRetIVAConceptoOriginal = 2 Then Funcionalidad = 310 - ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then + ConceptoContable = 184 + ConceptoContableContra = 183 + + ElseIf CveRetIVAConceptoOriginal = 3 Then Funcionalidad = 312 - ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then + ConceptoContable = 186 + ConceptoContableContra = 185 + + ElseIf CveRetIVAConceptoOriginal = 4 Then Funcionalidad = 314 - ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then + ConceptoContable = 249 + ConceptoContableContra = 248 + + ElseIf CveRetIVAConceptoOriginal = 5 Then Funcionalidad = 578 + ConceptoContable = 286 + ConceptoContableContra = 285 + End If ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) importeMN = ImporteMovimiento * tipoCambioNC - If CtaProveedorRetIVA > 0 Then - IdCtaContable = CtaProveedorRetIVA - ElseIf UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + If CtaProveedorRetIVA > 0 Then + IdCtaContable = CtaProveedorRetIVA + ElseIf UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero + Else + If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + End If End If End If End If + If tipoCambio > 1 Then Concepto += $" TC{tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}" + 'Agregamos el Opuesto del 22 -> 15 + If ImporteMovimiento <> 0 Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContableContra, Concepto + If(tipoCambio > 1, $" TC {tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}", ""), Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveAcreedor:=-1, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=-1, CveCreditoDetalle:=-1, ImporteMX:=ImporteMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), Contabilizable:=True, TipoCambio:=tipoCambio, CveSubProyecto:=CveSubProyectoAnticipo) Then + ErrorMovtosCxP = 1 + Exit For + End If + End If + + + + + ''Dim Funcionalidad As Integer = 0 + 'If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then + ' Funcionalidad = 307 + 'ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 2 Then + ' Funcionalidad = 310 + 'ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then + ' Funcionalidad = 312 + 'ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then + ' Funcionalidad = 314 + 'ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then + ' Funcionalidad = 578 + 'End If + + 'ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) + 'importeMN = ImporteMovimiento * tipoCambioNC + + + 'If CtaProveedorRetIVA > 0 Then + ' IdCtaContable = CtaProveedorRetIVA + 'ElseIf UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then + ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero + 'Else + ' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + ' If ObjConta.DtResultados.Rows.Count > 0 Then + ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + ' End If + ' End If + 'End If + + + + End If End If @@ -9393,39 +9515,131 @@ Partial Class Compras_Compras End If Case 16 'RetISR x Acreditar If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then - If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 1 Then + 'If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV") Then + If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero > 0 Then + + TipoMovimiento = If(TipoMovimiento, False, True) + + Dim funcionalidad As Integer = 0 + If DdlRetISRConcepto.SelectedValue.ToEntero = 1 Then + funcionalidad = 315 + ConceptoContable = 16 + ElseIf DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then + funcionalidad = 317 + ConceptoContable = 243 + ElseIf DdlRetISRConcepto.SelectedValue.ToEntero = 3 Then + funcionalidad = 348 + ConceptoContable = 327 + End If ImporteMovimiento = Math.Round(PorcentajePago * TxtRetISR.Text.ToDecimal, 2) importeMN = ImporteMovimiento * tipoCambio - If CtaProveedorRetISR > 0 Then - IdCtaContable = CtaProveedorRetISR - ElseIf UsuarioActual.Empresa.Funcionalidad(315).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(315).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + If tipoCambio > 1 Then Concepto += $" TC{tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}" + + + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + If CtaProveedorRetISR > 0 Then + IdCtaContable = CtaProveedorRetISR + + ElseIf UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero > 0 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero + Else + If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + End If End If End If End If + + 'ImporteMovimiento = Math.Round(PorcentajePago * TxtRetISR.Text.ToDecimal, 2) + 'importeMN = ImporteMovimiento * tipoCambio + 'If CtaProveedorRetISR > 0 Then + ' IdCtaContable = CtaProveedorRetISR + 'ElseIf UsuarioActual.Empresa.Funcionalidad(315).ToEntero > 0 Then + ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(315).ToEntero + 'Else + ' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + ' If ObjConta.DtResultados.Rows.Count > 0 Then + ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + ' End If + ' End If + 'End If + + End If End If Case 23 'RetISR Acreditable If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then - If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 1 Then + 'If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV") Then + If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero > 0 Then + + TipoMovimiento = If(TipoMovimiento, False, True) + + Dim funcionalidad As Integer = 0 + Dim ConceptoContableContra As Integer = 0 + + If CveRetISRConceptoOriginal = 1 Then + funcionalidad = 316 + ConceptoContable = 23 + ConceptoContableContra = 16 + ElseIf CveRetISRConceptoOriginal = 2 Then + funcionalidad = 318 + ConceptoContable = 244 + ConceptoContableContra = 243 + ElseIf CveRetISRConceptoOriginal = 3 Then + funcionalidad = 348 + ConceptoContable = 328 + ConceptoContableContra = 327 + End If + ImporteMovimiento = Math.Round(PorcentajePago * TxtRetISR.Text.ToDecimal, 2) - importeMN = ImporteMovimiento * tipoCambio - If CtaProveedorRetISR > 0 Then - IdCtaContable = CtaProveedorRetISR - ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(316).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + importeMN = Math.Round(ImporteMovimiento, 2) * tipoCambio * Multiplicador + + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + If CtaProveedorRetISR > 0 Then + IdCtaContable = CtaProveedorRetISR + ElseIf UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero > 0 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero + Else + If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + End If End If End If End If + + + If tipoCambio > 1 Then Concepto += $" TC{tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}" + + 'Agregamos el Opuesto del 23 -> 16 + If ImporteMovimiento <> 0 Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContableContra, Concepto + If(tipoCambio > 1, $" TC {tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}", ""), Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=-1, CveAcreedor:=-1, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=-1, CveCreditoDetalle:=-1, ImporteMX:=ImporteMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), Contabilizable:=True, CveSubProyecto:=CveSubProyectoAnticipo) Then + ErrorMovtosCxP = 1 + Exit For + End If + End If + + + + 'ImporteMovimiento = Math.Round(PorcentajePago * TxtRetISR.Text.ToDecimal, 2) + 'importeMN = ImporteMovimiento * tipoCambio + 'If CtaProveedorRetISR > 0 Then + ' IdCtaContable = CtaProveedorRetISR + 'ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then + ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(316).ToEntero + 'Else + ' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + ' If ObjConta.DtResultados.Rows.Count > 0 Then + ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + ' End If + ' End If + 'End If + + + + End If End If Case 243 'RetISR X Acreditar Terceros y Arrendamiento @@ -9521,7 +9735,7 @@ Partial Class Compras_Compras End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=tipoCambioNC) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=tipoCambioNC, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 Exit For End If @@ -9553,11 +9767,11 @@ Partial Class Compras_Compras If TxtIVA.Text.ToDecimal > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, True, TxtIVA.Text.ToDecimal, "", 14, "", Fecha, IdCtaIVAXAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=TxtIVA.Text.ToDecimal * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, TxtIVA.Text.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, True, TxtIVA.Text.ToDecimal, "", 14, "", Fecha, IdCtaIVAXAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=TxtIVA.Text.ToDecimal * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, TxtIVA.Text.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, False, TxtIVA.Text.ToDecimal, "", 19, "", Fecha, IdCtaIVAAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=TxtIVA.Text.ToDecimal * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, TxtIVA.Text.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, False, TxtIVA.Text.ToDecimal, "", 19, "", Fecha, IdCtaIVAAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=TxtIVA.Text.ToDecimal * tipoCambio, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, TxtIVA.Text.ToDecimal), PorcentajeImpuesto:=PorcentajeImpuesto, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 End If End If @@ -9657,13 +9871,13 @@ Partial Class Compras_Compras PorcentajePago = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal / TxtTotal.Text.ToDecimal 'Se agrega la nota de credito - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoCompra, gvr.FCTextBox("TxtAnticipo").Text.ToDecimal, " ", CveConceptoCompra, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, CveCompraAmortizacion:=CveCompraNC, ImporteMX:=gvr.FCTextBox("TxtAnticipo").Text.ToDecimal) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoCompra, gvr.FCTextBox("TxtAnticipo").Text.ToDecimal, " ", CveConceptoCompra, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompraNC, CveProveedor:=CveProveedor, CveIE:=CveIE, CveCompraAmortizacion:=CveCompraNC, ImporteMX:=gvr.FCTextBox("TxtAnticipo").Text.ToDecimal, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 Exit For End If 'movimiento de pago proveedor - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, gvr.FCTextBox("TxtAnticipo").Text.ToDecimal, " ", CveConceptoPago, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, CveCompraAmortizacion:=CveCompraNC, ImporteMX:=gvr.FCTextBox("TxtAnticipo").Text.ToDecimal) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoCompra, gvr.FCTextBox("TxtAnticipo").Text.ToDecimal, " ", CveConceptoPago, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, CveCompraAmortizacion:=CveCompraNC, ImporteMX:=gvr.FCTextBox("TxtAnticipo").Text.ToDecimal, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 Exit For End If @@ -9672,27 +9886,27 @@ Partial Class Compras_Compras ImporteMovimiento = Math.Round(PorcentajePago * TxtIVA.Text.ToDecimal, 2) If ImporteMovimiento > 0 Then Dim PorcentajeImpuesto As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, " ", 14, " ", TxtFechaPago.Text.ToDate, IdCtaIVAXAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, PorcentajeImpuesto:=PorcentajeImpuesto) Then ErrorMovtosCxP = 1 : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, " ", 14, " ", TxtFechaPago.Text.ToDate, IdCtaIVAXAcreditar, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, PorcentajeImpuesto:=PorcentajeImpuesto, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 : Exit For - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, " ", 19, " ", TxtFechaPago.Text.ToDate, IdCtaIVAAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, PorcentajeImpuesto:=PorcentajeImpuesto) Then ErrorMovtosCxP = 1 : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, " ", 19, " ", TxtFechaPago.Text.ToDate, IdCtaIVAAcreditable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, PorcentajeImpuesto:=PorcentajeImpuesto, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 : Exit For End If 'si tiene Ret iva y su proporcion ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) If ImporteMovimiento > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, " ", 15, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento) Then ErrorMovtosCxP = 1 : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, " ", 15, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 : Exit For - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, " ", 22, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento) Then ErrorMovtosCxP = 1 : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, " ", 22, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 : Exit For End If 'si tiene Ret ISR y su proporcion ImporteMovimiento = Math.Round(PorcentajePago * TxtRetISR.Text.ToDecimal, 2) If ImporteMovimiento > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, " ", 16, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento) Then ErrorMovtosCxP = 1 : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, " ", 16, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 : Exit For - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, " ", 23, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento) Then ErrorMovtosCxP = 1 : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, " ", 23, " ", TxtFechaPago.Text.ToDate, 0, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=ImporteMovimiento, CveSubProyecto:=CveSubProyectoAnticipo) Then ErrorMovtosCxP = 1 : Exit For End If diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 99e907c8d..df24000c7 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1212,15 +1212,15 @@ Partial Class PopUpVerFactura Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - 'params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, ImageToBase64(Drawing.Image.FromFile(Imagen.FullName), Drawing.Imaging.ImageFormat.Png), ""))) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + + Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) params.Add(New ReportParameter("AgrupoPor", $"{FechaCorte}{Usuario}")) If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -1326,7 +1326,6 @@ Partial Class PopUpVerFactura Private Sub ImprimeGastoContrato(CveContrato As Integer, CveContratoGasto As Integer) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) Dim Dr As DataRow = Nothing Dim ObjContratos As New ClsContratos @@ -1359,13 +1358,13 @@ Partial Class PopUpVerFactura SumaGasto = ObjContratos.DtResultados.SUM("Importe", "CveContratoGasto IS NULL") End If params.Add(New ReportParameter("Utilidad", $"$ {(SumaUtilidad - SumaGasto).ToString.FormatoNumero()}")) - If Imagen.Exists Then - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + If Imagen.Exists Then + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If + ImprimirPDF("Empresas/Grales/Formatos/ContratoGasto.rdlc", dt, params, $"{Nombre}-Gastos", Formato:="PDF") End Sub #End Region @@ -1510,11 +1509,10 @@ Partial Class PopUpVerFactura If Dt.Rows.Count > 0 Then Dim params As New List(Of ReportParameter) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - 'params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, ImageToBase64(Drawing.Image.FromFile(Imagen.FullName), Drawing.Imaging.ImageFormat.Png), ""))) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -1932,11 +1930,9 @@ Partial Class PopUpVerFactura If DtConceptos.Rows.Count > 0 Then Dim params As New List(Of ReportParameter) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) If Imagen.Exists Then - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -2938,11 +2934,8 @@ Partial Class PopUpVerFactura If Archivo.Exists Then ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Inicial.rdlc", DtMovimientos, params, String.Format("Inventario Inicial - {0}", Folio), RDSName:="DsInventarios") Else - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -2974,11 +2967,9 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturadoA", If(CveCompra > 0, dr("RazonSocial").ToString, ""))) End If If UsuarioActual.CveEmpresa = 119 Then - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) @@ -3041,11 +3032,9 @@ Partial Class PopUpVerFactura ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Entradas.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio), RDSName:="DsInventarios") ElseIf UsuarioActual.CveEmpresa = 140 Then - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3105,11 +3094,9 @@ Partial Class PopUpVerFactura Else - ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3284,11 +3271,9 @@ Partial Class PopUpVerFactura ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") ElseIf UsuarioActual.CveEmpresa = 140 Then - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3326,11 +3311,9 @@ Partial Class PopUpVerFactura Else Dim A As New System.IO.FileInfo(String.Format("{0}Formatos/EntradaSalida.rdlc", UsuarioActual.Empresa.Ruta)) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3408,11 +3391,9 @@ Partial Class PopUpVerFactura Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim params As New List(Of ReportParameter) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3439,11 +3420,9 @@ Partial Class PopUpVerFactura Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim params As New List(Of ReportParameter) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3476,11 +3455,10 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("NombreEntrego", Personal)) params.Add(New ReportParameter("Responsable", Personal)) params.Add(New ReportParameter("NombreRecibio", Capturo.ToUpper)) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) If Imagen.Exists Then - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3518,11 +3496,9 @@ Partial Class PopUpVerFactura Archivo = "Empresas/Grales/Formatos/PrestamoProductos.rdlc" End If - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3569,11 +3545,10 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("NombreEntrego", Capturo.ToUpper)) params.Add(New ReportParameter("Responsable", Personal)) params.Add(New ReportParameter("NombreRecibio", Personal)) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) If Imagen.Exists Then - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3611,11 +3586,9 @@ Partial Class PopUpVerFactura Archivo = "Empresas/Grales/Formatos/PrestamoProductos.rdlc" End If - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3765,12 +3738,10 @@ Partial Class PopUpVerFactura Dim Archivo As New System.IO.FileInfo(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta)) If Archivo.Exists Then Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3819,13 +3790,10 @@ Partial Class PopUpVerFactura ImprimirPDF(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios") Else Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - ' params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) - + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3870,12 +3838,10 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("CantidadProductos", "500")) params.Add(New ReportParameter("CantidadUsados", "500")) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3889,12 +3855,9 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado)) ElseIf UsuarioActual.CveEmpresa = 153 Then Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3910,12 +3873,9 @@ Partial Class PopUpVerFactura ImprimirPDF(String.Format("{0}Formatos\Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Recepción de Traslado - {0}", Folio), RDSName:="DsInventarios") Else Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -4075,9 +4035,7 @@ Partial Class PopUpVerFactura If Not Archivo.Exists Then If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -4225,14 +4183,13 @@ Partial Class PopUpVerFactura ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/DevolucionCliente.rdlc", DtMovimientos, params, String.Format("Devolucion del Cliente - {0}", Folio.ToString), RDSName:="DsInventarios") 'End If Else - ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If + Dim CiudadSucursal As String = "" Dim DomicilioSucursal As String = "" @@ -4263,11 +4220,9 @@ Partial Class PopUpVerFactura Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim params As New List(Of ReportParameter) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -4294,11 +4249,9 @@ Partial Class PopUpVerFactura Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim params As New List(Of ReportParameter) - ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -4330,11 +4283,8 @@ Partial Class PopUpVerFactura Archivo = "Empresas/Grales/Formatos/EntradaSalida.rdlc" End If - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -4406,11 +4356,8 @@ Partial Class PopUpVerFactura Archivo = "Empresas/Grales/Formatos/EntradaSalidaUniforme.rdlc" End If - ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -4455,11 +4402,9 @@ Partial Class PopUpVerFactura Archivo = "Empresas/Grales/Formatos/PrestamoProductos.rdlc" End If - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -4500,11 +4445,9 @@ Partial Class PopUpVerFactura Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim params As New List(Of ReportParameter) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -4526,7 +4469,7 @@ Partial Class PopUpVerFactura Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Salidas.rdlc", UsuarioActual.Empresa.Ruta)) Dim Archivo2 As New System.IO.FileInfo(String.Format("{0}Formatos/ConsumoInterno.rdlc", UsuarioActual.Empresa.Ruta)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim params As New List(Of ReportParameter) 'If UsuarioActual.CveEmpresa.Contiene(72, 80) Then @@ -4563,9 +4506,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("NombreRecibio", Recibio)) If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -4754,11 +4695,8 @@ Partial Class PopUpVerFactura Else Dim A As New System.IO.FileInfo(String.Format("{0}Formatos/EntradaSalida.rdlc", UsuarioActual.Empresa.Ruta)) - ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) If Imagen.Exists Then - 'params.Add(New ReportParameter("LogoPath", logouri)) - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -5014,8 +4952,6 @@ Partial Class PopUpVerFactura End If Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) If Not ReporteEmpresa.Exists Then params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) @@ -5023,8 +4959,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) If Imagen.Exists Then - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -5221,8 +5156,7 @@ Partial Class PopUpVerFactura Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) If Imagen.Exists Then - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -5830,7 +5764,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("TotAbono", DtComprobacion.SUM("Abonado").ToString)) If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -5877,17 +5811,7 @@ Partial Class PopUpVerFactura Dim paramList As New List(Of ReportParameter) With paramList - - Dim logouri As String = "" - Dim RutaLogo As String = String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta) - - Dim Imagen As New System.IO.FileInfo(RutaLogo) - - If Imagen.Exists Then - logouri = String.Format("file://{0}", RutaLogo) - Else - logouri = "" - End If + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) .Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) .Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) @@ -5902,7 +5826,7 @@ Partial Class PopUpVerFactura If Imagen.Exists Then - .Add(New ReportParameter("LogoPath", logouri)) + .Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else .Add(New ReportParameter("LogoPath", "")) End If @@ -6310,9 +6234,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("CodigoTD", CodigoTD)) If Imagen.Exists Then - - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -6449,9 +6371,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("CodigoTD", CodigoTD)) If Imagen.Exists Then - - Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) - params.Add(New ReportParameter("LogoPath", LogoRuta)) + params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If From 65368ceb2e796c1e80a5cd5bf7e713961aaff1c2 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 26 May 2022 09:55:02 -0700 Subject: [PATCH 44/48] Compras Retenciones, limpiesa en anticipos , se concetraron en 15,22,16,23, conceptos eliminados 183,185,248,285 , 184,186,249,578, --- Compras/Compras.aspx.vb | 253 +--------------------------------------- 1 file changed, 5 insertions(+), 248 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 8c901ce40..4cf9f6c23 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -9261,28 +9261,6 @@ Partial Class Compras_Compras End If End If - - - - 'If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then - ' ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) - ' importeMN = ImporteMovimiento * tipoCambio - ' If CtaProveedorRetIVA > 0 Then - ' IdCtaContable = CtaProveedorRetIVA - ' ElseIf UsuarioActual.Empresa.Funcionalidad(307).ToEntero > 0 Then - ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(307).ToEntero - ' Else - ' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjConta.DtResultados.Rows.Count > 0 Then - ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - ' End If - ' End If - ' End If - 'End If - - - - End If End If Case 22 'RetIVA Acreditable Honorarios/Serv. Prof. @@ -9349,168 +9327,11 @@ Partial Class Compras_Compras End If End If - - - - ''Dim Funcionalidad As Integer = 0 - 'If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then - ' Funcionalidad = 307 - 'ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 2 Then - ' Funcionalidad = 310 - 'ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then - ' Funcionalidad = 312 - 'ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then - ' Funcionalidad = 314 - 'ElseIf DdlRetIVAConcepto.SelectedValue.ToEntero = 5 Then - ' Funcionalidad = 578 - 'End If - - 'ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) - 'importeMN = ImporteMovimiento * tipoCambioNC - - - 'If CtaProveedorRetIVA > 0 Then - ' IdCtaContable = CtaProveedorRetIVA - 'ElseIf UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then - ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero - 'Else - ' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjConta.DtResultados.Rows.Count > 0 Then - ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - ' End If - ' End If - 'End If - - - - End If End If - Case 183 'RetIVA x Acreditar Fletes P.F. - If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then - If DdlRetIVAConcepto.Items.Count > 0 Then - If DdlRetIVAConcepto.SelectedValue.ToEntero = 2 Then - ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) - importeMN = ImporteMovimiento * tipoCambio - If CtaProveedorRetIVA > 0 Then - IdCtaContable = CtaProveedorRetIVA - ElseIf UsuarioActual.Empresa.Funcionalidad(309).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(309).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - End If - End If - End If - End If - End If - End If - Case 184 'RetIVA Acreditable Fletes P.F. - If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then - If DdlRetIVAConcepto.Items.Count > 0 Then - If DdlRetIVAConcepto.SelectedValue.ToEntero = 2 Then - ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) - importeMN = ImporteMovimiento * tipoCambio - If CtaProveedorRetIVA > 0 Then - IdCtaContable = CtaProveedorRetIVA - ElseIf UsuarioActual.Empresa.Funcionalidad(310).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(310).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - End If - End If - End If - End If - End If - End If - Case 185 'RetIVA x Acreditar Fletes P.M. - If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then - If DdlRetIVAConcepto.Items.Count > 0 Then - If DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then - ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) - importeMN = ImporteMovimiento * tipoCambio - If CtaProveedorRetIVA > 0 Then - IdCtaContable = CtaProveedorRetIVA - ElseIf UsuarioActual.Empresa.Funcionalidad(311).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(311).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - End If - End If - End If - End If - End If - End If - - Case 186 'RetIVA Acreditable Fletes P.M. - If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then - If DdlRetIVAConcepto.Items.Count > 0 Then - If DdlRetIVAConcepto.SelectedValue.ToEntero = 3 Then - ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) - importeMN = ImporteMovimiento * tipoCambio - If CtaProveedorRetIVA > 0 Then - IdCtaContable = CtaProveedorRetIVA - ElseIf UsuarioActual.Empresa.Funcionalidad(312).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(312).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - End If - End If - End If - End If - End If - End If - Case 248 'RetIVA x Acreditar Arrendamiento - If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then - If DdlRetIVAConcepto.Items.Count > 0 Then - If DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then - ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) - importeMN = ImporteMovimiento * tipoCambio - If CtaProveedorRetIVA > 0 Then - IdCtaContable = CtaProveedorRetIVA - ElseIf UsuarioActual.Empresa.Funcionalidad(313).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(313).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - End If - End If - End If - End If - End If - End If - - Case 249 'RetIVA Acreditable Arrendamiento - If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then - If DdlRetIVAConcepto.Items.Count > 0 Then - If DdlRetIVAConcepto.SelectedValue.ToEntero = 4 Then - ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) - importeMN = ImporteMovimiento * tipoCambio - If CtaProveedorRetIVA > 0 Then - IdCtaContable = CtaProveedorRetIVA - ElseIf UsuarioActual.Empresa.Funcionalidad(314).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(314).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - End If - End If - End If - End If - End If - End If Case 16 'RetISR x Acreditar If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then 'If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV") Then @@ -9549,20 +9370,6 @@ Partial Class Compras_Compras End If End If - 'ImporteMovimiento = Math.Round(PorcentajePago * TxtRetISR.Text.ToDecimal, 2) - 'importeMN = ImporteMovimiento * tipoCambio - 'If CtaProveedorRetISR > 0 Then - ' IdCtaContable = CtaProveedorRetISR - 'ElseIf UsuarioActual.Empresa.Funcionalidad(315).ToEntero > 0 Then - ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(315).ToEntero - 'Else - ' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjConta.DtResultados.Rows.Count > 0 Then - ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero - ' End If - ' End If - 'End If - End If End If @@ -9619,63 +9426,13 @@ Partial Class Compras_Compras End If End If - - - 'ImporteMovimiento = Math.Round(PorcentajePago * TxtRetISR.Text.ToDecimal, 2) - 'importeMN = ImporteMovimiento * tipoCambio - 'If CtaProveedorRetISR > 0 Then - ' IdCtaContable = CtaProveedorRetISR - 'ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then - ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(316).ToEntero - 'Else - ' If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjConta.DtResultados.Rows.Count > 0 Then - ' IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero - ' End If - ' End If - 'End If - - - - - End If - End If - Case 243 'RetISR X Acreditar Terceros y Arrendamiento - If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then - If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then - ImporteMovimiento = Math.Round(PorcentajePago * TxtRetISR.Text.ToDecimal, 2) - importeMN = ImporteMovimiento * tipoCambio - If CtaProveedorRetISR > 0 Then - IdCtaContable = CtaProveedorRetISR - ElseIf UsuarioActual.Empresa.Funcionalidad(317).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(317).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero - End If - End If - End If - End If - End If - Case 244 'RetISR Acreditable Terceros y Arrendamiento - If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then - If DdlRetISRConcepto.Items.Count > 0 AndAlso DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then - ImporteMovimiento = Math.Round(PorcentajePago * TxtRetISR.Text.ToDecimal, 2) - importeMN = ImporteMovimiento * tipoCambio - If CtaProveedorRetISR > 0 Then - IdCtaContable = CtaProveedorRetISR - ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero - End If - End If - End If End If End If + + + + + Case 64 'GANANCIA If gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then 'SOLO SE IMPLEMENTÓ PARA NC If DdlMoneda.SelectedValue.ToEntero <> 1 Or gvr.DataKey("CveMoneda").ToEntero <> 1 Then From eacf3ff3943b09989d1ca8e4b6b09a8cf3ca3d99 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 26 May 2022 17:29:54 -0700 Subject: [PATCH 45/48] ClsConpaQi consuta y eFacturas complemetnos validacion CveIE --- App_Code/ClsContPAQi.vb | 3 +++ Compras/eFacturas.aspx.vb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb index 146607353..f1be4bfd8 100644 --- a/App_Code/ClsContPAQi.vb +++ b/App_Code/ClsContPAQi.vb @@ -6644,6 +6644,7 @@ Public Class ClsContPAQi StrSQL.Append(" CodigoSup5 VARCHAR(100), Sup5 VARCHAR(200), CodigoSup6 VARCHAR(100), Sup6 VARCHAR(200),") StrSQL.Append(" CodigoSup7 VARCHAR(100), Sup7 VARCHAR(200), CodigoSup8 VARCHAR(100), Sup8 VARCHAR(100),") StrSQL.Append(" SaldoActual FLOAT);") + StrSQL.Append(" CREATE NONClUSTERED INDEX IDX ON #TEMP (ID); ") StrSQL.Append(" ") 'StrSQL.AppendLine(" -- RECOLECCION DE DATOS RECORRIENDO TODO EL ARBOL") StrSQL.Append(" WITH Rec(IdCtaSup, IdSubCtade, CtaSup, SubCtade, Level, Orden) AS ") @@ -6782,6 +6783,8 @@ Public Class ClsContPAQi SqlDataAdapter(StrSQL.ToString, CommandType.Text) + SqlAdapter.SelectCommand.CommandTimeout = 0 + With SqlAdapter.SelectCommand.Parameters .Add("@FechaI", SqlDbType.Date).Value = FechaI .Add("@FechaF", SqlDbType.Date).Value = FechaF diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index be531b95e..143b93038 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -3037,7 +3037,7 @@ Partial Class Compras_eFacturas ObjCompraFolios.Dispose() - DTDocumentosRelacionados = DTDocumentosRelacionados.FiltraParametros("CveIE > 0 AND LEN(IdDocumento) > 0") + DTDocumentosRelacionados = DTDocumentosRelacionados.FiltraParametros(" LEN(IdDocumento) > 0 ") GVPDocumentosRelacionadosPagos.DataSource = DTDocumentosRelacionados GVPDocumentosRelacionadosPagos.DataBind() From 20770a3157eb5be94981ec5e567674d47b315045 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 26 May 2022 22:58:13 -0700 Subject: [PATCH 46/48] Nominas cambiar Banco por cuenta. --- App_Code/ClsPaginas.vb | 8 +-- Nomina/Nomina.aspx | 31 +++++------ Nomina/Nomina.aspx.cs | 118 +++++++++++++++++++++++++++++++---------- 3 files changed, 108 insertions(+), 49 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index a910c4a2d..8a0a66972 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6553,10 +6553,12 @@ Public Class ClsPaginas Else LogoRuta = String.Format("{0}Formatos\Logo.png", UsuarioActual.Empresa.Ruta) If File.Exists(LogoRuta) Then - LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + 'LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + LogoRuta = String.Format("{0}", LogoRuta) End If End If - LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + 'LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + LogoRuta = String.Format("{0}", LogoRuta) 'Si no tiene CBB, SE GENERA If Not ImagenCBB.Exists Then Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar() @@ -7115,7 +7117,7 @@ Public Class ClsPaginas LogoRuta = String.Format("{0}Formatos\Logo.png", UsuarioActual.Empresa.Ruta) If File.Exists(LogoRuta) Then 'LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - LogoRuta = String.Format("file://{0}", LogoRuta) + LogoRuta = String.Format("{0}", LogoRuta) End If End If diff --git a/Nomina/Nomina.aspx b/Nomina/Nomina.aspx index b1dcd7448..1c7417cbb 100644 --- a/Nomina/Nomina.aspx +++ b/Nomina/Nomina.aspx @@ -4226,25 +4226,24 @@
diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 58495dce2..4b7800979 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -8110,27 +8110,105 @@ public partial class Nomina_Nomina2 : ClsPaginas #region Layouts + + enum Bancos + { + SinSelccion, + Bancomer, + Banorte + } + + + Bancos Banco + { + get { + if (ViewState["Banco"] == null) + { + ViewState["Banco"] = Bancos.SinSelccion; + } + return (Bancos) ViewState["Banco"]; + } + set { + ViewState["Banco"] = (Bancos) value; + } + } + + string ConvenioPagoElectronico + { + get { + if (ViewState["ConvenioPagoElectronico"] == null) + { + ViewState["ConvenioPagoElectronico"] = string.Empty; + } + return ViewState["ConvenioPagoElectronico"].ToString(); + } + set { + ViewState["ConvenioPagoElectronico"] = (string) value; + } + } + protected void LnkLayoutContable_Click(object sender, EventArgs e) { // RBLModalBancosLayout.SelectedValue = "1"; - DdlModalBancosLayout.SelectedValueExist("-1"); + Banco = Bancos.SinSelccion; + CargaCuentas(); + this.RegistraScript("$('#ModalLayoutBancos').modal('show');"); UpModalBancosLayout.Update(); } - - protected void RBLModalBancosLayout_SelectedIndexChanged(object sender, EventArgs e) + private void CargaCuentas() { + DdlCuenta.Items.Clear(); + DataTable DTCuentas = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta <> 1 AND UsaLayout = 'True' AND LEN(ConvenioPagoElectronico) > 0 "); + DTCuentas.CaseSensitive = false; + DdlCuenta.DataSource = DTCuentas.FiltraParametros(" Banco IN('BANCOMER','BANORTE')"); + DdlCuenta.DataBind(); + DdlCuenta.Items.Insert(0, new ListItem("Seleccione", "-1")); + DdlCuenta.SelectedValueExist("-1"); + + } + + protected void DdlCuenta_SelectedIndexChanged(object sender, EventArgs e) + { + + + ConvenioPagoElectronico = string.Empty; + + if (DdlCuenta.SelectedValue.ToEntero() > 0) + { + + ConvenioPagoElectronico = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("ConvenioPagoElectronico", $" CveCuenta = {DdlCuenta.SelectedValue}").ToString(); + if (DdlCuenta.SelectedItem.Text.ToUpper().Contains("BANCOMER")) + { + Banco = Bancos.Bancomer; + + }else if (DdlCuenta.SelectedItem.Text.ToUpper().Contains("BANORTE")) + { + Banco = Bancos.Banorte; + } + else + { + ConvenioPagoElectronico = string.Empty; + + } + } + else + { + Banco = Bancos.SinSelccion; + } + + + } protected void BtnModalBancosProcesar_Click(object sender, EventArgs e) { - //if (RBLModalBancosLayout.SelectedValue.ToEntero() == 1) - //{ - if (DdlModalBancosLayout.SelectedValue.ToEntero() == 1) + + if (Banco == Bancos.Bancomer) { using (ClsNominas objnom = new ClsNominas()) { @@ -8141,38 +8219,18 @@ public partial class Nomina_Nomina2 : ClsPaginas } } - else if (DdlModalBancosLayout.SelectedValue.ToEntero() == 2) + else if (Banco == Bancos.Banorte) { using (ClsNominas objnom = new ClsNominas()) { if (objnom.GetDispersionNominaBanorte(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa)) { - CrearLayoutNominaBanorte(objnom.DtResultados, "66564",1); + CrearLayoutNominaBanorte(objnom.DtResultados, ConvenioPagoElectronico, 1); } } } - //} - //else if (RBLModalBancosLayout.SelectedValue.ToEntero() == 2) - //{ - // if (DdlModalBancosLayout.SelectedValue.ToEntero() == 1) - // { - // //Sin Alta - // } - // else if (DdlModalBancosLayout.SelectedValue.ToEntero() == 2) - // { - // //Banorte - - // using (ClsNominas objnom = new ClsNominas()) - // { - // if (objnom.GetLayoutAltaBanorte(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa)) - // { - // CrearLayoutAltaBanorte(objnom.DtResultados, " 04539871", "12345", UsuarioActual.Empresa.Empresa); - // } - // } - - // } - //} + } @@ -8404,4 +8462,6 @@ public partial class Nomina_Nomina2 : ClsPaginas } #endregion + + } \ No newline at end of file From 2db7fbcbbf1e55d2720fc1f6a899e1292d7c5379 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 27 May 2022 16:20:12 -0700 Subject: [PATCH 47/48] Depositos seleccionar todo y deshabilitarchecks, enviar obserbaciones al guardar IE, Metas proveedores Rdlc, Compras validacion tipo de contabilidad --- Bancos/DepositosCaja.aspx | 45 ++++++---- Bancos/DepositosCaja.aspx.vb | 14 ++- Compras/Compras.aspx.vb | 156 ++++++++++++++++++++------------- Ventas/MetasVendedores.aspx.vb | 10 +-- 4 files changed, 140 insertions(+), 85 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 028df676e..5fa4f467c 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -142,36 +142,49 @@
-
- - + +
+ +
+
+
-
-
+ +
-
-
-
+
+
+ +
- - + + -
+
+
+ +
+
+ + + + + +
-
+
Seleccionado: $ 0.00 -
@@ -282,10 +295,10 @@ - + - + @@ -335,7 +348,7 @@

- +
diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index dc9c99b5c..bad49980c 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -97,6 +97,8 @@ Partial Class Bancos_DepositosCaja ObjBancos.GetPagosCajaChica(FechaI, FechaF, UsuarioActual.CveEmpresa, DdlCajaChica.SelectedValue.ToEntero, DdlTipoPago.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, MSI:=MSI) GvFacturas.DataSource = ObjBancos.DtResultados + lblValorTotal.Text = ObjBancos.DtResultados.SUM("Importe").ToString("###,###,###.00") + ObjBancos.Dispose() @@ -108,7 +110,7 @@ Partial Class Bancos_DepositosCaja TxtDescuento.Text = "" TxtIVA.Text = "" TxtComisionIntermediario.Text = "" - lblValorTotal.Text = "0.0" + 'lblValorTotal.Text = "0.0" lblValorTotalSeleccionado.Text = "0.0" divLabelTotal.Visible = True DdlSubProyectoDeposito.SelectedValueExist(DdlSubProyectos.SelectedValue.ToEntero) @@ -116,7 +118,11 @@ Partial Class Bancos_DepositosCaja DdlSubProyectoIntermediario.SelectedValueExist(DdlSubProyectos.SelectedValue.ToEntero) UpGvFacturas.Update() UpParametros.Update() - UpComisiones.Update() + UpComisiones.Update() + + + + End Sub Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click @@ -247,7 +253,7 @@ Partial Class Bancos_DepositosCaja If Not FolioIE > 0 Then OcurrioError = True End If - CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario) + CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario) documentos += String.Format("Depósito: {1}    
", CveIEOrigen, FolioIE) @@ -295,7 +301,7 @@ Partial Class Bancos_DepositosCaja OcurrioError = True Exit For End If - CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 4cf9f6c23..15afe3ed3 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6237,7 +6237,7 @@ Partial Class Compras_Compras If Not DdlTipoComprobante.SelectedValue.Contiene("Ant") Then importeMovimiento = ImporteIEPSAcreditable importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero End If @@ -6246,7 +6246,7 @@ Partial Class Compras_Compras 'Agregamos el Opuesto del 26 -> 25 If importeMovimiento <> 0 Then Dim IdCtaIEPS As Integer = 0 - If ObjConta.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaIEPS = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero End If @@ -6294,18 +6294,26 @@ Partial Class Compras_Compras importeMovimiento = importeRetIVAAcreditable importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador - If CtaProveedorRetIVA > 0 Then - IdCtaContable = CtaProveedorRetIVA - ElseIf UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + + If CtaProveedorRetIVA > 0 Then + IdCtaContable = CtaProveedorRetIVA + ElseIf UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero + Else + If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + End If End If End If + End If + + + 'Agregamos el Opuesto del 22 -> 15 If importeMovimiento <> 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ConceptoContableContra, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then @@ -6343,18 +6351,24 @@ Partial Class Compras_Compras importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" - If CtaProveedorRetIVA > 0 Then - IdCtaContable = CtaProveedorRetIVA - ElseIf UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + If CtaProveedorRetIVA > 0 Then + IdCtaContable = CtaProveedorRetIVA + ElseIf UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero > 0 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(Funcionalidad).ToEntero + Else + If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero + End If End If End If End If + + + End If End If @@ -6381,18 +6395,22 @@ Partial Class Compras_Compras importeMovimiento = importeRetISRAcreditable importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador - If CtaProveedorRetISR > 0 Then - IdCtaContable = CtaProveedorRetISR - ElseIf UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + If CtaProveedorRetISR > 0 Then + IdCtaContable = CtaProveedorRetISR + ElseIf UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero > 0 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero + Else + If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + End If End If End If End If + 'Agregamos el Opuesto del 23 -> 16 If importeMovimiento <> 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, ConceptoContableContra, Concepto + If(tipoCambioActual > 1, $" TC {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then @@ -6421,19 +6439,22 @@ Partial Class Compras_Compras importeMovimiento = importeRetISRxAcreditar importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" - If CtaProveedorRetISR > 0 Then - IdCtaContable = CtaProveedorRetISR - ElseIf UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero > 0 Then - IdCtaContable = UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero - Else - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + If CtaProveedorRetISR > 0 Then + IdCtaContable = CtaProveedorRetISR + ElseIf UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero > 0 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(funcionalidad).ToEntero + Else + If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + End If End If End If End If + End If End If @@ -6506,7 +6527,8 @@ Partial Class Compras_Compras For Each Row2 As DataRow In DT.Rows importeMovimiento = If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, Row2("ImporteSinImpuestos").ToString.ToDecimal, Row2("Total").ToString.ToDecimal) importeMN = importeMovimiento * tipoCambioActual * Multiplicador - If ObjConta.GetRetCuenta(49, Row2("CveActivoFijo").ToString.ToEntero) Then + + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(49, Row2("CveActivoFijo").ToString.ToEntero) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContActivoFijo").ToString.ToEntero End If @@ -6555,12 +6577,15 @@ Partial Class Compras_Compras importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"CveAlmacen = {RowDetalle("CveAlmacen")}").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen = {RowDetalle("CveAlmacen")}").ToString.ToDecimal 'Row2("Total").ToString.ToDecimal + Row2("CostoIndirectoAlmacen").ToString.ToDecimal importeMN = importeMovimiento * tipoCambioActual * Multiplicador - If ObjConta.GetRetCuenta(6, RowDetalle("CveClasificacion").ToString().ToEntero()) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + If ObjConta.GetRetCuenta(6, RowDetalle("CveClasificacion").ToString().ToEntero()) Then + If ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero + End If End If End If + If importeMN <> 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=SeContabiliza) Then @@ -6574,11 +6599,16 @@ Partial Class Compras_Compras importeMovimiento = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen = {Row2("CveAlmacen")}").ToString.ToDecimal 'Row2("Total").ToString.ToDecimal + Row2("CostoIndirectoAlmacen").ToString.ToDecimal importeMN = importeMovimiento * tipoCambioActual * Multiplicador - If ObjConta.GetRetCuenta(68, GvInv.HeaderRow.FCDropDownList("ddlAlmacen").SelectedValue.ToString.ToEntero) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero + + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + If ObjConta.GetRetCuenta(68, GvInv.HeaderRow.FCDropDownList("ddlAlmacen").SelectedValue.ToString.ToEntero) Then + If ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero + End If End If End If + + If importeMN <> 0 Then 'Conta ContPAQ If IdCtaContable = 0 Then @@ -6659,23 +6689,27 @@ Partial Class Compras_Compras importeMN = importeMovimiento * tipoCambioActual * Multiplicador 'TIENE QUE TENER EL IMPORTEMN IGUAL AL IMPORTEMOVIMIENTO PORQUE NO TOMA EN CUENTA SI UN PRODUCTO ES TIPO SERVICIO End Select - If ConceptoContabilizacion = 6 Then - If ObjConta.GetRetCuenta(ConceptoContabilizacion, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + If ConceptoContabilizacion = 6 Then + If ObjConta.GetRetCuenta(ConceptoContabilizacion, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero + End If + Else + If ObjConta.GetRetCuenta(ConceptoContabilizacion, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero + End If End If - Else - If ObjConta.GetRetCuenta(ConceptoContabilizacion, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero + + If ObjConta.GetRetCuenta(ConceptoContabilizacionME, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContableME = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero + End If + + If ObjConta.GetRetCuenta(ConceptoContabilizacionMEComp, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then + IdCtaContableMEComp = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero End If End If - If ObjConta.GetRetCuenta(ConceptoContabilizacionME, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContableME = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero - End If - If ObjConta.GetRetCuenta(ConceptoContabilizacionMEComp, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then - IdCtaContableMEComp = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero - End If Dim CveMovimientoAlmacen As Integer = -1 'If importeMovimiento <> 0 Then @@ -6777,7 +6811,7 @@ Partial Class Compras_Compras For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "CveSubProyecto"}).Rows - If ObjConta.GetRetCuenta(6, RowDetalle("CveClasificacion").ToString().ToEntero()) Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(6, RowDetalle("CveClasificacion").ToString().ToEntero()) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero End If @@ -6835,7 +6869,7 @@ Partial Class Compras_Compras CveMovimientoDevolucion = Devolucion.CveMovimiento End If - If ObjConta.GetRetCuenta(ConceptoContabilizacionNC, UsuarioActual.CveEmpresa) Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContabilizacionNC, UsuarioActual.CveEmpresa) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero End If @@ -7054,7 +7088,7 @@ Partial Class Compras_Compras 'CLASIFICACION If Row2("CveClasificacion").ToString.ToEntero > 0 AndAlso DdlTipoComprobante.SelectedValue = "Fac" Then - If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero Else @@ -7168,7 +7202,8 @@ Partial Class Compras_Compras Case 59 'Documentos importeMovimiento = importeCreditos importeMN = importeMovimiento * tipoCambioActual * Multiplicador - If ObjConta.GetRetCuenta(ConceptoContable, CveProveedor) Then + + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, CveProveedor) Then If ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero @@ -7351,7 +7386,8 @@ Partial Class Compras_Compras Case 29 'Funcionarios y Empleados importeMovimiento = importeFE importeMN = importeMovimiento * tipoCambioActual * Multiplicador - If ObjConta.GetRetCuenta(ConceptoContable, CvePersonal) Then + + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(ConceptoContable, CvePersonal) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContPersonal").ToString.ToEntero End If @@ -7367,12 +7403,12 @@ Partial Class Compras_Compras Dim PorcentajeImpuestoAnticipo = PorcentajeIVA CtaIvaxAcreditar = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0) CtaIvaAcreditable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0) - If ObjConta.GetRetCuenta(14, UsuarioActual.CveEmpresa) And Not CtaIvaxAcreditar > 0 Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(14, UsuarioActual.CveEmpresa) And Not CtaIvaxAcreditar > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then CtaIvaxAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero End If End If - If ObjConta.GetRetCuenta(19, UsuarioActual.CveEmpresa) And Not CtaIvaAcreditable > 0 Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjConta.GetRetCuenta(19, UsuarioActual.CveEmpresa) And Not CtaIvaAcreditable > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then CtaIvaAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero End If diff --git a/Ventas/MetasVendedores.aspx.vb b/Ventas/MetasVendedores.aspx.vb index f92b781f9..cc89c411b 100644 --- a/Ventas/MetasVendedores.aspx.vb +++ b/Ventas/MetasVendedores.aspx.vb @@ -120,13 +120,13 @@ Partial Class MetasVendedores End Sub Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - + + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim params As New List(Of ReportParameter) - params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa)) + If Imagen.Exists Then - params.Add(New ReportParameter("pImg", logouri)) + params.Add(New ReportParameter("pImg", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("pImg", "")) End If From 86be7031ccfac4d5c01c4067f880d0fde9124789 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 27 May 2022 17:54:04 -0700 Subject: [PATCH 48/48] Devoluciones Agregar Comprobante --- Bancos/Devoluciones.aspx | 17 +++++++++++++++ Bancos/Devoluciones.aspx.cs | 41 ++++++++++++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/Bancos/Devoluciones.aspx b/Bancos/Devoluciones.aspx index 26ab60086..eaa04eda3 100644 --- a/Bancos/Devoluciones.aspx +++ b/Bancos/Devoluciones.aspx @@ -247,6 +247,23 @@
+ + + + + + +
+ +
+
+
+ + + + + +
diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs index dfbffe5c3..cfe9b6d4a 100644 --- a/Bancos/Devoluciones.aspx.cs +++ b/Bancos/Devoluciones.aspx.cs @@ -108,7 +108,10 @@ public partial class Bancos_Devoluciones : ClsPaginas divTipoDevolucion.Visible = false; break; } + + ComprobanteMuestraOculta(); CargaTipoTransaccion(tipo); + } protected void TipoDevolucion_SelectedIndexChanged(object sender, EventArgs e) @@ -125,6 +128,23 @@ public partial class Bancos_Devoluciones : ClsPaginas break; } + + ComprobanteMuestraOculta(); + + } + + + private void ComprobanteMuestraOculta() + { + if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2) + { + Anexo.Text = ""; + DvComprobante.Visible = false; + } + else + { + DvComprobante.Visible = true; + } } protected void CargaTipoTransaccion(string tipo) @@ -374,6 +394,19 @@ public partial class Bancos_Devoluciones : ClsPaginas } //terminan validaciones + + + + List filesgral = Anexo.getfiles().Archivos; + string filemove = ""; + string Comprobante = ""; + foreach(Archivo fileItem in filesgral){ + Comprobante = System.IO.Path.GetExtension(String.Format("{0}Temp\\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", ""); + filemove = fileItem.filename; + } + + + ClsBancos ObjIE = new ClsBancos(); ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL()); ClsCompras ObjComp = new ClsCompras(ObjIE.IniciaTransacSQL()); @@ -489,7 +522,7 @@ public partial class Bancos_Devoluciones : ClsPaginas { CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero(), DdlTipoTransanccion.SelectedValue.ToEntero(), TxtFechaDocumento.Text.Trim().ToDate(), TxtFolio.Text.Trim(), PagueseA, TxtImporte.Text.Trim().ToDouble(), CveMoneda, - TC, TxtObservaciones.Text.Trim(), "", false, false, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); + TC, TxtObservaciones.Text.Trim(), "", false, false, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); if (CveIE > 0) { //GUARDA PREPOLIZAS DETALLE DEVOLUCION @@ -648,6 +681,12 @@ public partial class Bancos_Devoluciones : ClsPaginas } ObjIE.Commit(); + if (filemove != "") + { + filemove.FilesMove(CveIE.ToString(), String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false); + } + + if (!Msg.ToString().Equals("")) { string AccionJS = String.Format(@"document.location.href=""{0}"";", HttpContext.Current.Request.Url.PathAndQuery);