[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/01: cosmetic + typo SQL
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/01: cosmetic + typo SQL |
Date: |
Thu, 12 Nov 2015 08:03:41 +0000 |
sparkyx pushed a commit to tag rel6910
in repository noalyss.
commit 2e2ad0bec3576fb5d6843f220fc97506672d634b
Author: Dany De Bontridder <address@hidden>
Date: Thu Nov 12 08:55:54 2015 +0100
cosmetic + typo SQL
---
include/admin_repo.inc.php | 7 +++++++
include/sql/patch/upgrade121.sql | 4 ++--
include/upgrade.inc.php | 5 -----
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/include/admin_repo.inc.php b/include/admin_repo.inc.php
index 140a3a4..cc4da4a 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" ) {
+?>
+ <form method="get" id="frm_upg_all" onsubmit="return
confirm_box('frm_upg_all','<?php echo _('Confirmez')?>')">
+ <input type="hidden" name="sb" value="upg_all">
+ <input type="hidden" name="action" value="upgrade">
+ <input type="submit" class="button" name="submit_upg_all"
id="submit_upg_all" value="<?php echo _('Tout mettre à jour')?>">
+</form>
+<?php
require_once NOALYSS_INCLUDE."/upgrade.inc.php";
}
?>
diff --git a/include/sql/patch/upgrade121.sql b/include/sql/patch/upgrade121.sql
index b635b8c..f0f54b5 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 f633070..bb4b23d 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
*/
?>
-<form method="get" id="frm_upg_all" onsubmit="return
confirm_box('frm_upg_all','<?php echo _('Confirmez')?>')">
- <input type="hidden" name="sb" value="upg_all">
- <input type="hidden" name="action" value="upgrade">
- <input type="submit" class="button" name="submit_upg_all"
id="submit_upg_all" value="<?php echo _('Tout mettre à jour')?>">
-</form>
<?php
$sb= HtmlInput::default_value_get("sb", "none");