This commit is contained in:
HECTOR RODRIGUEZ
2021-04-09 19:11:39 -07:00
parent c53bb871ad
commit 74cdfcbc3e
5 changed files with 45 additions and 10 deletions

View File

@@ -253,7 +253,7 @@ Public Class ClsProductosServicios
Oferta = Data.Rows(0)("Oferta").ToString.ToDouble
IVA = Data.Rows(0)("IVA").ToString.ToDouble
RetIVA = Data.Rows(0)("RetIVA").ToString.ToDouble
CveMarca = Data.Rows(0)("CveMarca").ToString.ToEntero
Me.CveMarca = Data.Rows(0)("CveMarca").ToString.ToEntero
AplicaParaConcepto = CBool(Data.Rows(0)("AplicaParaConcepto").ToString)
AplicaParaVenta = Data.Rows(0)("AplicaParaVenta").ToString = "True"
Estado = Data.Rows(0)("Estado").ToString = "Activo"

View File

@@ -225,8 +225,8 @@
<br />
<asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" runat="server" Text="Guardar" data-toggle="confirmation" data-popout="true" data-original-title="<b>Verifique los datos para continuar</b>. <br/><br/> <center>¿Seguro de registrar esta cuenta nueva?</center>" data-btn-ok-label="si" />
<asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" />
<asp:Button ID="Guardar" CssClass="btn btn-primary" Visible="false" runat="server" Text="Guardar" />
<asp:Button ID="nuevacuenta" CssClass="btn btn-success" Visible="false" runat="server" Text="Guardar" />
<asp:Button ID="BtnEliminar" CssClass="btn btn-danger" Visible="false" runat="server" Text="Eliminar" OnClientClick="return confirm('Esta seguro de eliminar la cuenta?')" />
</fieldset>
</div>
@@ -270,5 +270,21 @@
buscararbolito('C_ArbolCuentas_Abuscar', 'C_ArbolCuentas_miarbol')
});
});
function Afectable(btn) {
debugger;
$('#C_nuevacuenta').attr('data-toggle', 'confirmation');
$('#C_nuevacuenta').attr('data-popout', 'true');
$('#C_nuevacuenta').attr('data-original-title', '<b>Verifique los datos para continuar</b>. <br/><br/> <center>¿Seguro de registrar esta cuenta nueva?</center>');
$('#C_nuevacuenta').attr('data-btn-ok-label', 'si');
}
function NoAfectable() {
debugger;
$('#C_nuevacuenta').attr('data-toggle', '');
$('#C_nuevacuenta').attr('data-popout', '');
$('#C_nuevacuenta').attr('data-original-title', '');
$('#C_nuevacuenta').attr('data-btn-ok-label', '');
}
</script>
</asp:Content>

View File

@@ -206,7 +206,11 @@ Partial Class Contabilidad2_CatCuentas
End If
If Afectable Then
RegistraScript(String.Format("Afectable({0});", nuevacuenta.ClientID))
Alert("Se va crear una subcuenta en una cuenta afectable", TipoMensaje.MsgAdvertencia)
Else
RegistraScript("NoAfectable();")
End If
TxtCuenta.Enabled = True

View File

@@ -92,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;

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();
@@ -100,7 +105,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
// DdlCliente.SelectedValue = "-1";
//}
protected void CargaCliente()
protected void CargaClientes()
{
DdlCliente.setEsWebService(true);
DdlCliente.Attributes.Add("data-metodo", "getcliente");
@@ -121,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;
@@ -133,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)
@@ -164,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;