Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -4101,29 +4101,51 @@ Public Class ClsPaginas
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTAcumGarantiasMesesTipoUso(CveEmpresa As Integer, CveMarca As Integer, CveTipoUso As Integer, Mes As Integer) As DataTable
|
||||
|
||||
Property GlobalDTAcumGarantiasTipoUso(CveEmpresa As Integer, CveMarca As Integer, CveTipoUso As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTAcumGarantiasMesesTipoUso-{CveEmpresa}"
|
||||
Dim AppNombre As String = $"GlobalDTAcumGarantiasTipoUso-{CveEmpresa}"
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjAcumuladores As New ClsAcumuladores()
|
||||
If ObjAcumuladores.GarantiasMesesGet(-1, CveEmpresa) Then Application(AppNombre) = ObjAcumuladores.DtResultados.FiltraParametros("", DistinctColumns:={"CveMarca", "CveTipoUso", "TipoUso"})
|
||||
ObjAcumuladores.Dispose()
|
||||
End If
|
||||
If CveMarca <> -1 Then
|
||||
Dim Str As StringBuilder = New StringBuilder()
|
||||
If CveMarca <> -1 Then Str.AppendFormat("CveMarca = {0}", CveMarca)
|
||||
If CveTipoUso <> -1 Then Str.AppendFormat("CveTipoUso = {0}", CveTipoUso)
|
||||
If Mes <> -1 Then Str.AppendFormat("Mes = {0}", CveTipoUso)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTAcumGarantiasMesesTipoUso = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTAcumGarantiasMesesTipoUso = DirectCast(Application(AppNombre), DataTable)
|
||||
End If
|
||||
Dim filtros As New List(Of String)
|
||||
If CveMarca <> -1 Then filtros.Add($"CveMarca = {CveMarca}")
|
||||
If CveTipoUso <> -1 Then filtros.Add($"CveTipoUso = {CveTipoUso}")
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTAcumGarantiasTipoUso = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTAcumGarantiasMesesTipoUso-{CveEmpresa}"
|
||||
Dim AppNombre As String = $"GlobalDTAcumGarantiasTipoUso-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTAcumGarantiasTipoUsoMeses(CveEmpresa As Integer, CveMarca As Integer, CveTipoUso As Integer, Mes As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTAcumGarantiasTipoUsoMeses-{CveEmpresa}"
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjAcumuladores As New ClsAcumuladores()
|
||||
If ObjAcumuladores.GarantiasMesesGet(-1, CveEmpresa) Then Application(AppNombre) = ObjAcumuladores.DtResultados
|
||||
ObjAcumuladores.Dispose()
|
||||
End If
|
||||
|
||||
Dim filtros As New List(Of String)
|
||||
If CveMarca <> -1 Then filtros.Add($"CveMarca = {CveMarca}")
|
||||
If CveTipoUso <> -1 Then filtros.Add($"CveTipoUso = {CveTipoUso}")
|
||||
If Mes <> -1 Then filtros.Add($"Mes = {Mes}")
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTAcumGarantiasTipoUsoMeses = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTAcumGarantiasTipoUsoMeses-{CveEmpresa}"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
3651
App_Code/Timbrado.vb
3651
App_Code/Timbrado.vb
File diff suppressed because it is too large
Load Diff
@@ -267,7 +267,7 @@ Partial Class Inventarios_KardexAlmacen
|
||||
If DdlProveedor.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat("Proveedor: {0},", DdlProveedor.SelectedText)
|
||||
If ddlProducto2.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat(" Producto/Servicio: {0},", ddlProducto2.SelectedText)
|
||||
If TxtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin: {0}", TxtFechaF.Text)
|
||||
ExportToExcelG(GvDatos, "ExistenciasHorizontal.xlsx", "Existencias Almacen", UsuarioActual, StrFiltro.ToString, 100, 200)
|
||||
ExportToExcelG(GvDatos, "ExistenciasHorizontal_" & TxtFechaF.Text, "Existencias Almacen", UsuarioActual, StrFiltro.ToString, 100, 200)
|
||||
Else
|
||||
Alert("Debe consultar para generar un excel", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
@@ -3089,7 +3089,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
End If
|
||||
|
||||
DdlTipoUso.Items.Clear()
|
||||
DdlTipoUso.DataSource = GlobalDTAcumGarantiasMesesTipoUso(UsuarioActual.CveEmpresa, CveMarca, -1, -1)
|
||||
DdlTipoUso.DataSource = GlobalDTAcumGarantiasTipoUso(UsuarioActual.CveEmpresa, CveMarca, -1)
|
||||
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlTipoUso.DataBind()
|
||||
|
||||
@@ -3246,7 +3246,7 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero
|
||||
|
||||
Dim dtt As DataTable = GlobalDTAcumGarantiasMesesTipoUso(UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero)
|
||||
Dim dtt As DataTable = GlobalDTAcumGarantiasTipoUsoMeses(UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero)
|
||||
|
||||
If dtt IsNot Nothing Then
|
||||
If dtt.Rows.Count > 0 Then
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Promoción" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -541,17 +541,23 @@
|
||||
<%--26--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiqColT" Width="55px" runat="server" Font-Bold="true" Style="text-align: right;" onkeypress="return disablekeys();"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtLiqCol10" Width="55px" runat="server" Style="text-align: right;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--27--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLiqColT" Width="55px" runat="server" Font-Bold="true" Style="text-align: right;" onkeypress="return disablekeys();"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--28--%>
|
||||
<asp:TemplateField Visible="false" HeaderText="Anticipo" ItemStyle-Width="120px">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAmort" Width="50px" runat="server" Style="text-align: right;"></asp:TextBox>
|
||||
<asp:DropDownList ID="DdlAnti" runat="server" Width="40px" DataTextField="RazonSocial" DataValueField="CveIE"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--28--%>
|
||||
<%--29--%>
|
||||
<asp:TemplateField Visible="false" HeaderText="Anticipo2" ItemStyle-Width="120px">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtAmort2" Width="50px" runat="server" Style="text-align: right;"></asp:TextBox>
|
||||
@@ -559,7 +565,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--29--%>
|
||||
<%--30--%>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Auxiliar</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
@@ -567,7 +573,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--30--%>
|
||||
<%--31--%>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Comp<br>
|
||||
|
||||
@@ -408,7 +408,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
GvCxC.Columns(23).HeaderText = "Aduana<br/>USA" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
|
||||
GvCxC.Columns(24).HeaderText = "Material<br/>Empaque" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
|
||||
GvCxC.Columns(25).HeaderText = "Semilla" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
|
||||
GvCxC.Columns(26).HeaderText = "Total<br/>Gastos"
|
||||
GvCxC.Columns(26).HeaderText = "Fletes" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12)
|
||||
GvCxC.Columns(27).HeaderText = "Total<br/>Gastos"
|
||||
|
||||
DvLiquidacion1.Visible = True
|
||||
DvLiquidacion2.Visible = True
|
||||
@@ -565,6 +566,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
e.Row.FCTextBox("TxtLiqCol7").Visible = False
|
||||
e.Row.FCTextBox("TxtLiqCol8").Visible = False
|
||||
e.Row.FCTextBox("TxtLiqCol9").Visible = False
|
||||
e.Row.FCTextBox("TxtLiqCol10").Visible = False
|
||||
e.Row.FCTextBox("TxtLiqColT").Visible = False
|
||||
e.Row.FCTextBox("TxtAmort").Visible = False
|
||||
e.Row.FCTextBox("TxtAmort2").Visible = False
|
||||
@@ -655,6 +657,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
e.Row.FCTextBox("TxtLiqCol7").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}")
|
||||
e.Row.FCTextBox("TxtLiqCol8").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}")
|
||||
e.Row.FCTextBox("TxtLiqCol9").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}")
|
||||
e.Row.FCTextBox("TxtLiqCol10").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}")
|
||||
|
||||
e.Row.FCTextBox("TxtLiqColT").Attributes.Add("class", $"ClsSelLiqVentaTotal{e.Row.DBCampo("CveVenta")}")
|
||||
e.Row.FCTextBox("TxtAmort").Attributes.Add("class", $"ClsSelLiqAnt")
|
||||
@@ -669,6 +672,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
e.Row.FCTextBox("TxtLiqCol7").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiqCol8").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiqCol9").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtLiqCol10").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtAmort").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
e.Row.FCTextBox("TxtAmort2").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})")
|
||||
|
||||
@@ -1010,7 +1014,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
tipoCambioPago = Pago.TCPago
|
||||
|
||||
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal * Pago.TCPago
|
||||
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal * If(Pago.CveMonedaPago = VentaActual.CveMoneda, 1, Pago.TCPago)
|
||||
|
||||
'If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then
|
||||
' EsAnticipoEspecial = True
|
||||
@@ -1038,6 +1042,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim ImporteLiq7 As Decimal = gvr.FCTextBox("TxtLiqCol7").Text.ToDecimal
|
||||
Dim ImporteLiq8 As Decimal = gvr.FCTextBox("TxtLiqCol8").Text.ToDecimal
|
||||
Dim ImporteLiq9 As Decimal = gvr.FCTextBox("TxtLiqCol9").Text.ToDecimal
|
||||
Dim ImporteLiq10 As Decimal = gvr.FCTextBox("TxtLiqCol10").Text.ToDecimal
|
||||
|
||||
Dim CveClasificacionCol1 As Integer = 21514 'comisiones sobre venta
|
||||
Dim CveClasificacionCol2 As Integer = 21916 ' manejo
|
||||
@@ -1048,6 +1053,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim CveClasificacionCol7 As Integer = 21919 'gastos aduanales usa
|
||||
Dim CveClasificacionCol8 As Integer = 21211 'material Empaque
|
||||
Dim CveClasificacionCol9 As Integer = 21207 'Semilla
|
||||
Dim CveClasificacionCol10 As Integer = 21541 'Flete
|
||||
|
||||
Dim CveSubProyectoLiquidacion As Integer = gvr.DataKey("CveSubProyecto").ToEntero
|
||||
Dim CveConceptoLiquidacion As Integer = 51
|
||||
@@ -1107,6 +1113,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End If
|
||||
|
||||
If ImporteLiq10 <> 0 Then
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq10, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq10 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol10, ImporteME:=If(CveMoneda > 1, ImporteLiq10, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then
|
||||
MsgError = "No se pudo insertar la póliza" : Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If MsgError = "" AndAlso gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero > 0 Then
|
||||
Dim TCP As Decimal = 0
|
||||
Dim FolioPago As String = " "
|
||||
@@ -2907,6 +2919,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
GvRow.FCTextBox("TxtLiqCol7").Text = Drow("AduanaUSA").ToString
|
||||
GvRow.FCTextBox("TxtLiqCol8").Text = Drow("MaterialEmpaque").ToString
|
||||
GvRow.FCTextBox("TxtLiqCol9").Text = Drow("Semilla").ToString
|
||||
GvRow.FCTextBox("TxtLiqCol10").Text = Drow("Fletes").ToString
|
||||
|
||||
GvRow.FCDropDownList("DdlAnti").SelectedTextLikeIfExist(Drow("FolioAnticipo1").ToString)
|
||||
GvRow.FCTextBox("TxtAmort").Text = Drow("ImporteAnticipo1").ToString
|
||||
|
||||
@@ -7378,7 +7378,7 @@ Partial Class PV
|
||||
End If
|
||||
|
||||
DdlTipoUso.Items.Clear()
|
||||
DdlTipoUso.DataSource = GlobalDTAcumGarantiasMesesTipoUso(UsuarioActual.CveEmpresa, CveMarca)
|
||||
DdlTipoUso.DataSource = GlobalDTAcumGarantiasTipoUso(UsuarioActual.CveEmpresa, CveMarca, -1)
|
||||
DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlTipoUso.DataBind()
|
||||
|
||||
@@ -7434,12 +7434,13 @@ Partial Class PV
|
||||
|
||||
CveMarca = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero
|
||||
Dim ImportePagarCliente As Decimal = 0
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then
|
||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtt As DataTable = GlobalDTAcumGarantiasTipoUsoMeses(UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero)
|
||||
|
||||
If dtt IsNot Nothing Then
|
||||
If dtt.Rows.Count > 0 Then
|
||||
''obtener siempre y cuando la fecha de inicio sea mayor
|
||||
Dim strDate As Date = ($"20{TxtEtiqueta.Text.Substring(2, 2)}/{TxtEtiqueta.Text.Substring(0, 2)}/01").ToDate
|
||||
Dim drg As DataRow = ObjAcum.DtResultados.FiltroPrimero($" #{strDate.ToString("yyyy/MM/dd")}# >= FechaInicioVigencia ", "FechaInicioVigencia DESC")
|
||||
Dim drg As DataRow = dtt.FiltroPrimero($" #{strDate.ToString("yyyy/MM/dd")}# >= FechaInicioVigencia ", "FechaInicioVigencia DESC")
|
||||
If drg IsNot Nothing Then
|
||||
|
||||
TxtPorcentajeAjuste.Text = (drg("Valor").ToString.ToDouble / 100).ToString
|
||||
@@ -7498,7 +7499,7 @@ Partial Class PV
|
||||
Else
|
||||
Alert("No se tiene especificado tabla de garantía")
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
|
||||
Else
|
||||
If DdlPSAjuste.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Especificar el producto a recibir")
|
||||
|
||||
Reference in New Issue
Block a user