--FIX, cerrar corte de caja al dia siguiente

--Anticipos de publico general en otros clientes
This commit is contained in:
2024-04-19 18:01:29 -07:00
parent d60bd65e5f
commit e8a993f3fa

View File

@@ -3746,7 +3746,7 @@ Partial Class Ventas
If ObjPVenta.DtResultados.Rows.Count > 0 Then
CveCorte = ObjPVenta.CveCorte
Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-5)
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < NowADS().Date Then
If (UsuarioActual.Empresa.Funcionalidad(531) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(109) = "1") AndAlso FechaICorte < NowADS().Date Then
DebeCerrarCorte = True
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
Else
@@ -16501,8 +16501,25 @@ Partial Class Ventas
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente) Then
Me.TmpDTAnticiposNCIxCCliente = ObjMovtos.DtResultados.Copy()
End If
'AGREGAR LOS ANTICIPOS, DEV, IxC QUE ESTEN EN PUBLICO GENERAL
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso UsuarioActual.CveEmpresa = 190 Then
Dim CveClientePublicoGeneral = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
If CveClientePublicoGeneral > 0 Then
If CveCliente <> CveClientePublicoGeneral Then
If ObjMovtos.GetAnticiposNCIxCCliente(CveClientePublicoGeneral) Then
For Each DrGeneral As DataRow In ObjMovtos.DtResultados.Rows
Me.TmpDTAnticiposNCIxCCliente.Rows.Add(DrGeneral.ItemArray)
Next
End If
End If
End If
End If
ObjMovtos.Dispose()
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
@@ -16516,7 +16533,6 @@ Partial Class Ventas
Else
GVAnticipos.DataSource = Nothing
End If
ObjMovtos.Dispose()
If CveVenta <= 0 OrElse (EsCreaApartirDe Or CveDevolucion > 0) Then
divAmortizacionTipo.Visible = True