From a36262ccf4aa583779cc1fadc985d6ea5f4302db Mon Sep 17 00:00:00 2001 From: "cyril@cym.fr" <> Date: Wed, 3 Apr 2013 17:49:09 +0000 Subject: [PATCH] 1er depot du plugin 'factures et devis' pour SPIP3 --- .gitattributes | 25 ++ base/factures.php | 81 +++++ fabrique_factures.php | 297 ++++++++++++++++++ factures_administrations.php | 53 ++++ factures_autorisations.php | 113 +++++++ factures_pipelines.php | 16 + formulaires/configurer_factures.html | 16 + formulaires/editer_facture.html | 17 + formulaires/editer_facture.php | 146 +++++++++ lang/facture_fr.php | 50 +++ lang/factures_fr.php | 20 ++ lang/paquet-factures_fr.php | 14 + paquet.xml | 29 ++ prive/objets/contenu/facture.html | 68 ++++ prive/objets/liste/factures.html | 33 ++ prive/objets/liste/factures_associer.html | 69 ++++ .../liste/factures_associer_fonctions.php | 18 ++ prive/objets/liste/factures_lies.html | 60 ++++ .../objets/liste/factures_lies_fonctions.php | 17 + .../contenu/configurer_factures.html | 7 + prive/squelettes/contenu/facture_edit.html | 30 ++ prive/themes/spip/images/facture-12.png | Bin 0 -> 475 bytes prive/themes/spip/images/facture-16.png | Bin 0 -> 581 bytes prive/themes/spip/images/facture-24.png | Bin 0 -> 1209 bytes prive/themes/spip/images/facture-32.png | Bin 0 -> 1166 bytes prive/themes/spip/images/facture-new-16.png | Bin 0 -> 651 bytes 26 files changed, 1179 insertions(+) create mode 100644 base/factures.php create mode 100644 fabrique_factures.php create mode 100644 factures_administrations.php create mode 100644 factures_autorisations.php create mode 100644 factures_pipelines.php create mode 100644 formulaires/configurer_factures.html create mode 100644 formulaires/editer_facture.html create mode 100644 formulaires/editer_facture.php create mode 100644 lang/facture_fr.php create mode 100644 lang/factures_fr.php create mode 100644 lang/paquet-factures_fr.php create mode 100644 paquet.xml create mode 100644 prive/objets/contenu/facture.html create mode 100644 prive/objets/liste/factures.html create mode 100644 prive/objets/liste/factures_associer.html create mode 100644 prive/objets/liste/factures_associer_fonctions.php create mode 100644 prive/objets/liste/factures_lies.html create mode 100644 prive/objets/liste/factures_lies_fonctions.php create mode 100644 prive/squelettes/contenu/configurer_factures.html create mode 100644 prive/squelettes/contenu/facture_edit.html create mode 100644 prive/themes/spip/images/facture-12.png create mode 100644 prive/themes/spip/images/facture-16.png create mode 100644 prive/themes/spip/images/facture-24.png create mode 100644 prive/themes/spip/images/facture-32.png create mode 100644 prive/themes/spip/images/facture-new-16.png diff --git a/.gitattributes b/.gitattributes index 8e948c5..8e421e4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,26 @@ * text=auto !eol +base/factures.php -text +/fabrique_factures.php -text +/factures_administrations.php -text +/factures_autorisations.php -text +/factures_pipelines.php -text +formulaires/configurer_factures.html -text +formulaires/editer_facture.html -text +formulaires/editer_facture.php -text +lang/facture_fr.php -text +lang/factures_fr.php -text +lang/paquet-factures_fr.php -text +/paquet.xml -text +prive/objets/contenu/facture.html -text +prive/objets/liste/factures.html -text +prive/objets/liste/factures_associer.html -text +prive/objets/liste/factures_associer_fonctions.php -text +prive/objets/liste/factures_lies.html -text +prive/objets/liste/factures_lies_fonctions.php -text +prive/squelettes/contenu/configurer_factures.html -text +prive/squelettes/contenu/facture_edit.html -text +prive/themes/spip/images/facture-12.png -text svneol=unset#image/png +prive/themes/spip/images/facture-16.png -text svneol=unset#image/png +prive/themes/spip/images/facture-24.png -text svneol=unset#image/png +prive/themes/spip/images/facture-32.png -text svneol=unset#image/png +prive/themes/spip/images/facture-new-16.png -text svneol=unset#image/png diff --git a/base/factures.php b/base/factures.php new file mode 100644 index 0000000..f45eb41 --- /dev/null +++ b/base/factures.php @@ -0,0 +1,81 @@ + 'facture', + 'principale' => "oui", + 'field'=> array( + "id_facture" => "bigint(21) NOT NULL", + "id_organisation" => "int(11) DEFAULT NULL", + "id_type_document" => "int(11) NOT NULL DEFAULT '1'", + "num_facture" => "varchar(50) NOT NULL", + "num_devis" => "varchar(50) DEFAULT NULL", + "date_facture" => "datetime DEFAULT NULL", + "libelle_facture" => "mediumtext", + "conditions" => "text NOT NULL", + "reglement" => "varchar(50) DEFAULT NULL", + "delais_validite" => "int(11) DEFAULT NULL", + "fin_validite" => "datetime DEFAULT NULL", + "montant" => "decimal(18,2) DEFAULT NULL", + "nb_heures_vendues" => "decimal(18,2) DEFAULT NULL", + "nota_bene" => "mediumtext", + "maj" => "TIMESTAMP" + ), + 'key' => array( + "PRIMARY KEY" => "id_facture", + ), + 'titre' => "'' AS titre, '' AS lang", + #'date' => "", + 'champs_editables' => array(), + 'champs_versionnes' => array(), + 'rechercher_champs' => array(), + 'tables_jointures' => array(), + + + ); + + return $tables; +} + + + +?> \ No newline at end of file diff --git a/fabrique_factures.php b/fabrique_factures.php new file mode 100644 index 0000000..ff0c14d --- /dev/null +++ b/fabrique_factures.php @@ -0,0 +1,297 @@ + + array ( + 'version' => 5, + ), + 'paquet' => + array ( + 'nom' => 'Factures & devis', + 'slogan' => 'Facturer et faire des devis avec SPIP', + 'description' => 'Factures & devis permet d\'éditer, imprimer, archiver facilement vos devis et factures.', + 'prefixe' => 'factures', + 'version' => '1.0.0', + 'auteur' => 'Cyril Marion', + 'auteur_lien' => '', + 'licence' => 'GNU/GPL', + 'categorie' => 'divers', + 'etat' => 'dev', + 'compatibilite' => '[3.0.7;3.0.*]', + 'documentation' => '', + 'administrations' => 'on', + 'schema' => '1.0.0', + 'formulaire_config' => 'on', + 'formulaire_config_titre' => '', + 'fichiers' => + array ( + 0 => 'autorisations', + 1 => 'pipelines', + ), + 'inserer' => + array ( + 'paquet' => '', + 'administrations' => + array ( + 'maj' => '', + 'desinstallation' => '', + 'fin' => '', + ), + 'base' => + array ( + 'tables' => + array ( + 'fin' => '', + ), + ), + ), + 'scripts' => + array ( + 'pre_copie' => '', + 'post_creation' => '', + ), + 'exemples' => '', + ), + 'objets' => + array ( + 0 => + array ( + 'nom' => 'Factures', + 'nom_singulier' => 'Facture', + 'genre' => 'masculin', + 'logo_variantes' => '', + 'table' => 'spip_factures', + 'cle_primaire' => 'id_facture', + 'cle_primaire_sql' => 'bigint(21) NOT NULL', + 'table_type' => 'facture', + 'champs' => + array ( + 0 => + array ( + 'nom' => 'Id organisation', + 'champ' => 'id_organisation', + 'sql' => 'int(11) DEFAULT NULL', + 'recherche' => '', + 'saisie' => '', + 'explication' => '', + 'saisie_options' => '', + ), + 1 => + array ( + 'nom' => 'Id type document', + 'champ' => 'id_type_document', + 'sql' => 'int(11) NOT NULL DEFAULT \'1\'', + 'recherche' => '', + 'saisie' => '', + 'explication' => '', + 'saisie_options' => '', + ), + 3 => + array ( + 'nom' => 'Num facture', + 'champ' => 'num_facture', + 'sql' => 'varchar(50) NOT NULL', + 'recherche' => '', + 'saisie' => '', + 'explication' => '', + 'saisie_options' => '', + ), + 4 => + array ( + 'nom' => 'Num devis', + 'champ' => 'num_devis', + 'sql' => 'varchar(50) DEFAULT NULL', + 'recherche' => '', + 'saisie' => '', + 'explication' => '', + 'saisie_options' => '', + ), + 5 => + array ( + 'nom' => 'Date facture', + 'champ' => 'date_facture', + 'sql' => 'datetime DEFAULT NULL', + 'recherche' => '', + 'saisie' => '', + 'explication' => '', + 'saisie_options' => '', + ), + 7 => + array ( + 'nom' => 'Libelle facture', + 'champ' => 'libelle_facture', + 'sql' => 'mediumtext', + 'recherche' => '', + 'saisie' => '', + 'explication' => '', + 'saisie_options' => '', + ), + 8 => + array ( + 'nom' => 'Conditions', + 'champ' => 'conditions', + 'sql' => 'text NOT NULL', + 'recherche' => '', + 'saisie' => '', + 'explication' => '', + 'saisie_options' => '', + ), + 9 => + array ( + 'nom' => 'Reglement', + 'champ' => 'reglement', + 'sql' => 'varchar(50) DEFAULT NULL', + 'recherche' => '', + 'saisie' => '', + 'explication' => '', + 'saisie_options' => '', + ), + 10 => + array ( + 'nom' => 'Delais validite', + 'champ' => 'delais_validite', + 'sql' => 'int(11) DEFAULT NULL', + 'recherche' => '', + 'saisie' => '', + 'explication' => '', + 'saisie_options' => '', + ), + 11 => + array ( + 'nom' => 'Fin validite', + 'champ' => 'fin_validite', + 'sql' => 'datetime DEFAULT NULL', + 'recherche' => '', + 'saisie' => '', + 'explication' => '', + 'saisie_options' => '', + ), + 13 => + array ( + 'nom' => 'Montant', + 'champ' => 'montant', + 'sql' => 'decimal(18,2) DEFAULT NULL', + 'recherche' => '', + 'saisie' => '', + 'explication' => '', + 'saisie_options' => '', + ), + 15 => + array ( + 'nom' => 'Nb heures vendues', + 'champ' => 'nb_heures_vendues', + 'sql' => 'decimal(18,2) DEFAULT NULL', + 'recherche' => '', + 'saisie' => '', + 'explication' => '', + 'saisie_options' => '', + ), + 16 => + array ( + 'nom' => 'Nota bene', + 'champ' => 'nota_bene', + 'sql' => 'mediumtext', + 'recherche' => '', + 'saisie' => '', + 'explication' => '', + 'saisie_options' => '', + ), + ), + 'champ_titre' => '', + 'champ_date' => '', + 'statut' => '', + 'chaines' => + array ( + 'titre_objets' => 'Factures', + 'titre_objet' => 'Facture', + 'info_aucun_objet' => 'Aucun facture', + 'info_1_objet' => 'Un facture', + 'info_nb_objets' => '@nb@ factures', + 'icone_creer_objet' => 'Créer un facture', + 'icone_modifier_objet' => 'Modifier ce facture', + 'titre_logo_objet' => 'Logo de ce facture', + 'titre_langue_objet' => 'Langue de ce facture', + 'titre_objets_rubrique' => 'Factures de la rubrique', + 'info_objets_auteur' => 'Les factures de cet auteur', + 'retirer_lien_objet' => 'Retirer ce facture', + 'retirer_tous_liens_objets' => 'Retirer tous les factures', + 'ajouter_lien_objet' => 'Ajouter ce facture', + 'texte_ajouter_objet' => 'Ajouter un facture', + 'texte_creer_associer_objet' => 'Créer et associer un facture', + 'texte_changer_statut_objet' => 'Ce facture est :', + ), + 'table_liens' => '', + 'vue_liens' => + array ( + 0 => 'spip_auteurs', + 1 => 'spip_contacts', + 2 => 'spip_organisations', + ), + 'roles' => '', + 'auteurs_liens' => '', + 'vue_auteurs_liens' => '', + 'autorisations' => + array ( + 'objet_creer' => '', + 'objet_voir' => '', + 'objet_modifier' => '', + 'objet_supprimer' => '', + 'associerobjet' => '', + ), + 'boutons' => + array ( + 0 => 'menu_edition', + 1 => 'outils_rapides', + ), + ), + ), + 'images' => + array ( + 'paquet' => + array ( + 'logo' => + array ( + 0 => + array ( + 'extension' => '', + 'contenu' => '', + ), + ), + ), + 'objets' => + array ( + 0 => + array ( + 'logo' => + array ( + 0 => + array ( + 'extension' => 'png', + 'contenu' => 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABAxJREFUeNq8V1tME0EUvdsWLG21UnzwLg9FLMHgI6JAqIKJ/mj8IvFbEhM14iPxFY3gBz5iNHyoUfk1wJ9KTIgKEdFqUARFI9qIIoqBSEILGPva9c7SXWfp7rYW9CSTmbmzO3PuuXNndhmO40DAjaamaqwqscyDKMEwjAbxg2PZup0VFZfCPi8QuN7YWJWcmHimtLBQHxMTw0RLoPvNGzAaDNDd2+v1BwJHK8OQ0AgNJFK5buXKOTE6HQOEVJSlf2AA0tPSYEVeXqxOqz2Lqh6KlIDVYDBoiB4zKQRevx9SUlIgz2YjJGpvNDYeioTArBQCHxIgJSkxEZbn5sbqdLpaDPEROQI6ocGyrOhBS2srX6ehF3q9HpwfP4ovzDWZIN9mA0dnJ9/fUl4umdBkNIJrYgLi4uL4/iIkwXJcbF9f3+lrDQ2wa8eOc7IEaA82l5VJJs2yWkOYC8/QWUSQmZ4OTqcTMrOyAEPK2xYuXjxF4t27vdhVIQAzRyaSxVSEz/394B4fF+0ZSMzj9carh4CbDQoAVswCUqajq6eHVSZAheDBw4dgW7YMBoeGYBy9SE9N5dUZ/Po1ZNL5ZjNY0btXvb18vyA/Hz5hKv7yeGB5Tg70oH3Thg3iGooEOEqBcrudr8kuppGTna3otfAOQYLFIrEL85I11BUIttva22HtmjW8Vx70hECr0cASJPAeNxi/MTMy4Nv37+I4DXIQEfvwyAjfLwuSU1WA3gMbS0v5uqiwMOSF5KSkP7FG6dVgy82VZAqrpgCRR2DY3tHB15b4eDBiXtOxT0lOBpfbDROY6zSyMe1GR0dhzOWS2Mg5siAhIcIQBAmUlpRIUwvljgSEnBxEBcKGAP4tVENA74HHT57M6sIlxcUREMDFaYmKiookDzocjhBbpGNsJCHgpp2E5EW5yZSgNvbX5wDBuvXrJQ8+e/o0xKY09vruJfj04jbfDgQCcOuedurU9PlMdbuvurFZX3Xlw0HVu0DuXlC7K+gxsvie44fB6/HCr8mf8HNiEibdk6RmsD/X8eg++e48qHgdz5RAxuptcLn2vKiAVjulgM/n4xjWRw6Q+rC34UwIfO66E6UC9IRyi6ikGj1mVVLAiwpw/0GBgX+twNuWOvjS1SzaiZfDwZ1OYExIVVDAiwr45RWYvglfPn8eQkCwDXXegn0nj8l5yPfRQ6iqqY5egQL8FlBD7I/toodyMCflyI6HU8DpGhsrMJvNmnBn++DLZqUYBxV4gAqc+msF6lvb2i7Y7Xa9xWJRJZG2amsYBZZKxom6Ab+f49iAhwHWRyvA0HHfX1NDmO3Ekqf61TvSZDpQfYKJYg8I4+N4FM8LIUADySh/+w/fvBj8jVfCB/INqzIu3gW/BRgAh/RYXDg93aEAAAAASUVORK5CYII=', + ), + ), + ), + ), + ), +); + +?> \ No newline at end of file diff --git a/factures_administrations.php b/factures_administrations.php new file mode 100644 index 0000000..d0391c7 --- /dev/null +++ b/factures_administrations.php @@ -0,0 +1,53 @@ + \ No newline at end of file diff --git a/factures_autorisations.php b/factures_autorisations.php new file mode 100644 index 0000000..5135e4f --- /dev/null +++ b/factures_autorisations.php @@ -0,0 +1,113 @@ + \ No newline at end of file diff --git a/factures_pipelines.php b/factures_pipelines.php new file mode 100644 index 0000000..4d7a81c --- /dev/null +++ b/factures_pipelines.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/formulaires/configurer_factures.html b/formulaires/configurer_factures.html new file mode 100644 index 0000000..c4d5a17 --- /dev/null +++ b/formulaires/configurer_factures.html @@ -0,0 +1,16 @@ +
(#ENV*{message_ok})
] + [(#ENV*{message_erreur})
] + + +(#ENV**{message_ok})
] + [(#ENV*{message_erreur})
] + + [(#ENV{editable}) + + ] ++ | [(#TRI{,<:facture:label_:>,ajax})] | +[(#TRI{id_facture,<:info_numero_abbreviation:>,ajax})] | +
---|---|---|
[(#CHEMIN_IMAGE{facture-16.png}|balise_img)] | +[(#LOGO_FACTURE|image_reduire{20,26})][(#RANG). ]# | +[(#AUTORISER{modifier,facture,#ID_FACTURE}|?{ + #ID_FACTURE, + #ID_FACTURE + })] | +
(#PAGINATION{prive})
] +(#GET{p}) | ||
[(#TRI{multi id_organisation,<:facture:label_id_organisation:>,ajax})] | ++ | |
---|---|---|
[(#LOGO_FACTURE|image_reduire{20,20})]#ID_ORGANISATION | ++ + | +
(#PAGINATION{prive})
] +(#GET{p}) | |||
[(#TRI{multi id_organisation,<:facture:label_id_organisation:>,ajax})] | ++ | ||
---|---|---|---|
[(#LOGO_FACTURE|image_reduire{20,20})]#ID_ORGANISATION | + ++ [(#ENV{editable}|oui) + + ] + | +
(#PAGINATION{prive})
] +[(#GRAND_TOTAL|>{3}|oui)] +