-- entradas por préstamo que se contabilicen
This commit is contained in:
@@ -1720,16 +1720,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Mensaje = "Error al guardar los movimientos"
|
Mensaje = "Error al guardar los movimientos"
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
'Else
|
|
||||||
'If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
|
||||||
' For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont}").Rows
|
|
||||||
' If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacen").ToString.ToEntero, Dr2("CantidadSeccionAlmacen").ToString.ToDecimal * Tipo) Then
|
|
||||||
' ErrorMovInv = True
|
|
||||||
' Mensaje = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
'End If
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|
||||||
@@ -1817,8 +1807,10 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
'[IPP] PARCHE CTA CONTABLE PARA SALIDA DE DEMOSTRACION
|
'[IPP] PARCHE CTA CONTABLE PARA SALIDA DE DEMOSTRACION
|
||||||
If DdlConcepto.SelectedValue.ToEntero = 31 Then
|
If DdlConcepto.SelectedValue.ToEntero = 31 Then
|
||||||
IdCtaContableOtro = 1319
|
IdCtaContableOtro = 1319
|
||||||
|
Else ''cuando es 28, es otros ingresos.78
|
||||||
|
CveConceptoContable = 78
|
||||||
End If
|
End If
|
||||||
EsContabilizable = False
|
EsContabilizable = True
|
||||||
Case 30
|
Case 30
|
||||||
CveConceptoContable = 181
|
CveConceptoContable = 181
|
||||||
TipoMovtoOtro = False
|
TipoMovtoOtro = False
|
||||||
@@ -1836,17 +1828,14 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
IdCtaContableOtro = drr("IdCuentaCostos").ToString.ToEntero
|
IdCtaContableOtro = drr("IdCuentaCostos").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, tValorInventario, TxtObservaciones.Text.Trim, 68, TxtObservaciones.Text.Trim, TxtFecha.Text.ToDate, idCtaContable, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=tValorInventario, CveClasificacion:=CveClasificacion, Contabilizable:=EsContabilizable) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, tValorInventario, TxtObservaciones.Text.Trim, 68, TxtObservaciones.Text.Trim, TxtFecha.Text.ToDate, idCtaContable, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=tValorInventario, CveClasificacion:=CveClasificacion, Contabilizable:=EsContabilizable) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Else
|
Else
|
||||||
'Select Case DdlConcepto.SelectedValue.ToEntero
|
|
||||||
' Case 30
|
|
||||||
|
|
||||||
'Dim Total As Decimal = 0
|
'Dim Total As Decimal = 0
|
||||||
If CveConceptoContable = 181 Then
|
If CveConceptoContable.Contiene(181, 78) Then
|
||||||
Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy
|
Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy
|
||||||
'Dim IdCuentaGasto As Integer = 0
|
'Dim IdCuentaGasto As Integer = 0
|
||||||
For Each Dr As DataRow In Dt.Rows
|
For Each Dr As DataRow In Dt.Rows
|
||||||
@@ -1856,13 +1845,8 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Else
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Case Else
|
|
||||||
|
|
||||||
'End Select
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
@@ -1908,12 +1892,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
If drA IsNot Nothing Then CuentaAbonoAlmacen = drA("IdCtaContable").ToString.ToEntero
|
If drA IsNot Nothing Then CuentaAbonoAlmacen = drA("IdCtaContable").ToString.ToEntero
|
||||||
|
|
||||||
''For Each gvr As GridViewRow In GvAC.Rows
|
|
||||||
'For Each Dr As DataRow In DtII.Rows
|
|
||||||
' Importe = Dr("Cantidad").ToString.ToDouble * Dr("PU").ToString.ToDouble ' gvr.FCTextBox("TxtImporte").Text.ToDouble
|
|
||||||
' TotalDetalle += Importe
|
|
||||||
|
|
||||||
|
|
||||||
'saco de que partida se va a descontar y se enviara a gasto
|
'saco de que partida se va a descontar y se enviara a gasto
|
||||||
' Dim drP As DataRow = DtPresupuestos.FiltroPrimero(String.Format("CveClasificacion = {0}", Dr("CveClasificacion")))
|
' Dim drP As DataRow = DtPresupuestos.FiltroPrimero(String.Format("CveClasificacion = {0}", Dr("CveClasificacion")))
|
||||||
' If drP IsNot Nothing Then CuentaCargoCOG = drP("IdCuentaMatriz").ToString.ToEntero
|
' If drP IsNot Nothing Then CuentaCargoCOG = drP("IdCuentaMatriz").ToString.ToEntero
|
||||||
@@ -1943,8 +1921,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1957,44 +1933,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Mensaje = "No se pudo insertar la poliza"
|
Mensaje = "No se pudo insertar la poliza"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
'TERMINA: DEVENGAR
|
'TERMINA: DEVENGAR
|
||||||
|
|
||||||
|
|
||||||
''PREPOLIZA - SE CAMBIO DE LUGAR EL USO DE ESTA PARTE
|
|
||||||
'If EsConsumoInterno Then
|
|
||||||
' If Not ErrorAC And Not ErrorMovInv Then
|
|
||||||
' Dim DtCostos As DataTable = Nothing
|
|
||||||
' Dim ValorInventario As Decimal = 0
|
|
||||||
|
|
||||||
' If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
|
||||||
' DtCostos = ObjInventario.DtResultados
|
|
||||||
' Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
|
||||||
' Dim IdCtaContable As Integer = 0
|
|
||||||
|
|
||||||
' If tmpCostos.Rows.Count > 0 Then
|
|
||||||
' Dim Concepto As String = $"Consumo Interno: {ObjInventario.Folio} - {TxtObservaciones.Text}"
|
|
||||||
' Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv/ConsumoInterno", 53, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, $"Consumo Interno: {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
|
||||||
|
|
||||||
' For Each RowInv As DataRow In tmpCostos.Rows
|
|
||||||
' ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal
|
|
||||||
' IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
|
||||||
|
|
||||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorInventario, Concepto, 6, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario) Then
|
|
||||||
' ErrorMovInv = True
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Next
|
|
||||||
|
|
||||||
' IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
|
|
||||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DtCostos.SUM("Total"), Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUM("Total")) Then
|
|
||||||
' ErrorMovInv = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Dim RetornoVirtual As MMovimientoVirtual = Nothing
|
Dim RetornoVirtual As MMovimientoVirtual = Nothing
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
|||||||
Reference in New Issue
Block a user