-- globaldt ventas complementocfdi

--ventas, klimpieza de propiedades
This commit is contained in:
2023-12-20 18:28:50 -07:00
parent 8844fdca38
commit be0114609f
3 changed files with 99 additions and 100 deletions

View File

@@ -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

View File

@@ -2391,42 +2391,35 @@
</div>
<div class="tools">
Emitir:
<asp:CheckBox ID="ChkEmitirCartaPorte" runat="server" CssClass="chksino" Text=" " OnCheckedChanged="ChkEmitirCartaPorte_CheckedChanged" AutoPostBack="true" />
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body ">
<div class="rowpadding">
<asp:UpdatePanel ID="UpEmitirTransitorio" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row rowpadding">
<label class="col-md-2">Emitir:</label>
<div class="col-md-10">
<asp:CheckBox ID="ChkEmitirCartaPorte" runat="server" CssClass="chksino" Text=" " OnCheckedChanged="ChkEmitirCartaPorte_CheckedChanged" AutoPostBack="true" />
</div>
</div>
<br />
<div class="row rowpadding">
<ContentTemplate>
<div class="row">
<label class="col-md-2">Origen:</label>
<div class="col-md-10">
<asp:DropDownList ID="DdlDireccionOrigen" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalClienteVentaDireccion" DataValueField="CveDireccionEnvio" Width="100%">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<br />
<div class="row rowpadding">
</div>
<div class="row">
<label class="col-md-2">Destino:</label>
<div class="col-md-10">
<asp:DropDownList ID="DdlDireccionDestino" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalClienteVentaDireccion" DataValueField="CveDireccionEnvio" Width="100%">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<br />
<div class="row rowpadding">
</div>
<div class="row">
<label class="col-md-2">F. Salida:</label>
<div class="col-md-4">
<ul class="list-inline" style="font-size: 12px; margin-top: -10px; margin-left: 0px; margin-bottom: 0px;">
<ul class="list-inline" style="font-size: 12px;">
<li>
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
<asp:TextBox ID="TxtFechaEntregaCP" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="100%"></asp:TextBox>
@@ -2436,7 +2429,7 @@
</div>
<label class="col-md-2">F. Llegada:</label>
<div class="col-md-4">
<ul class="list-inline" style="font-size: 12px; margin-top: -10px; margin-left: 0px; margin-bottom: 0px;">
<ul class="list-inline" style="font-size: 12px;">
<li>
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
<asp:TextBox ID="TxtFechaLlegadaCP" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="100%"></asp:TextBox>
@@ -2444,8 +2437,7 @@
</li>
</ul>
</div>
</div>
<br />
</div>
<div class="row">
<div class="col-md-6">
<div class="row rowpadding">
@@ -3498,6 +3490,9 @@
</ajax:TabPanel>
<ajax:TabPanel ID="TabAuxiliarConta" runat="server" HeaderText="Contabilidad" Visible="false">
<HeaderTemplate>
<asp:LinkButton ID="LnkTabContabilidad" CssClass="Texto" runat="server" OnClick="LnkTabContabilidad_Click">Contabilidad</asp:LinkButton>
</HeaderTemplate>
<ContentTemplate>
<asp:Literal ID="LtlTipo1" runat="server"></asp:Literal>
<table border="0" class="contenido Widthall">

View File

@@ -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