-- cuentas asignaciones, cambios en globalDT
This commit is contained in:
@@ -5646,7 +5646,7 @@ Public Class ClsContabilidad
|
||||
Optional PorcentajeIVA As Decimal = -1) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
DataAdapter("PA_Conta_CuentasAsignacionesAdd")
|
||||
DataAdapter("PA_Conta_CuentasAsignacionesUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCuentaAsignacion", SqlDbType.Int).Value = CveConceptoAsignacion
|
||||
|
||||
@@ -1344,7 +1344,7 @@ Namespace Modelos
|
||||
Public Sub GuardarVenta(ByRef factura As Modelos.Factura, ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, ByRef TmpDTDetalle As DataTable, CveNCaVincular As Integer, ByRef objContPaqi As ClsContPAQi, Optional ByRef ObjBancos As ClsBancos = Nothing, Optional ByRef ObjOS As ClsOS = Nothing, ByRef Optional ObjEventos As ClsOIEventos = Nothing, ByRef Optional ObjCGame As ClsCGame = Nothing, ByRef Optional ObjCliente As ClsClientes = Nothing, Optional EsNotaCredito As Boolean = False, Optional ObjAcum As ClsAcumuladores = Nothing)
|
||||
Dim Msgok As New StringBuilder
|
||||
|
||||
factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVenta", factura.CvePlantillaPoliza, factura.TotalTC, factura.TotalTC, factura.CveMoneda, factura.Fecha, If(factura.CveEmpresaCRM > 0, factura.EmpresaCRM, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa)
|
||||
factura.CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardarVentaM", factura.CvePlantillaPoliza, factura.TotalTC, factura.TotalTC, factura.CveMoneda, factura.Fecha, If(factura.CveEmpresaCRM > 0, factura.EmpresaCRM, factura.Cliente.Nombre), factura.CveUsuario, factura.CveEmpresa)
|
||||
|
||||
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
||||
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
|
||||
@@ -2213,7 +2213,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||
'CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||
End If
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
ImporteConcepto12 = importeMX.RoundSQL
|
||||
@@ -2222,10 +2222,10 @@ Namespace Modelos
|
||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Else
|
||||
@@ -2804,7 +2804,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
|
||||
CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
|
||||
'CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
@@ -2813,10 +2813,10 @@ Namespace Modelos
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then
|
||||
ErrorPrepoliza = True
|
||||
@@ -2891,7 +2891,7 @@ Namespace Modelos
|
||||
If Row2("CveClasificacion").ToString = "19929" Then IdCtaContable = 1142
|
||||
End If
|
||||
|
||||
CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
|
||||
'CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
@@ -2900,10 +2900,10 @@ Namespace Modelos
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"))
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then
|
||||
ErrorPrepoliza = True
|
||||
@@ -3194,7 +3194,7 @@ Namespace Modelos
|
||||
|
||||
If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows.Count = 1 Then
|
||||
IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
CveCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||
' CveCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("IdCtaContableSIG").ToString.ToEntero
|
||||
End If
|
||||
|
||||
If IdCtaContable <= 0 Then
|
||||
@@ -3202,10 +3202,10 @@ Namespace Modelos
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.AppendFormat("<br> {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("NumCuentaMoneda").ToString.ToEntero)
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.AppendFormat("<br> {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString.ToEntero).Rows(0)("NumCuentaMoneda").ToString.ToEntero)
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
|
||||
'BANCOS
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString)
|
||||
@@ -3272,10 +3272,10 @@ Namespace Modelos
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
'If CveCuenta <= 0 Then
|
||||
' CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
' CveCuentaContabilizacion = 0
|
||||
'End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=tipoCambio, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
|
||||
@@ -71,8 +71,8 @@
|
||||
<label for="<%= DdlCconceptosContables.ClientID.ToString()%>">Concepto Contable: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList>
|
||||
<label for="<%= DdlCuenta.ClientID.ToString()%>">Concepto Contable: </label>
|
||||
<asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="240px" ValidationGroup="GrpModulo"></asp:DropDownList>
|
||||
<label for="<%= DdlCuenta.ClientID.ToString()%>">Cuenta Contable: </label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtIdCuentaContable" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" style="width:100%"></asp:TextBox>
|
||||
@@ -112,6 +112,7 @@
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpModulo" />
|
||||
<button id="BtnCancelarProyecto" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
<asp:CheckBox ID="ChkSeguirRegistrando" Checked="true" Text="Seguir Registrando" runat="server" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -32,10 +32,6 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
|
||||
Private Sub CargaDatosModal()
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim ObjProveedores As New ClsCompProveedores
|
||||
Dim ObjRH As New ClsRH
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
Dim ObjInv As New ClsInventarios
|
||||
|
||||
If ObjConta.GetConta_ConceptosContables() Then
|
||||
DdlCconceptosContables.DataSource = ObjConta.DtResultados
|
||||
@@ -45,31 +41,17 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
DdlCuenta.DataSource = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlClientes.setEsWebService(True)
|
||||
|
||||
DdlPersonal.setEsWebService(True)
|
||||
'If ObjRH.GetPersonal(-1, UsuarioActual.CveEmpresa) Then
|
||||
' DdlPersonal.DataSource = ObjRH.DtResultados
|
||||
'End If
|
||||
|
||||
If ObjClasificaciones.GetClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
|
||||
End If
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
|
||||
If ObjInv.GetAlmacenes(-1, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||
DdlAlmacen.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
|
||||
ObjConta.Dispose()
|
||||
ObjProveedores.Dispose()
|
||||
ObjRH.Dispose()
|
||||
ObjClasificaciones.Dispose()
|
||||
ObjInv.Dispose()
|
||||
|
||||
|
||||
DdlCconceptosContables.DataBind()
|
||||
DdlCuenta.DataBind()
|
||||
@@ -171,7 +153,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
End If
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
RegistraScript("$('#ModalCat').modal('hide');")
|
||||
If Not ChkSeguirRegistrando.Checked Then RegistraScript("$('#ModalCat').modal('hide');")
|
||||
|
||||
If ErrorString.Length > 0 Then
|
||||
Alert(ErrorString)
|
||||
Else
|
||||
|
||||
@@ -1272,7 +1272,6 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
Next
|
||||
End If
|
||||
|
||||
RecargaGlobales(TieneError, ObjSubProyectos, ObjBancos, ObjOC, ObjUsuarios)
|
||||
|
||||
If Not TieneError Then
|
||||
If EsNuevoUsuario Then
|
||||
@@ -1280,6 +1279,7 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
End If
|
||||
Alert("El Usuario se Guardó Correctamente", TipoMensaje.MsgInformacion, "document.location.href=""/Sistemas/Usuarios.aspx"";")
|
||||
ObjUsuarios.Commit()
|
||||
RecargaGlobales(TieneError, ObjSubProyectos, ObjBancos, ObjOC, ObjUsuarios)
|
||||
Else
|
||||
Alert("Ocurrió un error al registrar el Usuario. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
ObjUsuarios.RollBack()
|
||||
|
||||
@@ -9958,8 +9958,8 @@ Partial Class Ventas
|
||||
Dim CveCuenta As Integer
|
||||
Dim IdCtaContableCliente As Integer
|
||||
Dim CveCuentaCliente As Integer
|
||||
Dim Concepto As String = ViewState("VentaFolio").ToString()
|
||||
Dim Referencia As String = ViewState("VentaFolio").ToString()
|
||||
Dim Concepto As String = ObjFactura.SerieFolio
|
||||
Dim Referencia As String = ObjFactura.SerieFolio
|
||||
Dim Fecha = TxtFecha.Text.Trim.ToDate
|
||||
|
||||
Dim importeMX As Decimal
|
||||
|
||||
Reference in New Issue
Block a user