Merge branch 'master' of http://adsistemasof.sytes.net:8383/SIG
This commit is contained in:
@@ -797,6 +797,21 @@ Public Class ClsAcumuladores
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function EliminarGarantiasDetalle(CveVenta As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_Acum_GarantiasDetallePolizaRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un error a eliminar de garantia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
@@ -863,6 +878,21 @@ Public Class ClsAcumuladores
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function EliminarPolizaVirtual(CveVenta As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
SqlDataAdapter("PA_Vta_PolizaVirtualRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un al eliminar poliza virtual. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
Public Function DistribuidorMovtosAdd(CveCliente As Integer, Cantidad As Integer, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer,
|
||||
|
||||
@@ -6785,7 +6785,7 @@ Public Class ClsPaginas
|
||||
Dim rds5 As New ReportDataSource With {.Name = "DataSet5", .Value = If(Vta.DtNCVinculadas IsNot Nothing, Vta.DtNCVinculadas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
|
||||
lrds.Add(rds5)
|
||||
|
||||
If UsuarioActual.CveEmpresa = 141 AndAlso RutaFormato.Contains("Factura") Then
|
||||
If UsuarioActual.CveEmpresa = 141 AndAlso (RutaFormato.Contains("Factura") Or RutaFormato.Contains("Cotizacion")) Then
|
||||
params.Add(New ReportParameter("Kilometraje", Vta.Kilometraje.ToString))
|
||||
End If
|
||||
'Imprime los parametros
|
||||
|
||||
@@ -4496,6 +4496,25 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function EliminarUsados(CveVenta As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_VentasUsadosRemove", CommandType.StoredProcedure)
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar los usados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetVentasUsados(CveVenta As Integer, CveSubProyecto As Integer, Fecha As DateTime, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkImprimir"/>
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirExcel"/>
|
||||
<asp:PostBackTrigger ControlID="LnkImprimir" />
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -130,8 +130,10 @@
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoProceso" Width="100%" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlTipoProceso" Width="100%" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlTipoProceso_Change" AutoPostBack="True"></asp:DropDownList>
|
||||
<label for="<%=DdlTipoProceso.ClientID.ToString()%>">Tipo de Proceso:</label>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RfvTipoProceso" Display="None" ValidationGroup="VGGuardar" runat="server" ControlToValidate="DdlTipoProceso" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Proceso''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceTipoProceso" runat="server" HighlightCssClass="vco" TargetControlID="RfvTipoProceso" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -145,7 +147,7 @@
|
||||
</asp:DropDownList>
|
||||
<label for="<%=DdlTipoEtapa.ClientID.ToString()%>">Tipo de Etapa:</label>
|
||||
</div>
|
||||
<div runat="server" id="DivOrden" class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<div runat="server" id="DivOrden" class="form-group col-md-6 form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlOrden" Width="100%" runat="server" DataTextField="Orden" DataValueField="Orden" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%=DdlOrden.ClientID.ToString()%>">Orden:</label>
|
||||
</div>
|
||||
|
||||
@@ -418,4 +418,47 @@ public partial class CRM_CatEtapasProceso : ClsPaginas
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepCatEtapasProceso.rdlc", TmpDT, param, "Report Cat Etapas Proceso", formato);
|
||||
}
|
||||
|
||||
protected void DdlTipoProceso_Change(Object sender,EventArgs e)
|
||||
{
|
||||
DataTable EtapasIterable = DTEtapas.Copy();
|
||||
DataTable EtapasAux = DTEtapas.Copy();
|
||||
int indice = 0;
|
||||
|
||||
foreach (DataRow EtapaRow in EtapasIterable.Rows)
|
||||
{
|
||||
int CveTipoEtapa = EtapaRow["CveTipoEtapa"].ToEntero();
|
||||
if (CveTipoEtapa != 2)
|
||||
{
|
||||
int CantidadEtapas = TmpDT.FiltraParametros(String.Format("CveTipoProceso = {0} AND CveTipoEtapa = {1}",DdlTipoProceso.SelectedValue,EtapaRow["CveTipoEtapa"])).Rows.Count;
|
||||
if(CantidadEtapas > 0)
|
||||
{
|
||||
EtapasAux.Rows.RemoveAt(indice);
|
||||
}
|
||||
}else
|
||||
{
|
||||
indice++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//for (int i = 1; i < CveTipoEtapa; i++)
|
||||
//{
|
||||
// DataRow TipoEtapaRow = EtapasAux.Rows[indice];
|
||||
// int CveTipoEtapaAux = TipoEtapaRow["CveTipoEtapa"].ToEntero();
|
||||
// if (CveTipoEtapaAux == 2)
|
||||
// {
|
||||
// indice++;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// EtapasAux.Rows.Remove(TipoEtapaRow);
|
||||
// }
|
||||
//}
|
||||
EtapasAux.AcceptChanges();
|
||||
|
||||
DdlTipoEtapa.DataSource = EtapasAux;
|
||||
DdlTipoEtapa.DataBind();
|
||||
UPModal.Update();
|
||||
}
|
||||
}
|
||||
@@ -95,6 +95,8 @@
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivTipoProceso" runat="server">
|
||||
<label runat="server" id="LblTipoProceso" for="<%= DdlTipoProceso.ClientID.ToString()%>">Tipo Proceso:</label><br />
|
||||
<asp:DropDownList runat="server" ID="DdlTipoProceso" CssClass="form-control input-sm select2me" Width="50%" DataValueField="CveTipoProceso" DataTextField="TipoProceso"/>
|
||||
<asp:RequiredFieldValidator InitialValue="-1" ID="RfvTipoProceso" Display="None" ValidationGroup="VGGuardar" runat="server" ControlToValidate="DdlTipoProceso" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Proceso''</b> es necesario, por favor seleccione uno."></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceTipoProceso" runat="server" HighlightCssClass="vco" TargetControlID="RfvTipoProceso" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRFC" CssClass="form-control " runat="server" MaxLength="13"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ID="REVRFC" runat="server" CssClass="help-block errorimput" ValidationExpression="^([A-Z\d]){12,13}$" ControlToValidate="TxtRFC" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
||||
<asp:RequiredFieldValidator ID="RFVRFC" runat="server" ControlToValidate="TxtRFC" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtRFC.ClientID.ToString()%>">RFC:</label>
|
||||
<i></i>
|
||||
|
||||
@@ -16,11 +16,13 @@
|
||||
|
||||
.form-group.form-md-line-input .form-control {
|
||||
background-color: #fff;
|
||||
}
|
||||
.GVRep tr td a{
|
||||
display:block;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.GVRep tr td a {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
@@ -46,90 +48,96 @@
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="upDatosRepA" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="Filtros">
|
||||
<div class="Filtros portlet solid grey-cascade portlet-filter">
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<asp:DropDownList ID="DdlTipoProceso" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" CssClass="form-control input-sm select2me Widthall" OnSelectedIndexChanged="DdlTipoProceso_Change" AutoPostBack="true" Width="100%"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Proceso:" AssociatedControlID="DdlTipoProceso"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-sm select2me Widthall" Width="100%"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Vendedor:" AssociatedControlID="DdlVendedor"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMedioCaptacion" runat="server" DataTextField="MedioCaptacion" DataValueField="CveMedioCaptacion" CssClass="form-control input-sm select2me Widthall" Width="100%"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Medio de Captación:" AssociatedControlID="DdlMedioCaptacion"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlProbabilidad" runat="server" DataTextField="ProbabilidadAcercamiento" DataValueField="CveProbabilidadAcercamiento" CssClass="form-control input-sm select2me Widthall" Width="100%"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Probabilidad:" AssociatedControlID="DdlProbabilidad"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1 text-right">
|
||||
<br />
|
||||
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" CssClass="btn btn-default">Consultar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright" style="width:100%">
|
||||
<asp:DropDownList ID="DdlGrupo1" runat="server" CssClass="form-control input-sm select2me Widthall" Width="100%">
|
||||
<asp:ListItem Value="1" Text="Vendedor" Selected="true"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Medio de Captación"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
|
||||
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
|
||||
<asp:ListItem Value="5" Text="Sucursal"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Agrupado Por:" AssociatedControlID="DdlGrupo1"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="display:none;">
|
||||
<div class="form-group form-md-line-input input-iconright" style="width:100%">
|
||||
<asp:DropDownList ID="DdlGrupo2" runat="server" CssClass="form-control input-sm select2me Widthall" style="width:100%">
|
||||
<asp:ListItem Value="-1" Text="Ninguno" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Vendedor"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Medio Captacion"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
|
||||
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
|
||||
<asp:ListItem Value="5" Text="Sucursal"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Agrupado Por(2):" AssociatedControlID="DdlGrupo2"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="">
|
||||
<asp:Label runat="server" Text="Fecha Inicio:" AssociatedControlID="TxtFechaInicio"></asp:Label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<div class="col-md-2" style="width: 85%">
|
||||
<div class="row">
|
||||
<div class="col-sm-3" style="width: 25%">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoProceso" runat="server" DataTextField="TipoProceso" DataValueField="CveTipoProceso" CssClass="form-control input-sm select2me Widthall" OnSelectedIndexChanged="DdlTipoProceso_Change" AutoPostBack="true" Width="100%"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Proceso:" AssociatedControlID="DdlTipoProceso"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaSolicitudI" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudI" TargetControlID="TxtFechaInicio" PopupButtonID="imgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="">
|
||||
<asp:Label runat="server" Text="Fecha Fin:" AssociatedControlID="TxtFechaFin"></asp:Label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<div class="col-sm-3" style="width: 25%">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-sm select2me Widthall" Width="100%"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Vendedor:" AssociatedControlID="DdlVendedor"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3" style="width: 25%">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMedioCaptacion" runat="server" DataTextField="MedioCaptacion" DataValueField="CveMedioCaptacion" CssClass="form-control input-sm select2me Widthall" Width="100%"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Medio de Captación:" AssociatedControlID="DdlMedioCaptacion"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" style="width: 25%">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlProbabilidad" runat="server" DataTextField="ProbabilidadAcercamiento" DataValueField="CveProbabilidadAcercamiento" CssClass="form-control input-sm select2me Widthall" Width="100%"></asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Probabilidad:" AssociatedControlID="DdlProbabilidad"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaSolicitudF" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudF" TargetControlID="TxtFechaFin" PopupButtonID="imgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-2" style="padding-left: 15px; width: 25%">
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 100%">
|
||||
<asp:DropDownList ID="DdlGrupo1" runat="server" CssClass="form-control input-sm select2me Widthall" Width="100%">
|
||||
<asp:ListItem Value="1" Text="Vendedor" Selected="true"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Medio de Captación"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
|
||||
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
|
||||
<asp:ListItem Value="5" Text="Sucursal"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Agrupado Por:" AssociatedControlID="DdlGrupo1"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3" style="display: none; width: 25%">
|
||||
<div class="form-group form-md-line-input input-iconright" style="width: 100%">
|
||||
<asp:DropDownList ID="DdlGrupo2" runat="server" CssClass="form-control input-sm select2me Widthall" Style="width: 100%">
|
||||
<asp:ListItem Value="-1" Text="Ninguno" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="1" Text="Vendedor"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Medio Captacion"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Probabilidad de Acercamiento"></asp:ListItem>
|
||||
<asp:ListItem Value="4" Text="Fecha"></asp:ListItem>
|
||||
<asp:ListItem Value="5" Text="Sucursal"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Text="Agrupado Por(2):" AssociatedControlID="DdlGrupo2"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" style="width: 25%">
|
||||
<div class="">
|
||||
<asp:Label runat="server" Text="Fecha Inicio:" AssociatedControlID="TxtFechaInicio"></asp:Label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaSolicitudI" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudI" TargetControlID="TxtFechaInicio" PopupButtonID="imgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" style="width: 25%">
|
||||
<div class="">
|
||||
<asp:Label runat="server" Text="Fecha Fin:" AssociatedControlID="TxtFechaFin"></asp:Label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-bottom: -10px; padding-bottom: 10px;">
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaSolicitudF" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaSolicitudF" TargetControlID="TxtFechaFin" PopupButtonID="imgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" style="width: 138px">
|
||||
<div class="col-sm-1 text-right" style="width: 138px">
|
||||
<br />
|
||||
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" CssClass="btn btn-default">Consultar</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -185,13 +193,14 @@
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script>
|
||||
|
||||
function CargaGraficaBarras(data) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Reporte Detaller de los Acercamientos Procesos
|
||||
Reporte Detalle de los Acercamientos Procesos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1157,6 +1157,20 @@
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=iif(Parameters!Kilometraje.Value = "-1", "","Kilometraje: "& Parameters!Kilometraje.Value)</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
@@ -1867,10 +1881,13 @@
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Top>6.7641cm</Top>
|
||||
<Left>3.33321cm</Left>
|
||||
<Left>1.68221cm</Left>
|
||||
<Height>1.05328cm</Height>
|
||||
<Width>17.71415cm</Width>
|
||||
<ZIndex>14</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=IIF((Sum(IIF(Fields!CveClasificacion.Value = 20345,1,0), "DsOC") > 0),false,true)</Hidden>
|
||||
</Visibility>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
@@ -3514,6 +3531,12 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="Kilometraje">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<EmbeddedImages>
|
||||
<EmbeddedImage Name="ID2">
|
||||
|
||||
@@ -349,10 +349,13 @@
|
||||
<Value>=Fields!FechaIng.Value</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>dd/MM/yyyy</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>FechaIng</rd:DefaultName>
|
||||
|
||||
@@ -1276,6 +1276,7 @@ Partial Class PV
|
||||
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
|
||||
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
||||
TmpDT.Columns.Add("ConsecPSPadre", GetType(Integer))
|
||||
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
|
||||
@@ -1656,8 +1657,8 @@ Partial Class PV
|
||||
'SI EL DETALLE NO TIENE MOVIMIENTOS DE INVENTARIO ES VISIBLE
|
||||
Dim CantidadFacturadaRemision = 0.0
|
||||
For Each Gvr As GridViewRow In GvPS.Rows
|
||||
Gvr.FCLinkButton("imgE").Visible = Not Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "True"
|
||||
Gvr.FCLinkButton("imgD").Visible = Not Gvr.DataKey("CantidadInventario").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "True"
|
||||
Gvr.FCLinkButton("imgE").Visible = Not Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "False"
|
||||
Gvr.FCLinkButton("imgD").Visible = Not Gvr.DataKey("CantidadInventario").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "False"
|
||||
CantidadFacturadaRemision += Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble
|
||||
Next
|
||||
|
||||
@@ -1694,6 +1695,8 @@ Partial Class PV
|
||||
Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjBancos As New ClsBancos(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
|
||||
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
|
||||
Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero
|
||||
@@ -1701,8 +1704,8 @@ Partial Class PV
|
||||
Try
|
||||
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
|
||||
If DdlMoneda.SelectedValue.ToEntero <> 2 AndAlso ChkConvertirDolares.Checked Then
|
||||
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
Dim TmpDTTotales As DataTable = TmpDT.FiltraParametros("EliminarDB = False")
|
||||
For Each Row As DataRow In TmpDTTotales.Rows
|
||||
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, 6)
|
||||
Row("Total") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
|
||||
@@ -1721,13 +1724,13 @@ Partial Class PV
|
||||
End If
|
||||
Next
|
||||
|
||||
TxtSubTotal.Text = TmpDT.SUM("Total").ToDecimal.FormatoNumero
|
||||
LblDescuentos.Text = TmpDT.SUM("Descuento").ToDecimal.FormatoNumero
|
||||
TxtSubTotal.Text = TmpDTTotales.SUM("Total").ToDecimal.FormatoNumero
|
||||
LblDescuentos.Text = TmpDTTotales.SUM("Descuento").ToDecimal.FormatoNumero
|
||||
LblAmortizacion.Text = Math.Round(LblAmortizacion.Text.Trim.ToDecimal / TxtTipoCambioDlls.Text.Trim.ToDecimal, NumeroDecimales).FormatoNumero
|
||||
TxtIVA.Text = TmpDT.SUM("ImporteIVA").ToDecimal.FormatoNumero
|
||||
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal.FormatoNumero
|
||||
TxtRetISR.Text = TmpDT.SUM("ImporteRetISR").ToDecimal.FormatoNumero
|
||||
TxtIEPS.Text = TmpDT.SUM("ImporteIEPS").ToDecimal.FormatoNumero
|
||||
TxtIVA.Text = TmpDTTotales.SUM("ImporteIVA").ToDecimal.FormatoNumero
|
||||
TxtRetIVA.Text = TmpDTTotales.SUM("ImporteRetIVA").ToDecimal.FormatoNumero
|
||||
TxtRetISR.Text = TmpDTTotales.SUM("ImporteRetISR").ToDecimal.FormatoNumero
|
||||
TxtIEPS.Text = TmpDTTotales.SUM("ImporteIEPS").ToDecimal.FormatoNumero
|
||||
TxtTotal.Text = (TxtSubTotal.Text.ToDecimal - LblDescuentos.Text.ToDecimal - LblAmortizacion.Text.ToDecimal + TxtIVA.Text.ToDecimal + TxtIEPS.Text.ToDecimal - TxtRetIVA.Text.ToDecimal - TxtRetISR.Text.ToDecimal - ImpuestosLocales).ToDecimal.FormatoNumero
|
||||
|
||||
TipoCambio = TxtTipoCambioDlls.Text.Trim.ToDecimal
|
||||
@@ -1736,9 +1739,10 @@ Partial Class PV
|
||||
|
||||
'CONVERTIR REMISION - TIPO MONEDA -PESO A DOLARES
|
||||
If DdlMoneda.SelectedValue.ToEntero <> 1 AndAlso ChkConvertirDoctoPesos.Checked Then
|
||||
Dim TmpDTTotales As DataTable = TmpDT.FiltraParametros("EliminarDB = False")
|
||||
Dim Importe As Decimal
|
||||
Dim TCC As Decimal = TxtTipoCambio.Text.Trim.ToDecimal
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
For Each Row As DataRow In TmpDTTotales.Rows
|
||||
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal * TCC, 6)
|
||||
Row("Total") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
|
||||
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal, NumeroDecimales)
|
||||
@@ -1758,13 +1762,13 @@ Partial Class PV
|
||||
End If
|
||||
Next
|
||||
|
||||
TxtSubTotal.Text = TmpDT.SUM("Total").ToDecimal.FormatoNumero
|
||||
LblDescuentos.Text = TmpDT.SUM("Descuento").ToDecimal.FormatoNumero
|
||||
TxtSubTotal.Text = TmpDTTotales.SUM("Total").ToDecimal.FormatoNumero
|
||||
LblDescuentos.Text = TmpDTTotales.SUM("Descuento").ToDecimal.FormatoNumero
|
||||
LblAmortizacion.Text = Math.Round(LblAmortizacion.Text.Trim.ToDecimal * TxtTipoCambio.Text.Trim.ToDecimal, NumeroDecimales).FormatoNumero
|
||||
TxtIVA.Text = TmpDT.SUM("ImporteIVA").ToDecimal.FormatoNumero
|
||||
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal.FormatoNumero
|
||||
TxtRetISR.Text = TmpDT.SUM("ImporteRetISR").ToDecimal.FormatoNumero
|
||||
TxtIEPS.Text = TmpDT.SUM("ImporteIEPS").ToDecimal.FormatoNumero
|
||||
TxtIVA.Text = TmpDTTotales.SUM("ImporteIVA").ToDecimal.FormatoNumero
|
||||
TxtRetIVA.Text = TmpDTTotales.SUM("ImporteRetIVA").ToDecimal.FormatoNumero
|
||||
TxtRetISR.Text = TmpDTTotales.SUM("ImporteRetISR").ToDecimal.FormatoNumero
|
||||
TxtIEPS.Text = TmpDTTotales.SUM("ImporteIEPS").ToDecimal.FormatoNumero
|
||||
TxtTotal.Text = (TxtSubTotal.Text.ToDecimal - LblDescuentos.Text.ToDecimal - LblAmortizacion.Text.ToDecimal + TxtIVA.Text.ToDecimal + TxtIEPS.Text.ToDecimal - TxtRetIVA.Text.ToDecimal - TxtRetISR.Text.ToDecimal - ImpuestosLocales).ToDecimal.FormatoNumero
|
||||
|
||||
|
||||
@@ -1802,32 +1806,99 @@ Partial Class PV
|
||||
Exit For
|
||||
Else
|
||||
TmpDT.Rows(index)("CveVentaDetalle") = ObjVentas.CveVentaDetalle
|
||||
|
||||
If TmpDTRecepcionUsados IsNot Nothing Then
|
||||
If TmpDTRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
|
||||
Dim rowInv As DataRow = TmpDTRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0)
|
||||
rowInv("CveVentaDetalle") = ObjVentas.CveVentaDetalle
|
||||
End If
|
||||
End If
|
||||
|
||||
If TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0 Then
|
||||
If TmpDTAjustes.Select($"ConsecutivoVenta={Row("Consec").ToString.ToEntero}").Length > 0 Then
|
||||
Dim DrAju As DataRow = TmpDTAjustes.Select($"ConsecutivoVenta={Row("Consec").ToString.ToEntero}")(0)
|
||||
DrAju("CveVentaDetalle") = ObjVentas.CveVentaDetalle
|
||||
End If
|
||||
End If
|
||||
|
||||
If TmpDTPolizaVirtual IsNot Nothing Then
|
||||
If TmpDTPolizaVirtual.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
|
||||
Dim RowPoliza As DataRow = TmpDTPolizaVirtual.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0)
|
||||
RowPoliza("CveVentaDetalle") = ObjVentas.CveVentaDetalle
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
index = index + 1
|
||||
Next
|
||||
End If
|
||||
|
||||
ObjFactura.DtDetalle = TmpDT
|
||||
|
||||
'ELIMINA LOS DETALLES
|
||||
If Not OcurrioError Then
|
||||
Dim DtEliminados As New DataTable
|
||||
If ObjVentas.GetVentaDetalle(CveVenta) Then
|
||||
DtEliminados = ObjVentas.DtResultados.FiltraParametros("", "", {"CveVentaDetalle"})
|
||||
For Each Dr1 As DataRow In DtEliminados.Rows
|
||||
If TmpDT.FiltraParametros($"CveVentaDetalle = {Dr1("CveVentaDetalle")}").Rows.Count = 0 Then
|
||||
If Not ObjVentas.RemoveVentasDetalle(CveVenta, Dr1("CveVentaDetalle").ToString.ToEntero) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
Dim DtEliminados As DataTable = TmpDT.FiltraParametros("EliminarDB = True AND CveVentaDetalle > 0", "", {"CveVentaDetalle"})
|
||||
|
||||
For Each Dr1 As DataRow In DtEliminados.Rows
|
||||
If Not ObjVentas.RemoveVentasDetalle(CveVenta, Dr1("CveVentaDetalle").ToString.ToEntero) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'OcurrioError = ProcesoPrepolizas(ObjConta, ObjFactura, -1, TmpDT, ObjAC, 1, ObjBancos, ObjVentas)
|
||||
'RECARGA LOS DATOS
|
||||
If ObjVentas.GetVentaDetalle(CveVenta) Then
|
||||
TmpDT = ObjVentas.DtResultados.Copy()
|
||||
ObjFactura.DtDetalle = TmpDT
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
'GUARDA USADOS
|
||||
If Not ObjVentas.EliminarUsados(CveVenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If TmpDTRecepcionUsados IsNot Nothing Then
|
||||
For Each drow As DataRow In TmpDTRecepcionUsados.Rows
|
||||
If Not ObjVentas.AddVentaUsado(CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("CveBCIUsado").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'GUARDAR AJUSTES'
|
||||
If Not ObjAcum.EliminarGarantiasDetalle(CveVenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0 Then
|
||||
For Each Dr As DataRow In TmpDTAjustes.Rows
|
||||
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
|
||||
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero,
|
||||
Dr("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString, Dr("FechaAjuste").ToString.ToDateTime()) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar la garantia detalle.")
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'GUARDAR POLIZA VIRTUAL
|
||||
If Not ObjAcum.EliminarPolizaVirtual(CveVenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If TmpDTPolizaVirtual IsNot Nothing Then
|
||||
For Each drow As DataRow In TmpDTPolizaVirtual.Rows
|
||||
If ObjAcum.AddPolizaVirtual(CveVenta, drow("CveVentaDetalle").ToString().ToEntero(), drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("Descuento").ToString.ToDecimal,
|
||||
drow("Total").ToString.ToDecimal, drow("TipoServicio").ToString.ToEntero, drow("TipoPoliza").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero, drow("AnioVehiculo").ToString.ToEntero, CBool(drow("TieneUsado").ToString),
|
||||
drow("FechaUsado").ToString().ToDateTime, drow("CvePSUsado").ToString.ToEntero, drow("CveBCIUsado").ToString.ToEntero) Then
|
||||
Else
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'Actualizo impuestos locales
|
||||
If Not OcurrioError Then
|
||||
@@ -2695,7 +2766,7 @@ Partial Class PV
|
||||
|
||||
TmpDT.Rows.Remove(DbRow)
|
||||
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False")
|
||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||
GvPS.DataBind()
|
||||
CargaGVInv(DtInv)
|
||||
@@ -2751,7 +2822,7 @@ Partial Class PV
|
||||
TmpDT = resultados.CopyToDataTable
|
||||
CalculaTotalesVenta()
|
||||
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False")
|
||||
GvPS.DataBind()
|
||||
UpPS.Update()
|
||||
|
||||
@@ -2857,7 +2928,7 @@ Partial Class PV
|
||||
GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> ""
|
||||
GvInv.Columns(6).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> ""
|
||||
|
||||
GvInv.DataSource = DtTemporal
|
||||
GvInv.DataSource = DtTemporal.FiltraParametros("EliminarDB = False")
|
||||
GvInv.DataBind()
|
||||
|
||||
UpINV.Update()
|
||||
@@ -3806,6 +3877,9 @@ Partial Class PV
|
||||
TmpDT.Columns.Add("PUOriginal", GetType(Decimal))
|
||||
TmpDT.Columns.Add("ConsecPSPadre", GetType(Integer))
|
||||
|
||||
TmpDT.Columns.Add("EliminarDB", GetType(Boolean))
|
||||
TmpDT.Columns("EliminarDB").DefaultValue = False
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CreaDTmpC()
|
||||
@@ -3878,7 +3952,7 @@ Partial Class PV
|
||||
Row("TiempoEntrega") = TiempoEntrega
|
||||
|
||||
TmpDT.Rows.Add(Row)
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False")
|
||||
GvPS.DataBind()
|
||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||
|
||||
@@ -3999,7 +4073,7 @@ Partial Class PV
|
||||
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
|
||||
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
|
||||
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional EsCargo As Boolean = False,
|
||||
Optional ConsecPSPadre As Integer = -1) As Integer
|
||||
Optional ConsecPSPadre As Integer = -1, Optional EliminarDB As Boolean = False) As Integer
|
||||
|
||||
Dim Retorno As Integer = -1
|
||||
If Not CvePS > 0 Then
|
||||
@@ -4170,6 +4244,8 @@ Partial Class PV
|
||||
Row("ConsecPSPadre") = ConsecPSPadre
|
||||
End If
|
||||
|
||||
Row("EliminarDB") = EliminarDB
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
|
||||
|
||||
@@ -4477,8 +4553,8 @@ Partial Class PV
|
||||
Else
|
||||
If Me.CveVentaDetalle > 0 Then
|
||||
For Each Gvr As GridViewRow In GvPS.Rows
|
||||
Gvr.FCLinkButton("imgE").Visible = Not Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "True"
|
||||
Gvr.FCLinkButton("imgD").Visible = Not Gvr.DataKey("CantidadInventario").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "True"
|
||||
Gvr.FCLinkButton("imgE").Visible = Not Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "False"
|
||||
Gvr.FCLinkButton("imgD").Visible = Not Gvr.DataKey("CantidadInventario").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "False"
|
||||
Next
|
||||
End If
|
||||
UpVenta.Update()
|
||||
@@ -4530,7 +4606,12 @@ Partial Class PV
|
||||
If ListaPSCargo.Count > 0 Then
|
||||
CalculaRecepcionUsados(GvRecepcionUsados, CvePS, ListaPSCargo)
|
||||
End If
|
||||
|
||||
ElseIf CveVentaDetalle > 0 AndAlso Not EsCargo Then
|
||||
EliminarUsados()
|
||||
Dim ListaPSCargo = CalculaUsados(Consec, LimpiarUsados:=False)
|
||||
If ListaPSCargo.Count > 0 Then
|
||||
CalculaRecepcionUsados(GvRecepcionUsados, CvePS, ListaPSCargo)
|
||||
End If
|
||||
End If
|
||||
|
||||
Return True
|
||||
@@ -4662,6 +4743,7 @@ Partial Class PV
|
||||
|
||||
#Region "CALCULA TOTALES"
|
||||
Private Sub CalculaTotalesVenta(Optional RecalculaImpuestosLocales As Boolean = True)
|
||||
Dim TmpDT = Me.TmpDT.FiltraParametros("EliminarDB = False", Orderby:="Consec")
|
||||
|
||||
Dim TotalSubTotal As Decimal = TmpDT.SUM("TotalImporte").ToDecimal
|
||||
Dim TotalDescuentos As Decimal = TmpDT.SUM("Descuento").ToDecimal
|
||||
@@ -4715,9 +4797,7 @@ Partial Class PV
|
||||
'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
||||
'CVImporteContado.ValueToCompare = Total.ToString
|
||||
|
||||
Dim view As DataView = New DataView(TmpDT)
|
||||
view.Sort = "Consec"
|
||||
GvPS.DataSource = view
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
|
||||
'RECARGA GV INVENTARIO
|
||||
@@ -6325,7 +6405,7 @@ Partial Class PV
|
||||
|
||||
Dim Total As Decimal = ((Cantidad * PU) - Descuento).RoundSQL(2)
|
||||
Dim TipoServicio As Integer = DdlTipoServicio.SelectedValue.ToEntero()
|
||||
Dim FechaUsado As DateTime = TxtFechaAjuste.Text.ToDateTime()
|
||||
Dim FechaUsado As DateTime = If(TxtFechaAjuste.Text.ToDateTime() < MinFecha, Now, TxtFechaAjuste.Text.ToDateTime())
|
||||
Dim CveModeloAuto As Integer = DdlModeloAuto.SelectedValue.ToEntero()
|
||||
Dim AnioVehiculo As Integer = TxtAnioVehiculo.Text.ToEntero()
|
||||
Dim TipoPoliza As Integer = 1 'VENTA
|
||||
@@ -6376,6 +6456,7 @@ Partial Class PV
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "U S A D O S"
|
||||
|
||||
Private Sub CreaDTmpDTRecepcionUsados()
|
||||
@@ -6388,6 +6469,8 @@ Partial Class PV
|
||||
TmpDTRecepcionUsados.Columns.Add("PU", GetType(Double))
|
||||
TmpDTRecepcionUsados.Columns.Add("CveBCIUsado", GetType(Integer))
|
||||
TmpDTRecepcionUsados.Columns.Add("CveModeloAuto", GetType(Integer))
|
||||
TmpDTRecepcionUsados.Columns.Add("EliminarDB", GetType(Boolean))
|
||||
TmpDTRecepcionUsados.Columns("EliminarDB").DefaultValue = False
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -6453,7 +6536,7 @@ Partial Class PV
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = True AND CvePS IN ({StrCargos})").Rows
|
||||
For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = True AND EliminarDB = False AND CvePS IN ({StrCargos})").Rows
|
||||
|
||||
Dim TotalAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal
|
||||
Dim PUActual As Decimal = (TotalAnterior - TotalCargos) / Dr("Cantidad").ToString.ToDecimal
|
||||
@@ -6485,7 +6568,7 @@ Partial Class PV
|
||||
Next
|
||||
TmpDT.AcceptChanges()
|
||||
If TotalCargos > 0 Then ' cuando se entrega más valor de usados, que los cargos hechos, se descuenta sobre el PU del producto de venta
|
||||
For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = False AND CvePS={CvePS}").Rows
|
||||
For Each Dr As DataRow In TmpDT.FiltraParametros($"EsCargo = False AND EliminarDB = False AND CvePS={CvePS}").Rows
|
||||
|
||||
Dim PUAnterior As Decimal = Dr("Cantidad").ToString.ToDecimal * Dr("PU").ToString.ToDecimal
|
||||
Dim PUActual As Decimal = PUAnterior - (TotalCargos / Dr("Cantidad").ToString.ToDecimal)
|
||||
@@ -6522,8 +6605,8 @@ Partial Class PV
|
||||
|
||||
CalculaTotalesVenta()
|
||||
End Sub
|
||||
Private Function CalculaUsados(Consec As Integer) As List(Of Integer)
|
||||
If Modalidad = "U" Then
|
||||
Private Function CalculaUsados(Consec As Integer, Optional LimpiarUsados As Boolean = True) As List(Of Integer)
|
||||
If Modalidad = "U" AndAlso LimpiarUsados Then
|
||||
EliminarUsados(Consec)
|
||||
End If
|
||||
|
||||
@@ -6556,6 +6639,8 @@ Partial Class PV
|
||||
DTPSTemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("SubProyecto", GetType(String))
|
||||
DTPSTemp.Columns.Add("ConsecPSPadre", GetType(Integer))
|
||||
DTPSTemp.Columns.Add("EliminarDB", GetType(Boolean))
|
||||
DTPSTemp.Columns("EliminarDB").DefaultValue = False
|
||||
|
||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||
For Each DrowPartidas As DataRow In TmpDT.Select($"Consec = {Consec}")
|
||||
@@ -6628,7 +6713,7 @@ Partial Class PV
|
||||
Dim Concec = AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString,
|
||||
drowPsTamaños("CveClasificacion").ToString.ToEntero, drowPsTamaños("Clasificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero,
|
||||
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
|
||||
drowPsTamaños("SubProyecto").ToString, EsCargo:=True, ConsecPSPadre:=drowPsTamaños("ConsecPSPadre").ToString.ToEntero)
|
||||
drowPsTamaños("SubProyecto").ToString, EsCargo:=True, ConsecPSPadre:=drowPsTamaños("ConsecPSPadre").ToString.ToEntero, EliminarDB:=CBool(drowPsTamaños("EliminarDB").ToString()))
|
||||
If Consec > 0 Then
|
||||
ListaPScargo.Add(drowPsTamaños("CvePS").ToString.ToEntero)
|
||||
End If
|
||||
@@ -6655,6 +6740,25 @@ Partial Class PV
|
||||
Next
|
||||
Next
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
TmpDTRecepcionUsados.AcceptChanges()
|
||||
End Sub
|
||||
Private Sub EliminarUsados()
|
||||
|
||||
'ELIMINAR EL USADO EXTRAS
|
||||
For Each drow As DataRow In TmpDT.Select("EsCargo = True")
|
||||
drow("EliminarDB") = True
|
||||
Next
|
||||
|
||||
'ELIMINAR LOS USADOS QUE SE MANDAN A RECEPCION
|
||||
For Each drow As DataRow In TmpDT.Select("EsCargo = True")
|
||||
For Each RowRecepcionUsados As DataRow In TmpDTRecepcionUsados.Rows
|
||||
If (RowRecepcionUsados("CvePSRelacionado").ToString() = drow("CvePS").ToString()) Then
|
||||
RowRecepcionUsados.Delete()
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
TmpDT.AcceptChanges()
|
||||
TmpDTRecepcionUsados.AcceptChanges()
|
||||
End Sub
|
||||
|
||||
@@ -14500,13 +14500,13 @@ Partial Class Ventas
|
||||
Dim RowPorcentaje = DtPorcentajeMarcas.FiltroPrimero($"CveMarca={DrPS("CveMarca").ToString()}")
|
||||
'REALIZA LOS DESCUENTOS DE ACUERDO AL PORCENTAJE POR MARCA
|
||||
If RowPorcentaje IsNot Nothing Then
|
||||
'LIMPIAR LOS DESCUENTOS
|
||||
Descuento = 0
|
||||
'(AHORA LOS DESCUENTOS SON ACUMULABLES)
|
||||
'Descuento = 0
|
||||
Dim PorcentajeProducto = RowPorcentaje("PorcentajeProducto").ToString().ToDecimal() / 100D
|
||||
Dim PorcentajeProducto2 = RowPorcentaje("PorcentajeProducto2").ToString().ToDecimal() / 100D
|
||||
Dim PorcentajeProducto3 = RowPorcentaje("PorcentajeProducto3").ToString().ToDecimal() / 100D
|
||||
|
||||
Dim TotalInicial As Decimal = (Cantidad * (PU)) - Descuento
|
||||
Dim TotalInicial As Decimal = (Cantidad * (PU)) '- Descuento
|
||||
Dim TotalFinal = TotalInicial
|
||||
'SI APLICA EL PRIMER DESCUENTO
|
||||
If PorcentajeProducto > 0 Then
|
||||
@@ -14532,7 +14532,9 @@ Partial Class Ventas
|
||||
TotalFinal = TotalInicial
|
||||
End If
|
||||
|
||||
Descuento += ((Cantidad * PU) - TotalFinal)
|
||||
If PorcentajeProducto > 0 Then
|
||||
Descuento += ((Cantidad * PU) - TotalFinal)
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user