mirror of
https://github.com/quentin-g-dev/afup.git
synced 2026-03-25 17:52:13 +01:00
* on n'initialise la dropzone des PJ du journal que si la PJ est marqué comme required * la dropzone est ensuite initialisée à la demande
251 lines
12 KiB
HTML
251 lines
12 KiB
HTML
{if $action == 'lister' || $action == 'debit' || $action == 'credit' }
|
|
|
|
<h2>Journal</h2>
|
|
|
|
<div class="ui menu">
|
|
<a href="index.php?page=compta_journal&action=ajouter" class="item">
|
|
<div data-tooltip="Ajouter une écriture" data-position="bottom left">
|
|
<i class="icon plus square"></i>
|
|
Ajouter
|
|
</div>
|
|
</a>
|
|
<a href="index.php?page=compta_journal&action=importer" class="item">
|
|
<i class="icon upload"></i>
|
|
Importer un fichier CSV
|
|
</a>
|
|
</div>
|
|
|
|
<div class="ui green segment">
|
|
<form method="GET" name="forum">
|
|
<input type="hidden" name="page" value="compta_journal" />
|
|
<div class="ui form">
|
|
<div class="inline fields">
|
|
<div class="field">
|
|
<label>Année comptable</label>
|
|
<select name="id_periode" onchange="this.form.submit(); return false;">
|
|
{foreach from=$listPeriode item=periode}
|
|
<option value="{$periode.id}"{if $id_periode == $periode.id} selected{/if}>{$periode.date_debut} - {$periode.date_fin}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="ui segment">
|
|
<form method="GET" name="filtre" class="js-form-search">
|
|
<input type="hidden" name="page" value="compta_journal" />
|
|
<input type="hidden" name="id_periode" value="{$smarty.get.id_periode}" />
|
|
|
|
<div class="ui form">
|
|
<div class="inline fields">
|
|
<div class="field">
|
|
<div class="ui checkbox">
|
|
<input type="checkbox" tabindex="0" class="hidden" name="also_display_classifed_entries" {if $also_display_classifed_entries}checked="checked"{/if}>
|
|
<label>Afficher aussi les entrées déjà pointées</label>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<input type="submit" value="Filtrer" class="ui button" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="ui menu">
|
|
<a href="index.php?page=compta_journal&action=export&id_periode={$smarty.get.id_periode}&also_display_classifed_entries={$also_display_classifed_entries}" class="item">
|
|
<i class="icon file"></i>
|
|
Exporter la période en CSV
|
|
</a>
|
|
</div>
|
|
|
|
<div class="ui top attached tabular menu">
|
|
<a class="item {if $action == 'lister'}active{/if}" href="index.php?page=compta_journal&action=lister&id_periode={$smarty.get.id_periode}&also_display_classifed_entries={$also_display_classifed_entries}">Dépenses/Recettes</a>
|
|
<a class="item {if $action == 'debit'}active{/if}" href="index.php?page=compta_journal&action=debit&id_periode={$smarty.get.id_periode}&also_display_classifed_entries={$also_display_classifed_entries}">Dépenses</a>
|
|
<a class="item {if $action == 'credit'}active{/if}" href="index.php?page=compta_journal&action=credit&id_periode={$smarty.get.id_periode}&also_display_classifed_entries={$also_display_classifed_entries}">Recettes</a><br />
|
|
</div>
|
|
|
|
<div class="ui bottom attached segment">
|
|
{if $journal}
|
|
<table class="ui table striped compact celled afup-tab-filterable">
|
|
<thead>
|
|
<tr>
|
|
<th>Date</th>
|
|
<th data-tf-filter-type="select">Compte</th>
|
|
<th data-tf-filter-type="select">Evenement</th>
|
|
<th data-tf-filter-type="select">Catégorie</th>
|
|
<th data-tf-filter-type="input">Description</th>
|
|
<th data-tf-filter-type="input" class="right aligned">Debit</th>
|
|
<th data-tf-filter-type="input" class="right aligned">Crédit</th>
|
|
<th data-tf-filter-type="select">Reglement</th>
|
|
<th>Justif ?</th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{foreach from=$journal item=ecriture}
|
|
<tr class="{cycle values="odd,even"}" id="journal-ligne-{$ecriture.idtmp}">
|
|
<td nowrap="nowrap"><a name="L{$ecriture.idtmp}"></a>{$ecriture.date_ecriture|date_format:"%d/%m/%Y"}</td>
|
|
<td>{$ecriture.nom_compte}</td>
|
|
<td>
|
|
{if $ecriture.evenement=='A déterminer'}
|
|
<div class="ui form">
|
|
<select class=" js-select-change" data-post-url="index.php?page=compta_journal&action=modifier_colonne&column=evenement&id={$ecriture.idtmp}" style="min-width:130px">
|
|
{foreach from=$events item=event_name key=event_id}
|
|
<option value="{$event_id}" {if $event_name == "A déterminer"}selected="selected"{/if}>{$event_name}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
{else}
|
|
{$ecriture.evenement}
|
|
{/if}
|
|
</td>
|
|
<td>
|
|
{if $ecriture.categorie=='A déterminer'}
|
|
<div class="ui form">
|
|
<select class="js-select-change" data-post-url="index.php?page=compta_journal&action=modifier_colonne&column=categorie&id={$ecriture.idtmp}" style="min-width:130px">
|
|
{foreach from=$categories item=cat_name key=cat_id}
|
|
<option value="{$cat_id}" {if $cat_name == "A déterminer"}selected="selected"{/if}>{$cat_name}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
{else}
|
|
{$ecriture.categorie}
|
|
{/if}
|
|
</td>
|
|
<td width="250">
|
|
{$ecriture.description|paybox_link}
|
|
</td>
|
|
{if $ecriture.idoperation == 1}
|
|
<td class="right aligned" width='100'>-{$ecriture.montant|number_format:2:',':' '}</td>
|
|
<td width='100'></td>
|
|
{else}
|
|
<td width='100'></td>
|
|
<td class="right aligned" width='100'>+{$ecriture.montant|number_format:2:',':' '}</td>
|
|
{/if}
|
|
|
|
<td>
|
|
{if $ecriture.reglement=='A déterminer'}
|
|
<div class="ui form">
|
|
<select class="js-select-change" data-post-url="index.php?page=compta_journal&action=modifier_colonne&column=reglement&id={$ecriture.idtmp}" style="min-width:130px">
|
|
{foreach from=$payment_methods item=method_name key=method_id}
|
|
<option value="{$method_id}" {if $method_name == "A déterminer"}selected="selected"{/if}>{$method_name}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
{else}
|
|
{$ecriture.reglement}
|
|
{/if}
|
|
</td>
|
|
<td align="center">
|
|
<input
|
|
type="checkbox" class="js-attachment-change"
|
|
data-post-url="index.php?page=compta_journal&action=modifier_colonne&column=attachment_required&id={$ecriture.idtmp}"
|
|
value="1"
|
|
{if $ecriture.attachment_required}checked{/if}
|
|
/>
|
|
<a
|
|
{if !$ecriture.attachment_filename}style="display:none;"{/if}
|
|
class="js-has-attachment"
|
|
href="index.php?page=compta_journal&action=download_attachment&id={$ecriture.idtmp}"
|
|
title="Télécharger le justificatif"
|
|
>
|
|
<i class="paperclip icon"></i>
|
|
</a>
|
|
<div class="js-attachment-form-container"
|
|
style="{if !$ecriture.attachment_required}display:none;"{/if}"
|
|
data-position="left center"
|
|
data-tooltip="Cliquez ou déposez un fichier dans la zone pour ajouter un justificatif"
|
|
>
|
|
<form action="index.php?page=compta_journal&action=upload_attachment&id={$ecriture.idtmp}"
|
|
class="js-dropzone{if !$ecriture.attachment_required}--lazy{/if} dz-journal-form ui center aligned tertiary blue segment"
|
|
style="display:none;cursor: pointer"
|
|
>
|
|
<i class="upload icon dz-message"></i>
|
|
</form>
|
|
</div>
|
|
</td>
|
|
<td style="text-align: right" class="single line">
|
|
<a class="js-edit-comment compact ui icon button"
|
|
style="cursor:pointer;"
|
|
data-position="left center"
|
|
data-tooltip='Editer le commentaire{if $ecriture.comment} ("{$ecriture.comment}"){/if}'
|
|
data-post-url="index.php?page=compta_journal&action=modifier_colonne&column=comment&id={$ecriture.idtmp}"
|
|
data-comment="{$ecriture.comment}">
|
|
<i class="comment {if $ecriture.comment}{else}outline{/if} icon"></i>
|
|
</a>
|
|
|
|
<a href="index.php?page=compta_journal&action=modifier&id={$ecriture.idtmp}"
|
|
data-position="left center"
|
|
data-tooltip="Modifier la ligne {$ecriture.description}"
|
|
class="compact ui icon button"
|
|
>
|
|
<i class="pencil alternate icon"></i>
|
|
</a>
|
|
|
|
<a href="#"
|
|
data-position="left center"
|
|
data-tooltip="Ventiler la fiche de {$ecriture.description}"
|
|
class="compact ui icon button"
|
|
onclick="javascript:ventiler({$ecriture.idtmp}, {$ecriture.montant});return false;"
|
|
>
|
|
<i class="calculator icon"></i>
|
|
</a>
|
|
|
|
<a href="index.php?page=compta_journal&action=supprimer&id={$ecriture.idtmp}"
|
|
data-position="left center"
|
|
data-tooltip="Supprimer la fiche de {$ecriture.description} "
|
|
class="compact ui red icon button confirmable"
|
|
data-confirmable-label="Etes-vous sûr de vouloir supprimer la fiche de {$ecriture.description} ?"
|
|
>
|
|
<i class="trash icon"></i>
|
|
</a>
|
|
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
{else}
|
|
<div class="ui placeholder segment">
|
|
<div class="ui icon header">
|
|
<i class="meh outline icon"></i>
|
|
Aucune ecriture
|
|
</div>
|
|
<div class="inline">
|
|
{if $also_display_classifed_entries }
|
|
{else}
|
|
<a class="ui button" href="index.php?page=compta_journal&action={$action}&id_periode={$smarty.get.id_periode}&also_display_classifed_entries=1">Afficher aussi les entrées pointées</a>
|
|
{/if}
|
|
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
|
|
|
|
</div>
|
|
|
|
<div class="js-dz-preview-template" style="display:none;">
|
|
<div class="dz-preview"></div>
|
|
</div>
|
|
|
|
<div class="js-upload-loader upload-loader" style="display: none;">
|
|
<img class="loader" src="{$chemin_template}images/ajax-loader.gif" alt="Loading…" />
|
|
</div>
|
|
|
|
<!-- Required for paybox popups -->
|
|
<meta name="referrer" content="no-referrer" />
|
|
|
|
{else}
|
|
{if $action == 'importer'}
|
|
<h2>Importer un fichier</h2>
|
|
{elseif $action == 'ajouter'}
|
|
<h2>Ajouter une écriture (facture)</h2>
|
|
{else}
|
|
<h2>Modifier une écriture (facture)</h2>
|
|
{/if}
|
|
{include file="formulaire.html"}
|
|
{/if}
|