diff --git a/include/lib/ifile.class.php b/include/lib/ifile.class.php index 7b64b8091..39ae4d433 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 5510b7334..a4f45d379 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"); + } ?> +