[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 02/04: Bug #0002060: Ne peut pas sauver le do
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 02/04: Bug #0002060: Ne peut pas sauver le document dans achat / vente |
Date: |
Thu, 2 Sep 2021 18:27:30 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit a38fc9f233b660c99455eef7b72a1d72a25093fb
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Thu Sep 2 15:59:37 2021 +0200
Bug #0002060: Ne peut pas sauver le document dans achat / vente
---
include/lib/ifile.class.php | 2 +-
include/template/acc_ledger-input_extra_info.php | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/include/lib/ifile.class.php b/include/lib/ifile.class.php
index 7b64b80..39ae4d4 100644
--- a/include/lib/ifile.class.php
+++ b/include/lib/ifile.class.php
@@ -75,7 +75,7 @@ class IFile extends HtmlInput
document.getElementById("%s").addEventListener("change",function
()
{
var fFile=document.getElementById("%s");
- if (fFile.files[0] && fFile.files[0].size>%s) {
smoke.alert("%s");}
+ if (fFile.files[0] && fFile.files[0].size>%s) {
smoke.alert("%s");fFile.value="";}
});',$this->id,$this->id,$max_size,$too_large);
$r.=create_script($js_check_size);
diff --git a/include/template/acc_ledger-input_extra_info.php
b/include/template/acc_ledger-input_extra_info.php
index 5510b73..a4f45d3 100644
--- a/include/template/acc_ledger-input_extra_info.php
+++ b/include/template/acc_ledger-input_extra_info.php
@@ -95,6 +95,10 @@ if (in_array('repo',$a_show)) {
if (in_array('invoice',$a_show)) {
echo $this->extra_info();
}
+if ( in_array("document",$a_show)) {
+ if ( in_array("invoice",$a_show)) {
+ throw new Exception("ACC_LEDGER_INPUT100 : document and invoice
available in same time");
+ }
?>
<div id="document_div_id" style="display:none;height:185px;height:10rem">
<?php
@@ -107,6 +111,10 @@ if (in_array('invoice',$a_show)) {
echo '</p>';
?>
</div>
+<?php
+
+}
+?>
<div id="modele_div_id" style="display:none;height:185px;height:10rem">
<?php echo Pre_operation::save_propose();?>
</div>