diff --git a/Bancos/Devoluciones.aspx b/Bancos/Devoluciones.aspx index 0948bde24..2ffebf93d 100644 --- a/Bancos/Devoluciones.aspx +++ b/Bancos/Devoluciones.aspx @@ -17,7 +17,7 @@ - +
@@ -58,7 +58,7 @@
- +
@@ -333,9 +333,10 @@ } else { txt.value = ""; } - - $get('TxtImporte').value = FormatoNumero(SumaValores(), 2); - + let valor = FormatoNumero(SumaValores(), 2); + $('#hdnTotal').val(valor); + $get('TxtImporte').value = valor; + } function FnCambia(chk, txt, saldo, op, text) { @@ -353,7 +354,9 @@ } } var Suma = SumaValores(); - $get('TxtImporte').value = FormatoNumero(Suma, 2); + let valor = FormatoNumero(SumaValores(), 2); + $('#C_hdnTotal').val(valor); + $get('TxtImporte').value = valor; if ($get('TxtTotal') != null) { $get('TxtTotal').value = FormatoNumero(Suma + (ToDouble($get('TxtComisiones').value * -1)), 2); diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs index 9a4c6db72..f8131736a 100644 --- a/Bancos/Devoluciones.aspx.cs +++ b/Bancos/Devoluciones.aspx.cs @@ -344,12 +344,26 @@ public partial class Bancos_Devoluciones : ClsPaginas return; } - if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2 && TxtValor.Text == "") + if (OpcionDevolucion.SelectedValue.ToEntero() == 3 && TipoDevolucion.SelectedValue.ToString().ToEntero() == 2) { - Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia); - return; + if (TxtValor.Text == "") + { + Alert("Debe ingresar un importe", TipoMensaje.MsgAdvertencia); + return; + } + else + { + int valor = (TxtValor.Text.ToEntero() * TxtVecesAplicar.Text.ToEntero()).ToEntero(); + int total = hdnTotal.Text.ToEntero(); + if (valor <> total) + { + Alert("La cantidad total debe ser igual a lo seleccionado"); + } + } + } + ClsBancos ObjIE = new ClsBancos(); ClsContabilidad ObjMov = new ClsContabilidad(ObjIE.IniciaTransacSQL()); ClsCompras ObjComp = new ClsCompras(ObjIE.IniciaTransacSQL()); diff --git a/Contabilidad/ContabilidadElectronica.aspx.vb b/Contabilidad/ContabilidadElectronica.aspx.vb index 0e154f034..e59728d33 100644 --- a/Contabilidad/ContabilidadElectronica.aspx.vb +++ b/Contabilidad/ContabilidadElectronica.aspx.vb @@ -183,20 +183,26 @@ Partial Class Contabilidad_ContabilidadElectronica Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), DdlEjercicio.SelectedValue).ToDate Dim FechaF = FechaI.LastDayOfMonth Dim DtCuentas As New DataTable - - Dim ObjConpaq As New ClsContPAQi(UsuarioActual.Empresa) - If ObjConpaq.GetBalanzaElectronica(FechaI, FechaF) Then - DtCuentas = ObjConpaq.DtResultados + If UsuarioActual.Empresa.TipoContabilidad = 1 Then + Dim objconta As New ClsContabilidad + If objconta.GetBalanzaComprobacion(FechaI, FechaF, UsuarioActual.CveEmpresa) Then + DtCuentas = objconta.DtResultados + End If + objconta.Dispose() + Else + Dim ObjConpaq As New ClsContPAQi(UsuarioActual.Empresa) + If ObjConpaq.GetBalanzaElectronica(FechaI, FechaF) Then + DtCuentas = ObjConpaq.DtResultados + End If + ObjConpaq.Dispose() End If - ObjConpaq.Dispose() - If DtCuentas IsNot Nothing AndAlso DtCuentas.Rows.Count > 0 Then Dim Str As New StringBuilder 'CABECERA Str.Append("") - Str.Append("") Next @@ -225,7 +231,6 @@ Partial Class Contabilidad_ContabilidadElectronica 'FIN Str.Append("") - 'GUARDA ARHIVO ArchivoBalanza = Server.MapPath(String.Format("~/Empresas/{0}/ContabilidadElectronica/{1}{2}{3}BN.xml", UsuarioActual.CveEmpresa, UsuarioActual.Empresa.RFC, DdlEjercicio.SelectedValue, DdlPeriodo.SelectedValue.PadLeft(2, "0"c))) diff --git a/Inventarios/InventarioFisicoDetalle.aspx b/Inventarios/InventarioFisicoDetalle.aspx index dcc4ec481..4a530b714 100644 --- a/Inventarios/InventarioFisicoDetalle.aspx +++ b/Inventarios/InventarioFisicoDetalle.aspx @@ -369,9 +369,14 @@ " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
- + - + + + + + + @@ -380,15 +385,15 @@ - - - - - - + + + + + + diff --git a/Inventarios/InventarioFisicoDetalle.aspx.vb b/Inventarios/InventarioFisicoDetalle.aspx.vb index b1f76bf7e..49dd744fb 100644 --- a/Inventarios/InventarioFisicoDetalle.aspx.vb +++ b/Inventarios/InventarioFisicoDetalle.aspx.vb @@ -296,10 +296,14 @@ Partial Class Inventarios_InventarioFisicoDetalle Dim Inventario As New ClsInventarios If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then If Inventario.DtResultados.Rows.Count > 0 Then + GvIFD.Columns(1).Visible = Inventario.DtResultados.MAX("CodigoBarras") <> "" GvIFD.Columns(4).Visible = Inventario.DtResultados.MAX("CveSeccionAlmacen", "CveSeccionAlmacen IS NOT NULL").ToEntero > 0 GvIFD.Columns(5).Visible = Inventario.DtResultados.MAX("SerieLote") <> "" GvIFD.Columns(6).Visible = Inventario.DtResultados.MAX("Lote") <> "" GvIFD.Columns(7).Visible = Inventario.DtResultados.MAX("FechaCaducidad", "FechaCaducidad IS NOT NULL").ToDate > MinFecha + GvIFD.Columns(9).Visible = Inventario.DtResultados.MAX("MalEstado", "MalEstado IS NOT NULL").ToEntero > 0 + GvIFD.Columns(10).Visible = Inventario.DtResultados.MAX("NoVendible", "NoVendible IS NOT NULL").ToEntero > 0 + GvIFD.DataSource = Inventario.DtResultados '.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(500).CopyToDataTable Else GvIFD.DataSource = Nothing @@ -648,15 +652,19 @@ Partial Class Inventarios_InventarioFisicoDetalle Private Sub LnkExcelUniverso_Click(sender As Object, e As EventArgs) Handles LnkExcelUniverso.Click Dim IncluyePS, ExcluyePS, IncluyeClasificacion, ExcluyeClasificacion, IncluyeProveedor As New StringBuilder Dim ObjInventario As New ClsInventarios - + Dim DtPS As DataTable If ObjInventario.GetInventarioFisicoUniversoProductos(CveInventarioFisico, UsuarioActual.CveEmpresa) Then - + If ObjInventario.DtResultados.Rows.Count > 0 Then + DtPS = ObjInventario.DtResultados.FiltraParametros("", "", {"Codigo", "PS", "Clasificacion", "RazonSocial"}) + Else + Alert("Error al consultar la informacion") + End If End If Dim NombreArchivo As String SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) Dim workbook As New ExcelFile() Dim worksheet = workbook.Worksheets.Add("Productos") - worksheet.InsertDataTable(ObjInventario.DtResultados, New InsertDataTableOptions() With + worksheet.InsertDataTable(DtPS, New InsertDataTableOptions() With { .ColumnHeaders = True, .StartRow = 0, @@ -726,9 +734,13 @@ Partial Class Inventarios_InventarioFisicoDetalle HfCvePS.Value = GvRow.DataKey("CvePS").ToString HfCveUM.Value = GvRow.DataKey("CveUnidadMedida").ToString - TxtSerieLote.Text = GvRow.DataKey("SerieLote").ToString - TxtLoteEdit.Text = GvRow.DataKey("Lote").ToString - TxtFechaCaducida.Text = GvRow.DataKey("FechaCaducidad").ToString + TxtSerieLote.Text = If(Convert.ToBoolean(GvRow.DataKey("AplicaSerie").ToString), GvRow.DataKey("SerieLote").ToString, "") + TxtLoteEdit.Text = If(Convert.ToBoolean(GvRow.DataKey("AplicaLote").ToString), GvRow.DataKey("Lote").ToString, "") + TxtFechaCaducida.Text = If(Convert.ToBoolean(GvRow.DataKey("AplicaCaducidad").ToString), If(GvRow.DataKey("FechaCaducidad").ToString <> "", GvRow.DataKey("FechaCaducidad").ToString.ToDate.ToShortDateString, ""), "") + + TxtSerieLote.Enabled = Convert.ToBoolean(GvRow.DataKey("AplicaSerie").ToString) + TxtLoteEdit.Enabled = Convert.ToBoolean(GvRow.DataKey("AplicaLote").ToString) + TxtFechaCaducida.Enabled = Convert.ToBoolean(GvRow.DataKey("AplicaCaducidad").ToString) TxtCantidad.Text = GvRow.DataKey("Cantidad").ToString UpEditarPS.Update() diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index dae0fd7d6..5b552d66e 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -2110,14 +2110,16 @@ Partial Class OC DrPSValidar("Cantidad") = TxtCant.Text.Trim.ToDecimal DrPSValidar("PU") = txtPrecioUnitario.Text.Trim.ToDecimal dttemp.Rows.Add(DrPSValidar) - - Dim dtPSInvalidos As String = ValidarPSContrato(dttemp) - If dtPSInvalidos <> "" Then - Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia) - Exit Sub + If UsuarioActual.Empresa.Funcionalidad(545) = "1" Then + Dim dtPSInvalidos As String = ValidarPSContrato(dttemp) + If dtPSInvalidos <> "" Then + Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia) + Exit Sub + End If End If + If DtDetalle IsNot Nothing Then Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=DdlP2.SelectedValue.ToEntero).FiltroPrimero("") If DrPS Is Nothing Then @@ -2485,12 +2487,15 @@ Partial Class OC TieneError = True End If - Dim dtPSInvalidos As String = ValidarPSContrato(DtDetalle.FiltraParametros("", "", {"CveSubProyecto", "CvePS", "Cantidad", "PU"})) - If dtPSInvalidos <> "" Then - Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia) - TieneError = True + If UsuarioActual.Empresa.Funcionalidad(545) = "1" Then + Dim dtPSInvalidos As String = ValidarPSContrato(DtDetalle.FiltraParametros("", "", {"CveSubProyecto", "CvePS", "Cantidad", "PU"})) + If dtPSInvalidos <> "" Then + Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia) + TieneError = True + End If End If + Return TieneError End Function Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click