This commit is contained in:
2021-04-14 17:13:37 -07:00
65 changed files with 2032 additions and 353 deletions

View File

@@ -138,8 +138,7 @@
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFechaDocumento" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''Fecha''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="La fecha del documento no puede ser superior a la fecha actual" ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" MaximumValue="01/12/2999" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a la fecha actual" ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
@@ -366,7 +365,7 @@
<asp:TemplateField >
<HeaderTemplate>Complemento Pago</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton runat="server" ID="LnkComplemento" CssClass="text-success" Text="<i class='fa fa-check' aria-hidden='true'></i>" OnClientClick="return false;" ></asp:LinkButton>
<asp:Literal runat="server" ID="LtlComplemento" Text="<i class='fa fa-check text-success ' aria-hidden='true'></i>" ></asp:Literal>
</ItemTemplate>
</asp:TemplateField>

View File

@@ -639,11 +639,10 @@ Partial Class Ventas_ClientesAbonar
If e.Row.DBCampo("CveVenta").ToEntero > 0 Then
If e.Row.DataKey("ClaveMetodoPagoSAT") = "PUE" Then
e.Row.FCLinkButton("LnkComplemento").Text = "<i class='fa fa-times' aria-hidden='true'></i>"
e.Row.FCLinkButton("LnkComplemento").CssClass = "text-danger"
e.Row.FCLiteral("LtlComplemento").Text = "<i class='fa fa-times text-danger ' aria-hidden='true'></i>"
End If
Else
e.Row.FCLinkButton("LnkComplemento").Visible = False
e.Row.FCLiteral("LtlComplemento").Visible = False
End If
@@ -934,7 +933,7 @@ Partial Class Ventas_ClientesAbonar
CveCuenta = If(EsAnticipoEspecial, -1, CveCuentaComplementaria)
If ImporteMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsuarioActual.CveEmpresa = 119) Then
importeMX = ImporteMovimiento
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, If(gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa = 119, 226, 207), ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, If(gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa = 119, 226, 207), ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
@@ -1380,7 +1379,7 @@ Partial Class Ventas_ClientesAbonar
Diferencia -= (((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el RetIVA
Diferencia -= (((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el RetISR
Diferencia -= (((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVenta) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el IEPS
Diferencia = Math.Round(Diferencia, 2)
Diferencia = Diferencia.RoundSQL
End If
ImporteMovimiento = Math.Abs(Diferencia)
@@ -2720,7 +2719,7 @@ Partial Class Ventas_ClientesAbonar
MsgError = "Ocurrio un error al saldar el movimiento"
End If
'complementaria
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, 0, gr.DataKey("SerieFolio").ToString, 207, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContComplementaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, (Saldo * TCVenta) - Saldo), ImporteME:=Saldo, CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, 0, gr.DataKey("SerieFolio").ToString, 207, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=IdCtaContComplementaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, (Saldo * TCVenta) - Saldo).RoundSQL, ImporteME:=Saldo, CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
@@ -3176,4 +3175,10 @@ Partial Class Ventas_ClientesAbonar
CargaDatos(CveMoneda)
End Sub
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
Calendario.EndDate = DateTime.Now
End Sub
End Class

View File

@@ -2953,7 +2953,7 @@
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConsecutivoAjuste" CssClass="form-control" runat="server" MaxLength="25"></asp:TextBox>
<asp:TextBox ID="TxtConsecutivoAjuste" CssClass="form-control" runat="server" MaxLength="25" Enabled="false"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RFVConsecutivoAjuste" runat="server" ControlToValidate="TxtConsecutivoAjuste" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Consec.''</b> es necesario, por favor ingréselo." ValidationGroup="VGMAjuste"></asp:RequiredFieldValidator>--%>
<%--<ajax:ValidatorCalloutExtender ID="VCEConsecutivoAjuste" runat="server" HighlightCssClass="vco" TargetControlID="RFVConsecutivoAjuste"></ajax:ValidatorCalloutExtender>--%>
<label for="<%= TxtConsecutivoAjuste.ClientID.ToString()%>">Consec.:</label>

View File

@@ -46,8 +46,10 @@
</div>
<label class="col-md-1 " id="LblCliente" runat="server">Cliente:</label>
<div class="col-md-2" id="DivDdlCliente" runat="server">
<asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
</asp:DropDownList>
<ADS:Dropdownlost ID="DdlCliente" runat="server" AutoPostBack="False" DataTextField="NombreComercial" IncluyeTodos="false" DataValueField="CveCliente" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
<%-- <asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
</asp:DropDownList>--%>
</div>
<div class="col-md-1" style="">Fecha Ini Doc:</div>
<div class="col-md-1">

View File

@@ -65,11 +65,16 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas
DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1"));
}
//protected void CargaClientes()
//{
// DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa,-1);
// DdlCliente.DataBind();
// DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
//}
protected void CargaClientes()
{
DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa,-1);
DdlCliente.DataBind();
DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
DdlCliente.setEsWebService(true);
DdlCliente.Attributes.Add("data-metodo", "getcliente");
}
protected void CargaVendedores()
{
@@ -87,7 +92,12 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas
DateTime FechaFCorte;
if (TxtFechaFCorte.Text != "") { FechaFCorte = TxtFechaFCorte.Text.ToDate(); } else { FechaFCorte = DateTime.MaxValue; }
ClsVentas ObjVenta = new ClsVentas();
if (ObjVenta.GetRepAnticiposNCIXC(DdlCliente.SelectedValue.ToEntero(), DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(),
int CveCliente = -1;
if (DdlCliente.SelectedValue.ToEntero() != 0)
{
CveCliente = DdlCliente.SelectedValue.ToEntero();
}
if (ObjVenta.GetRepAnticiposNCIXC(CveCliente, DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(),
txtFechaF.Text.ToDate(),UsuarioActual.CveEmpresa, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico, DdlVendedor.SelectedValue.ToEntero(),DdlConSaldo.SelectedValue.ToEntero()))
{
GvDatos.DataSource = ObjVenta.DtResultados;
@@ -127,7 +137,7 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas
String Sucursal;
if (DdlSucursal.SelectedValue != "-1") { Sucursal = $"&emsp;<b>Sucursal:</b> {DdlSucursal.SelectedItem.Text}"; } else { Sucursal = ""; }
String Cliente;
if (DdlCliente.SelectedValue != "-1") { Cliente = $"&emsp;<b>Cliente:</b> {DdlCliente.SelectedItem.Text}"; } else { Cliente = ""; }
if (DdlCliente.SelectedValue != "-1") { Cliente = $"&emsp;<b>Cliente:</b> {DdlCliente.SelectedText}"; } else { Cliente = ""; }
if (DtDatos.Rows.Count > 0)
{
System.IO.FileInfo Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));

View File

@@ -50,8 +50,10 @@
</div>
<label class="col-md-1 " id="LblCliente" runat="server">Cliente:</label>
<div class="col-md-2" id="DivDdlCliente" runat="server">
<asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
</asp:DropDownList>
<%-- <asp:DropDownList ID="DdlCliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
</asp:DropDownList>--%>
<ADS:Dropdownlost ID="DdlCliente" runat="server" AutoPostBack="False" DataTextField="NombreComercial" IncluyeTodos="false" DataValueField="CveCliente" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost>
</div>
<div class="col-md-1" style="">Fecha Ini Doc:</div>
<div class="col-md-1">

View File

@@ -58,7 +58,12 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
TxtFechaFCorte.Text = DateTime.Today.ToString();
CargaSucursales();
CargaClientes();
DdlCliente.SelectedValueExist(Request["CveCliente"] == null ? "-1" : Request["CveCliente"].ToString());
int CveCliente = (Request["CveCliente"] == null ? -1 : Request["CveCliente"].ToString().ToEntero());
DdlCliente.SelectedValue = CveCliente.ToString();
DataTable dt = get_GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:CveCliente);
DdlCliente.SelectedText = dt.FiltroPrimeroValor("NombreComercial", "");
DdlSucursal.SelectedValueExist(Request["CveSubProyecto"] == null ? "-1" : Request["CveSubProyecto"].ToString());
DdlTipo.SelectedValueExist(Request["Tipo"] == null ? "-1" : Request["Tipo"].ToString());
CveMoneda = Request["CveMoneda"] == null ? -1 : Request["CveMoneda"].ToString().ToEntero();
@@ -90,16 +95,21 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
DdlSucursal.DataBind();
DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1"));
DdlSucursal.SelectedValue = "-1";
}
//protected void CargaClientes()
//{
// DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1);
// DdlCliente.DataBind();
// DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
// DdlCliente.SelectedValue = "-1";
//}
protected void CargaClientes()
{
DdlCliente.setEsWebService(true);
DdlCliente.Attributes.Add("data-metodo", "getcliente");
}
protected void CargaClientes()
{
DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1);
DdlCliente.DataBind();
DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
DdlCliente.SelectedValue = "-1";
}
protected void CargaVendedores()
{
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
@@ -116,8 +126,13 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
if (TxtFechaICorte.Text != "") { FechaICorte = TxtFechaICorte.Text.ToDate(); } else { FechaICorte = DateTime.MinValue; }
DateTime FechaFCorte;
if (TxtFechaFCorte.Text != "") { FechaFCorte = TxtFechaFCorte.Text.ToDate(); } else { FechaFCorte = DateTime.MaxValue; }
ClsVentas ObjVenta = new ClsVentas();
if (ObjVenta.GetRepAnticiposNCIXCDetalle(DdlCliente.SelectedValue.ToEntero(), DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(),
ClsVentas ObjVenta = new ClsVentas();
int CveCliente = -1;
if (DdlCliente.SelectedValue.ToEntero() != 0)
{
CveCliente = DdlCliente.SelectedValue.ToEntero();
}
if (ObjVenta.GetRepAnticiposNCIXCDetalle(CveCliente, DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(),
UsuarioActual.CveEmpresa, DdlConSaldo.SelectedValue.ToEntero(), DdlTipo.SelectedValue.ToEntero(), CveMoneda, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico))
{
GvDatos.DataSource = ObjVenta.DtResultados;
@@ -128,7 +143,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
UpDatos.Update();
if (TxtFechaFCorte.Text != DateTime.Now.ToShortDateString() && txtFechaI.Text != "") { LnkHabilitarSaldar.Visible = false; LnkSaldar.Visible = false; } else { LnkHabilitarSaldar.Visible = true; }
if (LnkSaldar.Visible) { HabilitarCheckbox(); }
Tipo = DdlTipo.SelectedValue.ToEntero();
Tipo = DdlTipo.SelectedValue.ToEntero();
}
protected void BtnConsultar_Click(object sender, EventArgs e)
@@ -159,7 +174,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
String Sucursal;
if (DdlSucursal.SelectedValue != "-1") { Sucursal = $"&emsp;<b>Sucursal:</b> {DdlSucursal.SelectedItem.Text}"; } else { Sucursal = ""; }
String Cliente;
if (DdlCliente.SelectedValue != "-1") { Cliente = $"&emsp;<b>Cliente:</b> {DdlCliente.SelectedItem.Text}"; } else { Cliente = ""; }
if (DdlCliente.SelectedValue.ToEntero() != -1) { Cliente = $"&emsp;<b>Cliente:</b> {DdlCliente.SelectedText}"; } else { Cliente = ""; }
String ConSaldo;
if (DdlConSaldo.SelectedValue != "-1") { ConSaldo = $"&emsp;<b>Con Saldo:</b> {DdlConSaldo.SelectedItem.Text}"; } else { ConSaldo = ""; }
String Tipo2;

View File

@@ -179,7 +179,7 @@
</asp:DropDownList>
</div>
<div class="col-md-1 truncate">Fecha Aplicado Inicio: </div>
<div class="col-md-1 truncate">F. Conciliado inicio:</div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important;">
<asp:TextBox Width="80px" ID="TxtFechaAplicadoI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
@@ -194,7 +194,7 @@
<ajax:ValidatorCalloutExtender ID="vcoFfvFAplicadoI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaAplicadoI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFAplicadoI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaAplicadoI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1 truncate">Fecha Aplicado Fin: </div>
<div class="col-md-1 truncate">F. Conciliado Fin:</div>
<div class="col-md-1">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important;">
<asp:TextBox Width="80px" ID="TxtFechaAplicadoF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>