[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 19/46: Task #0001704: Faciliter l'ajout de pl
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 19/46: Task #0001704: Faciliter l'ajout de plusieurs lignes |
Date: |
Mon, 4 May 2020 13:38:47 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 5bd1ed9373638386e2ce079f43852bf7d9849015
Author: Dany De Bontridder <address@hidden>
AuthorDate: Mon Mar 2 20:39:15 2020 +0100
Task #0001704: Faciliter l'ajout de plusieurs lignes
---
html/js/acc_ledger.js | 16 ++++++++++++++++
include/class/acc_ledger.class.php | 1 +
include/class/acc_ledger_purchase.class.php | 2 +-
include/class/acc_ledger_sold.class.php | 3 +--
include/class/pre_op_advanced.class.php | 1 +
include/class/pre_op_ven.class.php | 2 +-
include/compta_fin.inc.php | 2 +-
include/operation_ods_new.inc.php | 2 +-
8 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js
index d6b2882..f236bf3 100644
--- a/html/js/acc_ledger.js
+++ b/html/js/acc_ledger.js
@@ -345,6 +345,22 @@ function ledger_fin_add_row()
}
/**
+ * Add multiple row
+ * @param p_numrow
+ */
+function ledger_add_multiple(p_elid)
+{
+ var nbrow=$(p_elid).value;
+ if (nbrow == NaN) {nbrow=1;}
+ var type_ledger=$(p_elid+"_ledger").value;
+ var i=0;
+ for (i=0;i<nbrow;i++) {
+ if ( type_ledger == 'O' ) {ledger_add_row();}
+ if ( type_ledger == 'F') { ledger_fin_add_row();}
+ if ( type_ledger == 'M') { quick_writing_add_row();}
+ }
+}
+/**
* add a line in the form for the purchase ledger
* @param p_dossier folder id
* @param p_table_name
diff --git a/include/class/acc_ledger.class.php
b/include/class/acc_ledger.class.php
index 606a7de..b2f05da 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -48,6 +48,7 @@ require_once NOALYSS_INCLUDE.'/class/acc_payment.class.php';
require_once NOALYSS_INCLUDE.'/class/acc_ledger_history.class.php';
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
require_once NOALYSS_INCLUDE.'/class/pre_op_ods.class.php';
+require_once NOALYSS_INCLUDE.'/class/html_input_noalyss.class.php';
/** \file
* @brief Class for jrn, class acc_ledger for manipulating the ledger
diff --git a/include/class/acc_ledger_purchase.class.php
b/include/class/acc_ledger_purchase.class.php
index 3fb6492..d6bd3ff 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -1332,7 +1332,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
// Set correctly the REQUEST param for jrn_type
$r.= HtmlInput::hidden('jrn_type','ACH');
- $r.= HtmlInput::button('add_item',_('Ajout article'), '
onClick="ledger_add_row()"');
+ $r.= Html_Input_Noalyss::ledger_add_item("O");
diff --git a/include/class/acc_ledger_sold.class.php
b/include/class/acc_ledger_sold.class.php
index 7b14a50..4e0e7c5 100644
--- a/include/class/acc_ledger_sold.class.php
+++ b/include/class/acc_ledger_sold.class.php
@@ -1330,8 +1330,7 @@ EOF;
// Set correctly the REQUEST param for jrn_type
$r.=HtmlInput::hidden('jrn_type', 'VEN');
-
- $r.=HtmlInput::button('add_item', _('Ajout article'), '
onClick="ledger_add_row()"');
+ $r.= Html_Input_Noalyss::ledger_add_item("O");
$r.= create_script("$('" . $Date->id . "').focus()");
return $r;
}
diff --git a/include/class/pre_op_advanced.class.php
b/include/class/pre_op_advanced.class.php
index ec78536..2c110fe 100644
--- a/include/class/pre_op_advanced.class.php
+++ b/include/class/pre_op_advanced.class.php
@@ -284,6 +284,7 @@ class Pre_Op_Advanced extends Pre_operation_detail
// If readonly == 1 then show CA
}
$ret.='</table>';
+ $ret.=Html_Input_Noalyss::ledger_add_item("M");
return $ret;
}
}
diff --git a/include/class/pre_op_ven.class.php
b/include/class/pre_op_ven.class.php
index 0a2c79d..c76252c 100644
--- a/include/class/pre_op_ven.class.php
+++ b/include/class/pre_op_ven.class.php
@@ -406,8 +406,8 @@ class Pre_op_ven extends Pre_operation_detail
// Set correctly the REQUEST param for jrn_type
$r.=HtmlInput::hidden('jrn_type','VEN');
+ $r.= Html_Input_Noalyss::ledger_add_item("O");
- $r.=HtmlInput::button('add_item',_('Ajout article'), '
onClick="ledger_add_row()"');
return $r;
}
}
diff --git a/include/compta_fin.inc.php b/include/compta_fin.inc.php
index 7627696..b15f39d 100644
--- a/include/compta_fin.inc.php
+++ b/include/compta_fin.inc.php
@@ -145,7 +145,7 @@ try
{
echo $Ledger->input($array);
- echo HtmlInput::button('add_item',_('Ajout article'), '
onClick="ledger_fin_add_row()"');
+ echo Html_Input_Noalyss::ledger_add_item("F");
echo HtmlInput::submit('save',_('Sauve'));
echo HtmlInput::reset(_('Effacer'));
diff --git a/include/operation_ods_new.inc.php
b/include/operation_ods_new.inc.php
index 9396314..bad4da0 100644
--- a/include/operation_ods_new.inc.php
+++ b/include/operation_ods_new.inc.php
@@ -94,7 +94,7 @@ $iconcerned->amount_id="totalDeb";
printf (_("Opération rapprochée : %s"),$iconcerned->input());
echo '<p>';
-echo HtmlInput::button('add', _('Ajout d\'une ligne'),
'onClick="quick_writing_add_row()"');
+echo Html_Input_Noalyss::ledger_add_item("M");
echo HtmlInput::submit('summary', _('Sauvez'));
echo '</p>';
- [Noalyss-commit] [noalyss] 06/46: Documentation, (continued)
- [Noalyss-commit] [noalyss] 06/46: Documentation, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 12/46: Minimum version : PHP 7.0 and PostgreSQL 9.5, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 07/46: phpunit : use plain text for restoring test database, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 09/46: search : add placeholder, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 10/46: Bug : customer.inc.php with http_input::request Correct : Contact.inc.php remove direct use of $_GET, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 11/46: New : Icon_Action::icon_onoff : display on or off, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 08/46: Bug : filter_list does not filter simple list, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 13/46: Noalyss_CSV : add setter and getter, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 16/46: remove blank line, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 18/46: Task #1694: Opération FIN: opération liée - code fiche mais pas nom, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 19/46: Task #0001704: Faciliter l'ajout de plusieurs lignes,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 23/46: Output_Html_Tab : cosmetic, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 24/46: Create test folder for phpunit, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 25/46: Task #0001704: Faciliter l'ajout de plusieurs lignes Fichier oublié html_input_noalyss.class.php, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 15/46: replace $_GET by httpInput, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 30/46: Task #0001793: Installation mot de passe Password cannot be empty, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 14/46: Task #0001699: Affichage PDF balance - totaux niveaux, etc'., Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 20/46: Cosmetic : Opération prédéfinie, modèle, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 17/46: Task #1756: Avertissement qcode, Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 21/46: if you want to modify the accounting , it must not be used before., Dany De Bontridder, 2020/05/04
- [Noalyss-commit] [noalyss] 26/46: Task #0001793: Installation mot de passe, Dany De Bontridder, 2020/05/04