[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 156/173: rel8100 Merge branch 'master' into e
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 156/173: rel8100 Merge branch 'master' into entreprise |
Date: |
Mon, 22 Mar 2021 12:59:20 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 3867346d28679b68f6b3934dacaa1bb7f81cc42a
Merge: 66cdd21 f0e5fea
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Mar 12 19:19:00 2021 +0100
rel8100
Merge branch 'master' into entreprise
contrib/mono-dossier/mono-belge.sql | 25 -
contrib/mono-dossier/mono-france.sql | 25 -
doc/developper/Doxyfile | 2 +-
html/ajax.php | 3 +-
html/ajax_misc.php | 85 +-
html/do.php | 50 +-
html/export.php | 1 +
html/extension.raw.php | 2 +-
html/fid.php | 4 +-
html/fid_card.php | 10 +-
html/image/fontello/css/fontello-codes.css | 7 +
html/image/fontello/css/fontello-embedded.css | 23 +-
html/image/fontello/css/fontello-ie7-codes.css | 7 +
html/image/fontello/css/fontello-ie7.css | 7 +
html/image/fontello/css/fontello.css | 23 +-
html/image/fontello/demo.html | 101 +-
html/image/fontello/fontello.eot | Bin 32768 -> 35304 bytes
html/image/fontello/fontello.svg | 16 +-
html/image/fontello/fontello.ttf | Bin 32600 -> 35136 bytes
html/image/fontello/fontello.woff | Bin 20020 -> 21500 bytes
html/image/fontello/fontello.woff2 | Bin 16944 -> 17964 bytes
html/image/logo7400.png | Bin 33498 -> 0 bytes
html/image/logo7400.xcf | Bin 69520 -> 0 bytes
html/image/logo7500.png | Bin 0 -> 33035 bytes
html/image/logo7500.xcf | Bin 0 -> 60829 bytes
html/image/logo8100.png | Bin 0 -> 35588 bytes
html/index.css | 13 +-
html/index.php | 2 +-
html/install.php | 24 +-
html/js/acc_ledger.js | 46 +-
html/js/accounting_item.js | 4 +
html/js/ajax_fiche.js | 2 +-
html/js/card.js | 230 +-
html/js/infobulle.js | 48 +
html/js/managetable.js | 25 +-
html/js/noalyss_checkbox.js | 84 +
html/js/scripts.js | 399 +-
html/js/taggroup.js | 70 +
html/lang/en_US/LC_MESSAGES/messages.po | 2916 +++++++--
html/lang/messages.po | 6880 ++++++++++++++------
html/lang/nl_NL/LC_MESSAGES/messages.po | 3080 +++++++--
html/login.php | 56 +-
html/popup.php | 4 +-
html/recherche.php | 18 +-
html/securimage/securimage.php | 1 +
html/style-classic.css | 104 +
html/style-classic7.css | 314 +-
html/style-light.css | 112 +-
html/test.php | 6 +-
html/user_login.php | 2 +-
include/action.common.inc.php | 121 +-
include/action.inc.php | 16 +-
include/adm.inc.php | 4 +-
include/admin_repo.inc.php | 2 +-
include/ajax/ajax_action_concerned_list.php | 66 +
include/ajax/ajax_action_remove_concerned.php | 25 +-
include/ajax/ajax_action_save_concerned.php | 37 +-
include/ajax/ajax_add_concerned_card.php | 79 +-
include/ajax/ajax_admin.php | 4 +-
include/ajax/ajax_anc_search.php | 4 +-
include/ajax/ajax_auto_anc_card.php | 14 +-
include/ajax/ajax_card.php | 180 +-
include/ajax/ajax_card_attribute.php | 103 +
include/ajax/ajax_cfgaction.php | 84 +
include/ajax/ajax_contact_option_list.php | 67 +
include/ajax/ajax_display_card_option.php | 44 +
include/ajax/ajax_document_state.php | 69 +
include/ajax/ajax_follow_up.php | 62 +
include/ajax/ajax_get_profile.php | 5 +-
include/ajax/ajax_history.php | 2 +-
include/ajax/ajax_ledger.php | 59 +-
include/ajax/ajax_mod_predf_op.php | 17 +-
include/ajax/ajax_navigator.php | 2 +-
include/ajax/ajax_operation_tag.php | 166 +
include/ajax/ajax_preference.php | 51 +-
include/ajax/ajax_save_card_option.php | 58 +
include/ajax/ajax_save_predf_op.php | 85 +-
include/ajax/ajax_search_add_tag.php | 44 +-
include/ajax/ajax_search_clear_tag.php | 4 +-
include/ajax/ajax_search_display_tag.php | 26 +-
include/ajax/ajax_search_filter.php | 43 +-
include/ajax/ajax_search_operation.php | 5 +-
include/ajax/ajax_tag_add_action.php | 21 +-
include/ajax/ajax_tag_detail.php | 22 +-
include/ajax/ajax_tag_group.php | 71 +
include/ajax/ajax_tag_list.php | 12 +-
include/ajax/ajax_tag_remove_action.php | 6 +-
include/ajax/ajax_tag_save.php | 14 +-
include/ajax/ajax_tag_select_search.php | 4 +-
include/ajax/ajax_tag_set_group.php | 77 +
include/ajax/ajax_todo_list.php | 4 +-
include/ajax/ajax_update_predef.php | 10 +-
include/anc_great_ledger.inc.php | 30 +-
include/balance.inc.php | 34 +-
include/bank.inc.php | 2 +-
include/card_attr.inc.php | 150 +-
include/cat_document.inc.php | 90 -
include/category_card.inc.php | 2 +-
include/category_followup.inc.php | 10 +-
...ax_tag_remove_action.php => cfg_action.inc.php} | 42 +-
include/cfgledger.inc.php | 4 +-
include/cfgplugin.inc.php | 2 +-
include/cfgtags.inc.php | 81 +-
include/class/acc_account_ledger.class.php | 2 +-
include/class/acc_bilan.class.php | 11 +-
include/class/acc_ledger.class.php | 57 +-
include/class/acc_ledger_fin.class.php | 23 +-
include/class/acc_ledger_history_generic.class.php | 6 +-
include/class/acc_ledger_purchase.class.php | 13 +-
include/class/acc_ledger_search.class.php | 54 +-
include/class/acc_ledger_sold.class.php | 16 +-
include/class/acc_operation.class.php | 25 +-
.../class/action_document_type_mtable.class.php | 315 +
include/class/anc_grandlivre.class.php | 60 +-
include/class/anc_operation.class.php | 7 +-
include/class/anc_print.class.php | 11 +-
include/class/calendar.class.php | 4 +-
include/class/card_attribut_mtable.class.php | 199 +
include/class/card_multiple.class.php | 165 +
include/class/contact.class.php | 6 +-
include/class/contact_option_ref_mtable.class.php | 50 +
include/class/document.class.php | 1911 +++---
include/class/document_export.class.php | 60 +-
include/class/document_option.class.php | 199 +
include/class/document_state_mtable.php | 58 +
include/class/document_type.class.php | 42 +-
include/class/dossier.class.php | 14 +-
include/class/extension.class.php | 8 +-
include/class/fiche.class.php | 173 +-
include/class/fiche_attr.class.php | 317 +-
include/class/fiche_def.class.php | 26 +-
include/class/follow_up.class.php | 605 +-
include/class/follow_up_detail.class.php | 16 +-
include/class/follow_up_other_concerned.class.php | 224 +
include/class/operation_predef_mtable.class.php | 185 +
include/class/periode.class.php | 1 +
include/class/periode_ledger_table.class.php | 1 +
include/class/pre_op_ach.class.php | 632 +-
include/class/pre_op_advanced.class.php | 114 +-
include/class/pre_op_ods.class.php | 66 +-
include/class/pre_op_ven.class.php | 127 +-
include/class/pre_operation.class.php | 463 +-
include/class/profile_menu.class.php | 3 +-
include/class/stock.class.php | 2 +-
include/class/stock_goods.class.php | 4 +-
include/class/tag.class.php | 67 +-
include/class/tag_action.class.php | 94 +
include/class/tag_group_mtable.class.php | 95 +
include/class/tag_operation.class.php | 199 +
include/class/todo_list.class.php | 8 +-
include/class/user.class.php | 497 +-
include/company.inc.php | 2 +-
include/compta_ach.inc.php | 9 +-
include/compta_fin.inc.php | 37 +-
include/compta_fin_rec.inc.php | 59 +-
include/compta_fin_saldo.inc.php | 4 +-
include/compta_ods.inc.php | 2 +-
include/compta_ven.inc.php | 26 +-
include/config.inc.example | 6 +-
include/constant.php | 20 +-
include/constant.security.php | 1 +
include/contact.inc.php | 7 +-
include/contact_option_ref.inc.php | 58 +
include/customer.inc.php | 2 +-
include/database.item.php | 38 +-
...eriode_sql.class.php => attr_def_sql.class.php} | 39 +-
....class.php => contact_option_ref_sql.class.php} | 37 +-
..._sql.class.php => document_state_sql.class.php} | 35 +-
...e_sql.class.php => document_type_sql.class.php} | 33 +-
include/database/fiche_def_ref_sql.class.php | 2 +-
include/database/jrn_def_sql.class.php | 2 +-
include/database/jrn_periode_sql.class.php | 2 +-
include/database/menu_ref_sql.class.php | 2 +-
...riode_sql.class.php => op_predef_sql.class.php} | 56 +-
include/database/parm_periode_sql.class.php | 2 +-
include/database/payment_method_sql.class.php | 2 +-
include/database/poste_analytique_sql.class.php | 2 +-
...riode_sql.class.php => tag_group_sql.class.php} | 37 +-
include/database/tag_sql.class.php | 2 +
include/database/tva_rate_sql.class.php | 2 +-
include/database/user_filter_sql.class.php | 7 +-
include/database/v_tva_rate_sql.class.php | 2 +-
include/doc_state.inc.php | 48 +-
include/dossier.inc.php | 13 +-
include/export/export_anc_receipt_pdf.php | 5 +-
include/export/export_document.php | 2 +-
include/export/export_fiche_detail_pdf.php | 10 +-
include/export/export_fiche_pdf.php | 19 +-
include/export/export_follow_up_contact_csv.php | 111 +
include/export/export_gl_pdf.php | 6 +-
include/export/export_poste_detail_pdf.php | 5 +-
include/extension_choice.inc.php | 2 +-
include/fiche.inc.php | 4 +-
include/history_operation.inc.php | 26 +-
include/impress_gl_comptes.inc.php | 6 +-
include/impress_jrn.inc.php | 6 +-
include/impress_poste.inc.php | 8 +-
include/lib/ac_common.php | 405 +-
include/lib/config_file.php | 2 +
include/lib/data_sql.class.php | 4 +-
include/lib/database_core.class.php | 20 +-
include/lib/function_javascript.php | 2 +
include/lib/html_input.class.php | 43 +-
include/lib/http_input.class.php | 2 +-
include/lib/icard.class.php | 54 +-
include/lib/icheckbox.class.php | 29 +-
include/lib/icon_action.class.php | 42 +
include/lib/iconcerned.class.php | 98 +-
include/lib/idate.class.php | 105 +-
include/lib/ifile.class.php | 46 +-
include/lib/impress.class.php | 4 +
include/lib/inplace_edit.class.php | 43 +-
include/lib/inplace_switch.class.php | 9 +-
...t_switch.class.php => input_checkbox.class.php} | 53 +-
include/lib/input_switch.class.php | 15 +-
include/lib/iselect.class.php | 6 +-
include/lib/itext.class.php | 28 +-
include/lib/itextarea.class.php | 5 +
include/lib/manage_table_sql.class.php | 154 +-
include/lib/message_javascript.php | 162 +-
include/lib/noalyss_csv.class.php | 6 +-
include/lib/select_box.class.php | 181 +-
include/lib/sort_table.class.php | 2 +-
include/lib/user_common.php | 40 +-
include/manager.inc.php | 2 +-
include/modele.inc.php | 2 +-
include/opening.inc.php | 2 +-
include/operation_ods_confirm.inc.php | 3 +-
include/operation_ods_new.inc.php | 7 +-
include/param_sec.inc.php | 77 +-
include/periode.inc.php | 1 +
include/preod.inc.php | 121 +-
include/sql/account_repository/schema.sql | 1 -
include/sql/mod1/schema.sql | 33 -
include/sql/patch/ac-upgrade18.sql | 7 +
include/sql/patch/upgrade144.sql | 188 +
include/sql/patch/upgrade145.sql | 33 +
include/sql/patch/upgrade146.sql | 7 +
include/sql/patch/upgrade147.sql | 22 +
include/sql/patch/upgrade148.sql | 6 +
include/sql/patch/upgrade149.sql | 6 +
include/sql/patch/upgrade150.sql | 15 +
include/sql/patch/upgrade151.sql | 253 +
include/sql/patch/upgrade152.sql | 7 +
include/supplier.inc.php | 2 +-
include/template/action_button.php | 22 +-
.../template/action_document_type_mtable_input.php | 159 +
include/template/action_other_action.php | 11 +-
include/template/action_search.php | 33 +-
include/template/action_search_result.php | 7 +-
include/template/balance_aged_result.php | 10 +-
include/template/calendar.php | 52 +-
include/template/card_multiple_display_option.php | 120 +
include/template/card_multiple_result.php | 51 +
include/template/card_result.php | 30 +-
include/template/detail-action.php | 382 +-
include/template/document_mod_change.php | 87 -
include/template/fiche_list.php | 9 +-
include/template/folder_display.php | 4 +-
include/template/follow_up_detail_display.php | 209 +
.../follow_up_other_concerned_display_table.php | 71 +
include/template/followup-show-action-add.php | 69 +
include/template/form_ledger_detail.php | 2 +-
include/template/form_ledger_fin.php | 2 +-
include/template/ledger_detail_bottom.php | 39 +-
include/template/ledger_detail_fin.php | 2 +-
include/template/ledger_search.php | 37 +-
include/template/letter_all.php | 2 +-
include/template/letter_prop.php | 2 +-
include/template/menu.php | 110 +-
include/template/modele_document.php | 2 +-
include/template/module.php | 4 +-
include/template/param_jrn.php | 2 +-
include/template/periode_add_exercice.php | 15 +-
.../pre_operation_display.php} | 39 +-
include/template/predf_ledger_detail.php | 9 +-
include/template/security_list_action.php | 3 +-
include/template/tag_detail.php | 27 +-
include/template/tag_list.php | 16 +-
include/template/tag_search_select.php | 62 +-
include/template/tag_select.php | 30 +-
include/template/template_config_form.php | 110 +-
include/template/todo_list_display.php | 2 +-
include/user.inc.php | 2 +
include/user_detail.inc.php | 48 +-
scenario/HtmlInput.test.php | 100 +-
scenario/icon_actionTest.php | 5 +
scenario/inplace_edit.test.php | 10 +-
scenario/select-box-test.php | 66 +-
sql/upgrade.sql | 13 -
unit-test/create-dossier-test.sh | 3 +-
unit-test/global.example.php | 6 +-
unit-test/global.php | 8 +-
unit-test/include/class/acc_ledger.Test.php | 65 +-
unit-test/include/class/acc_ledger_search.Test.php | 2 +-
unit-test/include/class/fiche.Test.php | 34 +-
unit-test/include/lib/ac_common.php | 171 +
297 files changed, 22194 insertions(+), 7645 deletions(-)
diff --cc html/ajax_misc.php
index 62d5713,1286976..8674b22
--- a/html/ajax_misc.php
+++ b/html/ajax_misc.php
@@@ -251,16 -254,32 +254,36 @@@ $path = array
'template_cat_category'=>'ajax_template_cat_category',
// From FollowUp , update a comment on a file
'update_comment_followUp'=>'ajax_follow_up',
+ // Update a follow up's comment
+ 'followup_comment_oneedit'=>'ajax_follow_up',
// TVA param
"tva_parameter"=>"ajax_tva_parameter",
- // Display all cards using an accounting
- "display_all_card"=>"ajax_display_all_card",
+ // Currency , add / remove / update currency
+ "CurrencyManage"=>"ajax_currency",
+ // Currency , delete a rate
+ "CurrencyRateDelete"=>"ajax_currency",
// payment_method
"payment_method"=>"ajax_payment_method",
- // Display all cards using an accounting
- "display_all_card"=>"ajax_display_all_card"
- // update list of predefined operation if ledger changes
++ // Display all cards using an accounting
++ "display_all_card"=>"ajax_display_all_card",
++ // update list of predefined operation if ledger changes
+ "up_predef"=>"ajax_update_predef",
+ // cfgaction type of document
+ "cfgaction"=>'ajax_cfgaction',
+ // list options for multiple contact
+ "contact_option_list"=>'ajax_contact_option_list',
+ // Add group of tags
+ 'tag_group'=>'ajax_tag_group',
+ // set the group for a tag
+ 'tag_set_group'=>"ajax_tag_set_group",
+ // Document_state
+ "document_state"=>"ajax_document_state",
+ // Operations tag add
+ 'operation_tag_add'=>"ajax_operation_tag",
+ // Operations tag remove
+ 'operation_tag_remove'=>"ajax_operation_tag",
+ // Operations tag select
+ 'operation_tag_select'=>"ajax_operation_tag"
) ;
if (array_key_exists($op, $path)) {
diff --cc html/js/scripts.js
index 5070480,8218c27..d6a4a9d
--- a/html/js/scripts.js
+++ b/html/js/scripts.js
@@@ -24,12 -24,28 +24,31 @@@
*
*/
var ask_reload = 0;
- var tag_choose = '';
+ // tag_choose Element which contains all the selected tags
+ var tag_choose = '';
var aDraggableElement = new Array();
-/**
+var viewport = document.viewport.getDimensions(); // Gets the viewport as an
object literal
+var width = viewport.width; // Usable window width
+var height = viewport.height;
-
++ /**
+ * return undefined if nothing is found , otherwise return the DOM elemnt
+ * @param {type} p_name_dom
+ * @param {type} name_child
+ * @returns {undefined}
+ */
+ function in_child(p_element,name_child) {
+ var element=p_element
+ if ( typeof p_element !== "object" ) {
+ element=document.getElementById(p_element);
+
+ }
+ if ( ! element ) return undefined;
+ for ( var e=0; e < element.childElementCount;e++) {
+ if ( element.childNodes[e].id == name_child) {
+ return element.childNodes[e];
+ }
+ }
+ }
/**
* callback function when we just need to update a hidden div with an info
* message
diff --cc include/class/acc_ledger_fin.class.php
index 654c462,1aea14b..50a1bc1
--- a/include/class/acc_ledger_fin.class.php
+++ b/include/class/acc_ledger_fin.class.php
@@@ -475,9 -483,9 +482,9 @@@ class Acc_Ledger_Fin extends Acc_Ledge
list ($l_date_start, $l_date_end) = $pPeriode->get_date_limit();
$exercice = $pPeriode->get_exercice();
$r.='';
- $r.='<fieldset><legend>Banque, caisse </legend>';
+ $r.='<fieldset><legend>'._("Banque, caisse").' </legend>';
$r.= '<div id="jrn_name_div">';
- $r.='<h2 id="jrn_name" style="display:inline">' .
$this->get_name() . '</h2>';
+ $r.='<h1 id="jrn_name" style="display:inline">' .
$this->get_name() . '</h1>';
$r.= '</div>';
$r.='<TABLE width="100%">';
// Date
@@@ -628,70 -636,26 +635,70 @@@
$r.='</TR>';
}
$r.="</TABLE>";
-
- // saldo
- $r.="<table>";
- $r.=tr(
- td(_("Ancien solde")).
- td(nbm($solde),'class="num"')
- );
- $new_solde+=$tot_amount;
- $r.=tr(
- td(_("Nouveau solde")).
- td(nbm($new_solde),' class="num"')
- );
- $r.=tr(
- td(_("Difference")).
- td(nbm($tot_amount),' class="num"')
- );
- $r.='</table>';
+ $acc_currency=$this->get_currency();
+
+ // If currency is not the default one
+ if ( $acc_currency->get_id() != 0)
+ {
+
+ $solde=$fBank->get_bk_balance_currency();
+ $cur=$acc_currency->get_code();
+ $cur_rate=$acc_currency->get_rate_date($e_date);
+ $default_currency=new Acc_Currency($this->db , 0);
+ // saldo
+ $r .= "<table>";
+ $r .= tr(
+ td(_("Ancien solde")) .
+ td(nbm($solde).$cur, 'class="num"')
+ );
+ $new_solde=bcadd($solde,$tot_amount);
+ $r .= tr(
+ td(_("Nouveau solde")) .
+ td(nbm($new_solde).$cur, ' class="num"')
+ );
+ $r .= tr(
+ td(_("Difference")) .
+ td(nbm($tot_amount).$cur, ' class="num"')
+ );
+ $r.=tr(
+ td(_("Taux")).
+ td($cur_rate)
+ );
+ $r.=tr(
+ td(_("Nouveau solde")).
+
td(bcdiv($new_solde,$cur_rate).$default_currency->get_code(), ' class="num"')
+ );
+ $r.='</table>';
+
+
+
+
+ } else {
+
+ $cur=$acc_currency->get_code();
+ // saldo
+ $r .= "<table>";
+ $r .= tr(
+ td(_("Ancien solde")) .
+ td(nbm($solde).$cur, 'class="num"')
+ );
+ $new_solde=bcadd($solde,$tot_amount);
+ $r .= tr(
+ td(_("Nouveau solde")) .
+ td(nbm($new_solde).$cur, ' class="num"')
+ );
+ $r .= tr(
+ td(_("Difference")) .
+ td(nbm($tot_amount).$cur, ' class="num"')
+ );
+
+ $r.='</table>';
+
+
+ }
// check for upload piece
$file = new IFile();
-
+ $file->setAlertOnSize(true);
$r.="<br>"._("Ajoutez une pièce justificative")." ";
$r.=$file->input("pj", "");
diff --cc include/class/acc_operation.class.php
index 999ae98,e2bdaf8..9b0ae6c
--- a/include/class/acc_operation.class.php
+++ b/include/class/acc_operation.class.php
@@@ -63,9 -60,7 +63,10 @@@ class Acc_Operatio
$this->periode=$g_user->get_periode();
$this->jr_id=0;
$this->jr_optype="NOR";
+ $this->amount=0;
+ $this->currency_rate=1;
+ $this->currency_rate_ref=1;
+ $this->currency_id=NULL;
}
/**
*@brief retrieve the grpt_id from jrn for a jr_id
@@@ -298,20 -289,18 +300,22 @@@
{
$this->mt=microtime(true);
}
+
// if amount == -1then the triggers will throw an error
//
+
$this->amount=(trim($this->amount)==''||$this->amount==NULL)?0:$this->amount;
$Res=$this->db->exec_sql("insert into jrn
(jr_def_id,jr_montant,jr_comment,".
-
"jr_date,jr_ech,jr_grpt_id,jr_tech_per,jr_mt,jr_optype) values (".
+
"jr_date,jr_ech,jr_grpt_id,jr_tech_per,jr_mt,jr_optype,currency_id,currency_rate,currency_rate_ref)
values (".
"$1,$2,$3,".
-
"to_date($4,'DD.MM.YYYY'),to_date($5,'DD.MM.YYYY'),$6,$7,$8,$9)",
+
"to_date($4,'DD.MM.YYYY'),to_date($5,'DD.MM.YYYY'),$6,$7,$8,$9,$10,$11,$12)",
array ($this->jrn, $this->amount,$p_comment,
-
$this->date,$echeance,$this->grpt,$this->periode,$this->mt,$this->jr_optype)
+
$this->date,$echeance,$this->grpt,$this->periode,$this->mt,$this->jr_optype,
+
$this->currency_id,$this->currency_rate,$this->currency_rate_ref)
);
- if ( $Res == false) return false;
+ if ($Res==FALSE)
+ {
+ return FALSE;
+ }
$this->jr_id=$this->db->get_current_seq('s_jrn');
return $this->jr_id;
}
diff --cc include/class/anc_operation.class.php
index fcba66a,35b8f4e..d28f395
--- a/include/class/anc_operation.class.php
+++ b/include/class/anc_operation.class.php
@@@ -732,10 -710,11 +732,13 @@@ class Anc_Operatio
$op->po_id=$hplan[$p_item][$e];
$op->oa_group=$this->oa_group;
$op->j_id=$p_j_id;
- $ratio=bcdiv($val[$p_item][$row],${"amount_t".$p_item});
+ $ratio=0;
+ if (${"amount_t".$p_item} != 0 ) {
+ $ratio=bcdiv($val[$p_item][$row],${"amount_t".$p_item});
+ }
$amount= bcmul($p_nd, $ratio);
+ // convert to euro
+ $amount=bcmul($amount,$this->currency_rate);
$op->oa_amount=round($amount,2);
$op->oa_debit=$this->oa_debit;
$op->oa_date=$this->oa_date;
diff --cc include/class/fiche.class.php
index 734226e,7c12578..7ebd55b
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@@ -29,7 -29,7 +29,8 @@@ require_once NOALYSS_INCLUDE.'/class/fi
require_once NOALYSS_INCLUDE.'/lib/iposte.class.php';
require_once NOALYSS_INCLUDE.'/class/acc_operation.class.php';
require_once NOALYSS_INCLUDE.'/class/acc_account.class.php';
+ require_once NOALYSS_INCLUDE."/lib/input_switch.class.php";
+require_once NOALYSS_INCLUDE.'/class/acc_ledger_fin.class.php';
/*! \file
* \brief define Class fiche, this class are using
diff --cc include/company.inc.php
index 33eb402,0f585a4..85de93e
--- a/include/company.inc.php
+++ b/include/company.inc.php
@@@ -48,12 -48,9 +48,12 @@@ 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->MY_ANC_FILTER=$http->post("p_anc_filter");
+ try{
- $m->Update();
+ $m->update();
} catch (Exception $e) {
alert($e->getMessage());
}
diff --cc include/compta_fin.inc.php
index 66d1eea,c9730f8..9501143
--- a/include/compta_fin.inc.php
+++ b/include/compta_fin.inc.php
@@@ -40,23 -39,22 +39,23 @@@ $Ledger=new Acc_Ledger_Fin($cn,0)
// Encode a new financial operation
//--------------------------------------------------------------------------------
- if ( $ledger_id == 0)
-if ( isset($_REQUEST['p_jrn']))
++if ( isset($_REQUEST['p_jrn'] ) )
{
- $Ledger=new Acc_Ledger_Fin($cn,0);
- $def_ledger=$Ledger->get_first('fin');
+ $Ledger->id=$http->request('p_jrn',"number");
+ }
+ else
+ {
- $def_ledger=$Ledger->get_first('fin');
- if ( empty ($def_ledger))
- {
- exit(_('Pas de journal disponible'));
- }
- $Ledger->id=$def_ledger['jrn_def_id'];
++ $def_ledger=$Ledger->get_first('fin');
+ if ( empty ($def_ledger))
+ {
+ exit(_('Pas de journal disponible'));
+ }
- $ledger_id=$def_ledger['jrn_def_id'];
++ $Ledger->id=$def_ledger['jrn_def_id'];
}
+
- $Ledger=new Acc_Ledger_Fin($cn,$ledger_id);
- $Ledger->load();
-
$jrn_priv=$g_user->get_ledger_access($Ledger->id);
// Check privilege
-if ( isset($_REQUEST['p_jrn']) && ( $jrn_priv == 'X'))
+if ( $jrn_priv == 'X')
{
NoAccess();
exit -1;
@@@ -163,4 -163,4 +164,4 @@@ tr
} catch (Exception $ex) {
echo $ex->getMessage();
}
--return;
++return;
diff --cc include/lib/function_javascript.php
index f8487f4,846adcd..0b8ce6c
--- a/include/lib/function_javascript.php
+++ b/include/lib/function_javascript.php
@@@ -2782,8 -2782,10 +2782,10 @@@ function load_all_script(
echo js_include('sorttable.js');
echo js_include('nicEdit.js');
echo js_include('managetable.js');
+ echo js_include('acc_currency.js');
+ echo js_include('taggroup.js');
+ echo js_include('noalyss_checkbox.js');
-
}
/**
* Send header and json object
diff --cc include/lib/manage_table_sql.class.php
index 67b5835,2b56a3e..b42db73
--- a/include/lib/manage_table_sql.class.php
+++ b/include/lib/manage_table_sql.class.php
@@@ -834,13 -939,14 +941,13 @@@ function check(
}
}
- if ( ! $found) {
+ if (!$found)
+ {
echo td("--");
-
}
-
} elseif ($this->get_col_type($v)=="custom") {
// For custom col
- echo td($this->display_row_custom($v,$p_row[$v]));
+ echo td($this->display_row_custom($v,$p_row[$v],$pk_id));
}
else {
echo td($p_row[$v]);
diff --cc include/template/form_ledger_detail.php
index d555b97,8af1f56..84bbf05
--- a/include/template/form_ledger_detail.php
+++ b/include/template/form_ledger_detail.php
@@@ -1,10 -1,9 +1,10 @@@
<?php
//This file is part of NOALYSS and is under GPL
//see licence.txt
+
?>
<div id="jrn_name_div">
- <h2 id="jrn_name"> <?php echo $this->get_name()?></h2>
+ <h1 id="jrn_name"> <?php echo $this->get_name()?></h1>
</div>
<table>
<tr>
- [Noalyss-commit] [noalyss] 124/173: Merge branch 'v7110-stable' into entreprise, (continued)
- [Noalyss-commit] [noalyss] 124/173: Merge branch 'v7110-stable' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 122/173: test : use the accounting with the biggest number of records, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 127/173: Merge branch 'dev7112' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 133/173: Test Acc_Account, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 136/173: Bug database.class.php : n'applique pas le patch, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 143/173: Merge commit '57309561191906d4099c8db08b7fa737f7c8e1e0' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 144/173: Merge commit 'b8fafe1f2b705272b9e3853a8a791200fb718fa6' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 148/173: Merge branch 'dev7400-1' into next-release-8, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 149/173: Merge branch 'enterprise' into entreprise, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 155/173: Merge branch 'master' into dev-8-bootstrap, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 156/173: rel8100 Merge branch 'master' into entreprise,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 157/173: Merge branch 'dev-8-bug-saldo-not-checked', Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 161/173: Move CSS and start to integrate BootStrap, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 163/173: Move CSS and start to integrate BootStrap Add fonts, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 165/173: Currency : adapt test, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 166/173: BootStrap : set up + move CSS and font to their own folders, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 167/173: Task 0001912: Developpement DEBUG new system with level, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 168/173: Task #1911: FOLLOW : télécharger toutes les documents en une fois, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 153/173: Improve scenario test, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 158/173: Merge branch 'dev8001', Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 172/173: Erreur : fiche_attr , first param is a DatabaseCore object, Dany De Bontridder, 2021/03/22