noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
ledger_detail_sup_files.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of NOALYSS.
5 *
6 * NOALYSS is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * NOALYSS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with NOALYSS; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19*/
20// Copyright Author Dany De Bontridder danydb@aevalys.eu 22/10/23
21
22
23/**
24 * @file
25 * @brief show supplemental files and let you add one
26 @var $jr_id (int) JRN.JR_ID (inherited)
27// @var $cn (Database) current conx
28// @var $gDossier (int) folder id
29 */
30?>
31<div id="supplemental_doc_div<?php echo $div;?>" class="myfieldset noprint" style="display:<?php echo $a_tab['supplemental_doc_div']['display']?>">
32 <div id="supplement_div_list<?=$div?>">
33<?php
34/**
35 * show existing supplemental files for this operation
36 */
38/*
39
40$q=new Jrn_Sup_Document_SQL($cn);
41$a_row=$q->collect_objects(" where jr_id=$1 order by js_cbc_id", [$jr_id]);
42
43if ( count($a_row) > 0)
44{
45 foreach ($a_row as $item) {
46 $export="export.php?";
47 $script="Supplement_Document.delete_document('$gDossier','$div','{$item->js_id}','$jr_id')";
48 $rowid=sprintf("row_js_%s_%s",$div,$item->js_id);
49 // @var $download (url) to send file
50 $download="export.php?". http_build_query(
51 [
52 "act"=>"RAW:suppl-document"
53 ,"js_id"=>$item->js_id
54 ,"gDossier"=>$gDossier
55 ]);
56 ?>
57 <div class="row" id="<?=$rowid?>">
58 <div class="col">
59 <a href="<?=$download?>" download> <?=$item->js_filename?></a>
60 </div>
61 <div class="col">
62 <?=$item->js_description?>
63 </div>
64 <div class="col">
65 <?=\Icon_Action::trash(uniqid("sdd"),$script)?>
66 </div>
67 </div>
68 <?php
69 }// end foreach $a_row
70}// end if count
71//download ALL files from this operation
72 $download="export.php?". http_build_query(
73 [
74 "act"=>"RAW:suppl-document"
75 ,"js_id"=>0
76 ,"gDossier"=>$gDossier
77 ,'operation_id'=>$jr_id
78 ]);
79
80 *
81 */
82$javascript=sprintf("Supplement_Document.input_file('%s','%s','%s')",
84 $div,
85 $jr_id);
86
87 $download="export.php?". http_build_query(
88 [
89 "act"=>"RAW:suppl-document"
90 ,"js_id"=>0
91 ,"gDossier"=>$gDossier
92 ,'operation_id'=>$jr_id
93 ]);
94?>
95 <a href="<?=$download?>" download=""><?=_("Télécharger tous les documents")?>
96 </a>
97 </div>
98 <ul class="aligned-block">
99 <li>
100 <?=\HtmlInput::button_action(_("Ajout fichier"), $javascript);?>
101 </li>
102 </ul>
103</div>
$jr_id
$opd_description style
_("actif, passif,charge,...")
static display_supplementary_doc($cn, $div, $jr_id)