Skip to content

Commit

Permalink
trunco monto en el message box de facturacion
Browse files Browse the repository at this point in the history
  • Loading branch information
estebansager committed Dec 10, 2012
1 parent 568eefc commit 2c05c67
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/GrouponDesktop/GUI/FacturarProveedor/FacturacionProveedor.cs
Expand Up @@ -153,12 +153,15 @@ private void Facturar_Click(object sender, EventArgs e)
{
case "1": MessageBox.Show("Ya hay cupones facturados para el intervalo ingresado.");
return;
default: MessageBox.Show("Facturación finalizada con éxito. \n Nro de factura: " + ret + ".\n Monto: $" + (monto*0.5).ToString());

default:

r = dbManager.executeQuery("SELECT c.id_cupon, c.cliente, c.id_promocion, c.fecha_compra, ca.fecha_canje FROM GESTION_DE_PATOS.Cupones c, GESTION_DE_PATOS.Promociones g, GESTION_DE_PATOS.Proveedores p , GESTION_DE_PATOS.Canjes ca WHERE ca.id_cupon = c.id_cupon AND c.id_promocion = g.id_promocion AND g.proveedor = p.username AND p.cuit = \'" + this.proveedores.SelectedItem.ToString() + "\' AND ca.fecha_canje between " + "\'" + this.FechaDesde.Text + "\'" + " and " + "\'" + this.FechaHasta.Text + "\' and not exists (select * from GESTION_DE_PATOS.Cupones_por_factura cpf where cpf.id_cupon = c.id_cupon)");
this.SetDataGridView(r.result);
return;

String elMonto = (monto*0.5).ToString();
MessageBox.Show("Facturación finalizada con éxito. \n Nro de factura: " + ret + ".\n Monto: $" + elMonto.Substring(0,elMonto.IndexOf(",") + 3));
r = dbManager.executeQuery("SELECT c.id_cupon, c.cliente, c.id_promocion, c.fecha_compra, ca.fecha_canje FROM GESTION_DE_PATOS.Cupones c, GESTION_DE_PATOS.Promociones g, GESTION_DE_PATOS.Proveedores p , GESTION_DE_PATOS.Canjes ca WHERE ca.id_cupon = c.id_cupon AND c.id_promocion = g.id_promocion AND g.proveedor = p.username AND p.cuit = \'" + this.proveedores.SelectedItem.ToString() + "\' AND ca.fecha_canje between " + "\'" + this.FechaDesde.Text + "\'" + " and " + "\'" + this.FechaHasta.Text + "\' and not exists (select * from GESTION_DE_PATOS.Cupones_por_factura cpf where cpf.id_cupon = c.id_cupon)");
this.SetDataGridView(r.result);
return;


}

Expand Down

0 comments on commit 2c05c67

Please sign in to comment.