[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 08/31: Currency = add a mode currency, possib
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 08/31: Currency = add a mode currency, possible to work without |
Date: |
Sat, 21 Jul 2018 07:47:07 -0400 (EDT) |
sparkyx pushed a commit to annotated tag r700-currency-001
in repository noalyss.
commit 1a09c71eb32b48e512f9009351fd40fc364260a8
Author: Dany De Bontridder <address@hidden>
Date: Sun Apr 22 16:29:14 2018 +0200
Currency = add a mode currency, possible to work without
---
include/acc_currency_cfg.inc.php | 7 ++++++-
include/class/noalyss_parameter_folder.class.php | 1 +
include/company.inc.php | 7 +++++++
sql/upgrade.sql | 5 ++++-
4 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/include/acc_currency_cfg.inc.php b/include/acc_currency_cfg.inc.php
index 1b6d391..c60bb29 100644
--- a/include/acc_currency_cfg.inc.php
+++ b/include/acc_currency_cfg.inc.php
@@ -27,6 +27,12 @@ if (!defined('ALLOWED')) { die('Appel direct ne sont pas
permis'); }
* @example test_currency_mtable.php
*/
+echo '<div class="content">';
+global $g_parameter;
+if ( $g_parameter->MY_CURRENCY=='N'){
+ echo h2info(_("Vous n'utilisez pas les devises , vous devez le configurer
dans COMPANY"));
+ return;
+}
require_once NOALYSS_INCLUDE."/class/currency_mtable.class.php";
require_once NOALYSS_INCLUDE."/lib/manage_table_sql.class.php";
require_once NOALYSS_INCLUDE.'/database/v_currency_last_value_sql.class.php';
@@ -39,7 +45,6 @@ $currency_table=new Currency_MTable($currency);
$currency_table->set_callback("ajax_misc.php");
$currency_table->add_json_param("op", "CurrencyManage");
-echo '<div class="content">';
$currency_table->create_js_script();
$currency_table->display_table();
echo '</div>';
\ No newline at end of file
diff --git a/include/class/noalyss_parameter_folder.class.php
b/include/class/noalyss_parameter_folder.class.php
index 8f78442..31b79b8 100644
--- a/include/class/noalyss_parameter_folder.class.php
+++ b/include/class/noalyss_parameter_folder.class.php
@@ -124,6 +124,7 @@ class Noalyss_Parameter_Folder
$this->save('MY_ALPHANUM');
$this->save('MY_UPDLAB');
$this->save('MY_STOCK');
+ $this->save('MY_CURRENCY');
}
diff --git a/include/company.inc.php b/include/company.inc.php
index c7dcc54..1dfaf3e 100644
--- a/include/company.inc.php
+++ b/include/company.inc.php
@@ -48,6 +48,7 @@ if (isset($_POST['record_company']))
$m->MY_ALPHANUM = $http->post("p_alphanum");
$m->MY_UPDLAB = $http->post("p_updlab");
$m->MY_STOCK =$http->post("p_stock");
+ $m->MY_CURRENCY =$http->post("p_currency");
$m->Update();
}
@@ -111,6 +112,11 @@ $stock->value = array(
$stock->selected = $my->MY_STOCK;
$stock->table = 1;
+$use_currency= new ISelect();
+$use_currency->table = 1;
+$use_currency->value = $updlab_array;
+$use_currency->selected = $my->MY_CURRENCY;
+
// other parameters
$all = new IText();
$all->table = 1;
@@ -137,6 +143,7 @@ echo "<tr>" . td(_("Numéro de Tva"),
'style="text-align:right"') . $all->input(
echo "<tr>" . td(_("Utilisation de la compta. analytique"),
'style="text-align:right"') . $compta->input("p_compta", $array) . "</tr>";
echo "<tr>" . td(_("Utilisation des stocks"), 'style="text-align:right"') .
$stock->input() . "</tr>";
+echo "<tr>" . td(_("Utilisation de devises étrangères"),
'style="text-align:right"') . $use_currency->input("p_currency", $strict_array)
. "</tr>";
echo "<tr>" . td(_("Utilisation du mode strict "), 'style="text-align:right"')
. $strict->input("p_strict", $strict_array) . "</tr>";
echo "<tr>" . td(_("Assujetti à la tva"), 'style="text-align:right"') .
$tva_use->input("p_tva_use", $strict_array) . "</tr>";
echo "<tr>" . td(_("Suggérer le numéro de pièce justificative"),
'style="text-align:right"') . $pj_suggest->input("p_pj", $strict_array) .
"</tr>";
diff --git a/sql/upgrade.sql b/sql/upgrade.sql
index cd61331..b5d6ba8 100644
--- a/sql/upgrade.sql
+++ b/sql/upgrade.sql
@@ -55,4 +55,7 @@ select
from
currency as cr1
join recent_rate on (currency_id=cr1.id)
-join currency_history as ch1 on (recent_rate.currency_id=ch1.currency_id and
rc_from=ch1.ch_from);
\ No newline at end of file
+join currency_history as ch1 on (recent_rate.currency_id=ch1.currency_id and
rc_from=ch1.ch_from);
+
+
+insert into "parameter" values ('MY_CURRENCY','N');
\ No newline at end of file
- [Noalyss-commit] [noalyss] annotated tag r700-currency-001 created (now 7549f83), Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 01/31: create currency SQL tables, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 02/31: Currency : add PHP Class for SQL table, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 11/31: Currency : SQL menu change, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 13/31: indent, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 12/31: Action_Code : add validate, cancel and modify icon, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 08/31: Currency = add a mode currency, possible to work without,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 03/31: Currency : create view + add currency name to table currency, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 05/31: html_page_start : protect query, improve code, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 09/31: Currency : add security for setting, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 17/31: Currency : fix rounded bugs in detail operation, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 10/31: Currency : add SQL constraint + doc, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 23/31: Display the balance difference, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 06/31: Currency : add ajax call to delete one rate , add documentation , remove debug info, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 24/31: Task #448 : rounded value for VEN, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 21/31: Task #448 : issue with reconciliation amount, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 27/31: Task #448 : delete unused currency, Dany De Bontridder, 2018/07/21