Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1478,7 +1478,7 @@ Public Class ClsContabilidad
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
ObjConta.RollBack()
|
||||
If Not ContaCompartida Then ObjConta.RollBack()
|
||||
OnError("Ocurrió un error al intentar contabilizar la PrePoliza", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
'Alert("Ocurrió un error al guardar la póliza", TipoMensaje.MsgAdvertencia)
|
||||
Retorno = False
|
||||
|
||||
@@ -3061,7 +3061,7 @@ Namespace Modelos
|
||||
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) Then
|
||||
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
|
||||
Else
|
||||
ObjFactura.SeGuardoPrePoliza = True
|
||||
@@ -4375,7 +4375,7 @@ Namespace Modelos
|
||||
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso ObjFactura.TipoDocto.Contiene("Ant", "Rem", "RNC", "Cot", "Ped", "Pd2", "PA", "NC") Then
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso ObjFactura.TipoDocto.Contiene("Ant", "Rem", "RNC", "Cot", "Ped", "Pd2", "PA", "Egs", "Dev") Then
|
||||
AutoConta = False
|
||||
End If
|
||||
|
||||
|
||||
@@ -430,6 +430,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then
|
||||
SeContabilizo = True
|
||||
Else
|
||||
ErrorRegistrar = True
|
||||
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
@@ -437,10 +438,12 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
If Not ErrorRegistrar And SeContabilizo Then
|
||||
|
||||
Conta.Commit()
|
||||
ObjContPaq.Commit()
|
||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
CargaDatosCuentas()
|
||||
Else
|
||||
Conta.RollBack()
|
||||
ObjContPaq.Dispose()
|
||||
End If
|
||||
Conta.Dispose()
|
||||
End Sub
|
||||
|
||||
@@ -1702,7 +1702,9 @@ Partial Class RegPoliza
|
||||
|
||||
If ObjConta.RemovePoliza(IDPoliza) Then
|
||||
If ObjMov.DesvincularPrePolizaContabilizada(IDPoliza, UsuarioActual.CveEmpresa) Then
|
||||
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, TxtDescripcion.Text, "Polizas", TxtNumeroPoliza.Text, DdlTipoPoliza.SelectedValue.ToEntero) Then
|
||||
If ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, TxtDescripcion.Text, "Polizas", TxtNumeroPoliza.Text, DdlTipoPoliza.SelectedValue.ToEntero) Then
|
||||
|
||||
Else
|
||||
ErrorTrans = True
|
||||
End If
|
||||
Else
|
||||
|
||||
@@ -1341,11 +1341,30 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
|
||||
Private Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
|
||||
ObjContabilidad.IniciaTransacSQL()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
If ObjContabilidad.RemovePrePolizas(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
If IdPoliza > 0 Then
|
||||
If Not ObjConta.RemovePoliza(IdPoliza) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Alert("La Prepóliza ha sido eliminada", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("La Prepóliza ha podido ser eliminada", TipoMensaje.MsgError)
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
ObjContabilidad.Commit()
|
||||
ObjConta.Commit()
|
||||
Else
|
||||
ObjContabilidad.RollBack()
|
||||
ObjConta.RollBack()
|
||||
End If
|
||||
|
||||
ObjContabilidad.Dispose()
|
||||
|
||||
@@ -1175,7 +1175,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
DdlSubProyecto.SelectedValueExist("-1")
|
||||
End If
|
||||
|
||||
EnvioCorreo()
|
||||
' EnvioCorreo()
|
||||
|
||||
CargaPendientesRecibir()
|
||||
UPDatos.Update()
|
||||
|
||||
@@ -913,14 +913,18 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
Dim importe As Decimal = resultado.SUM("Total").ToDecimal
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue.ToEntero)).ToEntero
|
||||
Dim importe As Decimal = resultado.SUMD("Total")
|
||||
Dim IdCtaContableSalida As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue.ToEntero)).ToEntero
|
||||
Dim IdCtaContableEntrada As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenDestino.SelectedValue.ToEntero)).ToEntero
|
||||
Dim Contabilizable As Boolean = True
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then
|
||||
If IdCtaContableSalida = IdCtaContableEntrada Then Contabilizable = False
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableSalida, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableEntrada, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -228,9 +228,9 @@ Partial Class RepVentaDetalle
|
||||
If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12) Then
|
||||
ImgExcelVSH.Visible = True
|
||||
ImgExcel.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveVendedor > 0 Then
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveVendedor > 0 AndAlso Not UsuarioActual.TienePermisoProceso(263) Then
|
||||
DdlVendedor.SelectedValuesIfExistM(UsuarioActual.CveVendedor.ToString)
|
||||
DdlVendedor.Attributes.Add("disabled", "")
|
||||
DdlVendedor.Enabled = False
|
||||
|
||||
@@ -211,11 +211,7 @@
|
||||
|
||||
|
||||
<%--INICIA: CANCELAR - NC - DEVOLUCION [OLD]--%>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LkDevolucion" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Devolución"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Aplicar Devolución?" data-btn-ok-label="si" Visible="false" />
|
||||
</li>
|
||||
|
||||
<%--<li>
|
||||
<asp:LinkButton ID="LkNotaCredito" runat="server" CausesValidation="False" Text="<i class='fa fa-pencil'></i> Nota de crédito"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Aplicar Nota de crédito?" data-btn-ok-label="si" Visible="false" />
|
||||
|
||||
@@ -3544,7 +3544,6 @@ Partial Class Ventas
|
||||
If TienePermiso <> "" Then ' si tiene acceso en el subproyecto
|
||||
'LkNotaCredito.Visible = UsuarioActual.TienePermisoProceso(175)
|
||||
If UsuarioActual.TienePermisoProceso(264) Then
|
||||
LkDevolucion.Visible = True
|
||||
InicializaAplicaDevolucion()
|
||||
End If
|
||||
End If
|
||||
@@ -7694,7 +7693,9 @@ Partial Class Ventas
|
||||
|
||||
|
||||
'ObjFactura.RefDocto = TxtDocto.Text.Trim
|
||||
ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero, -1)
|
||||
'si es cancelacion, debe de conservar el folio actual
|
||||
If Not EsCancelacion Then ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero, -1)
|
||||
|
||||
'ObjFactura.Folio = If(ExFolioFactura, FolioXML.ToEntero, -1)
|
||||
ObjFactura.Serie = If(VistaPrevia, "VistaPrevia", LblSerie.Text)
|
||||
ObjFactura.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second)
|
||||
@@ -13880,6 +13881,12 @@ Partial Class Ventas
|
||||
If PU * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal) >= DtPromociones.FiltroPrimeroValor("PUPromocion", $"CvePS = {CvePS}").ToDecimal Then
|
||||
EsValido = True
|
||||
End If
|
||||
Else
|
||||
'valida sino tiene promocion la clasificacion
|
||||
If DtPromociones.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero}").Rows.Count > 0 Then
|
||||
''falta aplicar si tiene promocion
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -16268,12 +16275,7 @@ Partial Class Ventas
|
||||
Response.Redirect(url)
|
||||
|
||||
End Sub
|
||||
Private Sub BtnGenerarNC_Click(sender As Object, e As EventArgs) Handles LkDevolucion.Click
|
||||
|
||||
Dim url As String = String.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=0", CveVenta)
|
||||
Response.Redirect(url)
|
||||
|
||||
End Sub
|
||||
'Private Sub LkNotaCreditoC_Click(sender As Object, e As EventArgs) Handles LkNotaCredito.Click
|
||||
|
||||
' Dim url As String = String.Format("Ventas.aspx?CveDevolucion={0}&NuevaFactura=2", CveVenta)
|
||||
@@ -16409,6 +16411,7 @@ Partial Class Ventas
|
||||
DdlMetodoPago33.Enabled = True
|
||||
DdlFormaPago33.Enabled = True
|
||||
UPCondicionesPago.Update()
|
||||
If Me.PermiteCredito Then RBLPago.Enabled = True
|
||||
|
||||
ModalidadEdicion = True
|
||||
|
||||
@@ -21431,7 +21434,6 @@ Partial Class Ventas
|
||||
|
||||
'LIMPIA ACCIONES
|
||||
HLOrdendeCompra.Visible = False
|
||||
LkDevolucion.Visible = False
|
||||
LBAplicaDevolucion.Visible = False
|
||||
'LkNotaCredito.Visible = False
|
||||
LkEliminarFactura.Visible = False
|
||||
@@ -21558,7 +21560,7 @@ Partial Class Ventas
|
||||
#Region " APLICA DEVOLUCION "
|
||||
Private Sub InicializaAplicaDevolucion()
|
||||
If Not UsuarioActual.CveUsuario = 100 Then
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(72, 80, 119) Then
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 140, 141, 146) Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
@@ -21568,7 +21570,6 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
LkDevolucion.Visible = False
|
||||
LBAplicaDevolucion.Visible = True
|
||||
Dim SeEsconde As Boolean = False
|
||||
Dim ObjVenta As New ClsVentas
|
||||
@@ -21789,7 +21790,6 @@ Partial Class Ventas
|
||||
BtnEmitir.Visible = False
|
||||
|
||||
'REINICIALIZA ACCIONES
|
||||
LkDevolucion.Visible = False
|
||||
'LkNotaCredito.Visible = False
|
||||
LkEliminarFactura.Visible = False
|
||||
ImgDownCancelacion.Visible = False
|
||||
@@ -23435,7 +23435,6 @@ Partial Class Ventas
|
||||
BtnGenerarOS.Visible = False
|
||||
BtnsFacturar.Visible = False
|
||||
HLOrdendeCompra.Visible = False
|
||||
LkDevolucion.Visible = False
|
||||
LBAplicaDevolucion.Visible = False
|
||||
'LkNotaCredito.Visible = False
|
||||
LkEliminarFactura.Visible = False
|
||||
|
||||
26
vwd.webinfo
26
vwd.webinfo
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Visual Studio global web project settings.
|
||||
-->
|
||||
<VisualWebDeveloper>
|
||||
|
||||
<StartupServices>
|
||||
|
||||
|
||||
|
||||
|
||||
<Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/>
|
||||
</StartupServices>
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Visual Studio global web project settings.
|
||||
-->
|
||||
<VisualWebDeveloper>
|
||||
|
||||
<StartupServices>
|
||||
|
||||
|
||||
|
||||
|
||||
<Service ID="{C0C07587-41A7-46C8-8FBD-3F9C8EBE2DDC}"/>
|
||||
</StartupServices>
|
||||
</VisualWebDeveloper>
|
||||
Reference in New Issue
Block a user