Cuentas asignaciones controles activos fijos, Entradas Salidas ajuste de inventario error redondeo
This commit is contained in:
@@ -127,7 +127,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
NavigateUrl="/AC/ProgramaOperativo.aspx?CveProgramaOperativo=703&EsProyecto=1,&Bloqueado=1"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -191,8 +191,12 @@ Partial Class AC_RepProgramasOperativosAvances
|
||||
cell.ColumnSpan = 2
|
||||
cell.Text = ""
|
||||
row.Controls.Add(cell)
|
||||
Try
|
||||
GVD.HeaderRow.Parent.Controls.AddAt(0, row)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
GVD.HeaderRow.Parent.Controls.AddAt(0, row)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8125,7 +8125,7 @@ Partial Class Compras_Compras
|
||||
If UsuarioActual.TienePermisoProceso(354) Then 'visualizar la póliza al registros
|
||||
Msg.AppendFormat("<br/><br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}"">Ver Póliza</a>. ", CvePrePoliza)
|
||||
Dim TempParametros = Encripta(String.Format("OP=PREPO&CvePrePoliza={0}", CvePrePoliza))
|
||||
Msg.Append($" <a class='Texto' target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={TempParametros}""> Descargar PDF <i class='fa fa-file-pdf-o' aria-hidden='true'></i></a>")
|
||||
Msg.Append($" <a class='Texto' target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={TempParametros}""> Imprimir PDF <i class='fa fa-file-pdf-o' aria-hidden='true'></i></a>")
|
||||
|
||||
|
||||
|
||||
@@ -8249,7 +8249,6 @@ Partial Class Compras_Compras
|
||||
|
||||
If listaUUIDSRelacionados.Count > 0 Then
|
||||
DoctosRelacionados = String.Join(",", listaUUIDSRelacionados.ToArray())
|
||||
DoctosRelacionados = DoctosRelacionados.Substring(0, DoctosRelacionados.Length - 2)
|
||||
End If
|
||||
|
||||
Return DoctosRelacionados
|
||||
|
||||
@@ -11,8 +11,20 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
Set
|
||||
ViewState("CveConceptoAsignacion") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
Public Property OpAgregar As Boolean
|
||||
Get
|
||||
If ViewState("OpAgregar") Is Nothing Then
|
||||
ViewState("OpAgregar") = False
|
||||
End If
|
||||
Return Boolean.Parse(ViewState("OpAgregar").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("OpAgregar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
@@ -116,7 +128,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub ActualizaModulo(sender As Object, e As EventArgs)
|
||||
Protected Sub ActualizaModulo(sender As Object, e As EventArgs)
|
||||
OpAgregar = False
|
||||
LimpiarDatos()
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim Dr As DataRow = GlobalDTContaConceptosContables(GvRow.DataKey("CveConceptoContable").ToEntero).FiltroPrimero("")
|
||||
@@ -149,6 +162,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
DdlSubProyectos.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero)
|
||||
DdlTipoGasto.SelectedValueExist(GvRow.DataKey("CveTipoGasto").ToEntero)
|
||||
DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo").ToEntero)
|
||||
DdlActivoFijo.Enabled = False
|
||||
|
||||
|
||||
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
|
||||
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
||||
@@ -176,29 +191,31 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
If Dr IsNot Nothing Then
|
||||
|
||||
|
||||
divCliente.Visible = Dr("AplicaCliente").ToString = "True"
|
||||
divCliente.Visible = Boolean.Parse(Dr("AplicaCliente").ToString)
|
||||
divProveedor.Visible = Boolean.Parse(Dr("AplicaProveedor").ToString)
|
||||
divPersonal.Visible = Boolean.Parse(Dr("AplicaPersonal").ToString)
|
||||
divPorcentajeIVA.Visible = Boolean.Parse(Dr("AplicaImpuesto").ToString)
|
||||
divClasificacion.Visible = Boolean.Parse(Dr("AplicaClasificacion").ToString)
|
||||
divBancos.Visible = Boolean.Parse(Dr("AplicaBancos").ToString)
|
||||
divAlmacen.Visible = Boolean.Parse(Dr("AplicaAlmacen").ToString)
|
||||
divSubProyectos.Visible = Boolean.Parse(Dr("AplicaSubProyecto").ToString)
|
||||
divActivoFijo.Visible = Boolean.Parse(Dr("AplicaActivoFijo").ToString)
|
||||
|
||||
divProveedor.Visible = Dr("AplicaProveedor").ToString = "True"
|
||||
|
||||
divPersonal.Visible = Dr("AplicaPersonal").ToString = "True"
|
||||
|
||||
divPorcentajeIVA.Visible = Dr("AplicaImpuesto").ToString = "True"
|
||||
|
||||
divClasificacion.Visible = Dr("AplicaClasificacion").ToString = "True"
|
||||
|
||||
divBancos.Visible = Dr("AplicaBancos").ToString = "True"
|
||||
|
||||
divAlmacen.Visible = Dr("AplicaAlmacen").ToString = "True"
|
||||
|
||||
divSubProyectos.Visible = Dr("AplicaSubProyecto").ToString = "True"
|
||||
DdlActivoFijo.Enabled = False
|
||||
|
||||
If Dr("AplicaActivoFijo").ToString = "True" Then
|
||||
divActivoFijo.Visible = True
|
||||
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||
DdlActivoFijo.DataBind()
|
||||
' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo"))
|
||||
DdlActivoFijo.DataBind() ' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo"))
|
||||
|
||||
If OpAgregar Then
|
||||
DdlActivoFijo.Enabled = True
|
||||
Else
|
||||
DdlActivoFijo.Enabled = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True"
|
||||
|
||||
If CveConceptoContable = 51 Then
|
||||
@@ -244,6 +261,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarAsignacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarAsignacion.Click
|
||||
OpAgregar = True
|
||||
|
||||
LimpiarDatos()
|
||||
DdlCconceptosContables.Enabled = True
|
||||
DdlSubProyectos.Enabled = True
|
||||
@@ -272,6 +291,23 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
DdlPersonal.ddl.DataBind()
|
||||
DdlPersonal.setEsWebService(True)
|
||||
HdnCveCuentaAsignacion.Value = ""
|
||||
|
||||
If OpAgregar Then
|
||||
divCliente.Visible = False
|
||||
divProveedor.Visible = False
|
||||
divPersonal.Visible = False
|
||||
divPorcentajeIVA.Visible = False
|
||||
divClasificacion.Visible = False
|
||||
divBancos.Visible = False
|
||||
divAlmacen.Visible = False
|
||||
divSubProyectos.Visible = False
|
||||
divActivoFijo.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
|
||||
@@ -4490,7 +4490,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
For Each Dr As DataRow In DtMovimientosSalidaInvFisico.Rows
|
||||
If ObjInventario.GetExistenciasPS(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenInventarioFisico.SelectedValue.ToEntero, PendientePorSurtir:=1) >= Dr("Cantidad").ToString.ToDouble Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero,
|
||||
Dr("PU").ToString.ToDecimal, -1, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString,
|
||||
Dr("PU").ToString.ToDecimal.RoundSQL(6), -1, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString,
|
||||
Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate) Then
|
||||
Mensaje = "Ocurrió un error al guardar los movimientos de salida"
|
||||
ErrorMovInv = True
|
||||
@@ -4511,10 +4511,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If Not ErrorMovInv AndAlso CveMovimientoSalida > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim ProTotalSalida As Decimal = ObjInventario.DtResultados.SUMD("Total", "")
|
||||
Dim ProTotalSalida As Decimal = ObjInventario.DtResultados.SUMD("Total", "").RoundSQL(2)
|
||||
Dim ProCantidadEntrada As Decimal = DtMovimientosEntradaInvFisico.SUMD("Cantidad", "")
|
||||
|
||||
ProPU = (ProTotalSalida / ProCantidadEntrada).RoundSQL(6)
|
||||
ProPU = (ProTotalSalida / ProCantidadEntrada).RoundSQL(10)
|
||||
|
||||
If Not ProPU > 0 Then
|
||||
ErrorMovInv = True
|
||||
@@ -4546,7 +4546,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
'Obtiene valor entrada
|
||||
If Not ErrorMovInv AndAlso CveMovimientoEntrada > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
|
||||
Dim tValorInventario As Decimal = ObjInventario.DtResultados.SUMD("Total", "").RoundSQL()
|
||||
Dim tValorInventario As Decimal = ObjInventario.DtResultados.SUMD("Total", "").RoundSQL(2)
|
||||
ValorEntrada = tValorInventario
|
||||
|
||||
Dim drA2 As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", DdlAlmacenInventarioFisico.SelectedValue))
|
||||
@@ -4563,7 +4563,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
'Obtiene valor salida
|
||||
If Not ErrorMovInv AndAlso CveMovimientoSalida > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
Dim tValorInventario As Decimal = ObjInventario.DtResultados.SUMD("Total", "").RoundSQL()
|
||||
Dim tValorInventario As Decimal = ObjInventario.DtResultados.SUMD("Total", "").RoundSQL(2)
|
||||
ValorSalida = tValorInventario
|
||||
Dim drA2 As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", DdlAlmacenInventarioFisico.SelectedValue))
|
||||
If drA2 IsNot Nothing Then
|
||||
|
||||
Reference in New Issue
Block a user