Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1952,12 +1952,18 @@ Public Class ClsPaginas
|
|||||||
If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) Then Application(AppNombre) = ObjInventarios.DtResultados
|
If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) Then Application(AppNombre) = ObjInventarios.DtResultados
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
End If
|
End If
|
||||||
Dim Str As New StringBuilder
|
|
||||||
If CveCamion > 0 Then Str.AppendFormat("CveCamion = {0}", CveCamion)
|
Dim filtros As New List(Of String)
|
||||||
If CveTipoCamion > 0 Then Str.AppendFormat("CveTipoCamion = {0}", CveTipoCamion)
|
If CveCamion >= 0 Then filtros.Add($"CveCamion = {CveCamion} ")
|
||||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
If CveTipoCamion >= 0 Then filtros.Add($"CveTipoCamion = {CveTipoCamion} ")
|
||||||
GlobalDTInvCamiones = Dv.ToTable
|
If filtros.Count > 0 Then
|
||||||
Dv.Dispose()
|
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||||
|
GlobalDTInvCamiones = Dv.ToTable
|
||||||
|
Dv.Dispose()
|
||||||
|
Else
|
||||||
|
GlobalDTInvCamiones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||||
|
End If
|
||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Dim AppNombre As String = $"GlobalDTInvCamiones-{CveEmpresa}"
|
Dim AppNombre As String = $"GlobalDTInvCamiones-{CveEmpresa}"
|
||||||
|
|||||||
@@ -6932,6 +6932,78 @@ Public Class ClsVentas
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region "VENTAS MEDICAS COMISIONES ESPECIALES"
|
||||||
|
|
||||||
|
Public Function GetComisionesMedicasEsPeciales(CveMedico As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_ComisionesMedicasEspecialesGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener las comisiones especiales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function AddComisionesMedicasEspeciales(CveMedico As Integer, CvePS As Integer, TipoComision As Integer, Comision As Decimal, CveUsuario As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_ComisionesMedicasEspecialesAdd")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
.Add("@TipoComision", SqlDbType.Int).Value = TipoComision
|
||||||
|
.Add("@Comision", SqlDbType.Money).Value = Comision
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al agegar la comisión especial", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function RemoveComisionesMedicasEspeciales(CveMedicoComision As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_ComisionesMedicasEspecialesRemove")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveMedicoComision", SqlDbType.Int).Value = CveMedicoComision
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al eliminar la comision especial.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
#Region "DEVOLUICON"
|
#Region "DEVOLUICON"
|
||||||
|
|
||||||
Public Function UpdateVentasDetalleCantidadDevolucion(CveVentaDetalle As Integer, CantidadDevolucion As Decimal) As Boolean
|
Public Function UpdateVentasDetalleCantidadDevolucion(CveVentaDetalle As Integer, CantidadDevolucion As Decimal) As Boolean
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-5" runat="server" id="DivTC" visible="false">
|
<div class="col-md-5" runat="server" id="DivTC" visible="false">
|
||||||
T.C.:
|
T.C.:
|
||||||
<asp:TextBox ID="TxtTC" runat="server" Text="1" placeholder="Tipo de Cambio" CssClass="form-control input-sm" MaxLength="12" onblur="CambiaPesosDolares();" Width="70px" ClientIDMode="Static" Style="text-align: right; display: inline-block;" />
|
<asp:TextBox ID="TxtTC" runat="server" Text="1" placeholder="Tipo de Cambio" CssClass="form-control input-sm" MaxLength="12" onblur="CambiaDolaresPesos();" Width="70px" ClientIDMode="Static" Style="text-align: right; display: inline-block;" />
|
||||||
<asp:RequiredFieldValidator ID="RFVTC" Enabled="false" runat="server" ControlToValidate="TxtTC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cambio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVTC" Enabled="false" runat="server" ControlToValidate="TxtTC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cambio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCETC" runat="server" HighlightCssClass="vco" TargetControlID="RFVTC" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCETC" runat="server" HighlightCssClass="vco" TargetControlID="RFVTC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<asp:Label ID="LbImporteME" Text="" ClientIDMode="Static" runat="server" />
|
<asp:Label ID="LbImporteME" Text="" ClientIDMode="Static" runat="server" />
|
||||||
|
|||||||
@@ -327,9 +327,21 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Private Sub CambiaTipoMoneda()
|
Private Sub CambiaTipoMoneda()
|
||||||
|
|
||||||
If DivTC.Visible Then
|
If DivTC.Visible Then
|
||||||
|
|
||||||
TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
||||||
If ChkPagarDolares.Checked Then RegistraScript("CambiaPesosDolares();")
|
|
||||||
If ChkPagarPesos.Checked Then RegistraScript("CambiaDolaresPesos();")
|
If ChkPagarDolares.Checked Then
|
||||||
|
'RegistraScript("CambiaPesosDolares();")
|
||||||
|
RegistraScript("CambiaDolaresPesos();")
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ChkPagarPesos.Checked Then
|
||||||
|
'RegistraScript("CambiaDolaresPesos();")
|
||||||
|
RegistraScript("CambiaPesosDolares();")
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1343,6 +1355,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||||
TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
||||||
|
TxtTC.Attributes.Add("onblur", "CambiaPesosDolares()")
|
||||||
Else
|
Else
|
||||||
DivTC.Visible = False
|
DivTC.Visible = False
|
||||||
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||||
@@ -1362,6 +1375,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||||
TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
|
||||||
|
TxtTC.Attributes.Add("onblur", "CambiaDolaresPesos()")
|
||||||
Else
|
Else
|
||||||
'DivDolaresDolares.Visible = False
|
'DivDolaresDolares.Visible = False
|
||||||
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
|
||||||
|
|||||||
@@ -187,8 +187,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox CssClass="form-control" ID="TxtUsuarioElaboro" runat="server" MaxLength="15" Enabled="false"></asp:TextBox>
|
<asp:Label CssClass="form-control" ID="LblUsuarioElaboro" runat="server" MaxLength="15" ></asp:Label>
|
||||||
<label for="<%= TxtUsuarioElaboro.ClientID.ToString()%>">Usuario Elaboró: </label>
|
<label for="<%= LblUsuarioElaboro.ClientID.ToString()%>">Usuario Elaboró: </label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
TxtFechaDocumento.Text = NowADS().ToString("dd/MM/yyyy")
|
TxtFechaDocumento.Text = NowADS().ToString("dd/MM/yyyy")
|
||||||
TxtFechaelaboracion.Text = NowADS().ToString("dd/MM/yyyy")
|
TxtFechaelaboracion.Text = NowADS().ToString("dd/MM/yyyy")
|
||||||
TxtConcepto.Enabled = True
|
TxtConcepto.Enabled = True
|
||||||
TxtUsuarioElaboro.Text = UsuarioActual.Nombre
|
LblUsuarioElaboro.Text = UsuarioActual.Nombre
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -352,7 +352,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
TxtFechaDocumento.Text = NowADS().ToString("dd/MM/yyyy")
|
TxtFechaDocumento.Text = NowADS().ToString("dd/MM/yyyy")
|
||||||
TxtFechaelaboracion.Text = NowADS().ToString("dd/MM/yyyy")
|
TxtFechaelaboracion.Text = NowADS().ToString("dd/MM/yyyy")
|
||||||
TxtConcepto.Enabled = True
|
TxtConcepto.Enabled = True
|
||||||
TxtUsuarioElaboro.Text = UsuarioActual.Usuario
|
LblUsuarioElaboro.Text = UsuarioActual.Usuario
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -453,13 +453,13 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Folio = dr("FolioPoliza").ToString
|
Folio = dr("FolioPoliza").ToString
|
||||||
|
|
||||||
TxtFolio.Text = dr("FolioPoliza").ToString
|
TxtFolio.Text = dr("FolioPoliza").ToString
|
||||||
TxtUsuarioElaboro.Text = dr("UsuarioNombre").ToString
|
LblUsuarioElaboro.Text = dr("UsuarioNombre").ToString
|
||||||
TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
|
TxtFechaelaboracion.Text = dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||||
TxtFechaelaboracion.ToolTip = dr("FechaIng").ToString.ToDate.ToString("HH:mm:ss")
|
TxtFechaelaboracion.ToolTip = dr("FechaIng").ToString.ToDate.ToString("HH:mm:ss")
|
||||||
CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString.ToEntero
|
CvePlantillaPoliza = dr("CvePlantillaPoliza").ToString.ToEntero
|
||||||
DdlPlantilla.SelectedValueExist(CvePlantillaPoliza)
|
DdlPlantilla.SelectedValueExist(CvePlantillaPoliza)
|
||||||
|
|
||||||
If UsuarioActual.CveRol = 1 Then TxtUsuarioElaboro.ToolTip = dr("Modulo").ToString
|
LblUsuarioElaboro.ToolTip = dr("Modulo").ToString
|
||||||
|
|
||||||
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then
|
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then
|
||||||
LnkAddConcepto.Visible = True
|
LnkAddConcepto.Visible = True
|
||||||
|
|||||||
108
OC/OC.aspx.vb
108
OC/OC.aspx.vb
@@ -6,7 +6,6 @@ Imports System.Data.SqlClient
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports GemBox.Spreadsheet
|
Imports GemBox.Spreadsheet
|
||||||
Imports Microsoft.Owin.Security.Provider
|
|
||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
|
|
||||||
Partial Class OC_OC
|
Partial Class OC_OC
|
||||||
@@ -926,13 +925,13 @@ Partial Class OC_OC
|
|||||||
ChkEntregaDirecta.Checked = False
|
ChkEntregaDirecta.Checked = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(13, 73) AndAlso CveOrdenCompra > 0 AndAlso Request("Conta") IsNot Nothing AndAlso Request("Conta").ToEntero = 1 Then
|
'If UsuarioActual.CveEmpresa.Contiene(13, 73) AndAlso CveOrdenCompra > 0 AndAlso Request("Conta") IsNot Nothing AndAlso Request("Conta").ToEntero = 1 Then
|
||||||
If GeneraPrePolizaPresupuesto(CveOrdenCompra, Nothing) Then
|
' If GeneraPrePolizaPresupuesto(CveOrdenCompra, Nothing) Then
|
||||||
Alert("PrePoliza de Presupuesto Generada Correctamente")
|
' Alert("PrePoliza de Presupuesto Generada Correctamente")
|
||||||
Else
|
' Else
|
||||||
Alert("No Se Genero la PrePoliza de Presupuesto Generada Correctamente", TipoMensaje.MsgAdvertencia)
|
' Alert("No Se Genero la PrePoliza de Presupuesto Generada Correctamente", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2218,51 +2217,11 @@ Partial Class OC_OC
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim ValImporte As Decimal = (TxtCant.Text.ToDecimal * txtPrecioUnitario.Text.ToDecimal).RoundSQL(2)
|
Dim ValImporte As Decimal = (TxtCant.Text.ToDecimal * txtPrecioUnitario.Text.ToDecimal).RoundSQL(2)
|
||||||
If Not ValidaPresupuesto(1, DdlSubProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, ValImporte) Then
|
If Not ValidaPresupuesto(1, DdlSubProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, ValImporte) Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
|
|
||||||
|
|
||||||
'Dim ObjCon As New ClsContratos
|
|
||||||
'Dim CvePresupuesto As Integer = 0
|
|
||||||
'Dim Autorizado As Decimal = 0
|
|
||||||
'Dim Ejercido As Decimal = 0
|
|
||||||
'If ObjCon.GetPresupuestos(-1, "-1", DdlSubProyecto.SelectedValue.ToEntero, 2, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
' If ObjCon.DtResultados.Rows.Count > 0 Then
|
|
||||||
' CvePresupuesto = ObjCon.DtResultados.Rows(0)("CvePresupuesto").ToString.ToEntero
|
|
||||||
' If CvePresupuesto > 0 Then
|
|
||||||
' If ObjCon.GetPresupuestosDetalle(CvePresupuesto, -1, UsuarioActual.CveEmpresa) Then
|
|
||||||
' If ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero} AND Importe > 0").Rows.Count > 0 Then
|
|
||||||
' Autorizado = ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero} AND Importe > 0").Rows(0)("Importe").ToString.ToDecimal
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' If ObjCon.GetPresupuestosRep(CvePresupuesto, -1, 1, $"01/09/{NowADS().Year - 1}".ToDate, NowADS(), UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero,
|
|
||||||
' DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlClasificacion.SelectedValue.ToEntero) Then
|
|
||||||
' If ObjCon.DtResultados.Rows.Count > 0 Then
|
|
||||||
' Ejercido = ObjCon.DtResultados.Rows(0)("Ejercido").ToString.ToDecimal
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
'ObjCon.Dispose()
|
|
||||||
|
|
||||||
'If CvePresupuesto > 0 And Autorizado > 0 Then
|
|
||||||
' Dim Diferencia As Decimal = (Ejercido + If(txtPrecioUnitario.Text.ToDecimal > 0, (txtPrecioUnitario.Text.ToDecimal * TxtCant.Text.ToDecimal) - TxtDescuentoAdd.Text.ToDecimal, 0)) - Autorizado
|
|
||||||
' If Diferencia > 0 Then
|
|
||||||
' Alert($"No hay presupuesto disponible en el subproyecto <b>{DdlSubProyecto.SelectedItem.Text}</b> y la clasificación <b>{DdlClasificacion.SelectedItem.Text}</b> se excede por <b>{Diferencia.FormatoNumero}</b>", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim RetISR As Decimal = DrPS("RetISR").ToString.ToDecimal
|
Dim RetISR As Decimal = DrPS("RetISR").ToString.ToDecimal
|
||||||
Dim RetIVA As Decimal = DrPS("RetIVA").ToString.ToDecimal
|
Dim RetIVA As Decimal = DrPS("RetIVA").ToString.ToDecimal
|
||||||
Dim IvaPS As Decimal = DrPS("IVA").ToString.ToDecimal
|
Dim IvaPS As Decimal = DrPS("IVA").ToString.ToDecimal
|
||||||
@@ -3554,8 +3513,7 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
|
||||||
If UsuarioActual.CveEmpresa.Contiene(13, 73) Then
|
|
||||||
|
|
||||||
If Not GeneraPrePolizaPresupuesto(objOrdenCompra.CveOrdenCompra, objOrdenCompra.IniciaTransacSQL) Then
|
If Not GeneraPrePolizaPresupuesto(objOrdenCompra.CveOrdenCompra, objOrdenCompra.IniciaTransacSQL) Then
|
||||||
HuboError = True
|
HuboError = True
|
||||||
@@ -3563,7 +3521,6 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
HuboError = True
|
HuboError = True
|
||||||
End Try
|
End Try
|
||||||
@@ -3720,6 +3677,10 @@ Partial Class OC_OC
|
|||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If (UsuarioActual.Empresa.Funcionalidad(532) = "1") Then
|
||||||
|
GeneraPrePolizaPresupuesto(CveOrdenCompra, objOrdenCompra.IniciaTransacSQL, True)
|
||||||
|
End If
|
||||||
|
|
||||||
If IDPolizaPresupuestal > 0 AndAlso UsuarioActual.Empresa.UsaAC Then
|
If IDPolizaPresupuestal > 0 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||||
PolizaCancelacion = CancelarAC(ObjAC)
|
PolizaCancelacion = CancelarAC(ObjAC)
|
||||||
|
|
||||||
@@ -9190,32 +9151,24 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function GeneraPrePolizaPresupuesto(CveOrdenCompraPresupuesto As Integer, Optional ByRef transaccion As SqlTransaction = Nothing, Optional EsCancelacion As Boolean = False) As Boolean
|
||||||
Private Function GeneraPrePolizaPresupuesto(CveOrdenCompraPresupuesto As Integer, Optional ByRef transaccion As SqlTransaction = Nothing) As Boolean
|
|
||||||
|
|
||||||
Dim Respuesta As Boolean = True
|
Dim Respuesta As Boolean = True
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(13, 73) Then
|
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
|
||||||
|
|
||||||
Dim CveMonedaPresupuesto As Integer = DdlMoneda.SelectedValue.ToEntero
|
Dim CveMonedaPresupuesto As Integer = DdlMoneda.SelectedValue.ToEntero
|
||||||
Dim TC As Decimal = If(CveMonedaPresupuesto = 1, 1, GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal)
|
Dim TC As Decimal = If(CveMonedaPresupuesto = 1, 1, GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal)
|
||||||
|
|
||||||
If CveMonedaPresupuesto > 1 AndAlso TC = 0 Then
|
If CveMonedaPresupuesto > 1 AndAlso TC = 0 Then
|
||||||
Alert($"No se genero la prepoliza de presupuesto, no se pudo obtener el Tipo de Cambio de la fecha {TxtFecha.Text}", TipoMensaje.MsgAdvertencia)
|
Alert($"No se genero la póliza de presupuesto, no se pudo obtener el Tipo de Cambio de la fecha {TxtFecha.Text}", TipoMensaje.MsgAdvertencia)
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjConta As New ClsContabilidad()
|
Dim ObjConta As New ClsContabilidad(transaccion)
|
||||||
|
Dim CvePrePolizaPresupuesto = ObjConta.AddPrePolizas("OC/OC-(Presupuesto)", 53, LblTotal.Text.ToDecimal, LblTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlProveedores.SelectedText, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If transaccion Is Nothing Then
|
If CvePrePolizaPresupuesto > 0 Then
|
||||||
ObjConta = New ClsContabilidad()
|
|
||||||
Else
|
|
||||||
ObjConta = New ClsContabilidad(transaccion)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim CvePrePolizaPreSuPuesto = ObjConta.AddPrePolizas("OC/OC-(Presupuesto)", 53, LblTotal.Text.ToDecimal, LblTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlProveedores.SelectedText, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
|
||||||
|
|
||||||
If CvePrePolizaPreSuPuesto > 0 Then
|
|
||||||
|
|
||||||
Dim EnumAgrupado = (From row In DtDetalle.AsEnumerable()
|
Dim EnumAgrupado = (From row In DtDetalle.AsEnumerable()
|
||||||
Group row By
|
Group row By
|
||||||
@@ -9235,37 +9188,28 @@ Partial Class OC_OC
|
|||||||
For Each item In EnumAgrupado
|
For Each item In EnumAgrupado
|
||||||
|
|
||||||
Dim SerieFolio = $"OC: {Folio}, Clasificación: {item.Clasificacion}"
|
Dim SerieFolio = $"OC: {Folio}, Clasificación: {item.Clasificacion}"
|
||||||
|
Dim Multiplicador As Decimal = If(EsCancelacion, -1, 1)
|
||||||
|
|
||||||
Dim Importe As Decimal = item.TotalSum
|
Dim Importe As Decimal = Multiplicador * item.TotalSum
|
||||||
Dim ImporteME As Decimal = If(CveMonedaPresupuesto = 1, 0, item.TotalSum)
|
Dim ImporteME As Decimal = Multiplicador * If(CveMonedaPresupuesto = 1, 0, item.TotalSum)
|
||||||
Dim ImporteMN As Decimal = If(CveMonedaPresupuesto = 1, item.TotalSum, item.TotalSum * TC)
|
Dim ImporteMN As Decimal = Multiplicador * If(CveMonedaPresupuesto = 1, item.TotalSum, item.TotalSum * TC)
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaPreSuPuesto, False, Importe, ImporteMN, 154, SerieFolio, SerieFolio, ImporteME:=ImporteME, TipoCambio:=TC, CveProveedor:=DdlProveedores.SelectedValue.ToEntero, CveOC:=CveOrdenCompraPresupuesto, CveClasificacion:=item.CveClasificacion, CveSubProyecto:=item.CveSubProyecto, Contabilizable:=True) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaPresupuesto, False, Importe, ImporteMN, 154, SerieFolio, SerieFolio, ImporteME:=ImporteME, TipoCambio:=TC, CveProveedor:=DdlProveedores.SelectedValue.ToEntero, CveOC:=CveOrdenCompraPresupuesto, CveClasificacion:=item.CveClasificacion, CveSubProyecto:=item.CveSubProyecto, Contabilizable:=True) Then
|
||||||
Respuesta = False
|
Respuesta = False : Exit For
|
||||||
Exit For
|
|
||||||
End If
|
End If
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaPresupuesto, True, Importe, ImporteMN, 152, SerieFolio, SerieFolio, ImporteME:=ImporteME, TipoCambio:=TC, CveProveedor:=DdlProveedores.SelectedValue.ToEntero, CveOC:=CveOrdenCompraPresupuesto, CveClasificacion:=item.CveClasificacion, CveSubProyecto:=item.CveSubProyecto, Contabilizable:=True) Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaPreSuPuesto, True, Importe, ImporteMN, 152, SerieFolio, SerieFolio, ImporteME:=ImporteME, TipoCambio:=TC, CveProveedor:=DdlProveedores.SelectedValue.ToEntero, CveOC:=CveOrdenCompraPresupuesto, CveClasificacion:=item.CveClasificacion, CveSubProyecto:=item.CveSubProyecto, Contabilizable:=True) Then
|
Respuesta = False : Exit For
|
||||||
Respuesta = False
|
|
||||||
Exit For
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
Else
|
Else
|
||||||
Respuesta = False
|
Respuesta = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return Respuesta
|
Return Respuesta
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton runat="server" ID="LnkComisiones" OnClick="LnkComisiones_Click" data-toggle="tooltip" data-placement="left" title="Comisiones" Text="<i class='fa fa-money'></i> Comisiones"></asp:LinkButton>
|
<asp:LinkButton runat="server" ID="LnkComisiones" OnClick="LnkComisiones_Click" data-toggle="tooltip" data-placement="left" title="Comisiones" Text="<i class='fa fa-money'></i> Comisiones"></asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton runat="server" ID="LnkComisionesEspeciales" OnClick="LnkComisionesEspeciales_Click" data-toggle="tooltip" data-placement="left" title="Comisiones" Text="<i class='fa fa-money'></i> Comisiones Especiales"></asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Excel</asp:LinkButton>
|
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Excel</asp:LinkButton>
|
||||||
@@ -282,6 +285,79 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="DvModalComisionesEspeciales" class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog" style="width: 900px;">
|
||||||
|
<asp:UpdatePanel runat="server" class="modal-content" ID="UpdatePanel1" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Literal ID="Literal2" runat="server">Comisiones Especiales</asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
||||||
|
<input type="text" id="TxtBusquedaComicionesEspeciales" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaComiciones','{0}')", GvComisionesEspeciales.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaComicionesEspeciales','{0}')", GvComisionesEspeciales.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
|
||||||
|
<asp:GridView ID="GvComisionesEspeciales" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames="CveMedicoComision,CveMedico,CvePS,TipoComision,Comision,CveUsuario"
|
||||||
|
data-sort="true"
|
||||||
|
EmptyDataText="No se encontraron Comisiones" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Médico" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlMedico" runat="server" Text='<%# Eval("Medico") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Código/Producto" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlCodigoPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="TipoComision" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlTipoComision" runat="server" Text='<%# Eval("TipoComisionStr") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Comision" ItemStyle-HorizontalAlign="Right">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlTipoComision" runat="server" Text='<%# Eval("Comision") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderText="Opciones" ItemStyle-Width="60px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkEliminarComisionEspecial" OnClick="LnkEliminarComisionEspecial_Click" runat="server" Visible="true" AlternateText="Eliminar" CausesValidation="False"
|
||||||
|
CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>"
|
||||||
|
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button id="Button2" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|
||||||
|
|||||||
@@ -248,4 +248,26 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "COMISIONES ESPECIALES"
|
||||||
|
|
||||||
|
Protected Sub LnkComisionesEspeciales_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
CargaComisionesEspeciales()
|
||||||
|
RegistraScript("$('#DvModalComisionesEspeciales').modal('show');")
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaComisionesEspeciales()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkEliminarComisionEspecial_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -113,7 +113,6 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpLineasAdicionales" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpLineasAdicionales" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="row " runat="server" visible ="false" id="DvLinea">
|
<div class="row " runat="server" visible ="false" id="DvLinea">
|
||||||
<div class=" col-md-12" style="text-align: right!important">
|
<div class=" col-md-12" style="text-align: right!important">
|
||||||
<input type="text" id="TxtBuscarLineaAdicional" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvD.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBuscarLineaAdicional" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvD.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
@@ -121,137 +120,32 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row " runat="server" visible ="false" id="DvLineaPO">
|
|
||||||
<div class=" col-md-12" style="text-align: right!important">
|
|
||||||
<input type="text" id="TxtBuscarLineaAdicionalpo" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLAPO.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLAPO.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row ">
|
<div class="row ">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<asp:GridView ID="GvD" Width="100%" runat="server" GridLines="None" Visible="false"
|
<asp:GridView ID="GvD" Width="100%" runat="server" GridLines="None"
|
||||||
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveCategoria,FechaIng,CveLineaAdicionalEstatus,Proveedor,LineaAdicionalComprobante,DiasVencimiento,CveVenta"
|
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveCategoria,FechaIng,Proveedor,DiasVencimiento"
|
||||||
CssClass="table table-striped table-advance table-hover ScrollAD input-sm " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
CssClass="table table-striped table-advance table-hover ScrollAD input-sm " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" />
|
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" />
|
||||||
<asp:BoundField DataField="NombreCliente" HeaderText="Cliente" />
|
<asp:HyperLinkField DataTextField="NombreCliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" HeaderText="Cliente" />
|
||||||
<asp:BoundField DataField="Proveedor" HeaderText="Comercializador" />
|
<asp:BoundField DataField="Proveedor" HeaderText="Comercializador" />
|
||||||
|
<asp:BoundField DataField="TipoLineaSTR" HeaderText="Tipo Linea" />
|
||||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" />
|
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" />
|
||||||
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Serie Folio" />
|
|
||||||
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField DataField="DiasVencimiento" HeaderText="Dias de Venc." />
|
<asp:BoundField DataField="DiasVencimiento" HeaderText="Dias de Venc." />
|
||||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" />
|
<asp:BoundField DataField="FechaVencimiento" HeaderText="F. Vencimiento" DataFormatString="{0:d}" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
<asp:GridView ID="GvLAPO" Width="100%" runat="server" GridLines="None" Visible="false"
|
|
||||||
DataKeyNames="CveLineaAdicional,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveLineaAdicionalEstatus,LineaAdicionalComprobante,CveVenta,CveCliente,CveProveedor"
|
|
||||||
CssClass="table table-striped table-advance table-hover ScrollAD input-sm mysmallbtn" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
|
||||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"
|
|
||||||
OnRowCommand="GvLAPO_RowCommand"
|
|
||||||
OnRowDataBound="GvLAPO_RowDataBound">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField DataField ="Agrupador" HeaderText="Agrupador" />
|
|
||||||
<asp:BoundField DataField="LineaAdicional" HeaderText="PO" />
|
|
||||||
<asp:BoundField DataField="Importe" HeaderText="Importe PO" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField DataField="Abreviatura" HeaderText="Mon" />
|
|
||||||
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Serie Folio" />
|
|
||||||
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField DataField="DiasVencimiento" HeaderText="D.Plazo" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField DataField="DiasTranscurridos" HeaderText="D.Trans" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField DataField="FechaVenta" HeaderText="F. Venta" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
|
||||||
<asp:BoundField DataField="FechaVencimientoVenta" HeaderText="F. Venc. Venta" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
|
||||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" />
|
|
||||||
<asp:BoundField DataField="FechaEnvio" HeaderText="F. Envío" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
|
||||||
<asp:TemplateField HeaderText="Opciones" ItemStyle-Width="75px" HeaderStyle-Width="75px">
|
|
||||||
<ItemTemplate>
|
|
||||||
<div class="row" >
|
|
||||||
<div class="col-md-4" style="max-width:26px!important">
|
|
||||||
<asp:LinkButton ID="LnkCargarComprobante" Visible="false" runat="server" AlternateText="Editar" CausesValidation="False"
|
|
||||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload'></i>" OnClick="LnkCargarComprobante_Click"
|
|
||||||
ToolTip="Cargar Comprobante" />
|
|
||||||
<asp:LinkButton ID="LnkDescargaComprobante" Visible="false" runat="server" AlternateText="Descarga" CausesValidation="False"
|
|
||||||
CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-download'></i>" OnClick="LnkDescargaComprobante_Click"
|
|
||||||
ToolTip="Descargar Comprobante" />
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4" style="max-width:26px!important" title="Cambiar estatus a Enviado">
|
|
||||||
<asp:LinkButton ID="LnkCambiarEstatus" runat="server" Visible="false" AlternateText="CambiarEstatus"
|
|
||||||
CommandName="Estatus" CommandArgument='<%# Eval("CveLineaAdicionalEstatus") %>' CausesValidation="False"
|
|
||||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>"
|
|
||||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Cambiar Estado?" data-btn-ok-label="si"
|
|
||||||
ToolTip="Cambiar estatus a Enviado" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<%-- MODAL COMPROBANTE --%>
|
|
||||||
<div id="ModalComprobante" class="modal ADS fade" role="dialog">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
|
|
||||||
<!-- Modal content-->
|
|
||||||
<div class="modal-content" style="width: 700px;">
|
|
||||||
<div class="modal-header ">
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
<h4 class="modal-title">Agregar Comprbante</h4>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
|
||||||
<asp:UpdatePanel runat="server" ID="UpAddComprobancte" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div>
|
|
||||||
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<asp:UpdatePanel runat="server">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:Button ID="BtnAddComprobante" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" OnClick="BtnAddComprobante_Click" />
|
|
||||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
|
||||||
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<%-- FIN MODAL COMPROBANTE --%>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||||
|
|
||||||
|
|||||||
@@ -89,57 +89,19 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
|||||||
private void CargaDatos()
|
private void CargaDatos()
|
||||||
{
|
{
|
||||||
DTDatosGvD = new DataTable();
|
DTDatosGvD = new DataTable();
|
||||||
LnkDescargaExcel.Visible = false;
|
LnkDescargaExcel.Visible = false;
|
||||||
|
|
||||||
ClsVentas objVentas = new ClsVentas();
|
|
||||||
|
|
||||||
int CveProveedor = -1;
|
ClsVentas objVentas = new ClsVentas();
|
||||||
|
|
||||||
if(TipoLinea == 1)
|
|
||||||
|
|
||||||
if (objVentas.GetLineasAdicionalesVencimientos( DdlClientes.SelectedValue.ToEntero(), 1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveEmpresa))
|
if (objVentas.GetLineasAdicionalesVencimientos( DdlClientes.SelectedValue.ToEntero(), -1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveEmpresa))
|
||||||
{
|
|
||||||
GvD.DataSource = objVentas.DtResultados;
|
|
||||||
|
|
||||||
if (objVentas.DtResultados.Rows.Count > 0)
|
|
||||||
{
|
|
||||||
DTDatosGvD = objVentas.DtResultados;
|
|
||||||
LnkDescargaExcel.Visible = true;
|
|
||||||
{
|
{
|
||||||
}
|
GvD.DataSource = objVentas.DtResultados;
|
||||||
|
|
||||||
|
if (objVentas.DtResultados.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
DTDatosGvD = objVentas.DtResultados;
|
DTDatosGvD = objVentas.DtResultados;
|
||||||
{
|
|
||||||
GvD.DataSource = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
if (DdlAgrupador.SelectedValue.ToEntero()== 1){
|
|
||||||
GvLAPO.Columns[0].HeaderText = "Comercializador";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GvLAPO.Columns[0].HeaderText = "Cliente";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (objVentas.RepLineasAdicionales(DdlAgrupador.SelectedValue.ToEntero(), -1, DdlClientes.SelectedValue.ToEntero(), CveProveedor, 2, -1, MinFecha, MaxFecha, DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa))
|
|
||||||
{
|
|
||||||
GvLAPO.DataSource = objVentas.DtResultados;
|
|
||||||
|
|
||||||
if (objVentas.DtResultados.Rows.Count > 0)
|
|
||||||
{
|
|
||||||
DTDatosGvD = objVentas.DtResultados;
|
|
||||||
LnkDescargaExcel.Visible = true;
|
|
||||||
UpAcciones.Update();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LnkDescargaExcel.Visible = true;
|
LnkDescargaExcel.Visible = true;
|
||||||
UpAcciones.Update();
|
UpAcciones.Update();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
objVentas.Dispose();
|
objVentas.Dispose();
|
||||||
@@ -155,116 +117,7 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
|||||||
CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
|
CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
|
||||||
CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero();
|
CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero();
|
||||||
LineaAdicionalComprobante = GvRow.DataKey("LineaAdicionalComprobante").ToString();
|
LineaAdicionalComprobante = GvRow.DataKey("LineaAdicionalComprobante").ToString();
|
||||||
|
|
||||||
RegistraScript("$('#ModalComprobante').modal('show');","");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void BtnAddComprobante_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
bool errorCargaComprobante = false;
|
|
||||||
|
|
||||||
List<Archivo> filesgral = Anexo.getfiles().Archivos;
|
|
||||||
string filemove = "";
|
|
||||||
FileInfo fiNuevo;
|
|
||||||
|
|
||||||
DirectoryInfo df = new DirectoryInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\");
|
|
||||||
|
|
||||||
//Crea directorio si no existe
|
|
||||||
if (!df.Exists)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Directory.CreateDirectory(df.FullName);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
errorCargaComprobante = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//borrar archivo anterior
|
|
||||||
if((!errorCargaComprobante) && LineaAdicionalComprobante.Length > 0)
|
|
||||||
{
|
|
||||||
FileInfo fiAnterior = new FileInfo($@"{df.FullName}{LineaAdicionalComprobante}");
|
|
||||||
if (fiAnterior.Exists)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
File.Delete(fiAnterior.FullName);
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
errorCargaComprobante = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!errorCargaComprobante){
|
|
||||||
|
|
||||||
string RutaArchivoTemp = "";
|
|
||||||
foreach (Archivo fileItem in filesgral)
|
|
||||||
{
|
|
||||||
FileExtension = System.IO.Path.GetExtension(string.Format(@"{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "");
|
|
||||||
filemove = fileItem.filename;
|
|
||||||
RutaArchivoTemp = $@"{AppDomain.CurrentDomain.BaseDirectory}\Temp\{fileItem.filename}";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if((!errorCargaComprobante) && RutaArchivoTemp.Length > 0)
|
|
||||||
{
|
|
||||||
fiNuevo = new FileInfo(RutaArchivoTemp);
|
|
||||||
|
|
||||||
if (fiNuevo.Exists)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (File.Exists($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}"))
|
|
||||||
{
|
|
||||||
File.Delete($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}");
|
|
||||||
}
|
|
||||||
File.Move(fiNuevo.FullName, $@"{df.FullName}\{CveVenta}{fiNuevo.Extension}");
|
|
||||||
errorCargaComprobante = false;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
errorCargaComprobante = true;
|
|
||||||
}
|
|
||||||
if (!errorCargaComprobante)
|
|
||||||
{
|
|
||||||
ClsVentas objVentas = new ClsVentas();
|
|
||||||
if (!objVentas.UpdateVentaLineaAdicional(CveLineaAdicional, CveVenta, $@"{CveVenta}{fiNuevo.Extension}", -1, UsuarioActual.CveEmpresa))
|
|
||||||
{
|
|
||||||
errorCargaComprobante = true;
|
|
||||||
}
|
|
||||||
objVentas.Dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!errorCargaComprobante)
|
|
||||||
{
|
|
||||||
CargaDatos();
|
|
||||||
Anexo.Text = "[]";
|
|
||||||
RegistraScript("$('#ModalComprobante').modal('hide');", "");
|
|
||||||
Alert("Comprobante actualizado correctamente.");
|
|
||||||
}
|
|
||||||
UpAddComprobancte.Update();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void LnkCambiarEstatus_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
|
||||||
int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToEntero();
|
|
||||||
int CveVenta = GvRow.DataKey("CveVenta").ToEntero();
|
|
||||||
bool errorCambioEstatus = false;
|
|
||||||
ClsVentas objVentas = new ClsVentas();
|
|
||||||
if (!objVentas.UpdateVentaLineaAdicional(CveLineaAdicional, CveVenta, "", 2, UsuarioActual.CveEmpresa))
|
|
||||||
{
|
|
||||||
errorCambioEstatus = true;
|
|
||||||
}
|
|
||||||
if (!errorCambioEstatus)
|
|
||||||
{
|
|
||||||
RegistraScript("$('#ModalComprobante').modal('show');","");
|
RegistraScript("$('#ModalComprobante').modal('show');","");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,13 +127,6 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
|||||||
{
|
{
|
||||||
if(TipoLinea == 1)
|
if(TipoLinea == 1)
|
||||||
{
|
{
|
||||||
GridView gvTemp = GvD;
|
|
||||||
//gvTemp.ExportToExcelX("RepLineasAdicionales" + NowADS().ToShortDateString());
|
|
||||||
gvTemp.ExportToExcelGembox("RepLineasAdicionales", UsuarioActual, "Rep Lineas Adicionales", AnchoImagen: 150);
|
|
||||||
}
|
|
||||||
else if(TipoLinea == 2)
|
|
||||||
{
|
|
||||||
GridView gvTemp = GvLAPO;
|
|
||||||
GridView gvTemp = GvD;
|
GridView gvTemp = GvD;
|
||||||
//gvTemp.ExportToExcelX("RepLineasAdicionales" + NowADS().ToShortDateString());
|
//gvTemp.ExportToExcelX("RepLineasAdicionales" + NowADS().ToShortDateString());
|
||||||
gvTemp.ExportToExcelGembox("RepLineasAdicionales", UsuarioActual, "Rep Lineas Adicionales", AnchoImagen: 150);
|
gvTemp.ExportToExcelGembox("RepLineasAdicionales", UsuarioActual, "Rep Lineas Adicionales", AnchoImagen: 150);
|
||||||
@@ -351,28 +197,6 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
|||||||
Response.ContentType = "text/octet-stream";
|
Response.ContentType = "text/octet-stream";
|
||||||
Response.Flush();
|
Response.Flush();
|
||||||
Response.TransmitFile(fi.FullName);
|
Response.TransmitFile(fi.FullName);
|
||||||
Response.End();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void GvLAPO_RowCommand(object sender, GridViewCommandEventArgs e)
|
|
||||||
{
|
|
||||||
if (e.CommandName == "Estatus")
|
|
||||||
Response.End();
|
Response.End();
|
||||||
GridViewRow GvRow = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer;
|
|
||||||
int CveLineaAdicionalActualizarEstatus = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
|
|
||||||
int CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero();
|
|
||||||
|
|
||||||
bool errorCambioEstatus = false;
|
|
||||||
//int cveestatus = e.CommandArgument.ToEntero() + 2; //pasar al siguiente estatus
|
|
||||||
|
|
||||||
ClsVentas objVentas = new ClsVentas();
|
|
||||||
if (!objVentas.UpdateVentaLineaAdicional(CveLineaAdicionalActualizarEstatus, CveVenta,"", 2, UsuarioActual.CveEmpresa))
|
|
||||||
{
|
|
||||||
errorCambioEstatus = true;
|
|
||||||
}
|
|
||||||
objVentas.Dispose();
|
|
||||||
if (!errorCambioEstatus)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36045,39 +36045,20 @@ Partial Class Ventas
|
|||||||
|
|
||||||
DdlChofer.DataSource = GlobalDTChoferes(UsuarioActual.CveEmpresa)
|
DdlChofer.DataSource = GlobalDTChoferes(UsuarioActual.CveEmpresa)
|
||||||
DdlChofer.DataBind()
|
DdlChofer.DataBind()
|
||||||
|
|
||||||
DdlChofer.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
DdlChofer.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||||
|
|
||||||
DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa, CveTipoCamion:=1)
|
||||||
DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
|
||||||
|
|
||||||
'Using ObjInv As New ClsInventarios
|
|
||||||
|
|
||||||
' If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus:=1) Then
|
|
||||||
' DdlUnidadCamion.DataSource = ObjInv.DtResultados
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' 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"))
|
||||||
|
|
||||||
DdlRemolque1.DataBind()
|
DdlConfigAuto.DataSource = GlobalDTGralCartaPorteConfigAutoTransportes
|
||||||
DdlRemolque1.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
|
||||||
|
|
||||||
Using ObjGrales As New ClsGenerales
|
|
||||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
|
||||||
DdlConfigAuto.DataSource = ObjGrales.DtResultados
|
|
||||||
End If
|
|
||||||
End Using
|
|
||||||
|
|
||||||
DdlConfigAuto.DataBind()
|
DdlConfigAuto.DataBind()
|
||||||
DdlConfigAuto.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
DdlConfigAuto.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
||||||
|
|
||||||
|
DdlRemolque1.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa, CveTipoCamion:=2)
|
||||||
|
DdlRemolque1.DataBind()
|
||||||
|
DdlRemolque1.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||||
|
|
||||||
UpEmitirTransitorio.Update()
|
UpEmitirTransitorio.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -36091,12 +36072,10 @@ Partial Class Ventas
|
|||||||
DdlRemolque2.SelectedValueExist(-1)
|
DdlRemolque2.SelectedValueExist(-1)
|
||||||
|
|
||||||
If DdlUnidadCamion.SelectedValue.ToEntero > 0 Then
|
If DdlUnidadCamion.SelectedValue.ToEntero > 0 Then
|
||||||
Using ObjInv As New ClsInventarios
|
|
||||||
If ObjInv.GetCamiones(DdlUnidadCamion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1) Then
|
Dim CveConfig As String = GlobalDTInvCamiones(UsuarioActual.CveEmpresa, CveCamion:=DdlUnidadCamion.SelectedValue.ToEntero, CveTipoCamion:=1).FiltroPrimeroValor("CveConfigAutoTransporte")
|
||||||
DdlConfigAuto.SelectedValueExist(ObjInv.DtResultados.FiltroPrimeroValor("CveConfigAutoTransporte"))
|
DdlConfigAuto.SelectedValueExist(CveConfig)
|
||||||
DdlConfigAuto_SelectedIndexChanged(Nothing, Nothing)
|
DdlConfigAuto_SelectedIndexChanged(Nothing, Nothing)
|
||||||
End If
|
|
||||||
End Using
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpEmitirTransitorio.Update()
|
UpEmitirTransitorio.Update()
|
||||||
@@ -36222,27 +36201,24 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If DdlConfigAuto.SelectedValue.ToEntero > 0 Then
|
If DdlConfigAuto.SelectedValue.ToEntero > 0 Then
|
||||||
|
|
||||||
Using ObjGrales As New ClsGenerales
|
Dim Remolque As String = GlobalDTGralCartaPorteConfigAutoTransportes.FiltroPrimeroValor("Remolque", $" CveConfigAutoTransporte ='{DdlConfigAuto.SelectedValue}'")
|
||||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
If Remolque <> "" Then
|
||||||
Dim Remolque As String = ObjGrales.DtResultados.FiltroPrimeroValor("Remolque", $" CveConfigAutoTransporte ='{DdlConfigAuto.SelectedValue}'")
|
|
||||||
|
|
||||||
If Remolque = "1" Then
|
If Remolque = "1" Then
|
||||||
RequiereRemolque = True
|
RequiereRemolque = True
|
||||||
MostrarRemolques = True
|
MostrarRemolques = True
|
||||||
End If
|
|
||||||
|
|
||||||
If Remolque = "0, 1" Then
|
|
||||||
RequiereRemolque = False
|
|
||||||
MostrarRemolques = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Remolque = "0" Then
|
|
||||||
RequiereRemolque = False
|
|
||||||
MostrarRemolques = False
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End Using
|
|
||||||
|
|
||||||
|
If Remolque = "0, 1" Then
|
||||||
|
RequiereRemolque = False
|
||||||
|
MostrarRemolques = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Remolque = "0" Then
|
||||||
|
RequiereRemolque = False
|
||||||
|
MostrarRemolques = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
RequiereRemolque = False
|
RequiereRemolque = False
|
||||||
MostrarRemolques = False
|
MostrarRemolques = False
|
||||||
@@ -36266,13 +36242,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If DdlRemolque1.SelectedValue.ToEntero > 0 Then
|
If DdlRemolque1.SelectedValue.ToEntero > 0 Then
|
||||||
DvRemolque2.Visible = True
|
DvRemolque2.Visible = True
|
||||||
|
DdlRemolque2.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa, CveTipoCamion:=2)
|
||||||
Using ObjInv As New ClsInventarios
|
|
||||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
|
|
||||||
DdlRemolque2.DataSource = ObjInv.DtResultados.FiltraParametros($"CveCamion <> {DdlRemolque1.SelectedValue.ToEntero}")
|
|
||||||
End If
|
|
||||||
End Using
|
|
||||||
|
|
||||||
DdlRemolque2.DataBind()
|
DdlRemolque2.DataBind()
|
||||||
Else
|
Else
|
||||||
DvRemolque2.Visible = False
|
DvRemolque2.Visible = False
|
||||||
|
|||||||
Reference in New Issue
Block a user