protected override void Crear() { base.Crear(); Txtotroingreso.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("OTRO INGRESO"); Txtotroingreso.Enabled = false; BtnBuscarCobro.Visible = false; }
protected override void Crear() { base.Crear(); Txtcobro.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("COBRO ADELANTADO"); Txtcobro.Enabled = false; BtnBuscarCobro.Visible = false; }
protected override void Crear() { base.Crear(); Txtregistro.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("REGISTRO CXC"); Txtregistro.Enabled = false; BtnBuscarRegistro.Visible = false; }
private void cxcproreciboingreso_Load(object sender, EventArgs e) { Fun_Set_Nombre_Formulario("Registro de Ingresos", this); Rbnreciboingreso.Checked = true; BtnModificar.Visible = false; BtnCrear.Visible = false; Txtcodigocliente.Focus(); CheckGrid(); Dgv.Columns[""].Width = 25; Dgv.Columns["dgvsecuencia"].ReadOnly = true; Dgv.Columns["dgvreferencia"].ReadOnly = true; Dgv.Columns["dgvfecha"].ReadOnly = true; Dgv.Columns["dgvvence"].ReadOnly = true; Dgv.Columns["dgvdias"].ReadOnly = true; Dgv.Columns["dgvtotal"].ReadOnly = true; Dgv.Columns["dgvbalance"].ReadOnly = true; Dgv.Columns["dgvbalancefinal"].ReadOnly = true; Dgv.Columns["dgvsecuencia"].DisplayIndex = 1; Ckbimprimir.Checked = true; Txtcobro.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("COBRO"); FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(Cmbmoneda, "select idmoneda, abreviatura from gendbfmoneda"); //tasamoneda= FuncionesSQL.Fun_SQL_Buscar_Tasa_Moneda(Funciones.Fun_Convierte_String_aEntrero(Cmbmoneda.SelectedValue.ToString())); }
private void cxcprodebcre_Load(object sender, EventArgs e) { Fun_Set_Nombre_Formulario("Registro de Nota DEB/CRE", this); Rbncredito.Checked = true; Ckbncf.Checked = true; BtnModificar.Visible = false; BtnCrear.Visible = false; Txtcodigocliente.Focus(); Dgv.Columns["dgvcheck"].Width = 25; Dgv.Columns["dgvsecuencia"].ReadOnly = true; Dgv.Columns["dgvreferencia"].ReadOnly = true; Dgv.Columns["dgvfecha"].ReadOnly = true; Dgv.Columns["dgvvence"].ReadOnly = true; Dgv.Columns["dgvdias"].ReadOnly = true; Dgv.Columns["dgvtotal"].ReadOnly = true; Dgv.Columns["dgvbalance"].ReadOnly = true; Dgv.Columns["dgvsecuencia"].DisplayIndex = 1; Ckbimprimir.Checked = true; Txtregistro.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("NOTA DE CREDITO CXC"); FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(Cmbmoneda, "select idmoneda, abreviatura from gendbfmoneda"); }
private void cxcprochequefuturo_Load(object sender, EventArgs e) { Fun_Set_Nombre_Formulario("Registro de Cheque Futuro", this); BtnModificar.Visible = false; BtnCrear.Visible = false; Txtcodigocliente.Focus(); CheckGrid(); Dgv.Columns[""].Width = 25; Dgv.Columns["dgvsecuencia"].ReadOnly = true; Dgv.Columns["dgvreferencia"].ReadOnly = true; Dgv.Columns["dgvfecha"].ReadOnly = true; Dgv.Columns["dgvvence"].ReadOnly = true; Dgv.Columns["dgvdias"].ReadOnly = true; Dgv.Columns["dgvbalance"].ReadOnly = true; Dgv.Columns["dgvsecuencia"].DisplayIndex = 1; Ckbimprimir.Checked = true; Txtchequefuturo.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("CHEQUE FUTURO"); FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(Cmbmoneda, "select idmoneda, abreviatura from gendbfmoneda"); FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(Cmbbanco, "select idbanco, descripcion from bandbfbanco"); Crear(); }
protected override void Crear() { base.Crear(); Txtchequedevuelto.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("CHEQUE DEVUELTO"); Txtchequedevuelto.Enabled = false; BtnBuscarChequeDevuelto.Visible = false; Txtconcepto.Text = "CHEQUE DEVUELTO"; }
private void Rbncredito_CheckedChanged(object sender, EventArgs e) { if (Rbncredito.Checked) { Txtregistro.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("NOTA DE CREDITO CXC"); FuncionesSQL.Fun_SQL_Buscar_Secuencia_NCF(4, Dtpfecha.Value, Mskncf); } }
protected override void Crear() { base.Crear(); Txtcobro.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("COBRO"); }
protected void Fun_Procesar_Salvar(string cmd2) { Control[] array = { Txtcodigocliente, Txtaplicar, Cmbmoneda }; if (!Funciones.Fun_Validar_Campos_Vacios(array)) { string encabezado = ""; string detalle = ""; string cierre = ""; string xml = ""; double balancecliente = Funciones.Fun_Convierte_String_aDecimal(Txtbalance.Text) - Funciones.Fun_Convierte_String_aDecimal(Txtaplicar.Text); double total = Funciones.Fun_Convierte_String_aDecimal(Txtaplicar.Text) - Funciones.Fun_Convierte_String_aDecimal(Txtcargdesc.Text); encabezado = "<Cobro dfecha = \"" + Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(Dtpfecha) + "\" nidcliente =\"" + Funciones.Fun_Convierte_String_aEntrero(Txtcodigocliente.Text) + "\" creferencia =\"" + Txtreferencia.Text + "\" ntotal =\"" + total + "\" nbalancecliente =\"" + balancecliente + "\" ccomentario =\"" + " " + "\" ntotalcomision =\"" + 0 + "\" ntasamoneda =\"" + tasamoneda + "\" ntotalretencionisr =\"" + Funciones.Fun_Convierte_String_aDecimal(Txttotalretencionisr.Text) + "\" ntotalretencionitbis =\"" + Funciones.Fun_Convierte_String_aDecimal(Txttotalretencionitbis.Text) + "\" ntotalcargo =\"" + Funciones.Fun_Convierte_String_aDecimal(Txttotalcargo.Text) + "\" ntotaldescuento =\"" + Funciones.Fun_Convierte_String_aDecimal(Txttotaldescuento.Text) + "\" nidvendedor =\"" + Funciones.Fun_Convierte_String_aEntrero(Txtcodigovendedor.Text) + "\" nidmoneda =\"" + Cmbmoneda.SelectedValue + "\" nidcierrecaja =\"" + 0 + "\"> <Facturas>"; foreach (DataGridViewRow item in Dgv.Rows) { if (Convert.ToBoolean(item.Cells[""].EditedFormattedValue)) { if (Funciones.Fun_Convierte_String_aDecimal(Convert.ToString(item.Cells["dgvaplicar"].Value)) > 0) { detalle = detalle + "<Factura nidregistro =\"" + Funciones.Fun_Convierte_String_aEntrero(item.Cells["dgvidregistro"].Value + "") + "\" nmonto =\"" + Funciones.Fun_Convierte_String_aDecimal(item.Cells["dgvaplicar"].Value + "") + "\" nmontoretencionisr =\"" + Funciones.Fun_Convierte_String_aDecimal(item.Cells["dgvretencionisr"].Value + "") + "\" nmontoretencionitbis =\"" + Funciones.Fun_Convierte_String_aDecimal(item.Cells["dgvretencionitbis"].Value + "") + "\" ncargo =\"" + Funciones.Fun_Convierte_String_aDecimal(item.Cells["dgvcargo"].Value + "") + "\" ndescuento =\"" + Funciones.Fun_Convierte_String_aDecimal(item.Cells["dgvdescuento"].Value + "") + "\"/>"; } } } cierre = "</Facturas> </Cobro>"; xml = encabezado + detalle + cierre; if (Rbnreciboingreso.Checked) { string cmd = string.Format("exec Spr_cxc_cobro '{0}','{1}','{2}'", Properties.Settings.Default.idsesion, 1, xml); //Armo el comando DataSet ds = FuncionesSQL.Fun_Sql_Ejecutar(cmd); string cmdpago = string.Format("exec Spr_gen_pago '{0}','{1}','{2}','{3}','{4}'", Properties.Settings.Default.idsesion, 1, ds.Tables[1].Rows[0][0].ToString(), Funciones_Duke4.Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(Dtpfecha), cmd2); DataSet ds2 = FuncionesSQL.Fun_Sql_Ejecutar(cmdpago); if (Ckbimprimir.Checked) { var reporte = new Reporte_General.CXC.cxcrepcobro01(); reporte._id = ds.Tables[1].Rows[0][0].ToString(); reporte.Show(); reporte.Owner = this; } } else if (Rbnaplicardeposito.Checked) { string cmd = string.Format("exec Spr_cxc_cobro_deposito '{0}','{1}','{2}'", Properties.Settings.Default.idsesion, 1, xml); //Armo el comando DataSet ds = FuncionesSQL.Fun_Sql_Ejecutar(cmd); if (Ckbimprimir.Checked) { var Reporte = new Reporte_General.CXC.cxcrepcobroadelantadodetalle01(); Reporte._id = ds.Tables[0].Rows[0][0].ToString(); Reporte.Show(); Reporte.Owner = this; } } Funciones.Fun_Limpiar_Formulario(MainPanel); Txtcobro.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("Cobro"); Txtcodigocliente.Enabled = true; Ckbimprimir.Checked = true; LblAlerta.Text = ""; } else { LblAlerta.Text = Mensajes.Stg_Campos_EnBlanco; } }
protected override void Salvar() { base.Salvar(); Control[] array = { Txtcodigocliente, Txtconcepto, Txtcodigovendedor, Txttotal, Cmbmoneda }; double balcli = 0; int tiponota = 0; int idncf = 0; string titulonota = ""; if (Rbncredito.Checked) { tiponota = 1; idncf = 4; titulonota = "NOTA DE CREDITO"; } else if (Rbndebito.Checked) { tiponota = 2; idncf = 3; titulonota = "NOTA DE DEBITO"; } if (!Funciones.Fun_Validar_Campos_Vacios(array)) { if (Funciones.Fun_Convierte_String_aDecimal(Txttotal.Text) > 0) { string encabezado = ""; string detalle = ""; string cierre = ""; string xml = ""; double balancecliente = Funciones.Fun_Convierte_String_aDecimal(Txtbalance.Text) - Funciones.Fun_Convierte_String_aDecimal(Txttotal.Text); encabezado = "<Debcre dfecha = \"" + Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(Dtpfecha) + "\" nidcliente =\"" + Funciones.Fun_Convierte_String_aEntrero(Txtcodigocliente.Text) + "\" creferencia =\"" + Txtreferencia.Text + "\" cconcepto =\"" + Txtconcepto.Text + "\" nitbis =\"" + Funciones_Duke4.Funciones.Fun_Convierte_String_aDecimal(Txtitbis.Text) + "\" ntotal =\"" + Funciones_Duke4.Funciones.Fun_Convierte_String_aDecimal(Txttotal.Text) + "\" nbalancecliente =\"" + balancecliente + "\" nidvendedor =\"" + Funciones.Fun_Convierte_String_aEntrero(Txtcodigovendedor.Text) + "\" cncf =\"" + Mskncf.Text + "\" nidmoneda =\"" + Cmbmoneda.SelectedValue + "\" ntiponota =\"" + tiponota + "\" ngravado =\"" + gravado + "\" nexento =\"" + exento + "\"> <Facturas>"; foreach (DataGridViewRow item in Dgv.Rows) { if (Convert.ToBoolean(item.Cells["dgvcheck"].EditedFormattedValue)) { if (Funciones.Fun_Convierte_String_aDecimal(Convert.ToString(item.Cells["dgvaplicar"].Value)) > 0) { detalle = detalle + "<Factura nidfactura =\"" + Funciones.Fun_Convierte_String_aEntrero(item.Cells["dgvidregistro"].Value + "") + "\" ngravado =\"" + gravado + "\" nexento =\"" + exento + "\" nitbis =\"" + Funciones.Fun_Convierte_String_aDecimal(item.Cells["dgvitbis"].Value + "") + "\" nmonto =\"" + Funciones.Fun_Convierte_String_aDecimal(item.Cells["dgvaplicar"].Value + "") + "\" cncffactura =\"" + item.Cells["dgvncf"].Value + "\"/>"; } } } cierre = "</Facturas> </Debcre>"; xml = encabezado + detalle + cierre; string cmd = string.Format("exec Spr_cxc_Debcre '{0}','{1}','{2}'", Properties.Settings.Default.idsesion, 1, xml); DataSet ds = FuncionesSQL.Fun_Sql_Ejecutar(cmd); if (Ckbncf.Checked == true) { FuncionesSQL.Fun_SQL_Actualizar_NCF(idncf); } if (Ckbimprimir.Checked == true) { var Reporte = new Reporte_General.CXC.cxcrepdebcre01(); if (tiponota == 1) { Reporte._titulonota = "NOTA DE CREDITO"; } else if (tiponota == 2) { Reporte._titulonota = "NOTA DE DEBITO"; } Reporte._id = ds.Tables[1].Rows[0][0].ToString(); Reporte.Show(); Reporte.Owner = this; } Funciones.Fun_Limpiar_Formulario(MainPanel); if (tiponota == 1) { Txtregistro.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("NOTA DE CREDITO CXC"); } else { Txtregistro.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("NOTA DE DEBITO CXC"); } Txtcodigocliente.Enabled = true; Ckbimprimir.Checked = true; Ckbncf.Checked = true; Rbncredito.Checked = true; LblAlerta.Text = ""; } else { if (tiponota == 1) { LblAlerta.Text = "Seleccione Factura a Aplicar Nota de Crédito "; } else if (tiponota == 2) { LblAlerta.Text = "Seleccione Factura a Aplicar Nota de Débito "; } } } else { LblAlerta.Text = Logistica.Mensajes.Stg_Campos_EnBlanco; } }
protected override void Salvar() { base.Salvar(); Control[] array = { Txtcodigocliente, Txtcodigovendedor, Cmbmoneda, Dgv }; if (!Funciones.Fun_Validar_Campos_Vacios(array)) { string encabezado = ""; string detalle = ""; string cierre = ""; string xml = ""; for (int c = 0; c <= Dgv.Rows.Count - 2; c++) { encabezado = "<Registros csecuencia=\"" + FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("REGISTRO CXC") + "\" dfecha=\"" + Convert.ToDateTime(Dgv.Rows[c].Cells["fecha"].Value).ToString("yyyyMMdd") + "\" creferencia=\"" + Convert.ToString(Dgv.Rows[c].Cells["factura"].Value) + "\" nidcliente=\"" + Funciones.Fun_Convierte_String_aEntrero(Txtcodigocliente.Text) + "\" ntotal=\"" + Funciones.Fun_Convierte_String_aDecimal(Txttotal.Text) + "\" nbalance=\"" + Funciones.Fun_Convierte_String_aDecimal(Txttotal.Text) + "\" ntotalitbis=\"" + 0 + "\" ntotalexento=\"" + 0 + "\" ntotalgravado16=\"" + 0 + "\" ntotalgravado18=\"" + 0 + "\" ntotaldescuentoporciento=\"" + 0 + "\" ntotaldescuentomonto=\"" + 0 + "\" ntotalimporte=\"" + Funciones.Fun_Convierte_String_aDecimal(Convert.ToString(Dgv.Rows[c].Cells["monto"].Value)) + "\" dfechavencimiento=\"" + Convert.ToDateTime(Dgv.Rows[c].Cells["fechaven"].Value).ToString("yyyyMMdd") + "\" nidvendedor=\"" + Funciones.Fun_Convierte_String_aEntrero(Txtcodigovendedor.Text) + "\" cncf=\"" + "" + "\" nidcontabilidad=\"" + 0 + "\" nidmoneda=\"" + Cmbmoneda.SelectedValue + "\" ccomentario=\"" + "BALANCE INICIAL" + "\" nbalancecliente =\"" + Funciones.Fun_Convierte_String_aDecimal(Txtbalance.Text) + "\" ntiporegistro =\"" + 3 + "\" ntotalcargo =\"" + 0 + "\" nidbanco =\"" + 0 + "\" nidcuentabancaria =\"" + 0 + "\"> <Facturas>"; detalle = detalle + "<Factura nidconcepto=\"" + 0 + "\" cdescripcion=\"" + "" + "\" ncantidad=\"" + 1 + "\" nprecio=\"" + Funciones.Fun_Convierte_String_aDecimal(Convert.ToString(Dgv.Rows[c].Cells["monto"].Value)) + "\" ndescuentomonto=\"" + 0 + "\" ndescuentoporciento=\"" + 0 + "\" nmontoitbis=\"" + 0 + "\" nmontoexento=\"" + 0 + "\" nmontogravado16=\"" + 0 + "\" nmontogravado18=\"" + 0 + "\" nmontoimporte=\"" + Funciones.Fun_Convierte_String_aDecimal(Convert.ToString(Dgv.Rows[c].Cells["monto"].Value)) + "\" norden=\"" + 1 + "\" nmontocargo=\"" + 0 + "\"/>"; cierre = "</Facturas> </Registros>"; xml = encabezado + detalle + cierre; string cmd = string.Format("exec Spr_cxc_registro '{0}','{1}','{2}','{3}'", "INSERTAR", Properties.Settings.Default.idsesion, 1, xml); //Armo el comando DataSet ds = FuncionesSQL.Fun_Sql_Ejecutar(cmd); } Funciones.Fun_Limpiar_Formulario(MainPanel); LblAlerta.Text = ""; } else { LblAlerta.Text = Mensajes.Stg_Campos_EnBlanco; } }
protected override void Salvar() { base.Salvar(); Control[] array = { Txtchequefuturo, Txtcodigocliente, Txtcodigovendedor, Txtaplicar, Cmbmoneda, Dgv, Txtnock, Dtpfechadeposito, Cmbbanco }; if (!Funciones.Fun_Validar_Campos_Vacios(array)) { string encabezado = ""; string detalle = ""; string cierre = ""; string xml = ""; encabezado = "<ChequesFuturos csecuencia=\"" + Txtchequefuturo.Text + "\" dfecha=\"" + Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(Dtpfecha) + "\" creferencia=\"" + Txtreferencia.Text + "\" nidcliente=\"" + Funciones.Fun_Convierte_String_aEntrero(Txtcodigocliente.Text) + "\" nidvendedor=\"" + Funciones.Fun_Convierte_String_aEntrero(Txtcodigovendedor.Text) + "\" nidbanco=\"" + Cmbbanco.SelectedValue + "\" nnocheque=\"" + Funciones.Fun_Convierte_String_aEntrero(Txtnock.Text) + "\" dfechadeposito=\"" + Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(Dtpfechadeposito) + "\" ntotal=\"" + Funciones.Fun_Convierte_String_aDecimal(Txtaplicar.Text) + "\" nbalancecliente =\"" + Funciones.Fun_Convierte_String_aDecimal(Txtbalance.Text) + "\" nidmoneda=\"" + Cmbmoneda.SelectedValue + "\"> <Facturas>"; foreach (DataGridViewRow item in Dgv.Rows) { if (Convert.ToBoolean(item.Cells[""].EditedFormattedValue)) { if (Funciones.Fun_Convierte_String_aDecimal(Convert.ToString(item.Cells["dgvaplicar"].Value)) > 0) { detalle = detalle + "<Factura nidfactura=\"" + Funciones.Fun_Convierte_String_aEntrero(Convert.ToString(item.Cells["dgvidregistro"].Value)) + "\" nmonto=\"" + Funciones.Fun_Convierte_String_aDecimal(Convert.ToString(item.Cells["dgvaplicar"].Value)) + "\"/>"; } } } cierre = "</Facturas> </ChequesFuturos>"; xml = encabezado + detalle + cierre; string cmd = string.Format("exec Spr_cxc_chequefuturo '{0}','{1}','{2}'", Properties.Settings.Default.idsesion, 1, xml); //Armo el comando DataSet ds = FuncionesSQL.Fun_Sql_Ejecutar(cmd); if (Ckbimprimir.Checked) { var Reporte_ChequeFuturo = new Reporte_General.CXC.cxcrepchequefuturo01(); Reporte_ChequeFuturo._id = ds.Tables[1].Rows[0][0].ToString(); Reporte_ChequeFuturo.Show(); Reporte_ChequeFuturo.Owner = this; } Funciones.Fun_Limpiar_Formulario(MainPanel); Txtchequefuturo.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("CHEQUE FUTURO"); Ckbimprimir.Checked = true; LblAlerta.Text = ""; } else { LblAlerta.Text = Mensajes.Stg_Campos_EnBlanco; } }