[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 277/323: Do not propose disable ledger for ne
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 277/323: Do not propose disable ledger for new operation |
Date: |
Wed, 14 Mar 2018 17:39:04 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 9448b24d4e4c477f5fc4f46581da54cddb9c33d5
Author: Dany De Bontridder <address@hidden>
Date: Mon Feb 26 19:19:11 2018 +0100
Do not propose disable ledger for new operation
---
include/class/acc_ledger.class.php | 12 +++++++-----
include/class/acc_ledger_fin.class.php | 2 +-
include/class/acc_ledger_purchase.class.php | 2 +-
include/class/acc_ledger_sold.class.php | 2 +-
4 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/include/class/acc_ledger.class.php
b/include/class/acc_ledger.class.php
index 43a16b0..6cb8dba 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -483,14 +483,16 @@ class Acc_Ledger extends jrn_def_sql
/**
* @brief Show a select list of the ledgers you can access in
* writing, reading or simply accessing.
- * @param$p_type = ALL or the type of the ledger (ACH,VEN,FIN,ODS)
- * @param$p_access =3 for READ and WRITE, 2 for write and 1 for readonly
+ * @param $p_type = ALL or the type of the ledger (ACH,VEN,FIN,ODS)
+ * @param $p_access =3 for READ and WRITE, 2 for write and 1 for readonly
+ * @param Boolean TRUE all ledger are selected, or FALSE only enable
* \return object HtmlInput select
+ *
*/
- function select_ledger($p_type="ALL", $p_access=3)
+ function select_ledger($p_type="ALL", $p_access=3,$enable=TRUE)
{
global $g_user;
- $array=$g_user->get_ledger($p_type, $p_access);
+ $array=$g_user->get_ledger($p_type, $p_access,$enable);
if ($array==null)
return null;
@@ -765,7 +767,7 @@ class Acc_Ledger extends jrn_def_sql
// Button for adding customer
$add_card=TRUE;
}
- $wLedger=$this->select_ledger('ODS', 2);
+ $wLedger=$this->select_ledger('ODS', 2,FALSE);
if ($wLedger==null)
throw new Exception(_('Pas de journal disponible'));
$wLedger->javascript="onChange='update_name();update_predef(\"ods\",\"t\",\"".$_REQUEST['ac']."\");$add_js'";
diff --git a/include/class/acc_ledger_fin.class.php
b/include/class/acc_ledger_fin.class.php
index ca5da1a..c9ef7d9 100644
--- a/include/class/acc_ledger_fin.class.php
+++ b/include/class/acc_ledger_fin.class.php
@@ -309,7 +309,7 @@ class Acc_Ledger_Fin extends Acc_Ledger
$onchange .= 'update_pj();';
$add_js = 'onchange="'.$onchange.'"';
- $wLedger = $this->select_ledger('FIN', 2);
+ $wLedger = $this->select_ledger('FIN', 2,FALSE);
if ($wLedger == null)
throw new Exception(_('Pas de journal disponible'));
diff --git a/include/class/acc_ledger_purchase.class.php
b/include/class/acc_ledger_purchase.class.php
index 7dfc938..5990d1d 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -1053,7 +1053,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
$add_js.='update_pay_method();';
$add_js.='update_row("sold_item");';
- $wLedger=$this->select_ledger('ACH',2);
+ $wLedger=$this->select_ledger('ACH',2,FALSE);
if ($wLedger == null) throw new Exception(_('Pas de journal
disponible'));
$wLedger->javascript="onChange='update_predef(\"ach\",\"f\",\"".$_REQUEST['ac']."\");$add_js'";
diff --git a/include/class/acc_ledger_sold.class.php
b/include/class/acc_ledger_sold.class.php
index b7e8d53..bfee0b6 100644
--- a/include/class/acc_ledger_sold.class.php
+++ b/include/class/acc_ledger_sold.class.php
@@ -1105,7 +1105,7 @@ EOF;
$add_js.='update_pay_method();';
$add_js.='update_row("sold_item");';
- $wLedger = $this->select_ledger('VEN', 2);
+ $wLedger = $this->select_ledger('VEN', 2,FALSE);
if ($wLedger == null)
throw new Exception(_('Pas de journal disponible'));
$wLedger->table = 1;
- [Noalyss-commit] [noalyss] 238/323: Icon_Action::trash remove unwanted char, (continued)
- [Noalyss-commit] [noalyss] 238/323: Icon_Action::trash remove unwanted char, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 304/323: Task #0001563: Achat mémoriser également 3 champs (suite), Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 321/323: Improve upgradeCore, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 320/323: Bug : Cannot upgrade core, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 241/323: HttpInput::extract fix bug, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 297/323: plugin : add explanation, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 284/323: CSS : box_search_card , hidden if width < 804px, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 232/323: Typo, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 242/323: ajax_card : warning if there is no category of cards, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 322/323: Fix : not reliable, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 277/323: Do not propose disable ledger for new operation,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 187/323: SQL : account_repository, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 278/323: New Favicon, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 282/323: CSS : color in selected cell, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 251/323: InPlaceEdit : cosmetic, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 279/323: Suivi : autres action: box déplacée vers la droite, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 272/323: CSS : change selected cell, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 274/323: COSMETIC : hightlight result, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 295/323: install plugin : cosmétique, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 301/323: Some dialog must be fixed, Dany De Bontridder, 2018/03/14
- [Noalyss-commit] [noalyss] 294/323: Bug : install plugin, Dany De Bontridder, 2018/03/14