Last change
on this file since 71863 was
71863,
checked in by cyril@…, 8 years ago
|
On ajoute les factures liées sur la fiche d'une organisation;
reste à faire pour demain :
- date facture = date du jour par défaut
- proposer un numéro de facture calculé selon un algo particulier
- la date de fin de validité ne doit pas être obligatoire (sauf si le document est un devis)
- récupérer l'id de l'organisation et le mettre en organisation facturée
- récupérer le id_organisation de la conf et le mettre en organisation emettrice
|
File size:
1.2 KB
|
Line | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * Utilisations de pipelines par Factures & devis |
---|
4 | * |
---|
5 | * @plugin Factures & devis |
---|
6 | * @copyright 2013 |
---|
7 | * @author Cyril Marion - Ateliers CYM |
---|
8 | * @licence GNU/GPL |
---|
9 | * @package SPIP\Factures\Pipelines |
---|
10 | */ |
---|
11 | |
---|
12 | if (!defined('_ECRIRE_INC_VERSION')) return; |
---|
13 | |
---|
14 | /** |
---|
15 | * Afficher les factures d'une organisation |
---|
16 | * |
---|
17 | * Il peut y en avoir beaucoup, on le met après le contenu d'une organisation donc. |
---|
18 | **/ |
---|
19 | function factures_afficher_complement_objet($flux) { |
---|
20 | |
---|
21 | $type = $flux['args']['type']; |
---|
22 | |
---|
23 | // projets sur les organisations |
---|
24 | if ($type == 'organisation') { |
---|
25 | |
---|
26 | $id_organisation = $flux['args']['id']; |
---|
27 | $lister_objets = charger_fonction('lister_objets', 'inc'); |
---|
28 | |
---|
29 | $bouton = ''; |
---|
30 | if (autoriser('creerfacturedans', 'organisation', $id_organisation)) { |
---|
31 | include_spip('inc/presentation'); |
---|
32 | $bouton .= icone_verticale(_T("facture:icone_creer_facture"), generer_url_ecrire("facture_edit", "id_organisation=$id_organisation"), "facture-24.png", "new", "right") |
---|
33 | . "<br class='nettoyeur' />"; |
---|
34 | } |
---|
35 | |
---|
36 | $flux['data'] .= $lister_objets('factures', array('id_organisation'=>$id_organisation, 'par'=>'date_facture')); |
---|
37 | $flux['data'] .= $bouton; |
---|
38 | } |
---|
39 | |
---|
40 | return $flux; |
---|
41 | } |
---|
42 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.