-- 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 HttpContext.Current.Application(AppNombre) = value
End Set End Set
End Property 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****************************************************************************************" #Region "***********************************************************************DT EVENTOS****************************************************************************************"
Property GlobalDTTiposEventos() As DataTable Property GlobalDTTiposEventos() As DataTable
Get Get

View File

@@ -2391,6 +2391,8 @@
</div> </div>
<div class="tools"> <div class="tools">
Emitir:
<asp:CheckBox ID="ChkEmitirCartaPorte" runat="server" CssClass="chksino" Text=" " OnCheckedChanged="ChkEmitirCartaPorte_CheckedChanged" AutoPostBack="true" />
<a href="javascript:;" class="collapse"></a> <a href="javascript:;" class="collapse"></a>
</div> </div>
</div> </div>
@@ -2398,14 +2400,7 @@
<div class="rowpadding"> <div class="rowpadding">
<asp:UpdatePanel ID="UpEmitirTransitorio" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpEmitirTransitorio" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="row rowpadding"> <div class="row">
<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">
<label class="col-md-2">Origen:</label> <label class="col-md-2">Origen:</label>
<div class="col-md-10"> <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:DropDownList ID="DdlDireccionOrigen" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalClienteVentaDireccion" DataValueField="CveDireccionEnvio" Width="100%">
@@ -2413,8 +2408,7 @@
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
<br /> <div class="row">
<div class="row rowpadding">
<label class="col-md-2">Destino:</label> <label class="col-md-2">Destino:</label>
<div class="col-md-10"> <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:DropDownList ID="DdlDireccionDestino" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalClienteVentaDireccion" DataValueField="CveDireccionEnvio" Width="100%">
@@ -2422,11 +2416,10 @@
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
<br /> <div class="row">
<div class="row rowpadding">
<label class="col-md-2">F. Salida:</label> <label class="col-md-2">F. Salida:</label>
<div class="col-md-4"> <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> <li>
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm"> <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> <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> </div>
<label class="col-md-2">F. Llegada:</label> <label class="col-md-2">F. Llegada:</label>
<div class="col-md-4"> <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> <li>
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm"> <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> <asp:TextBox ID="TxtFechaLlegadaCP" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="100%"></asp:TextBox>
@@ -2445,7 +2438,6 @@
</ul> </ul>
</div> </div>
</div> </div>
<br />
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="row rowpadding"> <div class="row rowpadding">
@@ -3498,6 +3490,9 @@
</ajax:TabPanel> </ajax:TabPanel>
<ajax:TabPanel ID="TabAuxiliarConta" runat="server" HeaderText="Contabilidad" Visible="false"> <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> <ContentTemplate>
<asp:Literal ID="LtlTipo1" runat="server"></asp:Literal> <asp:Literal ID="LtlTipo1" runat="server"></asp:Literal>
<table border="0" class="contenido Widthall"> <table border="0" class="contenido Widthall">

View File

@@ -64,23 +64,6 @@ Partial Class Ventas
Return CBool(ViewState("ExFolioFactura")) Return CBool(ViewState("ExFolioFactura"))
End Get End Get
End Property 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 'Local
Private Property DtPorcentajeMarcas As DataTable Private Property DtPorcentajeMarcas As DataTable
@@ -625,14 +608,7 @@ Partial Class Ventas
ViewState("CveEstatusFacturaPadre") = value ViewState("CveEstatusFacturaPadre") = value
End Set End Set
End Property 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 Private ReadOnly Property CveDevolucion As Integer
Get Get
Return ViewState("CveDevolucion").ToString().ToEntero() Return ViewState("CveDevolucion").ToString().ToEntero()
@@ -680,16 +656,7 @@ Partial Class Ventas
Return ViewState("VentaFolio").ToString() Return ViewState("VentaFolio").ToString()
End Get End Get
End Property 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 Private ReadOnly Property EstablecioFolio As Boolean
Get Get
Return CBool(ViewState("EstablecioFolio")) Return CBool(ViewState("EstablecioFolio"))
@@ -1657,15 +1624,6 @@ Partial Class Ventas
End Set End Set
End Property 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 Private Property Modalidad As String
Get Get
Return ViewState("Modalidad").ToString() Return ViewState("Modalidad").ToString()
@@ -2388,7 +2346,6 @@ Partial Class Ventas
CotizacionesLista = New List(Of Integer) CotizacionesLista = New List(Of Integer)
ListaDescuentos = New List(Of Modelos.VentaDescuentos) ListaDescuentos = New List(Of Modelos.VentaDescuentos)
CuentasContablesInvalidas = New StringBuilder
CvePrePoliza = 0 CvePrePoliza = 0
TotalOtrosConceptos = 0 TotalOtrosConceptos = 0
CveUsuarioActual = UsuarioActual.CveUsuario CveUsuarioActual = UsuarioActual.CveUsuario
@@ -2598,7 +2555,7 @@ Partial Class Ventas
'CargaFormaEntrega() 'CargaFormaEntrega()
CargaCuentasTerminal() CargaCuentasTerminal()
'CargaDdlNCPS() 'CargaDdlNCPS()
CargarCamiones() 'CargarCamiones()
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
CargaMedicos() CargaMedicos()
@@ -2868,11 +2825,8 @@ Partial Class Ventas
End If End If
'regenrea el tipo de cambio 'regenrea el tipo de cambio
CargaNuevaFactura(Nothing) CargaNuevaFactura(Nothing)
CambiaMoneda() CambiaMoneda()
'NOTA DE CREDITO 'NOTA DE CREDITO
If NuevaFactura = 2 Then If NuevaFactura = 2 Then
DdlTipoComprobante.Items.Insert(0, New ListItem("Nota de Crédito", "Egs")) DdlTipoComprobante.Items.Insert(0, New ListItem("Nota de Crédito", "Egs"))
@@ -3120,18 +3074,20 @@ Partial Class Ventas
'********************************** '**********************************
'Complementos de Timbrado 'Complementos de Timbrado
Dim ObjVenta As New ClsVentas 'Dim ObjVenta As New ClsVentas
If ObjVenta.GetVentaComplementos() Then 'If ObjVenta.GetVentaComplementos() Then
RblComplementos.DataSource = ObjVenta.DtResultados ' RblComplementos.DataSource = ObjVenta.DtResultados
RblComplementos.DataBind() ' RblComplementos.DataBind()
UpComplementos.Update() ' UpComplementos.Update()
End If 'End If
ObjVenta.Dispose() 'ObjVenta.Dispose()
RblComplementos.DataSource = GlobalDTVtaComplementoCFDI
RblComplementos.DataBind()
CargaFormatoSucursal() CargaFormatoSucursal()
InicializaDevolucionAlmacen() InicializaDevolucionAlmacen()
CargaOtrosConceptos() 'CargaOtrosConceptos()
CargaFacturaOC() CargaFacturaOC()
'SELECCIONA SUCURSAL DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE '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" HLPagar.NavigateUrl = $"/Bancos/PopIEVentas.aspx?CveVenta={CveVenta}&TB_iframe=true&height=500&width=675"
HlCuentaTerminal.Visible = True HlCuentaTerminal.Visible = True
End If End If
CargarSaldoAuxiliar(CveCliente) 'CargarSaldoAuxiliar(CveCliente)
TabAuxiliarConta.Visible = UsuarioActual.TienePermisoProceso(306) 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"))) 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 If TienePermiso <> "" Then ' si tiene acceso en el subproyecto
@@ -10097,11 +10053,11 @@ Partial Class Ventas
End If End If
End If End If
If CveFactura > 0 AndAlso ErrorList.Count = 0 Then 'If CveFactura > 0 AndAlso ErrorList.Count = 0 Then
If Not ObjVentas.UpdateVentaFacturas(CveFactura, ObjVentas.CveVenta, UsuarioActual.CveEmpresa) Then ' If Not ObjVentas.UpdateVentaFacturas(CveFactura, ObjVentas.CveVenta, UsuarioActual.CveEmpresa) Then
ErrorList.Add("No se pudo actualizar la Factura") ' ErrorList.Add("No se pudo actualizar la Factura")
End If ' End If
End If 'End If
If CveCicloComercial > 0 AndAlso ErrorList.Count = 0 Then If CveCicloComercial > 0 AndAlso ErrorList.Count = 0 Then
If Not ObjContr.CicloComercialUpdate(CveCicloComercial, True, UsuarioActual.CveEmpresa, CveVenta:=ObjFactura.CveVenta) 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")) 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 'Using ObjInv As New ClsInventarios
DdlUnidadCamion.DataSource = ObjInv.DtResultados
End If
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then ' If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus:=1) Then
DdlRemolque1.DataSource = ObjInv.DtResultados ' DdlUnidadCamion.DataSource = ObjInv.DtResultados
End If ' 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.DataBind()
DdlUnidadCamion.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) DdlUnidadCamion.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
@@ -34807,7 +34766,6 @@ Partial Class Ventas
End Sub End Sub
Private Sub HabilitarControlesCartaPorte(Habilitar As Boolean) Private Sub HabilitarControlesCartaPorte(Habilitar As Boolean)
ChkEmitirCartaPorte.Enabled = Habilitar
TxtFechaEntregaCP.Enabled = Habilitar TxtFechaEntregaCP.Enabled = Habilitar
TxtFechaLlegadaCP.Enabled = Habilitar TxtFechaLlegadaCP.Enabled = Habilitar
DdlChofer.Enabled = Habilitar DdlChofer.Enabled = Habilitar
@@ -35349,6 +35307,9 @@ Partial Class Ventas
DdlDireccionDestino.DataSource = TmpDTDireccionCP DdlDireccionDestino.DataSource = TmpDTDireccionCP
DdlDireccionDestino.DataBind() DdlDireccionDestino.DataBind()
CargarCamiones()
HabilitarControlesCartaPorte(ChkEmitirCartaPorte.Checked)
End Sub End Sub
'Protected Sub ChkAgregarFlete_CheckedChanged(sender As Object, e As EventArgs) '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") TxtFechaModal.Text = NowADS.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
LnkDvModalTipoVentaAceptar.Visible = True LnkDvModalTipoVentaAceptar.Visible = True
'si es A - Vista o ,Fuera De Linea requiere tecnico
If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 3) Then Select Case RBLTipoVenta.SelectedValue
ChkRequiereTecnicoModal.Checked = True Case "1" ' Fuera de linea
ChkRequiereTecnicoModal.Enabled = False ChkRequiereTecnicoModal.Checked = True
DvModalRequiereOSFecha.Visible = True ChkRequiereTecnicoModal.Enabled = False
End If 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 End If
@@ -36102,7 +36081,7 @@ Partial Class Ventas
DdlProcedimiento.SelectedValueExist(DdlProcedimientoModal.SelectedValue) DdlProcedimiento.SelectedValueExist(DdlProcedimientoModal.SelectedValue)
'si es A - Vista o ,Fuera De Linea requiere tecnico '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 TdFechaOS1.Visible = True
TdFechaOS2.Visible = True TdFechaOS2.Visible = True
ChkRequiereTecnico.Checked = True ChkRequiereTecnico.Checked = True
@@ -36279,11 +36258,20 @@ Partial Class Ventas
Protected Sub LBNotaCredito_Click(sender As Object, e As EventArgs) Protected Sub LBNotaCredito_Click(sender As Object, e As EventArgs)
CargaDdlNCPS() CargaDdlNCPS()
DivGvCxC.Visible = True
CargaCxC() If CveVenta <= 0 Then 'cuando es nueva la factura
DivGvCxC.Visible = True
CargaCxC()
End If
UpAplicarNC.Update()
'CARGAR RNC 'CARGAR RNC
RblRNCTipo_SelectedIndexChanged(RblRNCTipo, EventArgs.Empty) RblRNCTipo_SelectedIndexChanged(RblRNCTipo, EventArgs.Empty)
RegistraScript("$('#ModalAplicarNC').modal('show');", "ModalNC") RegistraScript("$('#ModalAplicarNC').modal('show');", "ModalNC")
End Sub End Sub
Protected Sub LnkTabContabilidad_Click(sender As Object, e As EventArgs)
Tab.ActiveTabIndex = 6
CargarSaldoAuxiliar(CveCliente)
End Sub
End Class End Class