This commit is contained in:
2023-06-13 17:13:52 -07:00
13 changed files with 203 additions and 103 deletions

View File

@@ -2498,7 +2498,7 @@ Partial Class AF_AF
FechaBaja:=FechaBaja, Lat:=TxtLatitud.Text, Longi:=TxtLongitud.Text, AgroCuenta:=TxtAgroCuenta.Text) > 0 Then
ViewState("CveActivoFijo") = ObjAF.CveActivoFijo
GlobalDTActivoFijos(UsuarioActual.CveEmpresa) = Nothing
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
If UsuarioActual.Empresa.TipoContabilidad = 1 AndAlso DdlCtaContable.SelectedValue.ToEntero > 0 Then
If Not ObjContabilidad.AddCuentasAsignaciones(49, UsuarioActual.CveEmpresa, CveCuenta:=DdlCtaContable.SelectedValue.ToEntero, CveActivoFijo:=ObjAF.CveActivoFijo) Then
ErrorGuardar = True
End If

View File

@@ -1279,6 +1279,27 @@ Public Class ClsContabilidad
End Try
Return Retorno
End Function
Public Function UpdateContabilizable(CvePrePolizaDetalle As Integer, Contabilizar As Boolean) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_PrePolizasContabilizableUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePrePolizaDetalle", SqlDbType.Int).Value = CvePrePolizaDetalle
.Add("@Contabilizar", SqlDbType.Bit).Value = If(Contabilizar, 1, 0)
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
If ex.Message.Contains("50015;") Then
OnError("No se puede actualizar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else
OnError("Ocurrió un error al contabilizar las prepoliza detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
End Try
Return Retorno
End Function
Public Function ContabilizarPrePoliza(CvePrePoliza As Integer, CveUsuario As Integer, Empresa As Empresa, Optional Fecha As Date = MinFecha, Optional Concepto As String = "",
Optional ObjConta As ClsContPAQi = Nothing, Optional pIDPoliza As Integer = -1) As Boolean
@@ -1286,7 +1307,7 @@ Public Class ClsContabilidad
Dim Retorno As Boolean = False
Dim OcurrioError As Boolean = False
StrLog.AppendFormat("CvePrep:{0} - Inicio -", CvePrePoliza)
StrLog.AppendFormat("CvePrep:{0} - CveE:{1} - Inicio -", CvePrePoliza, Empresa.CveEmpresa)
If Empresa.TipoContabilizacion = 1 Then ' contabilidad en SIG

View File

@@ -3405,14 +3405,15 @@ Public Class ClsNominas
End Function
#Region "Visor sat"
Public Function SATSolicitudTimbreNominaGral(IDsolicitud As Integer, cveEmpresa As Integer, fechaInicio As String, fechaFin As String, TipoNomina As Integer) As Boolean
Public Function SATSolicitudTimbreNominaGral(IDsolicitud As Integer, CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, TipoNomina As Integer, RegimenContratacion As Integer) As Boolean
Dim retorno As Boolean = False
DataAdapter("[PA_SAT_SolicitudTimbreNominaGral]", CommandType.StoredProcedure)
addParameters("@IDsolicitud", SqlDbType.Int, IDsolicitud)
addParameters("@TipoNomina", SqlDbType.Int, TipoNomina)
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
addParameters("@FechaInicio", SqlDbType.VarChar, fechaInicio)
addParameters("@FechaFin", SqlDbType.VarChar, fechaFin)
addParameters("@CveEmpresa", SqlDbType.Int, CveEmpresa)
addParameters("@FechaInicio", SqlDbType.Date, FechaInicio)
addParameters("@FechaFin", SqlDbType.Date, FechaFin)
addParameters("@RegimenContratacion", SqlDbType.Int, RegimenContratacion)
retorno = RunQuery("Ocurrió un error al obtener el Calculo ISR anual.")
Return retorno
End Function

View File

@@ -3519,6 +3519,33 @@ Public Class ClsPaginas
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Public Shared Property GlobalDTContaCuentasContables(CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Afectable As Integer = -1, Optional CvePadre As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTContaCuentasContables-{CveEmpresa}"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjContabilidad As New ClsContabilidad
If ObjContabilidad.GetCuentas(-1, "-1", -1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing
End Using
End If
Dim filtros As New List(Of String)
If Codigo <> "-1" Then filtros.Add($"Codigo = '{Codigo}'")
If Afectable <> -1 Then filtros.Add($"Afectable = {Afectable}")
If CvePadre <> -1 Then filtros.Add($"CvePadre = {CvePadre}")
If filtros.Count > 0 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTContaCuentasContables = Dv.ToTable
Dv.Dispose()
Else
GlobalDTContaCuentasContables = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTContaCuentasContables-{CveEmpresa}"
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
#End Region
#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************"
Property GlobalDTAsistenciaDetalle() As DataTable

View File

@@ -730,7 +730,7 @@
<asp:RequiredFieldValidator ID="RFVDdlSubproyectoBancos" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubproyectoBancos" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarBancos"></asp:RequiredFieldValidator>
<i></i>
</div>
<div class="col-md-6" style="text-align: right!important">
<div class="col-md-3" style="text-align: right!important">
<asp:Button Text="Generar Bancos" runat="server" ID="BtnGeneraBancos" OnClick="BtnGeneraBancos_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarBancos" />
<asp:HiddenField ID="HdnBancoCvePrePoliza" runat="server" />
<asp:HyperLink ID="HplBancosLiga" runat="server" Text="Ver Póliza" CssClass="Texto" Visible="false" />

View File

@@ -291,6 +291,12 @@
<asp:TextBox ID="TxtOtrosIngresosEgresos" runat="server" CssClass="form-control input-sm" ClientIDMode="Static" Style="text-align: right;" AutoComplete="off"></asp:TextBox>
</div>
<label id="lblDevolucion" runat="server" class="col-md-2 control-label ">Dev. Cliente:</label>
<div id="divTxtDevolucion" runat="server" class="col-md-2 input-icon">
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtDevolución" runat="server" CssClass="form-control input-sm" ClientIDMode="Static" Style="text-align: right;" AutoComplete="off"></asp:TextBox>
</div>
</div>
<br />
<asp:Panel ID="PnlRecibidoPor" runat="server" Visible="false">
@@ -1485,47 +1491,7 @@
</div>
</div>
</div>
<div id="ModalAjustarMovimiento" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Ajustar Movimiento</h4>
</div>
<div class="modal-body">
<asp:UpdatePanel ID="UpModalAjustarMovimiento" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-xs-2">Importe:</div>
<div class="col-xs-8" style="text-align: left">
<asp:TextBox ID="TxtAjustarMovimiento" runat="server" Width="120px" CssClass="form-control" ClientIDMode="Static" Style="text-align: right;" AutoComplete="off" onkeydown="return (event.keyCode!=13);"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtAjustarMovimiento" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtAjustarMovimiento" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GpoAjustarMovimiento"></asp:RequiredFieldValidator>
<ajax:FilteredTextBoxExtender ID="FIETxtAjustarMovimiento" runat="server" TargetControlID="TxtAjustarMovimiento" FilterType="Custom, Numbers" ValidChars="+-.," />
<i></i>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:Button ID="BtnAjustarMovimiento" Text="Ajustar" runat="server" ClientIDMode="Static" CssClass="btn btn-primary" ValidationGroup="GpoAjustarMovimiento" />
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
<%-- <div id="ModalCancelarComplemetno" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
@@ -1773,11 +1739,23 @@
//VALIDA QUE LA CANTIDAD DE T (TXT) NO SEA MAYOR A C
function ValidarCantidad(t, c) {
var Ot = 0.00;
debugger;
// considera importe de OT ingresos, para que se peuda exceder
if ($get('TxtOtrosIngresosEgresos')) { Ot = ToDouble($get('TxtOtrosIngresosEgresos').value); }
t.value = (ToDouble(t.value) > ToDouble(c) + Ot ? c : t.value)
}
function ValidarCantidadDev(s) {
var Ot = 0.00;
var Dev = 0.00;
debugger; //valida importe
if ($get('TxtDevolución') && (ToDouble($get('TxtDevolución').value) > s)) $get('TxtDevolución').value = s;
// considera importe de OT ingresos, para que se peuda exceder
if ($get('TxtOtrosIngresosEgresos')) { Ot = ToDouble($get('TxtOtrosIngresosEgresos').value); }
if ($get('TxtImporte')) $get('TxtImporte').value = ToDouble($get('TxtDevolución').value) + Ot;
}
var TipoCambioActual = 0.0;
function CambiaTC(txt) {
let TipoCambioTxt = ToDouble(txt.value)

View File

@@ -1504,6 +1504,8 @@ Partial Class Bancos_IE
DdlCliente.SelectedText = ObjCliente.NombreComercial
DdlCliente.SelectedValue = ObjCliente.CveCliente.ToString
DivOtrosIngresosEgresos.Visible = True
'TxtImporte.ReadOnly = True
TxtImporte.Attributes.Add(“readonly”, “readonly”)
End If
'If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
@@ -3009,7 +3011,8 @@ Partial Class Bancos_IE
If TxtOtrosIngresosEgresos.Text.ToDecimal <> 0 Then
Dim TipoMovtoIE As Boolean = False
Dim CveConcIE As Integer = 78
If Impo > 0 Then
Dim tCveSub As Integer = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero
If Impo < 0 Then
TipoMovtoIE = True
Impo = Math.Abs(Impo)
CveConcIE = 78
@@ -3021,7 +3024,7 @@ Partial Class Bancos_IE
IdCtaContableAplicar = UsuarioActual.Empresa.Funcionalidad(266).ToEntero
End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=Impo, ImporteME:=0) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=Impo, ImporteME:=0, CveSubProyecto:=tCveSub) Then
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
Exit Select
End If
@@ -3029,7 +3032,7 @@ Partial Class Bancos_IE
'CANCELA NC
IdCtaContableAplicar = IDCtaBeneficiario
ImporteAplicar = ImporteAplicar + Impo
ImporteAplicar = ImporteAplicar - Impo
ImporteAplicarMN = (ImporteAplicar * If(tCveMoneda = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL()
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(ImporteAplicar), ReferenciaAplicar, 12, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveVenta:=CveVentaDevDin, CveCliente:=CveCliente, ImporteMX:=-(ImporteAplicarMN), ImporteME:=ImporteAplicarME) Then
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
@@ -5806,7 +5809,10 @@ Partial Class Bancos_IE
CvePrePolizaDevDin = UrlParametros("CVEPREPOLIZA").ToString.ToEntero
ImporteOriginalDevDin = UrlParametros("ORIGINAL").ToString.ToDecimal.RoundSQL(6)
TxtImporte.Text = UrlParametros("SALDO").ToString.FormatoNumero()
TxtImporte.Attributes.Add("onkeyup", $"FormatoMoneda(this);ValidarCantidad(this,{UrlParametros("SALDO").ToString});")
TxtDevolución.Text = UrlParametros("SALDO").ToString.FormatoNumero()
'TxtImporte.Attributes.Add("onkeyup", $"FormatoMoneda(this);ValidarCantidad(this,{UrlParametros("SALDO").ToString});")
TxtDevolución.Attributes.Add("onkeyup", $"FormatoMoneda(this);ValidarCantidadDev( {UrlParametros("SALDO").ToString});")
TxtOtrosIngresosEgresos.Attributes.Add("onkeyup", $"ValidarCantidadDev();")
TxtImporteLetra.Text = UrlParametros("SALDO").ToString.ToDouble.Texto2Letras(UrlParametros("CVEMONEDA").ToString.ToEntero)
CargaCliente(CveCliente)
'BuscarCliente()
@@ -6322,26 +6328,26 @@ Partial Class Bancos_IE
End Sub
Private Sub LnkAjustarMovimiento_Click(sender As Object, e As EventArgs) Handles LnkAjustarMovimiento.Click
RegistraScript("$('#ModalAjustarMovimiento').modal('show');")
End Sub
'Private Sub LnkAjustarMovimiento_Click(sender As Object, e As EventArgs) Handles LnkAjustarMovimiento.Click
' RegistraScript("$('#ModalAjustarMovimiento').modal('show');")
'End Sub
Private Sub BtnAjustarMovimiento_Click(sender As Object, e As EventArgs) Handles BtnAjustarMovimiento.Click
'Private Sub BtnAjustarMovimiento_Click(sender As Object, e As EventArgs) Handles BtnAjustarMovimiento.Click
Dim ObjBanco As New ClsBancos
ObjBanco.IniciaTransacSQL()
' Dim ObjBanco As New ClsBancos
' ObjBanco.IniciaTransacSQL()
If ObjBanco.UpdateAjustarMovimiento(CveIE, TxtAjustarMovimiento.Text.ToDecimal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
ObjBanco.Commit()
RegistraScript("$('#ModalAjustarMovimiento').modal('hide');", "ALTR")
Alert("El ajuste se realizo correctamente.", TipoMensaje.MsgInformacion, $" document.location.href = ""./IE.aspx?CveIE={CveIE}"";")
Else
ObjBanco.RollBack()
End If
' If ObjBanco.UpdateAjustarMovimiento(CveIE, TxtAjustarMovimiento.Text.ToDecimal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
' ObjBanco.Commit()
' RegistraScript("$('#ModalAjustarMovimiento').modal('hide');", "ALTR")
' Alert("El ajuste se realizo correctamente.", TipoMensaje.MsgInformacion, $" document.location.href = ""./IE.aspx?CveIE={CveIE}"";")
' Else
' ObjBanco.RollBack()
' End If
ObjBanco.Dispose()
' ObjBanco.Dispose()
End Sub
'End Sub

View File

@@ -4866,7 +4866,36 @@ Partial Class Compras_eFacturas
End Sub
Protected Sub GvTraslados_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvTraslados.RowCommand
Dim ImgBtn As LinkButton = DirectCast(e.CommandSource, LinkButton)
Dim GvRow As GridViewRow = DirectCast(ImgBtn.BindingContainer, GridViewRow)
Dim ObjDatos As New ClsCompras
Dim Correcto As Boolean = False
Select Case e.CommandName
Case "ValidarCFDi"
Dim ObjValidacion As New ClsValidaCFDi(GvRow.DataKey("UUID"), GvRow.DataKey("RFCDe"), GvRow.DataKey("RFCPara"), 0)
If ObjValidacion.EsValida > 0 Then
If ObjValidacion.EsValida = 2 Then
Alert("La factura está cancelada ante el SAT.", TipoMensaje.MsgInformacion)
End If
Correcto = ObjDatos.UpdateEstatus(ObjValidacion.EsValida, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
Else
Alert("La Factura no se pudo validar.", TipoMensaje.MsgAdvertencia)
End If
ObjValidacion.Dispose()
Case "ValidarCFD"
Correcto = ObjDatos.UpdateEstatus(1, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
Case "Omitir"
Correcto = ObjDatos.UpdateEstatus(3, GvRow.DataKey("CveFactura").ToEntero, UsuarioActual.CveEmpresa)
End Select
ObjDatos.Dispose()
If Correcto Then
CargaDatos()
End If
End Sub
Protected Sub LnkAgregarTraslado_Click(sender As Object, e As EventArgs)

View File

@@ -1710,8 +1710,8 @@ Partial Class General_SaldosIniciales
If Not ObjVentas.AddVenta(TipoDocto, Folio, CveCliente.ToEntero(), CveClienteSucursal, SubTotal, 0, Amortizacion, IVA, RetIVA, RetISR, Total, CveMoneda, TipoCambio.ToDouble,
0, 0, 0, FechaVencimiento, Fecha, "", "", Fecha, CveVendedor, Folio2, "", "", 0, 0, 0, "-1".ToDate, "-1".ToDate, "-1".ToDate, -1, 0, CvePrePoliza,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Serie:=Serie, CveSubProyecto:=Sucursal.ToEntero(), CveSubProyectoEjecucion:=Sucursal.ToEntero(),
CveSubProyectoCobranza:=Sucursal.ToEntero(), IEPS:=IEPS,
ObservacionesAlmacen:=Transaccion, Entrega:=CodCliente, ImpuestoLocal:=ImpuestoLocal, PedidoContrato:=PedidoContrato) Then
CveSubProyectoCobranza:=Sucursal.ToEntero(), IEPS:=IEPS, ObservacionesAlmacen:=Transaccion, Entrega:=CodCliente, ImpuestoLocal:=ImpuestoLocal,
PedidoContrato:=PedidoContrato, CveMetodoPago33:=3) Then
ErrorVentas = True
Exit For
End If

View File

@@ -1953,15 +1953,27 @@ Partial Class Inventarios_EntradasSalidas
OpcionPrePoliza = 11
End If
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, OpcionPrePoliza) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
ErrorMovInv = True
GuardaLogAD($"Inv/ES | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
Alert("No se pudo validar la prepoliza de cuadre.", TipoMensaje.MsgAdvertencia)
End If
Else
Alert("No se pudo validar la prepoliza de cuadre.", TipoMensaje.MsgAdvertencia)
Dim AutoConta As Boolean = True
If (UsuarioActual.CveEmpresa = 119 And EsConsumoInterno) Then
AutoConta = False
End If
If Not ErrorMovInv AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=OpcionPrePoliza, AutoConta:=AutoConta) Then
ErrorMovInv = True
'If ObjConta.ValorPolizaDescuadre > 0 Then
' GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
' ErrorPrepolizaDescuadre = True
'End If
End If
'If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, OpcionPrePoliza) Then
' If ObjConta.ValorPolizaDescuadre > 0 Then
' ErrorMovInv = True
' GuardaLogAD($"Inv/ES | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
' Alert("No se pudo validar la prepoliza de cuadre.", TipoMensaje.MsgAdvertencia)
' End If
'Else
' Alert("No se pudo validar la prepoliza de cuadre.", TipoMensaje.MsgAdvertencia)
'End If
End If
'------------------------------------------------
@@ -4503,9 +4515,6 @@ Partial Class Inventarios_EntradasSalidas
End If
Next
If Prorratear Then
If Not ErrorMovInv AndAlso CveMovimientoSalida > 0 Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
@@ -4527,8 +4536,6 @@ Partial Class Inventarios_EntradasSalidas
End If
End If
If Not ErrorMovInv Then
For Each Dr As DataRow In DtMovimientosEntradaInvFisico.Rows
ImporteConcepto = If(Prorratear, ProPU, Dr("PU").ToString.ToDecimal)
@@ -4635,17 +4642,28 @@ Partial Class Inventarios_EntradasSalidas
End If
End If
End If
End If
If Not ErrorMovInv Then
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa)
If ObjConta.ValorPolizaDescuadre > 0 Then
ErrorMovInv = True
Mensaje = "Ocurrió un error al validar los movimientos contables"
End If
Dim AutoConta As Boolean = True
If (UsuarioActual.CveEmpresa = 119) Then
AutoConta = False
End If
If Not ErrorMovInv AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, AutoConta:=AutoConta) Then
ErrorMovInv = True
'If ObjConta.ValorPolizaDescuadre > 0 Then
' GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
' ErrorPrepolizaDescuadre = True
'End If
End If
'If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
' ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa)
' If ObjConta.ValorPolizaDescuadre > 0 Then
' ErrorMovInv = True
' Mensaje = "Ocurrió un error al validar los movimientos contables"
' End If
'End If
End If
Dim RetornoVirtual As MMovimientoVirtual = Nothing
@@ -4695,8 +4713,6 @@ Partial Class Inventarios_EntradasSalidas
End Sub
Private Sub BtnGuardarCambiosVigencia_Click(sender As Object, e As EventArgs) Handles BtnGuardarCambiosVigencia.Click
If GvSalidasCambioVigencia.Rows.Count = 0 Then
Alert("No hay ningun registro para generar el movimiento. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgError)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")

View File

@@ -237,6 +237,18 @@ Partial Class Inventarios_PrestamosdeProveedor
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, -tValorInventario, TxtObservacionesEntrega.Text.Trim, CveConceptoContable, TxtObservacionesEntrega.Text.Trim, Fecha, IdCtaContableOtro, -1, CveMovimientoAlmacen:=CveMovimientoSalida, CveClasificacion:=CveClasifCosto, ImporteMX:=-tValorInventario, CveSubProyecto:=CveSubProyecto) Then
ErrorMovInv = True
End If
End If
Dim AutoConta As Boolean = True
If (UsuarioActual.CveEmpresa = 119) Then
AutoConta = False
End If
If Not ErrorMovInv AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, AutoConta:=AutoConta) Then
ErrorMovInv = True
'If ObjConta.ValorPolizaDescuadre > 0 Then
' GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
' ErrorPrepolizaDescuadre = True
'End If
End If
Else
ErrorMovInv = True

View File

@@ -307,6 +307,16 @@
</div>
</div>
<div class="portlet-body" style="display: none">
<div class="row">
<label class="col-md-1 compoonenlabel" style="line-height: 1; max-width: 65px;">Régimen:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlRegimenContratacion" runat="server" Style="width: 100% !important;" CssClass="select2me">
<asp:ListItem Text="Asalariados" Value="1"></asp:ListItem>
<asp:ListItem Text="Asimilados" Value="2"></asp:ListItem>
<asp:ListItem Text="Todos" Value="3"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>

View File

@@ -26,21 +26,21 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
}
set { ViewState["clasegrid"] = value; }
}
public string fechaInicio
public DateTime fechaInicio
{
get
{
if (ViewState["fechaInicio"] == null) { return ""; }
else { return ViewState["fechaInicio"].ToString(); }
if (ViewState["fechaInicio"] == null) { return ModExtensiones.MinFecha; }
else { return ViewState["fechaInicio"].ToString().ToDate(); }
}
set { ViewState["fechaInicio"] = value; }
}
public string fechaFin
public DateTime fechaFin
{
get
{
if (ViewState["fechaFin"] == null) { return ""; }
else { return ViewState["fechaFin"].ToString(); }
if (ViewState["fechaFin"] == null) { return ModExtensiones.MaxFecha; }
else { return ViewState["fechaFin"].ToString().ToDate(); }
}
set { ViewState["fechaFin"] = value; }
}
@@ -60,7 +60,7 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
using (ClsNominas nom = new ClsNominas())
{
nom.SATSolicitudTimbreNominaGral(DdlReporte.SelectedValue.ToString().ToEntero(), UsuarioActual.CveEmpresa, fechaInicio, fechaFin, DdlTipoNomina.SelectedValue.ToEntero());
nom.SATSolicitudTimbreNominaGral(DdlReporte.SelectedValue.ToString().ToEntero(), UsuarioActual.CveEmpresa, fechaInicio, fechaFin, DdlTipoNomina.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero());
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
var libro = wb.AddWorksheet(nom.DtResultados , "Nomina");
@@ -137,10 +137,10 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
{
using (ClsNominas nom = new ClsNominas())
{
fechaInicio = TxtRpdFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd");
fechaFin = TxtRpdFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd");
fechaInicio = TxtRpdFechaInicio.Text.ToDateTime();
fechaFin = TxtRpdFechaFin.Text.ToDateTime();
nom.SATSolicitudTimbreNominaGral(0, UsuarioActual.CveEmpresa, fechaInicio, fechaFin, DdlTipoNomina.SelectedValue.ToEntero());
nom.SATSolicitudTimbreNominaGral(0, UsuarioActual.CveEmpresa, fechaInicio, fechaFin, DdlTipoNomina.SelectedValue.ToEntero(),DdlRegimenContratacion.SelectedValue.ToEntero());
if (nom.DtResultados.Rows.Count > 0)
{
DataRow drow = nom.DtResultados.Rows[0];
@@ -156,7 +156,7 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
}
nom.SATSolicitudTimbreNominaGral(DdlReporte.SelectedValue.ToString().ToEntero(), UsuarioActual.CveEmpresa, fechaInicio, fechaFin, DdlTipoNomina.SelectedValue.ToEntero());
nom.SATSolicitudTimbreNominaGral(DdlReporte.SelectedValue.ToString().ToEntero(), UsuarioActual.CveEmpresa, fechaInicio, fechaFin, DdlTipoNomina.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero());
GVSolicitudTimbreNominaGral.DataSource = nom.DtResultados;
GVSolicitudTimbreNominaGral.DataBind();
clasegrid = string.Format("reporte{0}", DdlReporte.SelectedValue);