This commit is contained in:
2024-02-21 11:20:29 -07:00
22 changed files with 1127 additions and 902 deletions

View File

@@ -10422,14 +10422,60 @@ Partial Class Compras_Compras
DdlTipoTransaccionCaja.Items.Insert(0, New ListItem("Seleccione Tipo Movimiento", "-1"))
End Sub
Private Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged
CargaCuentas()
UpContado.Update()
End Sub
Private Sub DdlTipoTransaccionCaja_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccionCaja.SelectedIndexChanged
CargaCuentas()
UpContado.Update()
End Sub
Private Sub CargaCuentas()
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
'cuando es layout
If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then
dt = dt.FiltraParametros("UsaLayout = 1")
End If
If DdlTipoTransaccion.SelectedValue.ToEntero = 17 Then
dt = dt.FiltraParametros("UsaLayoutGrupos = 1")
End If
DdlCuenta.SelectedValue = Nothing
DdlCuenta.Items.Clear()
DdlCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveTipoCuenta <> 1"))
DdlCuenta.ClearSelection()
DdlCuenta.DataSource = dt.FiltraParametros(String.Format("CveTipoCuenta <> 1"))
DdlCuenta.DataBind()
DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
Dim dtCaja As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
If DdlTipoTransaccionCaja.SelectedValue.ToEntero = 9 Then
dtCaja = dtCaja.FiltraParametros("UsaLayout = 1")
End If
If DdlTipoTransaccionCaja.SelectedValue.ToEntero = 17 Then
dtCaja = dtCaja.FiltraParametros("UsaLayoutGrupos = 1")
End If
DdlCuentaCaja.SelectedValue = Nothing
DdlCuentaCaja.Items.Clear()
DdlCuentaCaja.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveTipoCuenta = 1"))
DdlCuentaCaja.ClearSelection()
DdlCuentaCaja.Items.Clear()
DdlCuentaCaja.DataSource = dtCaja.FiltraParametros(String.Format("CveTipoCuenta = 1"))
DdlCuentaCaja.DataBind()
DdlCuentaCaja.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub
@@ -14240,7 +14286,7 @@ Partial Class Compras_Compras
If DrTipoGasto IsNot Nothing Then
CveTipoGasto = DrTipoGasto("CveTipoGasto").ToString.ToEntero
TipoGasto = DrTipoGasto("TipoGasto").ToString
End If
End IfclsVa
End If
AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False,
@@ -18804,11 +18850,11 @@ Partial Class Compras_Compras
If CvePrePoliza > 0 Then
If CveMoneda = 2 Then
ImporteME = (DiferenciaInvOC / TCInvOC).RoundAD()
ImporteMEComp = ((ImporteME * TCInvOC) - ImporteME).RoundAD()
If CveMoneda = 2 Then
ImporteME = (DiferenciaInvOC / TCInvOC).RoundAD()
ImporteMEComp = ((ImporteME * TCInvOC) - ImporteME).RoundAD()
Dim DifImporte As Decimal = DiferenciaInvOC - (ImporteME + ImporteMEComp)
Dim DifImporte As Decimal = DiferenciaInvOC - (ImporteME + ImporteMEComp)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoCosto, DiferenciaInvOCCosto, DiferenciaInvOCCosto, 177, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=CveSubProyecto) Then
Retorno = False
@@ -18816,12 +18862,8 @@ Partial Class Compras_Compras
End If
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteME, ImporteME, 228, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMEComp, ImporteMEComp, 229, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then
If DifImporte <> 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoCosto, DifImporte, DifImporte, 69, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteME:=DifImporte, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle, CveClasificacion:=CveClasificacionCostoOC, CveSubProyecto:=CveSubProyecto) Then
Retorno = False
Exit For
End If
Else
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMEComp, ImporteMEComp, 229, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then
If DifImporte <> 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoCosto, DifImporte, DifImporte, 69, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteME:=DifImporte, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle, CveClasificacion:=CveClasificacionCostoOC, CveSubProyecto:=CveSubProyecto) Then
Retorno = False
Exit For
End If
@@ -18830,6 +18872,10 @@ Partial Class Compras_Compras
Exit For
End If
Else
Retorno = False
Exit For
End If
Else
'2018.11.24 se cambia concepto 177, de cargo a abono negativo., petición MALL
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoCosto, DiferenciaInvOCCosto, DiferenciaInvOCCosto, 177, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=CveSubProyecto, CveClasificacion:=CveClasificacionCostoOC) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaInvOC, DiferenciaInvOC, 176, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, CveOCDetalle:=CveOCDetalle, CveColectiva:=CveColectiva) Then
@@ -18837,22 +18883,22 @@ Partial Class Compras_Compras
Exit For
End If
Else
Retorno = False
Exit For
End If
End If
If Not OC.UpdateOrdenCompraDetalleAjuste(CveOrdenCompra, CveOCDetalle, PUCompra, UsuarioActual.CveUsuario) Then
Retorno = False
Exit For
End If
End If
If Not OC.UpdateOrdenCompraDetalleAjuste(CveOrdenCompra, CveOCDetalle, PUCompra, UsuarioActual.CveUsuario) Then
Retorno = False
Exit For
End If
If Retorno Then
If Not OCBitacora.AddEventoBitacora(String.Format("Se registró una póliza de ajuste por cambio de precio en producto: {0}", PS), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveOC:=CveOrdenCompra) Then
Retorno = False
End If
If Retorno Then
If Not OCBitacora.AddEventoBitacora(String.Format("Se registró una póliza de ajuste por cambio de precio en producto: {0}", PS), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveOC:=CveOrdenCompra) Then
Retorno = False
End If
End If
End If
End If
Next
If Retorno AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
Alert("No se procesaron las diferencias en precio.", TipoMensaje.MsgAdvertencia)
@@ -20061,29 +20107,6 @@ Partial Class Compras_Compras
DdlRefacturacionFacturas.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub
Protected Sub BtnRecolecciónAplicar_Click(sender As Object, e As EventArgs)
Using ObjAcum As New ClsGenerales
If ObjAcum.GetEntregaAlmacenRutaDetalle(DdlRecoleccion.SelectedValue.ToEntero) Then
'Dim dtt As DataTable = ObjAcum.DtResultados.FiltraParametros("CantidadDisponible > 0")
'Dim Porcentaje As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
'Dim tCveSub As Integer = TmpDT.MAX("CveSubProyecto").ToEntero
'Dim tCveTipoGasto As Integer = TmpDT.MAX("CveTipoGasto").ToEntero
'Dim Total As Decimal = TmpDT.SUMD("Total")
'For Each drr As DataRow In TmpDT.Rows
' ClavesBorradas.Add(drr("CveCompraDetalle").ToString)
'Next
TmpDT.Clear()
'For Each dr As DataRow In dtt.Rows
' Dim pu As Decimal = Total / dtt.SUMD("CantidadDisponible")
' Dim cantidad As Decimal = dr("CantidadDisponible").ToString.ToDecimal
' AddPS(cantidad, dr("CveUM").ToString.ToEntero, "", dr("CveClasificacion").ToString.ToEntero, "", dr("CvePS").ToString.ToEntero, dr("PS").ToString, 2, tCveSub.ToString, "SE", "SE", "", "", pu, Total, Porcentaje, 0, 0, 0, 0, 0, PorcentajeIVA:=Porcentaje, TCalculaTotales:=True, CveTipoGasto:=tCveTipoGasto)
'Next
'AddPS2()
End If
End Using
End Sub
End Class

View File

@@ -3390,14 +3390,12 @@ Partial Class PopUpVerFactura
If CveCliente = 819998 Then
RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc"
If Consola <> "-1" And Consola.Trim.Length > 0 Then
RutaFormato = "{0}Formatos\Consola.rdlc"
params.Add(New ReportParameter("Consola", Consola))
End If
End If
If Consola <> "-1" And Consola.Trim.Length > 0 Then
RutaFormato = "{0}Formatos\Consola.rdlc"
params.Add(New ReportParameter("Consola", Consola))
End If
@@ -3426,6 +3424,8 @@ Partial Class PopUpVerFactura
End If
ObjVentas.Dispose()