mirror of
https://github.com/quentin-g-dev/afup.git
synced 2026-03-25 01:32:08 +01:00
131 lines
5.2 KiB
HTML
131 lines
5.2 KiB
HTML
{if $action == 'lister'}
|
|
<h2>Liste devis </h2>
|
|
|
|
<div class="ui menu">
|
|
<a href="index.php?page=compta_devis&action=ajouter" class="item">
|
|
<div data-tooltip="Ajouter un devis" data-position="bottom left">
|
|
<i class="icon plus square"></i>
|
|
Ajouter
|
|
</div>
|
|
</a>
|
|
</div>
|
|
|
|
<div class="ui green segment">
|
|
<form method="GET" name="forum">
|
|
<input type="hidden" name="page" value="compta_devis" />
|
|
<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 bottom attached segment">
|
|
{if $ecritures}
|
|
<table class="ui table striped compact celled afup-tab-filterable">
|
|
<thead>
|
|
<tr>
|
|
<!-- th width="20px"> </th -->
|
|
<th data-tf-filter-type="input"><a href="index.php?page=compta_devis&tri=date_consultation&sens={if $smarty.get.sens == 'asc' && $smarty.get.tri == 'date_consultation'}desc{else}asc{/if}">Date</a></th>
|
|
<th data-tf-filter-type="input"><a href="index.php?page=compta_devis&tri=evenement&sens={if $smarty.get.sens == 'asc' && $smarty.get.tri == 'date_consultation'}desc{else}asc{/if}">Clients</a></th>
|
|
<th data-tf-filter-type="input">Ville</th>
|
|
<th data-tf-filter-type="input">Ref client</th>
|
|
<th data-tf-filter-type="input">Numero devis</th>
|
|
<th data-tf-filter-type="input"class="right aligned">Prix</th>
|
|
<th data-tf-filter-type="select" class="center aligned">Facturé ?</th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{foreach from=$ecritures item=ecriture}
|
|
<tr class="{cycle values="odd,even"}">
|
|
<!-- td width="20px"><input type="checkbox" value=""/></td -->
|
|
<td nowrap="nowrap">{$ecriture.date_devis|date_format:"%d/%m/%Y"}</td>
|
|
<td>{$ecriture.societe}</td>
|
|
<td width="250">{$ecriture.ville}</td>
|
|
<td>{$ecriture.ref_clt1}</td>
|
|
<td>{$ecriture.numero_devis}</td>
|
|
<td class="right aligned">{$ecriture.prix|number_format:2:',':' '}</td>
|
|
<td class="center aligned">
|
|
{if $ecriture.numero_facture == ''}
|
|
<span class="ui red label">non</span>
|
|
{else}
|
|
<span class="ui green label">oui</span>
|
|
{/if}
|
|
</td>
|
|
<td class="right aligned single line">
|
|
{if $ecriture.numero_facture == ''}
|
|
<a href="index.php?page=compta_devis&action=modifier&id={$ecriture.id}"
|
|
data-position="left center"
|
|
data-tooltip="Modifier le devis {$ecriture.description}"
|
|
class="compact ui icon button"
|
|
>
|
|
<i class="pencil alernate icon"></i>
|
|
</a>
|
|
{else}
|
|
<a href="index.php?page=compta_facture&action=modifier&id={$ecriture.id}"
|
|
data-position="left center"
|
|
data-tooltip="Modifier la facture {$ecriture.description}"
|
|
class="compact ui icon button"
|
|
>
|
|
<i class="pencil alernate icon"></i>
|
|
</a>
|
|
{/if}
|
|
<a href="index.php?page=compta_devis&action=telecharger_devis&ref={$ecriture.numero_devis}"
|
|
data-position="left center"
|
|
data-tooltip="Télécharger le devis"
|
|
class="compact ui icon button"
|
|
>
|
|
<i class="file pdf icon"></i>
|
|
</a>
|
|
{if $ecriture.numero_facture == ''}
|
|
<a href="index.php?page=compta_devis&action=transfert&ref={$ecriture.numero_devis}"
|
|
data-position="left center"
|
|
data-tooltip="Transférer la ligne {$ecriture.description} en facture"
|
|
class="compact ui icon button"
|
|
>
|
|
<i class="cart icon"></i>
|
|
</a>
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
{foreachelse}
|
|
<tr>
|
|
<td><em>Aucune ecriture actuellement</em></td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
{else}
|
|
<div class="ui placeholder segment">
|
|
<div class="ui icon header">
|
|
<i class="meh outline icon"></i>
|
|
Aucun devis
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
|
|
{else}
|
|
{if $action == 'ajouter'}
|
|
<h2>Ajouter un devis</h2>
|
|
{else}
|
|
<h2>Modifier un devis</h2>
|
|
|
|
<div class="ui menu">
|
|
<a href="index.php?page=compta_devis&action=ajouter&from={$devis_id}" class="item">
|
|
Dupliquer le devis
|
|
</a>
|
|
</div>
|
|
{/if}
|
|
{include file="formulaire.html"}
|
|
{/if}
|