diff --git a/include/admin_repo.inc.php b/include/admin_repo.inc.php index 140a3a4fe..cc4da4a13 100644 --- a/include/admin_repo.inc.php +++ b/include/admin_repo.inc.php @@ -172,6 +172,13 @@ hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #0 } if ( $action == "upgrade" ) { +?> +
+ + + +
+ diff --git a/include/sql/patch/upgrade121.sql b/include/sql/patch/upgrade121.sql index b635b8c06..f0f54b58d 100644 --- a/include/sql/patch/upgrade121.sql +++ b/include/sql/patch/upgrade121.sql @@ -181,10 +181,10 @@ $BODY$ LANGUAGE plpgsql; alter table quant_sold add column qs_unit numeric(20,4) default 0; -update quant_sold set qs_unit = qs_price / qs_quantite; +update quant_sold set qs_unit = qs_price / qs_quantite where qs_quantite <> 0 ; alter table quant_purchase add column qp_unit numeric(20,4) default 0; -update quant_purchase set qp_unit = qp_price / qp_quantite; +update quant_purchase set qp_unit = qp_price / qp_quantite where qp_quantite <> 0; CREATE OR REPLACE FUNCTION comptaproc.insert_quant_sold(p_internal text, p_jid numeric, p_fiche character varying, p_quant numeric, p_price numeric, p_vat numeric, p_vat_code integer, p_client character varying, p_tva_sided numeric, p_price_unit numeric) RETURNS void AS diff --git a/include/upgrade.inc.php b/include/upgrade.inc.php index f6330705d..bb4b23da4 100644 --- a/include/upgrade.inc.php +++ b/include/upgrade.inc.php @@ -29,11 +29,6 @@ if (!defined('ALLOWED')) * @param $rep db connection to central repository */ ?> -
- - - -