diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 156d4f212..8f1a42729 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -2502,6 +2502,22 @@ Public Class ClsPaginas
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
+
+ Public Shared Property GlobalDTVtaComplementoCFDI() As DataTable
+ Get
+ Dim AppNombre As String = "GlobalDTVtaComplementoCFDI"
+ If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetVentaComplementos() Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
+ ObjVentas.Dispose()
+ End If
+ GlobalDTVtaComplementoCFDI = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
+ End Get
+ Set(value As DataTable)
+ Dim AppNombre As String = "GlobalDTVtaComplementoCFDI"
+ HttpContext.Current.Application(AppNombre) = value
+ End Set
+ End Property
#Region "***********************************************************************DT EVENTOS****************************************************************************************"
Property GlobalDTTiposEventos() As DataTable
Get
diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx
index 38e80a887..1212cac5d 100644
--- a/Ventas/Ventas.aspx
+++ b/Ventas/Ventas.aspx
@@ -2391,42 +2391,35 @@
-
-
-
-
+
+
-
-
+
+
-
-
+
+
F. Salida:
@@ -3498,6 +3490,9 @@
+
+ Contabilidad
+
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index f3f3c291f..e9f137ff9 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -64,23 +64,6 @@ Partial Class Ventas
Return CBool(ViewState("ExFolioFactura"))
End Get
End Property
- Private Property CveFactura As Integer
- Get
- Return ViewState("CveFactura").ToString().ToEntero()
- End Get
- Set(value As Integer)
- ViewState("CveFactura") = value
- End Set
- End Property
-
- Private Property CuentasContablesInvalidas As StringBuilder
- Get
- Return CType(ViewState("CuentasContablesInvalidas"), StringBuilder)
- End Get
- Set(value As StringBuilder)
- ViewState("CuentasContablesInvalidas") = value
- End Set
- End Property
'Local
Private Property DtPorcentajeMarcas As DataTable
@@ -625,14 +608,7 @@ Partial Class Ventas
ViewState("CveEstatusFacturaPadre") = value
End Set
End Property
- Private Property CveMovimientoDetalle As Integer
- Get
- Return If(IsNothing(ViewState("CveMovimientoDetalle")), -1, ViewState("CveMovimientoDetalle").ToString().ToEntero())
- End Get
- Set(value As Integer)
- ViewState("CveMovimientoDetalle") = value
- End Set
- End Property
+
Private ReadOnly Property CveDevolucion As Integer
Get
Return ViewState("CveDevolucion").ToString().ToEntero()
@@ -680,16 +656,7 @@ Partial Class Ventas
Return ViewState("VentaFolio").ToString()
End Get
End Property
- Private ReadOnly Property SelloCancelacion As String
- Get
- Return ViewState("SelloCancelacion").ToString()
- End Get
- End Property
- Private ReadOnly Property FechaCancelacion As DateTime
- Get
- Return ViewState("FechaCancelacion").ToString().ToDateTime
- End Get
- End Property
+
Private ReadOnly Property EstablecioFolio As Boolean
Get
Return CBool(ViewState("EstablecioFolio"))
@@ -1657,15 +1624,6 @@ Partial Class Ventas
End Set
End Property
- 'Private Property CveMetodoPagoCliente As Integer
- ' Get
- ' Return ViewState("CveMetodoPagoCliente").ToString().ToEntero()
- ' End Get
- ' Set(value As Integer)
- ' ViewState("CveMetodoPagoCliente") = value
- ' End Set
- 'End Property
-
Private Property Modalidad As String
Get
Return ViewState("Modalidad").ToString()
@@ -2388,7 +2346,6 @@ Partial Class Ventas
CotizacionesLista = New List(Of Integer)
ListaDescuentos = New List(Of Modelos.VentaDescuentos)
- CuentasContablesInvalidas = New StringBuilder
CvePrePoliza = 0
TotalOtrosConceptos = 0
CveUsuarioActual = UsuarioActual.CveUsuario
@@ -2598,7 +2555,7 @@ Partial Class Ventas
'CargaFormaEntrega()
CargaCuentasTerminal()
'CargaDdlNCPS()
- CargarCamiones()
+ 'CargarCamiones()
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
CargaMedicos()
@@ -2868,11 +2825,8 @@ Partial Class Ventas
End If
'regenrea el tipo de cambio
CargaNuevaFactura(Nothing)
-
CambiaMoneda()
-
-
'NOTA DE CREDITO
If NuevaFactura = 2 Then
DdlTipoComprobante.Items.Insert(0, New ListItem("Nota de Crédito", "Egs"))
@@ -3120,18 +3074,20 @@ Partial Class Ventas
'**********************************
'Complementos de Timbrado
- Dim ObjVenta As New ClsVentas
- If ObjVenta.GetVentaComplementos() Then
- RblComplementos.DataSource = ObjVenta.DtResultados
- RblComplementos.DataBind()
- UpComplementos.Update()
- End If
- ObjVenta.Dispose()
+ 'Dim ObjVenta As New ClsVentas
+ 'If ObjVenta.GetVentaComplementos() Then
+ ' RblComplementos.DataSource = ObjVenta.DtResultados
+ ' RblComplementos.DataBind()
+ ' UpComplementos.Update()
+ 'End If
+ 'ObjVenta.Dispose()
+ RblComplementos.DataSource = GlobalDTVtaComplementoCFDI
+ RblComplementos.DataBind()
CargaFormatoSucursal()
InicializaDevolucionAlmacen()
- CargaOtrosConceptos()
+ 'CargaOtrosConceptos()
CargaFacturaOC()
'SELECCIONA SUCURSAL DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE
@@ -4836,7 +4792,7 @@ Partial Class Ventas
HLPagar.NavigateUrl = $"/Bancos/PopIEVentas.aspx?CveVenta={CveVenta}&TB_iframe=true&height=500&width=675"
HlCuentaTerminal.Visible = True
End If
- CargarSaldoAuxiliar(CveCliente)
+ 'CargarSaldoAuxiliar(CveCliente)
TabAuxiliarConta.Visible = UsuarioActual.TienePermisoProceso(306)
Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
If TienePermiso <> "" Then ' si tiene acceso en el subproyecto
@@ -10097,11 +10053,11 @@ Partial Class Ventas
End If
End If
- If CveFactura > 0 AndAlso ErrorList.Count = 0 Then
- If Not ObjVentas.UpdateVentaFacturas(CveFactura, ObjVentas.CveVenta, UsuarioActual.CveEmpresa) Then
- ErrorList.Add("No se pudo actualizar la Factura")
- End If
- End If
+ 'If CveFactura > 0 AndAlso ErrorList.Count = 0 Then
+ ' If Not ObjVentas.UpdateVentaFacturas(CveFactura, ObjVentas.CveVenta, UsuarioActual.CveEmpresa) Then
+ ' ErrorList.Add("No se pudo actualizar la Factura")
+ ' End If
+ 'End If
If CveCicloComercial > 0 AndAlso ErrorList.Count = 0 Then
If Not ObjContr.CicloComercialUpdate(CveCicloComercial, True, UsuarioActual.CveEmpresa, CveVenta:=ObjFactura.CveVenta) Then
@@ -34659,17 +34615,20 @@ Partial Class Ventas
DdlChofer.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
- Using ObjInv As New ClsInventarios
+ DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
+ DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
- If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus:=1) Then
- DdlUnidadCamion.DataSource = ObjInv.DtResultados
- End If
+ 'Using ObjInv As New ClsInventarios
- If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
- DdlRemolque1.DataSource = ObjInv.DtResultados
- End If
+ ' If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus:=1) Then
+ ' DdlUnidadCamion.DataSource = ObjInv.DtResultados
+ ' End If
- End Using
+ ' If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
+ ' DdlRemolque1.DataSource = ObjInv.DtResultados
+ ' End If
+
+ 'End Using
DdlUnidadCamion.DataBind()
DdlUnidadCamion.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
@@ -34807,7 +34766,6 @@ Partial Class Ventas
End Sub
Private Sub HabilitarControlesCartaPorte(Habilitar As Boolean)
- ChkEmitirCartaPorte.Enabled = Habilitar
TxtFechaEntregaCP.Enabled = Habilitar
TxtFechaLlegadaCP.Enabled = Habilitar
DdlChofer.Enabled = Habilitar
@@ -35349,6 +35307,9 @@ Partial Class Ventas
DdlDireccionDestino.DataSource = TmpDTDireccionCP
DdlDireccionDestino.DataBind()
+ CargarCamiones()
+ HabilitarControlesCartaPorte(ChkEmitirCartaPorte.Checked)
+
End Sub
'Protected Sub ChkAgregarFlete_CheckedChanged(sender As Object, e As EventArgs)
@@ -35985,12 +35946,30 @@ Partial Class Ventas
TxtFechaModal.Text = NowADS.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
LnkDvModalTipoVentaAceptar.Visible = True
- 'si es A - Vista o ,Fuera De Linea requiere tecnico
- If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 3) Then
- ChkRequiereTecnicoModal.Checked = True
- ChkRequiereTecnicoModal.Enabled = False
- DvModalRequiereOSFecha.Visible = True
- End If
+
+ Select Case RBLTipoVenta.SelectedValue
+ Case "1" ' Fuera de linea
+ ChkRequiereTecnicoModal.Checked = True
+ ChkRequiereTecnicoModal.Enabled = False
+ DvModalRequiereOSFecha.Visible = True
+ Case "2" ' Pago Directo
+ ChkRequiereTecnicoModal.Checked = True
+ ChkRequiereTecnicoModal.Enabled = False
+ DvModalRequiereOSFecha.Visible = True
+ Case "3" 'A-Vista
+ ChkRequiereTecnicoModal.Checked = False
+ DvModalTipoVentaPasoRequiereOS.Visible = False
+ DvModalRequiereOSFecha.Visible = False
+ DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
+ DVGvProductosProcedimiento.Visible = False
+ Case "4" 'Consigna
+ ChkRequiereTecnicoModal.Checked = False
+ DvModalTipoVentaPasoRequiereOS.Visible = False
+ DvModalRequiereOSFecha.Visible = False
+ DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
+ DVGvProductosProcedimiento.Visible = False
+ End Select
+
End If
@@ -36102,7 +36081,7 @@ Partial Class Ventas
DdlProcedimiento.SelectedValueExist(DdlProcedimientoModal.SelectedValue)
'si es A - Vista o ,Fuera De Linea requiere tecnico
- If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 3) Then
+ If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 2) Then
TdFechaOS1.Visible = True
TdFechaOS2.Visible = True
ChkRequiereTecnico.Checked = True
@@ -36279,11 +36258,20 @@ Partial Class Ventas
Protected Sub LBNotaCredito_Click(sender As Object, e As EventArgs)
CargaDdlNCPS()
- DivGvCxC.Visible = True
- CargaCxC()
+
+ If CveVenta <= 0 Then 'cuando es nueva la factura
+ DivGvCxC.Visible = True
+ CargaCxC()
+ End If
+ UpAplicarNC.Update()
'CARGAR RNC
RblRNCTipo_SelectedIndexChanged(RblRNCTipo, EventArgs.Empty)
RegistraScript("$('#ModalAplicarNC').modal('show');", "ModalNC")
End Sub
+
+ Protected Sub LnkTabContabilidad_Click(sender As Object, e As EventArgs)
+ Tab.ActiveTabIndex = 6
+ CargarSaldoAuxiliar(CveCliente)
+ End Sub
End Class