From ee889a8bd2bece55f4ec05ac57843c0d2df92341 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 9 Nov 2020 12:58:13 -0700 Subject: [PATCH 1/7] - todos las cuentas --- Contabilidad/RepIVA.aspx.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 6d37128bf..ff5467b8a 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -68,6 +68,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas DdlCuenta.DataSource = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:UsuarioActual.CveEmpresa, CveTipoCuenta:2); DdlCuenta.DataBind(); + DdlCuenta.Items.Insert(0, new ListItem("Todos", "-1")); } public void Consulta() From a684591c6713bcd28b90b834d166331e22022878 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 9 Nov 2020 12:58:36 -0700 Subject: [PATCH 2/7] -- registro, con serie,lote,caducidad --- Inventarios/Consignaciones.aspx.vb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Inventarios/Consignaciones.aspx.vb b/Inventarios/Consignaciones.aspx.vb index a98290c76..8da1e3b5e 100644 --- a/Inventarios/Consignaciones.aspx.vb +++ b/Inventarios/Consignaciones.aspx.vb @@ -595,9 +595,9 @@ Partial Class Inventarios_Consignaciones Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero Dim SeccionAlmacen As String = DdlSeccionAlmacen.SelectedItem.Text - Dim Serie As String = If(TxtSerie.Text = "", "-1", TxtSerie.Text) - Dim Lote As String = If(TxtLote.Text = "", "-1", TxtLote.Text) - Dim Caducidad As String = If(TxtCaducidad.Text = "", "-1", TxtCaducidad.Text) + Dim Serie As String = If(TxtSerie.Text = "", "", TxtSerie.Text) + Dim Lote As String = If(TxtLote.Text = "", "", TxtLote.Text) + Dim Caducidad As String = If(TxtCaducidad.Text = "", MinFecha.ToShortDateString, TxtCaducidad.Text) Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=PSSelected).FiltroPrimero("") @@ -634,6 +634,15 @@ Partial Class Inventarios_Consignaciones GvDatos.DataSource = DtMovimientos GvDatos.DataBind() + + If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then + GvDatos.Columns(7).Visible = DtMovimientos.MAX("CveSeccionAlmacen").ToEntero > 0 + GvDatos.Columns(8).Visible = DtMovimientos.MAX("Serie") <> "" + GvDatos.Columns(9).Visible = DtMovimientos.MAX("Lote") <> "" + GvDatos.Columns(10).Visible = DtMovimientos.MAX("FechaCaducidad").ToDate > MinFecha + + End If + TxtCantidad.Text = "" TxtPU.Text = "" LbTotal.Text = "" From 69e7eee86f22ee9c32a524285bb9116943404cbe Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 9 Nov 2020 12:58:56 -0700 Subject: [PATCH 3/7] -- permiso 131, que aplique al editar una OC ya autorizada --- OC/OC.aspx.vb | 2 +- vwd.webinfo | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 35b261248..fb8f773a7 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -3740,7 +3740,7 @@ Partial Class OC GvD.EditIndex = e.NewEditIndex CargaDatosDetalles() Dim EditingRow As GridViewRow = GvD.Rows(e.NewEditIndex) - If Not EsCreaApartirDe Then + If Not EsCreaApartirDe AndAlso Not UsuarioActual.TienePermisoProceso(131) Then 'si tiene el proce 131, e va a permitir, sino que lo bloquee If EditingRow.DataKey("TipoDato").ToEntero = 2 Or EditingRow.DataKey("CantidadNoEditable").ToDecimal > 0 Then EditingRow.FCDropDownList("DdlClasificacion").Enabled = False EditingRow.FCDropDownList("DdlPS").Enabled = False diff --git a/vwd.webinfo b/vwd.webinfo index 58b25d2ef..1391aa8cf 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -130,6 +130,10 @@ + + + + From 2f5e5d763c70ba67d1ee814654d81f15b254e1bd Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Tue, 10 Nov 2020 10:53:04 -0700 Subject: [PATCH 4/7] Generales --- Compras/eFacturas.aspx.vb | 7 ++++++- Contratos/Contrato.aspx.vb | 4 ++-- Inventarios/Kardex.aspx | 6 ++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index cbeb4ecb2..6282a37cd 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -2809,7 +2809,12 @@ Partial Class Compras_eFacturas dRow2("CveFactura") = drow("CveFactura").ToString.ToEntero dRow2("CveMetodoPago") = drow("CveMetodoPago").ToString.ToEntero dRow2("SerieFolioCompra") = drow("SerieFolioCompra").ToString - dRow2("CvePrePolizaDetalle") = drow("CvePrePolizaDetalle").ToString + Try + dRow2("CvePrePolizaDetalle") = drow("CvePrePolizaDetalle").ToString + Catch ex As Exception + dRow2("CvePrePolizaDetalle") = 0 + End Try + If drow("CveIE").ToString.ToEntero > 0 Then diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb index 789944859..7e94ff778 100644 --- a/Contratos/Contrato.aspx.vb +++ b/Contratos/Contrato.aspx.vb @@ -1275,7 +1275,7 @@ Partial Class Contratos_Default PorcentajeComision:=TxtPorcentajeComision.Text.ToEntero, TipoGarantia:=DdlTipoGarantia.SelectedValue.ToEntero, Folio:=TxtFolio.Text.ToEntero, FechaVenc:=txtFechaVenc.Text.ToDate, EstatusFianza:=DdlEstatusFianza.SelectedValue.ToEntero, CvePeriodo:=DdlPeriodo.SelectedValue.ToEntero, CveCuentaEquipo:=DdlCuentaEquipo.SelectedValue.ToEntero, CveContratoPlantilla:=DdlPlantillaContrato.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=DdlClienteDireccionEnvio.SelectedValue.ToEntero, AplicaImpuestosLocales:=ChkImpuestosLocales.Checked, CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), - FacturacionCicilica:=ChkAplicaFacCiclica.Checked, FacturacionCiclicaAutomatico:=ChkFacAutomatica.Checked, DiaMesFacturacion:=DdlDiaFact.SelectedValue.ToEntero()) + FacturacionCicilica:=ChkAplicaFacCiclica.Checked, FacturacionCiclicaAutomatico:=ChkFacAutomatica.Checked, DiaMesFacturacion:=If(DdlDiaFact.SelectedValue.ToEntero() < 0, 0, DdlDiaFact.SelectedValue.ToEntero())) TieneError = Not GuardaFianzas(ObjContratos) @@ -1364,7 +1364,7 @@ Partial Class Contratos_Default CveAlmacenOrigen:=DdlAlmacenOrigen.SelectedValue.ToEntero, CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, PorcentajeComision:=TxtPorcentajeComision.Text.ToEntero, TipoGarantia:=DdlTipoGarantia.SelectedValue.ToEntero, Folio:=TxtFolio.Text.ToEntero, FechaVenc:=txtFechaVenc.Text.ToDate, EstatusFianza:=DdlEstatusFianza.SelectedValue.ToEntero, CveContratoPlantilla:=DdlPlantillaContrato.SelectedValue.ToEntero, CveCuentaEquipo:=DdlCuentaEquipo.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=DdlClienteDireccionEnvio.SelectedValue.ToEntero, AplicaImpuestosLocales:=ChkImpuestosLocales.Checked, - CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), FacturacionCicilica:=ChkAplicaFacCiclica.Checked, FacturacionCiclicaAutomatico:=ChkFacAutomatica.Checked, DiaMesFacturacion:=DdlDiaFact.SelectedValue.ToEntero(), CvePeriodo:=DdlPeriodo.SelectedValue.ToEntero()) Then + CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), FacturacionCicilica:=ChkAplicaFacCiclica.Checked, FacturacionCiclicaAutomatico:=ChkFacAutomatica.Checked, DiaMesFacturacion:=If(DdlDiaFact.SelectedValue.ToEntero() < 0, 0, DdlDiaFact.SelectedValue.ToEntero()), CvePeriodo:=DdlPeriodo.SelectedValue.ToEntero()) Then TieneError = Not GuardaFianzas(ObjContratos) diff --git a/Inventarios/Kardex.aspx b/Inventarios/Kardex.aspx index 08c2ac128..d5fdfdc19 100644 --- a/Inventarios/Kardex.aspx +++ b/Inventarios/Kardex.aspx @@ -134,6 +134,12 @@   + + + + + + From a25d40e2292f4f953f0ac37931ea56c2a783966c Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 10 Nov 2020 14:46:06 -0700 Subject: [PATCH 5/7] -- minima venta --- Inventarios/EntradasSalidas.aspx.vb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 7dd85fdfa..20e6e8e4e 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -1259,6 +1259,13 @@ Partial Class Inventarios_EntradasSalidas Alert("El producto requiere Serie", TipoMensaje.MsgAdvertencia) End If + If RowPS("VentaMinima").ToString.ToDecimal > 0 Then + If Cantidad Mod RowPS("VentaMinima").ToString().ToDecimal <> 0 Then + Alert(String.Format("El producto se vende solo en cantidades de {0}", RowPS("VentaMinima").ToString())) + Valido = False + End If + End If + 'salida If Valido AndAlso DdlConcepto.SelectedValue.Contiene({"3", "5", "7", "8", "11", "12", "13", "15", "16", "17", "20", "21", "30", "31"}) Then ' salida de almacen From 10247d304c8d4204de57d3873325b01810e20464 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 10 Nov 2020 14:46:20 -0700 Subject: [PATCH 6/7] -- mejoras en carga de porv --- General/SaldosIniciales.aspx.vb | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 245310417..8e68f2b23 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1237,14 +1237,15 @@ Partial Class General_SaldosIniciales Dim TipoDocto As String = Row("Tipo Documento").ToString Dim CveProveedor As Integer = DtProveedores.FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString.ToEntero GuardaLog(Sucursal + " - " + Row("Sucursal").ToString) - Dim RetIVA As Double = Row("Ret IVA").ToString.ToDouble - Dim RetISR As Double = Row("Ret ISR").ToString.ToDouble + Dim RetIVA As Decimal = Row("Ret IVA").ToString.ToDecimal + Dim RetISR As Decimal = Row("Ret ISR").ToString.ToDecimal Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal Dim Moneda As String = Row("Moneda").ToString Dim TipoCambio As String = Row("Tipo Cambio").ToString Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString.ToDate Dim CveMoneda As Integer = 1 Dim CveProveedorSucursal As Integer = Row("CveProveedorSucursal").ToString.ToEntero + Dim PorcentajeIVA As String = Row("PorcentajeIVA").ToString If Not CvePS > 0 Then Alert(String.Format("No se encontró el Producto Servicio"), TipoMensaje.MsgError) : ErrorCompras = True @@ -1252,7 +1253,7 @@ Partial Class General_SaldosIniciales If Not CveProveedor > 0 Then Alert(String.Format("No se encontró el Proveedor con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorCompras = True : Exit For If Not CveProveedorSucursal > 0 Then CveProveedorSucursal = -1 - TipoDocto = IIf(TipoDocto.ToUpper = "INGRESOS", "Fac", "NC").ToString + TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESOS", "INGRESO", "ING"), "Fac", "NC").ToString 'Temporalmente SE BORRARA @@ -1261,9 +1262,9 @@ Partial Class General_SaldosIniciales Dim CodProvee As String = "" 'Row("CodProvee2").ToString 'Moneda - If Moneda = "Pesos" Then + If Moneda.ToUpper.Contiene("PESOS", "PESO", "MXN") Then CveMoneda = 1 - ElseIf Moneda = "Dólares" Then + ElseIf Moneda.ToUpper.Contiene("DOLARES", "DOLAR", "USD", "DÓLARES") Then CveMoneda = 2 End If @@ -1287,7 +1288,7 @@ Partial Class General_SaldosIniciales 'Compra If Not ObjCompras.AddCompra(TipoDocto, "", Serie, Folio, Folio2, CveProveedor.ToEntero, SubTotal, 0, 0, IVA, RetIVA, RetISR, IEPS, 0, 0, Total, Fecha, CveMoneda, TipoCambio.ToDouble, FechaVencimiento, False, CodProvee, 1, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorSucursal:=CveProveedorSucursal, - NumeroReembolso:=Transaccion, PorcentajeIVA:=0.16) Then + NumeroReembolso:=Transaccion, PorcentajeIVA:=PorcentajeIVA.ToDecimal) Then ErrorCompras = True Exit For End If @@ -1308,6 +1309,10 @@ Partial Class General_SaldosIniciales If IEPS > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IEPS, Folio, 25, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=IEPS, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For + If RetIVA > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetIVA, Folio, 15, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=RetIVA, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For + If RetISR > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetISR, Folio, 16, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=RetISR, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For + + 'Saldo If Saldo < Total Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total - Saldo, Folio, 17, Folio, Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=Total - Saldo) Then ErrorCompras = True : Exit For From 3c379422045581266020b4a5e46c7af2bb28fdbd Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 11 Nov 2020 14:51:04 -0700 Subject: [PATCH 7/7] - no contabilizar al contpaq en automatico, solo si usa ac --- Compras/Compras.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 0268da558..7fec87ed4 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -14699,7 +14699,7 @@ Partial Class Compras_Compras If TxtFecha.Text.ToDate.Month < TxtFechaCancelacion.Text.ToDate.Month Or TxtFecha.Text.ToDate.Year < TxtFechaCancelacion.Text.ToDate.Year Or DdlTipoComprobante.SelectedValue.Contiene("NC") Then 'CREA POLIZA NEGATIVA - If IdPoliza > 0 AndAlso ObjAC IsNot Nothing Then + If IdPoliza > 0 AndAlso ObjAC IsNot Nothing AndAlso UsuarioActual.Empresa.UsaAC Then If ObjAC.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjAC.DtResultados.Rows.Count > 0 Then dt = ObjAC.DtResultados @@ -14737,7 +14737,7 @@ Partial Class Compras_Compras If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePolizaNueva, CBool(dr("TipoMovto").ToString), dr("Importe").ToString.ToDecimal * -1, dr("Referencia").ToString, dr("CveConceptoContable").ToString.ToEntero, dr("Concepto").ToString, TxtFechaCancelacion.Text.ToDate, dr("IdCtaContable").ToString.ToEntero, dr("IdSegmentoNegocio").ToString.ToEntero, dr("CveIE").ToString.ToEntero, dr("CveVenta").ToString.ToEntero, dr("CveCompra").ToString.ToEntero, dr("CveSubProyecto").ToString.ToEntero, dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero, - dr("CveMovimientoAlmacen").ToString.ToEntero, dr("CveActivoFijo").ToString.ToEntero, dr("CveAcreedor").ToString.ToEntero, dr("CveColectiva").ToString.ToEntero, dr("CveCreditoDetalle").ToString.ToEntero, CveCuenta:=dr("CveCuenta").ToString.ToEntero, + dr("CveMovimientoAlmacen").ToString.ToEntero, dr("CveActivoFijo").ToString.ToEntero, -1, -1, dr("CveCreditoDetalle").ToString.ToEntero, CveCuenta:=dr("CveCuenta").ToString.ToEntero, ImporteMX:=dr("Importe").ToString.ToDecimal * -1, ImporteME:=dr("Importe").ToString.ToDecimal * -1, CveTipoGasto:=dr("CveTipoGasto").ToString.ToEntero, CveClasificacion:=dr("CveClasificacion").ToString.ToEntero, CveOCDetalle:=dr("CveOCDetalle").ToString.ToEntero, CveCompraAmortizacion:=dr("CveCompraAmortizacion").ToString.ToEntero) Then ErrorCancelar = True @@ -14761,7 +14761,7 @@ Partial Class Compras_Compras If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePolizaNueva, CBool(dr("TipoMovto").ToString), dr("Importe").ToString.ToDecimal * -1, dr("Referencia").ToString, dr("CveConceptoContable").ToString.ToEntero, dr("Concepto").ToString, TxtFechaCancelacion.Text.ToDate, dr("IdCtaContable").ToString.ToEntero, dr("IdSegmentoNegocio").ToString.ToEntero, dr("CveIE").ToString.ToEntero, dr("CveVenta").ToString.ToEntero, dr("CveCompra").ToString.ToEntero, dr("CveSubProyecto").ToString.ToEntero, dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero, - dr("CveMovimientoAlmacen").ToString.ToEntero, dr("CveActivoFijo").ToString.ToEntero, dr("CveAcreedor").ToString.ToEntero, dr("CveColectiva").ToString.ToEntero, dr("CveCreditoDetalle").ToString.ToEntero, CveCuenta:=dr("CveCuenta").ToString.ToEntero, + dr("CveMovimientoAlmacen").ToString.ToEntero, dr("CveActivoFijo").ToString.ToEntero, -1, -1, dr("CveCreditoDetalle").ToString.ToEntero, CveCuenta:=dr("CveCuenta").ToString.ToEntero, ImporteMX:=dr("Importe").ToString.ToDecimal * -1, ImporteME:=dr("Importe").ToString.ToDecimal * -1, CveTipoGasto:=dr("CveTipoGasto").ToString.ToEntero, CveClasificacion:=dr("CveClasificacion").ToString.ToEntero, CveOCDetalle:=dr("CveOCDetalle").ToString.ToEntero) Then ErrorCancelar = True Exit For