2008-08-19  Jonathan Gonzalez V.  <zeus@gnu.org>

	* funciones.sql (ranking_ventas): Added the condition to avoid all
	the sales that are null.

2008-08-18  Jonathan Gonzalez V.  <zeus@gnu.org>

	* funciones.sql (calculate_fifo): Added function to calculate the average cost.

2008-08-07  Jonathan Gonzalez V.  <zeus@gnu.org>

	* funciones.sql (cash_box_report): Fixed bug that wasn't
	considering all the sells when ask for the cash box report and the
	cash box wasn't closed.
	(cash_box_report): Added payed cash to the list of thing to show
	on cash report.

2008-08-06  Jonathan Gonzalez V.  <zeus@gnu.org>

	* funciones.sql (get_sale_detail): Added function to get the
	detail of a specified sell, this aim to help the nullify process.
	(nullify_sale): Fixed to add the proper stock to the product list.

	* rizoma.structure: Removed id_detail column since we will not use
	it anymore.

	* funciones.sql (trg_tasks_delete): Added to handle a trigger on
	impuesto table.
	(insert_impuesto): Modified to deal with the new table.
	(nullify_sale): Modified function to add an egress when a sell is
	nullified. Now we mark all the sell as nullified and not just a detail.

2008-07-29  Jonathan Gonzalez V.  <zeus@lunareja.lunareja>

	* funciones.sql (cash_box_report): Added function to return a cash
	box report.

2008-07-28  Jonathan Gonzalez V.  <zeus@lunareja.lunareja>

	* funciones.sql (ranking_ventas): Fixed problem that produce an
	error when try to calculate the total sold amount.

2008-07-27  Jonathan Gonzalez V.  <zeus@gnu.org>

	* funciones.sql (ranking_ventas): Fixed to return a proper rank
	with a proportional discount if the sell has a discount.

2008-07-08  Jonathan Gonzalez V.  <zeus@gnu.org>

	* funciones.sql (informacion_producto): We check even if days it's
	0 because we need to avoid any division by zero.

2008-07-07  Jonathan Gonzalez V.  <zeus@gnu.org>

	* funciones.sql (is_caja_abierta): If current_caja is NULL then we
	just return FALSE.

2008-07-02  Jonathan Gonzalez V.  <zeus@gnu.org>

	* funciones.sql (informacion_producto_venta): Added function.

2008-07-01  Jonathan Gonzalez V.  <zeus@gnu.org>

	* rizoma.structure: Deleted some trash lines. Added drop if exists
	and cascade to the drop tables sentences.

2008-06-16  Jonathan Gonzalez V.  <zeus@gnu.org>

	* funciones.sql (get_guide_detail): Changed query to use
	guis_compra_detalle instead of documentos_detalle.
	(guide_invoice): Bug Fix.

2008-06-15  Jonathan Gonzalez V.  <zeus@gnu.org>

	* funciones.sql (get_invoice_detail): Added funciton get an
	invoice detail.

2008-06-11  Jonathan Gonzalez V.  <zeus@gnu.org>

	* funciones.sql (get_guide_detail): Added function to get the
	detail of a guide.

2008-03-29  Jonathan Gonzalez V.  <zeus@gnu.org>

	* funciones.sql (buscar_producto): Added quote_literal to
	expresion and drop the % on search.

2006-04-14  Jonathan Gonzalez V.  <zeus@gnu.org>

	* rizoma.structure: Replaced the integer type of compras and
	ventas table for bigint so we can manage a very big integer as a
	total.

