diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index e37fd5697..098f80b4c 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -5027,7 +5027,7 @@ Partial Class Compras_Compras 'ACTUALIZAR PRODUCTO/SERVICIO SAT If Version = "3.3" Then - If Not ObjProductosServicios.UpdateProductosServiciosSAT(Row("CvePS").ToString().ToEntero(), Row("CveSATPS").ToString().ToEntero(), UsuarioActual.CveUsuario) Then + If Not ObjProductosServicios.UpdateProductosServiciosSAT(Row("CvePS").ToString().ToEntero(), Row("CveSATPS").ToString().ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then ErrorSATPS = True End If End If @@ -15973,6 +15973,46 @@ Partial Class Compras_Compras End Sub + Public Sub CargaIndirectosServicios() + If DtServicios Is Nothing Then CreaDTServicios() + DtServicios.Rows.Clear() + + Dim objps As New ClsProductosServicios + Dim dr As DataRow + dvFacturas.Visible = False + GvFacturas.Visible = False + + For Each DrGv As DataRow In TmpDT.Rows + If DrGv("CvePS").ToString.ToEntero > 0 Then + If objps.GetPS(DrGv("CvePS").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then + If objps.DtResultados(0)("CveTipoPS").ToString.ToEntero = 1 Then + dr = DtServicios.NewRow() + dr("Consec") = DrGv("Consec").ToString.ToEntero + dr("Total") = DrGv("Total").ToString.ToDecimal + dr("CvePS") = DrGv("CvePS").ToString.ToEntero + dr("PS") = DrGv("PS").ToString + DtServicios.Rows.Add(dr) + End If + End If + End If + Next + + objps.Dispose() + + If DtServicios.Rows.Count > 0 Then + GVServicios.DataSource = DtServicios + GVServicios.DataBind() + GVServicios.Visible = True + Else + GVServicios.DataSource = Nothing + GVServicios.DataBind() + End If + + UpGVServicios.Update() + UpFacturas.Update() + UPGVFacturas.Update() + End Sub + Public Sub btnAgregarFlete_Click(sender As Object, e As EventArgs) Handles BtnAgregarFlete.Click Dim ListaConsecutivas As New List(Of String) 'Almacena los consecutivos que pertenecen al almacen @@ -16025,7 +16065,7 @@ Partial Class Compras_Compras ''Marcamos todos los almacenes como check 'GvInv.HeaderRow.FCCheckBox("cbAll").Checked = True 'cbAll_CheckedChanged(Nothing, Nothing) - + RegistraScript("$('#ModalFletesImportaciones').modal('hide');") End Sub Private Sub CargaGastosServicios(CvePS As Integer) @@ -18157,7 +18197,7 @@ Partial Class Compras_Compras CvePS = DdlPSAlias2.SelectedValue.ToEntero tPS = DdlPSAlias2.SelectedText - If PS.AddPSAlias(System.Web.HttpUtility.HtmlDecode(TxtPSAlias.Text.Trim), CvePS) Then + If PS.AddPSAlias(System.Web.HttpUtility.HtmlDecode(TxtPSAlias.Text.Trim), CvePS, UsuarioActual.CveUsuario) Then GlobalDTProductosServiciosAlias(-1) = PS.DtResultados TmpDT.Rows(HdnAliasInd.Value.ToEntero)("CvePS") = CvePS @@ -20058,6 +20098,9 @@ Partial Class Compras_Compras DivGastosyServicios.Visible = MostrarGastosServicios DivGastosyServiciosFooter.Visible = MostrarGastosServicios + If MostrarGastosServicios Then + CargaIndirectosServicios() + End If DivVincularCrear.Visible = Not MostrarGastosServicios DivVincularCrearFooter.Visible = Not MostrarGastosServicios diff --git a/Compras/eFacturas.aspx b/Compras/eFacturas.aspx index aef1158b7..3069747e7 100644 --- a/Compras/eFacturas.aspx +++ b/Compras/eFacturas.aspx @@ -216,7 +216,7 @@ - + diff --git a/Inventarios/RepNotasSinAlmacen.aspx.vb b/Inventarios/RepNotasSinAlmacen.aspx.vb index 95cdd8db2..d558f6498 100644 --- a/Inventarios/RepNotasSinAlmacen.aspx.vb +++ b/Inventarios/RepNotasSinAlmacen.aspx.vb @@ -146,7 +146,7 @@ Partial Class RepNotasSinAlmacen CveClienteProveedor = DdlProveedor.SelectedValue.ToEntero End If - If Reporte.RepNotasSinAlmacen(2, CveClienteProveedor, FechaInicial, FechaFinal, DdlTipoDocto2.SelectedValue.ToEntero, -1, UsuarioActual.Empresa.CveEmpresa) Then + If Reporte.RepNotasSinAlmacen(2, CveClienteProveedor, FechaInicial, FechaFinal, DdlTipoDocto2.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa) Then GvCompras.DataSource = Reporte.DtResultados DtNotasSinAlmacenCompras = Reporte.DtResultados Else diff --git a/Ventas/ActualizarPrecios.aspx.vb b/Ventas/ActualizarPrecios.aspx.vb index 54e4822da..71dd6e415 100644 --- a/Ventas/ActualizarPrecios.aspx.vb +++ b/Ventas/ActualizarPrecios.aspx.vb @@ -1,5 +1,6 @@  Option Explicit On +Option Strict On Imports Extensiones Imports System.Data @@ -293,7 +294,7 @@ Partial Class Ventas_ActualizarPrecios #Region "C A R G A R E X C E L " Private Sub BtnDescargarFormato_Click(sender As Object, e As EventArgs) Handles BtnDescargarFormato.Click - Dim DtExcel As DataTable = (From row As GridViewRow In GVPrecios.Rows + Dim DtExcel As DataTable = (From row As GridViewRow In GVPrecios.Rows.Cast(Of GridViewRow) Where row.RowType = DataControlRowType.DataRow Select New With { @@ -408,7 +409,7 @@ Partial Class Ventas_ActualizarPrecios Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) For Each row As DataRow In dt.Rows Dim Correcto As Boolean = False - Dim CvePS As Integer = DtPS.FiltroPrimeroValor("CvePS", String.Format("Codigo='{0}' AND CveEmpresa={1}", row(0).ToString(), UsuarioActual.CveEmpresa)) + Dim CvePS As Integer = DtPS.FiltroPrimeroValor("CvePS", String.Format("Codigo='{0}' AND CveEmpresa={1}", row(0).ToString(), UsuarioActual.CveEmpresa)).ToEntero Dim CvePrecioLista As Integer = DdlPrecioListaCarga.SelectedValue.ToEntero() Dim PrecioNuevo As Decimal = row("Precio").ToString().ToDecimal() Dim Porcentaje As Decimal = -1 diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 51997adf9..e4ea4d42e 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -821,7 +821,6 @@ Partial Class ProductosyServicios lbTitulo.Text = $"{lbTitulo.Text}{ObjProductosServicios.PS}" LtProductoUnificar.Text = ObjProductosServicios.PS ddlMetodos.SelectedValue = ObjProductosServicios.CveMetodoInventario.ToString - TxtAlmacenSeccion.Text = ObjProductosServicios.AlmacenSeccion.ToString DdlConceptoRelacionado.SelectedValueExist(ObjProductosServicios.CveConceptoContable.ToString) DdlProveedor.SelectedValue = ObjProductosServicios.CveProveedorCompra.ToString diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 9d25b9949..22d27ffc1 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2643,6 +2643,12 @@ Partial Class Ventas End If + 'rmf.2020.09.30, codigo de prueba + If UsuarioActual.CveEmpresa = 1 Then + DivMesesSinIntereses.Visible = True + DivDdlCuentaTarjetaCredito.Attributes.Add("class", "col-md-4") + DivContadoOtros.Visible = True + End If If UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 Then @@ -15133,7 +15139,7 @@ Partial Class Ventas If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then 'VALIDA EXISTENCIA - If UsuarioActual.CveEmpresa.Contiene({72, 80, 119}) Then + If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153}) Then If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia) Return False @@ -18497,8 +18503,8 @@ Partial Class Ventas Dim DtCC As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) - DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) - DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) + DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) + DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND (CveTipoCuenta <> 1 OR TieneTerminal = 1)", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) DdlCuentaTransferencia.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero() <= 0, 1, DdlMoneda.SelectedValue.ToEntero()))) diff --git a/vwd.webinfo b/vwd.webinfo index 10e72764b..ca182e0f3 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -100,6 +100,18 @@ + + + + + + + + + + + +