[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 218/218: Merge branch 'dev7109' into entrepri
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 218/218: Merge branch 'dev7109' into entreprise |
Date: |
Thu, 12 Sep 2019 15:59:13 -0400 (EDT) |
sparkyx pushed a commit to branch entreprise
in repository noalyss.
commit 0030779e71e909d8fe3209c1c5dfa20be41f6414
Merge: 19e5d9f 1c6b973
Author: Dany De Bontridder <address@hidden>
Date: Thu Sep 12 21:57:47 2019 +0200
Merge branch 'dev7109' into entreprise
# Conflicts:
# html/install.php
# include/class/acc_ledger.class.php
# include/class/noalyss_parameter_folder.class.php
# include/company.inc.php
doc/developper/Doxyfile | 4 +-
html/ajax_misc.php | 2 +
html/extension.raw.php | 4 +-
html/install.php | 23 ++-
html/js/acc_ledger.js | 2 +-
html/js/anc_script.js | 49 ++++++
html/js/scripts.js | 2 +-
include/adm.inc.php | 6 +-
include/ajax/ajax_anc_key_clean.php | 76 +++++++++
include/ajax/ajax_anc_search.php | 17 +-
include/ajax/ajax_periode.php | 32 +---
include/ajax/ajax_preference.php | 3 +
include/ajax/ajax_template_cat_category.php | 3 +-
include/anc_pa.inc.php | 4 +-
include/bank.inc.php | 13 +-
include/class/acc_ledger.class.php | 18 +-
include/class/acc_ledger_fin.class.php | 2 +-
include/class/acc_ledger_purchase.class.php | 2 +-
include/class/acc_ledger_search.class.php | 20 ++-
include/class/acc_ledger_sold.class.php | 5 +-
include/class/anc_group_operation.class.php | 1 +
include/class/anc_key.class.php | 1 +
include/class/anc_operation.class.php | 16 ++
include/class/anc_plan.class.php | 1 +
include/class/document.class.php | 3 +
include/class/fiche.class.php | 4 +-
include/class/noalyss_parameter_folder.class.php | 93 ++++++++---
include/class/payment_method_mtable.class.php | 15 +-
include/class/periode_ledger_table.class.php | 2 +-
include/class/prepared_query.class.php | 1 +
include/class/print_ledger_detail_item.class.php | 2 +
include/class/template_card_category.class.php | 9 +-
include/company.inc.php | 17 +-
include/compta_ach.inc.php | 2 +-
include/constant.php | 2 +-
include/contact.inc.php | 23 +--
include/customer.inc.php | 13 +-
include/export/export_form_csv.php | 4 +-
include/history_operation.inc.php | 24 ++-
include/lib/data_sql.class.php | 91 +++++++++-
include/lib/database_core.class.php | 8 +
include/lib/icon_action.class.php | 39 ++++-
include/lib/noalyss_sql.class.php | 46 ++++--
include/lib/pdf_core.class.php | 35 +++-
include/manager.inc.php | 14 +-
include/periode.inc.php | 11 +-
include/sql/patch/upgrade137.sql | 6 +
include/supplier.inc.php | 19 ++-
include/template/fiche_def_input.php | 6 +-
include/template/ledger_detail_ach.php | 2 +-
include/template/ledger_detail_bottom.php | 4 +-
include/template/ledger_detail_fin.php | 2 +-
include/template/ledger_detail_misc.php | 2 +-
include/template/ledger_detail_ven.php | 2 +-
include/template/letter_all.php | 2 +-
include/template/param_jrn.php | 1 +
include/verif_bilan.inc.php | 2 -
scenario/icon_actionTest.php | 6 +
.../class/noalyss_parameter_folderTest.class.php | 183 +++++++++++++++++++++
59 files changed, 804 insertions(+), 197 deletions(-)
diff --cc html/install.php
index e82a329,2c4248f..191209e
--- a/html/install.php
+++ b/html/install.php
@@@ -212,8 -225,8 +225,8 @@@ if (isset($_POST['save_config']))
if ( $cnx !== false ) {
echo '<h1>'._('Important').'</h1>';
echo '<h2 class="warning">',_("Voici l'utilisateur et mot de passe de
l'utilisateur administrateur de Noalyss , il a tous les droits et a accès à
tout."
- . " Connectez-vous avec ses identifiants et changer le mot de
passe dans préférence (en haut à droit)"),
+ . " Connectez-vous avec ses identifiants et changer le mot de
passe dans préférence (en haut à droite)"),
- "</h2>";
+ "</h2>";
echo '<p style="font-size:120%">'._('Utilisateur administrateur'),'
','<span style="color:red"> ',$cadmin,'</span>','</p>';
echo '<p style="font-size:120%">',_('Mot de passe'),'<span
style="color:red"> phpcompta </span>','</p>';
// Create the db
diff --cc include/class/acc_ledger.class.php
index ba433ec,e1942a8..bfb8f0f
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@@ -2582,9 -2393,8 +2584,9 @@@ class Acc_Ledger extends jrn_def_sq
$this->jrn_deb_max_line=($min_row<1)?1:$min_row;
$this->jrn_def_description=$p_description;
$this->jrn_enable=$jrn_enable;
+ $this->currency_id=0;
- $this->jrn_def_negative_amount=$negative_amount;
- $this->jrn_def_negative_warning=$negative_warning;
+
$this->jrn_def_negative_amount=(isset($negative_amount))?$negative_amount:'0';
+ $this->jrn_def_negative_warning=(isset
($negative_warning))?$negative_warning:_("Attention, ce journal doit utiliser
des montants négatifs");
switch ($this->jrn_def_type)
{
diff --cc include/class/acc_ledger_sold.class.php
index 7353421,8a6ff3e..bb94f91
--- a/include/class/acc_ledger_sold.class.php
+++ b/include/class/acc_ledger_sold.class.php
@@@ -401,10 -364,9 +401,10 @@@ class Acc_Ledger_Sold extends Acc_Ledge
}
- if ($g_parameter->MY_ANALYTIC != "nu") {
+ if ($g_parameter->MY_ANALYTIC != "nu" &&
$g_parameter->match_analytic($poste_val)) {
// for each item, insert into operation_analytique */
$op = new Anc_Operation($this->db);
+ $op->set_currency_rate($p_currency_rate);
$op->oa_group = $group;
$op->j_id = $j_id;
$op->oa_date = $e_date;
diff --cc include/class/noalyss_parameter_folder.class.php
index 4d32dd5,a9db097..345184c
--- a/include/class/noalyss_parameter_folder.class.php
+++ b/include/class/noalyss_parameter_folder.class.php
@@@ -45,8 -45,7 +45,11 @@@ class Noalyss_Parameter_Folde
var $MY_ALPHANUM;
var $MY_UPDLAB;
var $MY_STOCK;
+ var $MY_DEFAULT_ROUND_ERROR_DEB;
+ var $MY_DEFAULT_ROUND_ERROR_CRED;
+ var $MY_ANC_FILTER;
++ var $MY_CURRENCY;
++
// constructor
function __construct($p_cn)
@@@ -126,10 -166,19 +170,21 @@@
$this->save('MY_ALPHANUM');
$this->save('MY_UPDLAB');
$this->save('MY_STOCK');
+ $this->save('MY_DEFAULT_ROUND_ERROR_DEB');
+ $this->save('MY_DEFAULT_ROUND_ERROR_CRED');
+ $this->save("MY_ANC_FILTER");
-
+ }
+ /**
+ * Check if an accounting match the anc_filter
+ * @param string $p_accounting
+ * @return boolean FALSE does not match , TRUE matches
+ */
+ function match_analytic($p_accounting)
+ {
+ $string="/^[".$this->MY_ANC_FILTER."]+/";
+ if ( preg_match($string,$p_accounting) == 0 ) return FALSE;
+ return TRUE;
}
}
diff --cc include/company.inc.php
index f433c31,2bd6ae2..33eb402
--- a/include/company.inc.php
+++ b/include/company.inc.php
@@@ -48,10 -48,12 +48,15 @@@ 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_ANC_FILTER=$http->post("p_anc_filter");
- try {
+ $m->MY_CURRENCY =$http->post("p_currency");
+ $m->MY_DEFAULT_ROUND_ERROR_DEB=$http->post("p_round_error_deb");
+ $m->MY_DEFAULT_ROUND_ERROR_CRED=$http->post("p_round_error_cred");
- $m->Update();
++ $m->MY_ANC_FILTER=$http->post("p_anc_filter");
++ try{
+ $m->Update();
+ } catch (Exception $e) {
+ alert($e->getMessage());
+ }
}
$my = new Noalyss_Parameter_Folder($cn);
@@@ -113,23 -115,10 +118,27 @@@ $stock->value = array
$stock->selected = $my->MY_STOCK;
$stock->table = 1;
+ $anc_filter=new IText("p_anc_filter", $my->MY_ANC_FILTER);
+ $anc_filter->placeholder='6,7';
+ $anc_filter->title=_("Uniquement des chiffres séparés par des virgules");
+
+$use_currency= new ISelect();
+$use_currency->table = 1;
+$use_currency->value = $updlab_array;
+$use_currency->selected = $my->MY_CURRENCY;
+
+$default_error_deb=new
IPoste("p_round_error_deb",$my->MY_DEFAULT_ROUND_ERROR_DEB);
+$default_error_deb->name = 'p_round_error_deb';
+$default_error_deb->set_attribute('gDossier',Dossier::id());
+$default_error_deb->set_attribute('jrn',0);
+$default_error_deb->set_attribute('account','p_round_error_deb');
+
+$default_error_cred=new
IPoste("p_round_error_deb",$my->MY_DEFAULT_ROUND_ERROR_CRED);
+$default_error_cred->name = 'p_round_error_cred';
+$default_error_cred->set_attribute('gDossier',Dossier::id());
+$default_error_cred->set_attribute('jrn',0);
+$default_error_cred->set_attribute('account','p_round_error_cred');
+
// other parameters
$all = new IText();
$all->table = 1;
@@@ -154,9 -143,14 +163,15 @@@ echo "<tr>" . td(_("Pays"), 'style="tex
$all->value = '';
echo "<tr>" . td(_("Numéro de Tva"), 'style="text-align:right"') .
$all->input("p_tva", $my->MY_TVA) . "</tr>";
echo "<tr>" . td(_("Utilisation de la compta. analytique"),
'style="text-align:right"') . $compta->input("p_compta", $array) . "</tr>";
+ echo '<tr>'. td(_("Opération analytique uniquement pour les postes comptables
commençant par")).
+ '<td>'.
+ $anc_filter->input().
+ Icon_Action::tips($anc_filter->title);
+ '</td>'.
+ '</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 --cc include/template/ledger_detail_misc.php
index fa82e72,eb00e11..e48be4c
--- a/include/template/ledger_detail_misc.php
+++ b/include/template/ledger_detail_misc.php
@@@ -159,17 -159,9 +159,17 @@@ $amount_idx=0; $sum_prod_currency=0
$montant=td(nbm($q[$e]['j_montant']),'class="num"');
$row.=($q[$e]['j_debit']=='t')?$montant:td('');
$row.=($q[$e]['j_debit']=='f')?$montant:td('');
+ /*
+ * Compute total in currency if not default one
+ */
+ if ( $obj->det->currency_id != 0 && $q[$e]['j_debit']=='f' ) {
+ $value=$obj->db->get_value("select oc_amount+oc_vat_amount from
operation_currency where j_id=$1",[$q[$e]['j_id']]);
+ $sum_prod_currency=bcadd($sum_prod_currency,$value,2);
+
+ }
/* Analytic accountancy */
if ( $owner->MY_ANALYTIC != "nu" /*&& $div=='popup'*/){
- if ( preg_match('/^(6|7)/',$q[$e]['j_poste'])) {
+ if ( $g_parameter->match_analytic($q[$e]['j_poste'])) {
echo HtmlInput::hidden("amount_t".$amount_idx,$q[$e]['j_montant']);
$anc_op=new Anc_Operation($cn);
- [Noalyss-commit] [noalyss] 193/218: Php7.2 incompatibility, (continued)
- [Noalyss-commit] [noalyss] 193/218: Php7.2 incompatibility, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 197/218: translation, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 192/218: Mantis #0001618: Journaux - choix du type en premier, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 183/218: Fix bug from merge, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 195/218: mantis #1690: Bug : impossible d'utiliser < dans Inplace_Edit Replace strip_tags , add a space before the "<", Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 196/218: Mantis #1693: CA - problème avec la balance croisée double, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 206/218: Cosmetic, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 203/218: Merge branch 'dev7109' into entreprise, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 207/218: #0001736: PHP7 comptability, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 214/218: Bug : for customer without vat, there is not variable e_march_x_tva, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 218/218: Merge branch 'dev7109' into entreprise,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 180/218: Mantis #0001614: Problème bilans , changement pour bilan ASBL, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 190/218: translate, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 81/218: adapt to 7.2 , error with sizeof, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 204/218: Cosmetic, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 208/218: #0001736: PHP7 comptability, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 213/218: Code cleaning : remove dead code, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 201/218: Merge branch 'dev7109' into entreprise, Dany De Bontridder, 2019/09/12