Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -6091,6 +6091,22 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetAutorizacion(CveAutorizacion As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_AutorizacionGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveAutorizacion", SqlDbType.Int).Value = CveAutorizacion
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error la autorización.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, TipoDocumento As String, Optional CveEstatus As Integer = -1, Optional FechaI As DateTime = MinFecha, Optional FechaF As DateTime = MaxFecha, Optional CveUsuarioConsulta As Integer = -1) As Boolean
|
Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, TipoDocumento As String, Optional CveEstatus As Integer = -1, Optional FechaI As DateTime = MinFecha, Optional FechaF As DateTime = MaxFecha, Optional CveUsuarioConsulta As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_AutorizacionLimitesGet")
|
DataAdapter("PA_Vta_AutorizacionLimitesGet")
|
||||||
|
|||||||
@@ -232,7 +232,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UPPMov" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPMov" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvM" Width="100%" runat="server" data-sort="false" GridLines="None" CssClass="table table-smallpadding table-striped table-hover Widthall ScrollAD"
|
<asp:GridView ID="GvM" Width="100%" runat="server" data-sort="false" GridLines="None" CssClass="table table-smallpadding table-striped table-hover Widthall adssigrid-scroll adssigrid-order" data-cols="1" data-rows="2"
|
||||||
DataKeyNames="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Codigo,NumeroParte,PS"
|
DataKeyNames="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Codigo,NumeroParte,PS"
|
||||||
ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|||||||
@@ -120,7 +120,6 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
|||||||
GvM.Columns(7).HeaderStyle.Width = 133
|
GvM.Columns(7).HeaderStyle.Width = 133
|
||||||
GvM.Columns(8).HeaderStyle.Width = 133
|
GvM.Columns(8).HeaderStyle.Width = 133
|
||||||
GvM.Columns(10).HeaderStyle.Width = 134
|
GvM.Columns(10).HeaderStyle.Width = 134
|
||||||
GvM.CssClass = "table table-smallpadding table-striped table-hover ScrollAD"
|
|
||||||
GvM.Width = 1074
|
GvM.Width = 1074
|
||||||
dvArt.Attributes.Add("style", "text-align:center!important; font-size:14px;width:537px;")
|
dvArt.Attributes.Add("style", "text-align:center!important; font-size:14px;width:537px;")
|
||||||
dvCan.Attributes.Add("style", "text-align:center!important; font-size:14px; border-right-color: white!important;border-left-color: white!important;width:537px;border-style: solid;")
|
dvCan.Attributes.Add("style", "text-align:center!important; font-size:14px; border-right-color: white!important;border-left-color: white!important;width:537px;border-style: solid;")
|
||||||
|
|||||||
@@ -10,9 +10,11 @@
|
|||||||
|
|
||||||
.GVCalculosSBC tr th:nth-child(n+13):not(:nth-child(n+16)) {
|
.GVCalculosSBC tr th:nth-child(n+13):not(:nth-child(n+16)) {
|
||||||
background-color: #88d6cd !important;
|
background-color: #88d6cd !important;
|
||||||
}.GVDetalleParteVariable tr > td:nth-child(n+2) {
|
}
|
||||||
text-align: right;
|
|
||||||
}
|
.GVDetalleParteVariable tr > td:nth-child(n+2) {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
@@ -248,7 +250,7 @@
|
|||||||
Modificación
|
Modificación
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblsalarioDiarioSSf" runat="server" > </asp:Label>
|
<asp:Label ID="lblsalarioDiarioSSf" runat="server"> </asp:Label>
|
||||||
<%--<asp:Label ID="lblsalarioDiarioSSf" runat="server" Text='<%# (Eval("SalarioDiarioSSNuevo", "{0:N2}") == Eval("SalarioDiarioSS", "{0:N2}") ? "NO" : "SI") %>'> </asp:Label>--%>
|
<%--<asp:Label ID="lblsalarioDiarioSSf" runat="server" Text='<%# (Eval("SalarioDiarioSSNuevo", "{0:N2}") == Eval("SalarioDiarioSS", "{0:N2}") ? "NO" : "SI") %>'> </asp:Label>--%>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -474,7 +476,8 @@
|
|||||||
<ajax:TabPanel ID="TabDetalleParteVariable" runat="server" HeaderText="Detalle parte variable">
|
<ajax:TabPanel ID="TabDetalleParteVariable" runat="server" HeaderText="Detalle parte variable">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GVDetalleParteVariable" HeaderStyle-CssClass="ADtr" runat="server" GridLines="None" OnRowDataBound="GVDetalleParteVariable_RowDataBound"
|
<asp:GridView ID="GVDetalleParteVariable" HeaderStyle-CssClass="ADtr" runat="server" GridLines="None" OnRowDataBound="GVDetalleParteVariable_RowDataBound"
|
||||||
CssClass="table table-hover table-striped ScrollAD Widthall GVBuscaddor GVDetalleParteVariable"></asp:GridView>
|
CssClass="table table-hover table-striped ScrollAD Widthall GVBuscaddor GVDetalleParteVariable">
|
||||||
|
</asp:GridView>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
@@ -619,10 +622,20 @@
|
|||||||
<asp:Label runat="server" Text='<%# Eval("fecha","{0:dd/MM/yyyy HH}:{0:mm}")%>'> </asp:Label>
|
<asp:Label runat="server" Text='<%# Eval("fecha","{0:dd/MM/yyyy HH}:{0:mm}")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Descargar" ItemStyle-Width="80">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Button runat="server" Text="" CssClass="fa fa-download btn btn-primary"
|
||||||
|
CommandArgument='<%# Eval("ruta") %>' OnClick="DescargarArchivobitacora" ToolTip="Descargar" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="GVDoctos" />
|
||||||
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
@@ -883,7 +896,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="btn-group ">
|
<div class="btn-group ">
|
||||||
<a class="btn yellow-gold btn-sm" href="javascript:;" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" aria-expanded="true"><i class="fa fa-ad-excel"></i> Formatos
|
<a class="btn yellow-gold btn-sm" href="javascript:;" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" aria-expanded="true"><i class="fa fa-ad-excel"></i>Formatos
|
||||||
<i class="fa fa-angle-down"></i>
|
<i class="fa fa-angle-down"></i>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu pull-right">
|
<ul class="dropdown-menu pull-right">
|
||||||
@@ -951,7 +964,7 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="DmodalSalariomenoralminimo" class="modal ADS fade" role="dialog">
|
<div id="DmodalSalariomenoralminimo" class="modal ADS fade" role="dialog">
|
||||||
<asp:UpdatePanel ID="UpdatePanel1" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpdatePanel1" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -977,20 +990,19 @@
|
|||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body rowpadding ">
|
<div class="portlet-body rowpadding ">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
|||||||
column++;
|
column++;
|
||||||
libro.Cell(1, column).Value = "Empleado";
|
libro.Cell(1, column).Value = "Empleado";
|
||||||
column++;
|
column++;
|
||||||
libro.Cell(1, column).Value = "TipodeSalario";
|
libro.Cell(1, column).Value = "TipodeSalario";
|
||||||
libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||||
libro.Row(1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
libro.Row(1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
|
||||||
|
|
||||||
@@ -434,7 +434,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
|||||||
libro.Cell(Fila, column).Value = erow["Nombre"];
|
libro.Cell(Fila, column).Value = erow["Nombre"];
|
||||||
|
|
||||||
column++;
|
column++;
|
||||||
libro.Cell(Fila, column).Value = erow["TipodeSalario"];
|
libro.Cell(Fila, column).Value = erow["TipodeSalario"];
|
||||||
}
|
}
|
||||||
|
|
||||||
libro.Columns().AdjustToContents();
|
libro.Columns().AdjustToContents();
|
||||||
@@ -521,7 +521,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
|||||||
SalarioCotizacion = Salariovariable + SDI;
|
SalarioCotizacion = Salariovariable + SDI;
|
||||||
if (objpersonal.UpdateSalarios(CvePersonal, txtfechacargamasiva.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
if (objpersonal.UpdateSalarios(CvePersonal, txtfechacargamasiva.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||||
Salariodiario.ToString().ToDouble(), SDI.ToString().ToDouble(), SalarioCotizacion.ToString().ToDouble(), Salariodiario.ToString().ToDouble(),
|
Salariodiario.ToString().ToDouble(), SDI.ToString().ToDouble(), SalarioCotizacion.ToString().ToDouble(), Salariodiario.ToString().ToDouble(),
|
||||||
false,true,"True"))
|
false, true, "True"))
|
||||||
{
|
{
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -574,7 +574,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
|||||||
}
|
}
|
||||||
if (CvePersonal > 0)
|
if (CvePersonal > 0)
|
||||||
{
|
{
|
||||||
objpersonal.PersonalRPUpdate( CvePersonal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa , RegistroPatronal);
|
objpersonal.PersonalRPUpdate(CvePersonal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RegistroPatronal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -613,7 +613,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
|||||||
}
|
}
|
||||||
if (CvePersonal > 0)
|
if (CvePersonal > 0)
|
||||||
{
|
{
|
||||||
objpersonal.PersonalTSUpdate(CvePersonal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TipodeSalario);
|
objpersonal.PersonalTSUpdate(CvePersonal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TipodeSalario);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -732,6 +732,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
|||||||
try { archivoW = new System.IO.StreamWriter(string.Format("{0}{1}.txt", rutarchivos, namearchivo), true, System.Text.Encoding.UTF8); } catch (Exception) { }
|
try { archivoW = new System.IO.StreamWriter(string.Format("{0}{1}.txt", rutarchivos, namearchivo), true, System.Text.Encoding.UTF8); } catch (Exception) { }
|
||||||
if (archivoW != null)
|
if (archivoW != null)
|
||||||
{
|
{
|
||||||
|
Alert(MovtosmodSalario);
|
||||||
try { archivoW.WriteLine(MovtosmodSalario); } catch (Exception) { }
|
try { archivoW.WriteLine(MovtosmodSalario); } catch (Exception) { }
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -758,7 +759,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
|||||||
double SalarioDiarioSS = Math.Round(item.DataKey("SalarioDiarioSS").ToDouble(), 2);
|
double SalarioDiarioSS = Math.Round(item.DataKey("SalarioDiarioSS").ToDouble(), 2);
|
||||||
if (continuar && (item.FCCheckBox("chkUpdate").Checked) &&//SalarioDiarioSSNuevo != SalarioDiarioSS &&
|
if (continuar && (item.FCCheckBox("chkUpdate").Checked) &&//SalarioDiarioSSNuevo != SalarioDiarioSS &&
|
||||||
(continuar = objrh.UpdateSalarios(CvePersonal, fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, SalarioDiario, SDINuevo, SalarioDiarioSSNuevo, SalarioDiario,
|
(continuar = objrh.UpdateSalarios(CvePersonal, fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, SalarioDiario, SDINuevo, SalarioDiarioSSNuevo, SalarioDiario,
|
||||||
false,true,"True"
|
false, true, "True"
|
||||||
)))
|
)))
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -915,16 +916,19 @@ public partial class RH_CalculoSBC : ClsPaginas
|
|||||||
|
|
||||||
string rutarchivos = string.Format("{0}\\modificacionsalarios\\", UsuarioActual.Empresa.Ruta);
|
string rutarchivos = string.Format("{0}\\modificacionsalarios\\", UsuarioActual.Empresa.Ruta);
|
||||||
List<archivosD> lisaarchivos = new List<archivosD>();
|
List<archivosD> lisaarchivos = new List<archivosD>();
|
||||||
foreach (var urfile in System.IO.Directory.GetFiles(rutarchivos, "*"))
|
if (System.IO.Directory.Exists(rutarchivos))
|
||||||
{
|
{
|
||||||
if (urfile.Replace(rutarchivos, "").Length > 9)
|
foreach (var urfile in System.IO.Directory.GetFiles(rutarchivos, "*"))
|
||||||
{
|
{
|
||||||
string cfecha = urfile.Replace(rutarchivos, "").Substring(0, 10).ToDateTime().ToString("dd/MM/yyyy");
|
if (urfile.Replace(rutarchivos, "").Length > 9)
|
||||||
|
{
|
||||||
|
string cfecha = urfile.Replace(rutarchivos, "").Substring(0, 10).ToDateTime().ToString("dd/MM/yyyy");
|
||||||
|
|
||||||
|
|
||||||
archivosD arch = new archivosD() { nombrearchivo = cfecha, ruta = urfile, fecha = System.IO.File.GetCreationTime(urfile) };
|
archivosD arch = new archivosD() { nombrearchivo = cfecha, ruta = urfile, fecha = System.IO.File.GetCreationTime(urfile) };
|
||||||
lisaarchivos.Add(arch);
|
lisaarchivos.Add(arch);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GVDoctos.DataSource = lisaarchivos;
|
GVDoctos.DataSource = lisaarchivos;
|
||||||
@@ -936,7 +940,7 @@ public partial class RH_CalculoSBC : ClsPaginas
|
|||||||
|
|
||||||
protected void GVDetalleParteVariable_RowDataBound(object sender, GridViewRowEventArgs e)
|
protected void GVDetalleParteVariable_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||||
{
|
{
|
||||||
if(e.Row.RowType == DataControlRowType.DataRow)
|
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < e.Row.Cells.Count; i++)
|
for (int i = 0; i < e.Row.Cells.Count; i++)
|
||||||
{
|
{
|
||||||
@@ -966,6 +970,28 @@ public partial class RH_CalculoSBC : ClsPaginas
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
protected void DescargarArchivobitacora(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Button btn = (Button)sender;
|
||||||
|
GridViewRow row = (GridViewRow)btn.NamingContainer;
|
||||||
|
|
||||||
|
// Obtener la ruta del archivo desde el DataKeyNames
|
||||||
|
string rutaArchivo = GVDoctos.DataKeys[row.RowIndex]["ruta"].ToString();
|
||||||
|
string nombreArchivo = string.Format("{0}.txt",GVDoctos.DataKeys[row.RowIndex]["nombrearchivo"]);
|
||||||
|
|
||||||
|
if (System.IO.File.Exists(rutaArchivo))
|
||||||
|
{
|
||||||
|
Response.Clear();
|
||||||
|
Response.ContentType = "application/octet-stream";
|
||||||
|
Response.AddHeader("Content-Disposition", "attachment; filename=" + nombreArchivo);
|
||||||
|
Response.WriteFile(rutaArchivo);
|
||||||
|
Response.End();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ScriptManager.RegisterStartupScript(this, GetType(), "alert", "alert('El archivo no existe en el servidor');", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public class archivosD
|
public class archivosD
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -202,8 +202,11 @@ Partial Class Ventas_RepVentas
|
|||||||
DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14"))
|
DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14"))
|
||||||
DdlGrupo.Items.Insert(13, New ListItem("Tipo Cliente", "20"))
|
DdlGrupo.Items.Insert(13, New ListItem("Tipo Cliente", "20"))
|
||||||
DdlGrupo.Items.Insert(13, New ListItem("Vendedor/Cliente", "21"))
|
DdlGrupo.Items.Insert(13, New ListItem("Vendedor/Cliente", "21"))
|
||||||
DdlGrupo.Items.Insert(13, New ListItem("Giro", "22"))
|
DdlGrupo.Items.Insert(13, New ListItem("Giro", "22"))
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then DdlGrupo.Items.Insert(10, New ListItem(UsuarioActual.Empresa.Funcionalidad(307), "23"))
|
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then DdlGrupo.Items.Insert(10, New ListItem(UsuarioActual.Empresa.Funcionalidad(307), "23"))
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then DdlGrupo.Items.Insert(13, New ListItem("Tipo Venta", "24"))
|
||||||
|
|
||||||
DdlGrupo.DataBind()
|
DdlGrupo.DataBind()
|
||||||
DdlGrupo.SelectedValueExist("3")
|
DdlGrupo.SelectedValueExist("3")
|
||||||
@@ -222,6 +225,7 @@ Partial Class Ventas_RepVentas
|
|||||||
|
|
||||||
DdlTipoVenta.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' AND TipoDocto = 'Egs' ")
|
DdlTipoVenta.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' AND TipoDocto = 'Egs' ")
|
||||||
DdlTipoVenta.DataBind()
|
DdlTipoVenta.DataBind()
|
||||||
|
DdlTipoVenta.Items.Insert(0, New ListItem("Sin Asignar", "-2"))
|
||||||
DdlTipoVenta.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlTipoVenta.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -314,11 +318,15 @@ Partial Class Ventas_RepVentas
|
|||||||
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha)
|
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha)
|
||||||
|
|
||||||
Dim ModalidadContable As Boolean = Not ChkLecturaAdmin.Checked
|
Dim ModalidadContable As Boolean = Not ChkLecturaAdmin.Checked
|
||||||
|
Dim CveTipoVenta As Integer = -1
|
||||||
|
If DivTipoVenta.Visible Then
|
||||||
|
CveTipoVenta = DdlTipoVenta.SelectedValue.ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjVentas.GetRepVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores,
|
If ObjVentas.GetRepVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores,
|
||||||
DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
|
DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
|
||||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable,
|
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable,
|
||||||
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero()) Then
|
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(), ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, CveTipoVenta:=CveTipoVenta) Then
|
||||||
GvDatos.DataSource = ObjVentas.DtResultados
|
GvDatos.DataSource = ObjVentas.DtResultados
|
||||||
DtVentas = ObjVentas.DtResultados
|
DtVentas = ObjVentas.DtResultados
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ Imports System.Data
|
|||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports System.Net.Http
|
Imports System.Net.Http
|
||||||
|
Imports DocumentFormat.OpenXml.Office2010.PowerPoint
|
||||||
|
|
||||||
Partial Class RepVentasDetalle
|
Partial Class RepVentasDetalle
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -326,6 +327,7 @@ Partial Class RepVentasDetalle
|
|||||||
|
|
||||||
DdlTipoVenta.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' AND TipoDocto = 'Egs'")
|
DdlTipoVenta.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' AND TipoDocto = 'Egs'")
|
||||||
DdlTipoVenta.DataBind()
|
DdlTipoVenta.DataBind()
|
||||||
|
DdlTipoVenta.Items.Insert(0, New ListItem("Sin Asignar", "-2"))
|
||||||
DdlTipoVenta.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlTipoVenta.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -461,6 +463,11 @@ Partial Class RepVentasDetalle
|
|||||||
ChkLecturaAdmin.Checked = Not ModalidadContable
|
ChkLecturaAdmin.Checked = Not ModalidadContable
|
||||||
CveProyecto = DdlProyecto.SelectedValue.ToEntero
|
CveProyecto = DdlProyecto.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
Dim CveTipoVenta As Integer = -1
|
||||||
|
If DivTipoVenta.Visible Then
|
||||||
|
CveTipoVenta = DdlTipoVenta.SelectedValue.ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas()
|
Dim ObjVentas As New ClsVentas()
|
||||||
'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero
|
'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero
|
||||||
If ObjVentas.GetRepVentasDetalle(DdlGrupo.SelectedValue.ToEntero, Anio.ToEntero, Mes.ToEntero, AnioMes, Fecha, CveCliente,
|
If ObjVentas.GetRepVentasDetalle(DdlGrupo.SelectedValue.ToEntero, Anio.ToEntero, Mes.ToEntero, AnioMes, Fecha, CveCliente,
|
||||||
@@ -468,7 +475,7 @@ Partial Class RepVentasDetalle
|
|||||||
CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec,
|
CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec,
|
||||||
CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
|
CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
|
||||||
CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(),
|
CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero(),
|
||||||
ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, CveTipoVenta:=DdlTipoVenta.SelectedValue.ToEntero()) Then
|
ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero, EsFacturaGlobal:=DdlFacturaGlobal.SelectedValue.ToEntero, EsFilial:=DdlFilial.SelectedValue.ToEntero, CveTipoVenta:=CveTipoVenta) Then
|
||||||
DtVentas = AddRows(ObjVentas.DtResultados)
|
DtVentas = AddRows(ObjVentas.DtResultados)
|
||||||
ImgImprimir.Enabled = True
|
ImgImprimir.Enabled = True
|
||||||
GvDatos.DataSource = AddRows(ObjVentas.DtResultados)
|
GvDatos.DataSource = AddRows(ObjVentas.DtResultados)
|
||||||
@@ -536,6 +543,7 @@ Partial Class RepVentasDetalle
|
|||||||
ChkIEPS.Checked = UsuarioActual.Empresa.Funcionalidad(713) = "1" 'empresa deduce IEPS
|
ChkIEPS.Checked = UsuarioActual.Empresa.Funcionalidad(713) = "1" 'empresa deduce IEPS
|
||||||
GvDatos.Columns(9).Visible = ChkIEPS.Checked
|
GvDatos.Columns(9).Visible = ChkIEPS.Checked
|
||||||
ChkKilometraje.Visible = UsuarioActual.Empresa.Funcionalidad(558) = "1" 'empresa llantera
|
ChkKilometraje.Visible = UsuarioActual.Empresa.Funcionalidad(558) = "1" 'empresa llantera
|
||||||
|
ChkTipoVenta.Visible = UsuarioActual.Empresa.Funcionalidad(531) = "1" 'empresa acumuladores
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
@@ -668,6 +676,11 @@ Partial Class RepVentasDetalle
|
|||||||
ChkEstatusFactura.Checked = True
|
ChkEstatusFactura.Checked = True
|
||||||
ChkCliente.Checked = True
|
ChkCliente.Checked = True
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
ChkSucursal.Checked = False
|
||||||
|
ChkTipoVenta.Checked = True
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub LnkPersonalizar_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkPersonalizar_Click(sender As Object, e As EventArgs)
|
||||||
@@ -781,6 +794,8 @@ Partial Class RepVentasDetalle
|
|||||||
|
|
||||||
If ChkDescargarXML.Checked Then ListPersonalizada.Add("XML")
|
If ChkDescargarXML.Checked Then ListPersonalizada.Add("XML")
|
||||||
|
|
||||||
|
If ChkTipoVenta.Checked Then ListPersonalizada.Add("TipoVenta")
|
||||||
|
|
||||||
If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentaDetalles.aspx", String.Join("|", ListPersonalizada)) Then
|
If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentaDetalles.aspx", String.Join("|", ListPersonalizada)) Then
|
||||||
'Alert("Personalizacion guardada")
|
'Alert("Personalizacion guardada")
|
||||||
End If
|
End If
|
||||||
@@ -841,6 +856,7 @@ Partial Class RepVentasDetalle
|
|||||||
ChkDescargarPDF.Checked = False
|
ChkDescargarPDF.Checked = False
|
||||||
ChkDescargarXML.Checked = False
|
ChkDescargarXML.Checked = False
|
||||||
|
|
||||||
|
ChkTipoVenta.Checked = False
|
||||||
Dim Personalizaciones As String() = strBasePersonalizacion.Split("|"c)
|
Dim Personalizaciones As String() = strBasePersonalizacion.Split("|"c)
|
||||||
|
|
||||||
For Each personalizacion As String In Personalizaciones
|
For Each personalizacion As String In Personalizaciones
|
||||||
@@ -980,6 +996,9 @@ Partial Class RepVentasDetalle
|
|||||||
Case "PDF"
|
Case "PDF"
|
||||||
ChkDescargarPDF.Checked = True
|
ChkDescargarPDF.Checked = True
|
||||||
Exit Select
|
Exit Select
|
||||||
|
Case "TipoVenta"
|
||||||
|
ChkTipoVenta.Checked = True
|
||||||
|
Exit Select
|
||||||
Case Else
|
Case Else
|
||||||
Exit Select
|
Exit Select
|
||||||
End Select
|
End Select
|
||||||
@@ -988,6 +1007,7 @@ Partial Class RepVentasDetalle
|
|||||||
Personaliza()
|
Personaliza()
|
||||||
Else
|
Else
|
||||||
PersonalizaDefault()
|
PersonalizaDefault()
|
||||||
|
Personaliza()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UPPersonalizar.Update()
|
UPPersonalizar.Update()
|
||||||
|
|||||||
@@ -417,9 +417,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LbVerificarExistencia" Visible="false" runat="server"><i class='fa fa-list-alt'></i>Verificar Existencias</asp:LinkButton>
|
<asp:LinkButton ID="LbVerificarExistencia" Visible="false" runat="server"><i class='fa fa-list-alt'></i>Verificar Existencias</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkEnvioDeCorreoFactura" runat="server" CausesValidation="False" OnClick="LnkEnvioDeCorreoFactura_Click" Visible="false" > <i class="fa fa-envelope-o" aria-hidden="true"></i> Envio De Correo</asp:LinkButton>
|
<asp:LinkButton ID="LnkEnvioDeCorreoFactura" runat="server" CausesValidation="False" OnClick="LnkEnvioDeCorreoFactura_Click" Visible="false"> <i class="fa fa-envelope-o" aria-hidden="true"></i> Envio De Correo</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" />
|
<asp:AsyncPostBackTrigger ControlID="LnkImprimir" EventName="Click" />
|
||||||
@@ -654,7 +654,7 @@
|
|||||||
<td runat="server">
|
<td runat="server">
|
||||||
<asp:Label runat="server" ID="LblTipoVenta"></asp:Label>
|
<asp:Label runat="server" ID="LblTipoVenta"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -995,6 +995,11 @@
|
|||||||
<td>
|
<td>
|
||||||
<asp:Label ID="lblMotivoDev" runat="server"></asp:Label></td>
|
<asp:Label ID="lblMotivoDev" runat="server"></asp:Label></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr align="left" id="TrTipoVentaEgs" runat="server" visible="false">
|
||||||
|
<td><b class="truncate">Tipo Venta:</b> </td>
|
||||||
|
<td>
|
||||||
|
<asp:Label ID="LblTipoVentaEGS" runat="server"></asp:Label></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1345,7 +1350,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<br />
|
<br />
|
||||||
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Label>
|
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Label>
|
||||||
<asp:Hyperlink ID="HLPS" runat="server" Visible="false" Target="_blank" Text='<%# Eval("CodigoPS") %>'></asp:Hyperlink>
|
<asp:HyperLink ID="HLPS" runat="server" Visible="false" Target="_blank" Text='<%# Eval("CodigoPS") %>'></asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged1" CssClass="select2me">
|
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged1" CssClass="select2me">
|
||||||
@@ -7357,7 +7362,14 @@
|
|||||||
<h4 class="modal-title">Aplicar NC</h4>
|
<h4 class="modal-title">Aplicar NC</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
<div class="row form-group" id="DivTipoVentaAsingado" runat="server" visible="false">
|
||||||
|
<div class="col-md-2">
|
||||||
|
Tipo Venta:
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:Label runat="server" ID="LblTipoVentaAsignado" ></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row form-group">
|
<div class="row form-group">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
Concepto:
|
Concepto:
|
||||||
@@ -8847,6 +8859,11 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlSolCreditoTipoDocto.ClientID.ToString()%>">Tipo Documento:</label>
|
<label for="<%= DdlSolCreditoTipoDocto.ClientID.ToString()%>">Tipo Documento:</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright" id="DivTipoVentaSol" runat="server">
|
||||||
|
<asp:DropDownList ID="DdlTipoVentaSolCredito" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="TipoVenta" DataValueField="CveTipoVenta">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<label for="<%= DdlTipoVentaSolCredito.ClientID.ToString()%>">Tipo:</label>
|
||||||
|
</div>
|
||||||
<div id="DivAutorizacion" runat="server" class="form-group form-md-line-input input-iconright">
|
<div id="DivAutorizacion" runat="server" class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlTipoAutorizacion" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
|
<asp:DropDownList ID="DdlTipoAutorizacion" runat="server" Width="100%" CssClass="form-control marginFixRow select2me" AutoPostBack="true">
|
||||||
<asp:ListItem Selected="True" Value="-1" Text="Seleccione"></asp:ListItem>
|
<asp:ListItem Selected="True" Value="-1" Text="Seleccione"></asp:ListItem>
|
||||||
@@ -9016,7 +9033,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDvModalTipoVenta" UpdateMode="Conditional">
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDvModalTipoVenta" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="modal-content" style="width:650px;">
|
<div class="modal-content" style="width: 650px;">
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
<h4 class="modal-title">
|
<h4 class="modal-title">
|
||||||
<asp:Label ID="LblDvModalTipoVentaTitulo" runat="server">Tipo de Venta</asp:Label>
|
<asp:Label ID="LblDvModalTipoVentaTitulo" runat="server">Tipo de Venta</asp:Label>
|
||||||
@@ -9114,11 +9131,11 @@
|
|||||||
<div class="row" runat="server" id="DVGvPSProced" visible="false">
|
<div class="row" runat="server" id="DVGvPSProced" visible="false">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:CheckBox ID="ChkVerTodosPS" runat="server" Text="Ver Todos los productos" AutoPostBack="true" OnCheckedChanged="ChkVerTodosPS_CheckedChanged" />
|
<asp:CheckBox ID="ChkVerTodosPS" runat="server" Text="Ver Todos los productos" AutoPostBack="true" OnCheckedChanged="ChkVerTodosPS_CheckedChanged" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4" style="text-align: right">
|
<div class="col-md-4" style="text-align: right">
|
||||||
<input type="text" id="TxtBus" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvPSProced.ClientID) %>" style="display: inline-block; width: 150px;" />
|
<input type="text" id="TxtBus" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvPSProced.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvPSProced.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvPSProced.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@@ -9137,18 +9154,18 @@
|
|||||||
</asp:BoundField>
|
</asp:BoundField>
|
||||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto">
|
<asp:BoundField DataField="CodigoPS" HeaderText="Producto">
|
||||||
<ItemStyle HorizontalAlign="Left" />
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
</asp:BoundField>
|
</asp:BoundField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Precio" ItemStyle-Width="30px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Precio" ItemStyle-Width="30px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio", "{0:#,###.00##}") %>' Style="text-align: right!important" Width="70px" Enabled="false"></asp:TextBox>
|
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio", "{0:#,###.00##}") %>' Style="text-align: right!important" Width="70px" Enabled="false"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Ed. Médica" ItemStyle-Width="40px" Visible="false">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Ed. Médica" ItemStyle-Width="40px" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtEdMedica" runat="server" Style="text-align: right!important" Width="70px"></asp:TextBox>
|
<asp:TextBox ID="TxtEdMedica" runat="server" Style="text-align: right!important" Width="70px"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -9311,8 +9328,9 @@
|
|||||||
<asp:GridView ID="GvExist" runat="server" AutoGenerateColumns="true" GridLines="None" BorderWidth="0" CssClass="table table-striped table-hover">
|
<asp:GridView ID="GvExist" runat="server" AutoGenerateColumns="true" GridLines="None" BorderWidth="0" CssClass="table table-striped table-hover">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Producto">
|
<asp:TemplateField HeaderText="Producto">
|
||||||
<ItemTemplate >
|
<ItemTemplate>
|
||||||
<span style="width:400px; display:flex;"> <asp:Literal ID="LtlProducto" runat="server" Text='<%# Eval("Producto") %>'></asp:Literal> </span>
|
<span style="width: 400px; display: flex;">
|
||||||
|
<asp:Literal ID="LtlProducto" runat="server" Text='<%# Eval("Producto") %>'></asp:Literal> </span>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
@@ -9326,63 +9344,63 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="ModalDivMailFactura" class="modal ADS fade" role="dialog">
|
<div id="ModalDivMailFactura" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<h4 class="modal-title">Envio de Correo</h4>
|
<h4 class="modal-title">Envio de Correo</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<asp:UpdatePanel ID="UpSendMailFactura" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpSendMailFactura" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:HiddenField ID="HdnCveVentaFactura" runat="server" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField ID="HdnCveVentaFactura" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
<asp:HiddenField ID="HdnFolioVenta" runat="server" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField ID="HdnFolioVenta" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
<asp:HiddenField ID="HdnTipoDocto" runat="server" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField ID="HdnTipoDocto" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
<asp:HiddenField ID="HdnSerieFolio" runat="server" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField ID="HdnSerieFolio" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
<asp:HiddenField ID="HdnSubProyecto" runat="server" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField ID="HdnSubProyecto" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
<asp:HiddenField ID="HiddenField2" runat="server" ClientIDMode="Static" Value="-1" />
|
<asp:HiddenField ID="HiddenField2" runat="server" ClientIDMode="Static" Value="-1" />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-4">Para:</div>
|
<div class="col-xs-4">Para:</div>
|
||||||
<div class="col-xs-8">
|
<div class="col-xs-8">
|
||||||
<asp:TextBox ID="TxtParaMailFactura" runat="server" Width="370px" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
<asp:TextBox ID="TxtParaMailFactura" runat="server" Width="370px" CssClass="form-control" ClientIDMode="Static"></asp:TextBox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="row">
|
||||||
<div class="row">
|
<div class="col-xs-4">
|
||||||
<div class="col-xs-4">
|
Con copia para:<br />
|
||||||
Con copia para:<br />
|
(Separar con: ;)
|
||||||
(Separar con: ;)
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-8">
|
||||||
|
<asp:TextBox ID="TxtCCFactura" runat="server" TextMode="MultiLine" Columns="3" Rows="3" CssClass="form-control"></asp:TextBox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-8">
|
<div class="row">
|
||||||
<asp:TextBox ID="TxtCCFactura" runat="server" TextMode="MultiLine" Columns="3" Rows="3" CssClass="form-control"></asp:TextBox>
|
<div class="col-xs-4">Texto Adicional:</div>
|
||||||
|
<div class="col-xs-8">
|
||||||
|
<asp:TextBox ID="TxtBodyFactura" runat="server" TextMode="MultiLine" Columns="3" Rows="3" CssClass="form-control"></asp:TextBox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-4">Texto Adicional:</div>
|
|
||||||
<div class="col-xs-8">
|
|
||||||
<asp:TextBox ID="TxtBodyFactura" runat="server" TextMode="MultiLine" Columns="3" Rows="3" CssClass="form-control"></asp:TextBox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Button ID="BtnSendMailFactura" Text="Enviar" runat="server" ClientIDMode="Static" CssClass="btn btn-primary" OnClick="BtnSendMailFactura_Click" />
|
<asp:Button ID="BtnSendMailFactura" Text="Enviar" runat="server" ClientIDMode="Static" CssClass="btn btn-primary" OnClick="BtnSendMailFactura_Click" />
|
||||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -5275,6 +5275,13 @@ Partial Class Ventas
|
|||||||
EsNCDevolucionEfectivo = True
|
EsNCDevolucionEfectivo = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
If Not String.IsNullOrEmpty(DbRowVenta("TipoVenta").ToString()) Then
|
||||||
|
TrTipoVentaEgs.Visible = True
|
||||||
|
LblTipoVentaEGS.Text = DbRowVenta("TipoVenta").ToString()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Case "Rem"
|
Case "Rem"
|
||||||
Trsaldo.Visible = True
|
Trsaldo.Visible = True
|
||||||
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
HplSaldoAuxiliar.NavigateUrl = String.Format("/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxCClientes&CveCliente={0}&CveVenta={1}&TB_iframe=true&height=550&width=920", DbRowVenta("CveCliente"), DbRowVenta("CveVenta"))
|
||||||
@@ -10210,45 +10217,10 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If PermiteAutorizacion Then
|
If PermiteAutorizacion Then
|
||||||
|
VerificaAutorizacionEgs(VerificarImportes:=True)
|
||||||
Dim ImporteAutorizacion As Decimal = 0
|
If Me.CveAutorizacion <= 0 Then
|
||||||
Dim TipoAutorizacion As Integer = 0
|
|
||||||
|
|
||||||
Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero()
|
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
|
||||||
|
|
||||||
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, "Egs", CveEstatus:=1) Then
|
|
||||||
Dim RowAutorizacion As DataRow = Nothing
|
|
||||||
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
|
|
||||||
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 1 AND CveVenta IS NULL AND CveTipoDocumento='Egs'", Orderby:="Importe DESC")
|
|
||||||
|
|
||||||
If RowAutorizacion IsNot Nothing Then
|
|
||||||
ImporteAutorizacion = RowAutorizacion("Importe").ToString().ToDecimal()
|
|
||||||
CveAutorizacion = RowAutorizacion("CveAutorizacion").ToString().ToEntero()
|
|
||||||
TipoAutorizacion = RowAutorizacion("TipoAutorizacion").ToString().ToEntero()
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
ObjVentas.Dispose()
|
|
||||||
|
|
||||||
If TipoAutorizacion = 1 Then
|
|
||||||
If ImporteAutorizacion < TxtTotal.Text.ToDecimal() Then
|
|
||||||
Dim BloquearCredito As Boolean = True
|
|
||||||
CveAutorizacion = -1
|
|
||||||
|
|
||||||
If BloquearCredito Then
|
|
||||||
Alert($"El importe autorizado es insuficiente. Importe autorizado:{ImporteAutorizacion:N2}", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
CveAutorizacion = -1
|
|
||||||
Alert($"No se encontro una autorización de crédito.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -10532,6 +10504,50 @@ Partial Class Ventas
|
|||||||
EmitirImprimirNew(TipoDoctoViejo)
|
EmitirImprimirNew(TipoDoctoViejo)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub VerificaAutorizacionEgs(Optional VerificarImportes As Boolean = True)
|
||||||
|
Dim ImporteAutorizacion As Decimal = 0
|
||||||
|
Dim TipoAutorizacion As Integer = 0
|
||||||
|
|
||||||
|
Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero()
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
|
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, "Egs", CveEstatus:=1) Then
|
||||||
|
Dim RowAutorizacion As DataRow = Nothing
|
||||||
|
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
|
||||||
|
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 1 AND CveVenta IS NULL AND CveTipoDocumento='Egs'", Orderby:="Importe DESC")
|
||||||
|
|
||||||
|
If RowAutorizacion IsNot Nothing Then
|
||||||
|
ImporteAutorizacion = RowAutorizacion("Importe").ToString().ToDecimal()
|
||||||
|
CveAutorizacion = RowAutorizacion("CveAutorizacion").ToString().ToEntero()
|
||||||
|
TipoAutorizacion = RowAutorizacion("TipoAutorizacion").ToString().ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
If TipoAutorizacion = 1 Then
|
||||||
|
If VerificarImportes Then
|
||||||
|
If ImporteAutorizacion < TxtTotal.Text.ToDecimal() Then
|
||||||
|
Dim BloquearCredito As Boolean = True
|
||||||
|
CveAutorizacion = -1
|
||||||
|
|
||||||
|
If BloquearCredito Then
|
||||||
|
Alert($"El importe autorizado es insuficiente. Importe autorizado:{ImporteAutorizacion:N2}", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
CveAutorizacion = -1
|
||||||
|
Alert($"No se encontro una autorización de crédito.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " NNNNEEEEEEEWWWWWW "
|
#Region " NNNNEEEEEEEWWWWWW "
|
||||||
@@ -14644,31 +14660,49 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso factura.TipoDocto = "Egs" AndAlso Not factura.EsGarantia Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
CveTipoVentaGuardar = -1
|
CveTipoVentaGuardar = -1
|
||||||
|
|
||||||
If NCDescuento Then
|
If factura.TipoDocto = "Egs" AndAlso Not factura.EsGarantia Then
|
||||||
If ListaNCDescuento IsNot Nothing AndAlso ListaNCDescuento.Count > 0 Then
|
If NCDescuento Then
|
||||||
'VERIFICA SI BONIFICACION
|
If ListaNCDescuento IsNot Nothing AndAlso ListaNCDescuento.Count > 0 Then
|
||||||
If ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 2)) Then
|
'VERIFICA SI BONIFICACION
|
||||||
CveTipoVentaGuardar = 7 ' BONIFICACION
|
If ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 2)) Then
|
||||||
ElseIf ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 1)) Then
|
CveTipoVentaGuardar = 7 ' BU - BONIFICACION DE USADO
|
||||||
CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS
|
ElseIf ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 1)) Then
|
||||||
|
CveTipoVentaGuardar = 9 ' CU - CANCELACION DE USADO
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
Else
|
||||||
Else
|
If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then
|
||||||
If ListaRemisionesNC IsNot Nothing AndAlso ListaRemisionesNC.Count > 0 Then
|
'VERIFICA SI BONIFICACION
|
||||||
'VERIFICA SI BONIFICACION
|
If ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 2)) Then
|
||||||
If ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 2)) Then
|
CveTipoVentaGuardar = 7 ' BU - BONIFICACION DE USADO
|
||||||
CveTipoVentaGuardar = 7 ' BONIFICACION
|
ElseIf ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 1)) Then
|
||||||
ElseIf ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 1)) Then
|
CveTipoVentaGuardar = 9 ' CU - CANCELACION DE USADO
|
||||||
CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'GA - GARANTIAS Y AJUSTES
|
||||||
|
If factura.TipoDocto = "Egs" AndAlso factura.EsGarantia Then CveTipoVentaGuardar = 11
|
||||||
|
|
||||||
|
'DM - DEVOLUCION DE MERCANCIA
|
||||||
|
If factura.TipoDocto = "Dev" Then CveTipoVentaGuardar = 10
|
||||||
|
|
||||||
|
'SI TIENE TIPO VENTA LA AUTORIZACION TOMAR DE AHI
|
||||||
|
If factura.TipoDocto = "Egs" AndAlso Me.CveAutorizacion > 0 Then
|
||||||
|
If ObjVentas.GetAutorizacion(Me.CveAutorizacion, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjVentas.DtResultados.FiltroPrimeroValor("CveTipoVenta").ToEntero() > 0 Then CveTipoVentaGuardar = ObjVentas.DtResultados.FiltroPrimeroValor("CveTipoVenta").ToEntero()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
|
||||||
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
|
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
|
||||||
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, 0, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, 0, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
|
||||||
@@ -31844,6 +31878,18 @@ Partial Class Ventas
|
|||||||
BtnEmitirImprimir.Visible = True
|
BtnEmitirImprimir.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso Me.CveAutorizacion > 0 Then
|
||||||
|
Using ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetAutorizacion(CveAutorizacion, UsuarioActual.CveEmpresa) Then
|
||||||
|
If Not String.IsNullOrEmpty(ObjVentas.DtResultados.FiltroPrimeroValor("TipoVenta")) Then
|
||||||
|
TrTipoVentaEgs.Visible = True
|
||||||
|
TxtObsFact.Text = $"{ObjVentas.DtResultados.FiltroPrimeroValor("TipoVenta")}"
|
||||||
|
UPObservaciones.Update()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al aplicar NC", ex)
|
OnError("Ocurrió un error al aplicar NC", ex)
|
||||||
End Try
|
End Try
|
||||||
@@ -36380,10 +36426,19 @@ Partial Class Ventas
|
|||||||
Select Case RblRNCTipo.SelectedValue
|
Select Case RblRNCTipo.SelectedValue
|
||||||
Case "1" 'CARGOS
|
Case "1" 'CARGOS
|
||||||
NCConcepto = ArrayNC(3).ToEntero()
|
NCConcepto = ArrayNC(3).ToEntero()
|
||||||
|
If DivTipoVentaAsingado.Visible Then
|
||||||
|
LblTipoVentaAsignado.Text = "CU - CANCELACION DE USADO "
|
||||||
|
End If
|
||||||
Case "2" 'BONIFICACIONES
|
Case "2" 'BONIFICACIONES
|
||||||
NCConcepto = ArrayNC(4).ToEntero()
|
NCConcepto = ArrayNC(4).ToEntero()
|
||||||
|
If DivTipoVentaAsingado.Visible Then
|
||||||
|
LblTipoVentaAsignado.Text = "BU - BONIFICACION DE USADO"
|
||||||
|
End If
|
||||||
Case "3" 'AJUSTE/GARANTIAS
|
Case "3" 'AJUSTE/GARANTIAS
|
||||||
NCConcepto = ArrayNC(1).ToEntero()
|
NCConcepto = ArrayNC(1).ToEntero()
|
||||||
|
If DivTipoVentaAsingado.Visible Then
|
||||||
|
LblTipoVentaAsignado.Text = "GA - GARANTIAS Y AJUSTES"
|
||||||
|
End If
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
'CARGOS/AJUSTES POR GARANTIA POR PRODUCTO
|
'CARGOS/AJUSTES POR GARANTIA POR PRODUCTO
|
||||||
@@ -36455,6 +36510,7 @@ Partial Class Ventas
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'CARGOS/AJUSTES POR GARANTIA POR TOTAL
|
'CARGOS/AJUSTES POR GARANTIA POR TOTAL
|
||||||
ElseIf RblRNCTipo.SelectedValue.Contiene("1", "3") AndAlso Not ChkMostarProductosRNC.Checked Then
|
ElseIf RblRNCTipo.SelectedValue.Contiene("1", "3") AndAlso Not ChkMostarProductosRNC.Checked Then
|
||||||
|
|
||||||
@@ -36574,6 +36630,7 @@ Partial Class Ventas
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'BONIFICACIONES POR TOTAL
|
'BONIFICACIONES POR TOTAL
|
||||||
ElseIf RblRNCTipo.SelectedValue.Contiene("2") AndAlso Not ChkMostarProductosRNCBon.Checked Then
|
ElseIf RblRNCTipo.SelectedValue.Contiene("2") AndAlso Not ChkMostarProductosRNCBon.Checked Then
|
||||||
For Each GvRow As GridViewRow In GvRemisionesNCBon.Rows
|
For Each GvRow As GridViewRow In GvRemisionesNCBon.Rows
|
||||||
@@ -38385,6 +38442,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
TxtImporteSolicitud.Text = ""
|
TxtImporteSolicitud.Text = ""
|
||||||
|
DdlSolCreditoTipoDocto_SelectedIndexChanged(Nothing, EventArgs.Empty)
|
||||||
RegistraScript("$('#DivModalSolicitarCredito').modal('show')")
|
RegistraScript("$('#DivModalSolicitarCredito').modal('show')")
|
||||||
UpModalSolicitud.Update()
|
UpModalSolicitud.Update()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -38427,9 +38485,18 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Motivo As String = TxtMotivoAutorizacion.Text
|
Dim Motivo As String = TxtMotivoAutorizacion.Text
|
||||||
|
Dim CveTipoVenta As Integer = -1
|
||||||
|
If DdlTipoVentaSolCredito.SelectedValue.ToEntero() > 0 Then
|
||||||
|
CveTipoVenta = DdlTipoVentaSolCredito.SelectedValue.ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveTipoVenta <= 0 AndAlso TipoDocto = "Egs" Then
|
||||||
|
Alert("Debe seleccionar un tipo de venta", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ObjPS As New ClsVentas
|
Dim ObjPS As New ClsVentas
|
||||||
If ObjPS.AddAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero(), TxtImporteSolicitud.Text.ToDecimal(), CveEstatus, UsuarioActual.CveUsuario, CveTipoAutorizacion, TipoDocumento:=DdlSolCreditoTipoDocto.SelectedValue, DiasVencidos:=DiasVencidos, Motivo:=Motivo) Then
|
If ObjPS.AddAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero(), TxtImporteSolicitud.Text.ToDecimal(), CveEstatus, UsuarioActual.CveUsuario, CveTipoAutorizacion, TipoDocumento:=DdlSolCreditoTipoDocto.SelectedValue, DiasVencidos:=DiasVencidos, Motivo:=Motivo, CveTipoVenta:=CveTipoVenta) Then
|
||||||
RegistraScript("$('#DivModalSolicitarCredito').modal('hide')")
|
RegistraScript("$('#DivModalSolicitarCredito').modal('hide')")
|
||||||
Alert("La autorización se agregó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La autorización se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
'signal
|
'signal
|
||||||
@@ -38460,10 +38527,16 @@ Partial Class Ventas
|
|||||||
DdlTipoAutorizacion.Items.Insert(0, New ListItem("Vencimiento", "2"))
|
DdlTipoAutorizacion.Items.Insert(0, New ListItem("Vencimiento", "2"))
|
||||||
DivMotivoAutorizacion.Visible = True
|
DivMotivoAutorizacion.Visible = True
|
||||||
End If
|
End If
|
||||||
|
DivTipoVentaSol.Visible = False
|
||||||
Case "Egs"
|
Case "Egs"
|
||||||
'QUITAR LA DE VENCIMIENTO
|
'QUITAR LA DE VENCIMIENTO
|
||||||
DdlTipoAutorizacion.Items.Remove(DdlTipoAutorizacion.Items.FindByValue("2"))
|
DdlTipoAutorizacion.Items.Remove(DdlTipoAutorizacion.Items.FindByValue("2"))
|
||||||
DivMotivoAutorizacion.Visible = True
|
DivMotivoAutorizacion.Visible = True
|
||||||
|
|
||||||
|
DivTipoVentaSol.Visible = True
|
||||||
|
DdlTipoVentaSolCredito.DataSource = GlobalDTTipoVenta(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' AND TipoDocto = 'Egs' AND CveTipoVenta NOT IN (7,9,10,11) ")
|
||||||
|
DdlTipoVentaSolCredito.DataBind()
|
||||||
|
DdlTipoVentaSolCredito.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End Select
|
End Select
|
||||||
UpModalSolicitud.Update()
|
UpModalSolicitud.Update()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -40482,7 +40555,7 @@ 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()
|
||||||
|
DivTipoVentaAsingado.Visible = False
|
||||||
If CveVenta <= 0 Then 'cuando es nueva la factura
|
If CveVenta <= 0 Then 'cuando es nueva la factura
|
||||||
DivGvCxC.Visible = True
|
DivGvCxC.Visible = True
|
||||||
CargaCxC()
|
CargaCxC()
|
||||||
@@ -40490,6 +40563,24 @@ Partial Class Ventas
|
|||||||
UpAplicarNC.Update()
|
UpAplicarNC.Update()
|
||||||
'CARGAR RNC
|
'CARGAR RNC
|
||||||
RblRNCTipo_SelectedIndexChanged(RblRNCTipo, EventArgs.Empty)
|
RblRNCTipo_SelectedIndexChanged(RblRNCTipo, EventArgs.Empty)
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
VerificaAutorizacionEgs(VerificarImportes:=True)
|
||||||
|
If Me.CveAutorizacion <= 0 Then
|
||||||
|
Exit Sub
|
||||||
|
Else
|
||||||
|
Using ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetAutorizacion(Me.CveAutorizacion, UsuarioActual.CveEmpresa) Then
|
||||||
|
If ObjVentas.DtResultados.FiltroPrimeroValor("CveTipoVenta").ToEntero() > 0 Then
|
||||||
|
DivTipoVentaAsingado.Visible = True
|
||||||
|
LblTipoVentaAsignado.Text = ObjVentas.DtResultados.FiltroPrimeroValor("TipoVenta")
|
||||||
|
DdlNCPS.Enabled = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
RegistraScript("$('#ModalAplicarNC').modal('show');", "ModalNC")
|
RegistraScript("$('#ModalAplicarNC').modal('show');", "ModalNC")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user