diff --git a/admin/meta-box-project-details.php b/admin/meta-box-project-details.php
index 6dac1f2..46a1b69 100644
--- a/admin/meta-box-project-details.php
+++ b/admin/meta-box-project-details.php
@@ -6,10 +6,11 @@
wp_nonce_field( 'orbis_save_project_details', 'orbis_project_details_meta_box_nonce' );
-$orbis_id = get_post_meta( $post->ID, '_orbis_project_id', true );
-$principal_id = get_post_meta( $post->ID, '_orbis_project_principal_id', true );
-$seconds = get_post_meta( $post->ID, '_orbis_project_seconds_available', true );
-$agreement_id = get_post_meta( $post->ID, '_orbis_project_agreement_id', true );
+$orbis_id = get_post_meta( $post->ID, '_orbis_project_id', true );
+$principal_id = get_post_meta( $post->ID, '_orbis_project_principal_id', true );
+$seconds = get_post_meta( $post->ID, '_orbis_project_seconds_available', true );
+$agreement_id = get_post_meta( $post->ID, '_orbis_project_agreement_id', true );
+$declarability = get_post_meta( $post->ID, '_orbis_project_declarability', true );
$invoice_reference = get_post_meta( $post->ID, '_orbis_invoice_reference', true );
$invoice_line_description = get_post_meta( $post->ID, '_orbis_invoice_line_description', true );
@@ -23,6 +24,7 @@
$principal_id = $project->principal_id;
$invoice_number = $project->invoice_number;
$seconds = $project->number_seconds;
+ $declarability = $project->declarability;
}
$principal = $wpdb->get_var( $wpdb->prepare( "SELECT name FROM $wpdb->orbis_companies WHERE id= %d;", $principal_id ) );
@@ -161,6 +163,40 @@
+
+
+
+ |
+
+ \__( '— Select Declarability —', 'orbis-projects' ),
+ 'chargeable' => \_x( 'Chargeable', 'declarability', 'orbis-projects' ),
+ 'non_chargeable' => \_x( 'Non-chargeable', 'declarability', 'orbis-projects' ),
+ 'excluded' => \_x( 'Excluded', 'declarability', 'orbis-projects' ),
+ ];
+
+ ?>
+
+ |
+
+
diff --git a/classes/AdminProjectPostType.php b/classes/AdminProjectPostType.php
index 73b8258..ff56b94 100644
--- a/classes/AdminProjectPostType.php
+++ b/classes/AdminProjectPostType.php
@@ -156,6 +156,7 @@ public function save_project( $post_id, $post ) {
'_orbis_project_agreement_id' => FILTER_VALIDATE_INT,
'_orbis_project_is_finished' => FILTER_VALIDATE_BOOLEAN,
'_orbis_project_is_invoicable' => FILTER_VALIDATE_BOOLEAN,
+ '_orbis_project_declarability' => FILTER_SANITIZE_STRING,
'_orbis_project_invoice_number' => FILTER_SANITIZE_STRING,
'_orbis_invoice_reference' => FILTER_SANITIZE_STRING,
'_orbis_invoice_line_description' => FILTER_SANITIZE_STRING,
@@ -224,6 +225,7 @@ public function save_project_sync( $post_id, $post ) {
$principal_id = get_post_meta( $post_id, '_orbis_project_principal_id', true );
$is_invoicable = get_post_meta( $post_id, '_orbis_project_is_invoicable', true );
+ $declarability = get_post_meta( $post_id, '_orbis_project_declarability', true );
$is_invoiced = get_post_meta( $post_id, '_orbis_project_is_invoiced', true );
$invoice_number = get_post_meta( $post_id, '_orbis_project_invoice_number', true );
$is_finished = get_post_meta( $post_id, '_orbis_project_is_finished', true );
@@ -250,6 +252,9 @@ public function save_project_sync( $post_id, $post ) {
$data['invoicable'] = $is_invoicable;
$form['invoicable'] = '%d';
+ $data['declarability'] = $declarability;
+ $form['declarability'] = '%s';
+
$data['invoiced'] = $is_invoiced;
$form['invoiced'] = '%d';
diff --git a/classes/Plugin.php b/classes/Plugin.php
index 6facf35..164c6b6 100644
--- a/classes/Plugin.php
+++ b/classes/Plugin.php
@@ -117,6 +117,7 @@ public function install() {
invoice_number VARCHAR(128) DEFAULT NULL,
finished BOOLEAN NOT NULL DEFAULT FALSE,
billable_amount DECIMAL(15,2) DEFAULT NULL,
+ declarability VARCHAR(16) DEFAULT '',
PRIMARY KEY (id),
KEY post_id (post_id),
KEY principal_id (principal_id)
diff --git a/languages/orbis-projects-nl_NL.mo b/languages/orbis-projects-nl_NL.mo
index e3b9073..9079b9e 100644
Binary files a/languages/orbis-projects-nl_NL.mo and b/languages/orbis-projects-nl_NL.mo differ
diff --git a/languages/orbis-projects-nl_NL.po b/languages/orbis-projects-nl_NL.po
index 4114f73..507aabd 100644
--- a/languages/orbis-projects-nl_NL.po
+++ b/languages/orbis-projects-nl_NL.po
@@ -4,29 +4,26 @@ msgid ""
msgstr ""
"Project-Id-Version: Orbis Projects\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/orbis-projects\n"
-"POT-Creation-Date: 2024-03-15T10:35:35+00:00\n"
-"PO-Revision-Date: 2024-03-15 11:35+0100\n"
+"POT-Creation-Date: 2025-01-09T11:32:24+00:00\n"
+"PO-Revision-Date: 2025-01-09 12:33+0100\n"
"Last-Translator: Remco Tolsma \n"
"Language-Team: Pronamic \n"
"Language: nl_NL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 3.4.2\n"
+"X-Generator: Poedit 3.5\n"
"X-Poedit-SourceCharset: UTF-8\n"
#. Plugin Name of the plugin
-#: orbis-projects.php
msgid "Orbis Projects"
msgstr "Orbis Projects"
#. Plugin URI of the plugin
-#: orbis-projects.php
msgid "https://wp.pronamic.directory/plugins/orbis-projects/"
msgstr "https://wp.pronamic.directory/plugins/orbis-projects/"
#. Description of the plugin
-#: orbis-projects.php
msgid ""
"The Orbis Projects plugin extends your Orbis environment with the option to "
"manage projects."
@@ -35,71 +32,69 @@ msgstr ""
"om projecten te beheren."
#. Author of the plugin
-#: orbis-projects.php
msgid "Pronamic"
msgstr "Pronamic"
#. Author URI of the plugin
-#: orbis-projects.php
msgid "https://www.pronamic.eu/"
msgstr "https://www.pronamic.nl/"
-#: admin/meta-box-project-details.php:69 admin/page-billing.php:109
+#: admin/meta-box-project-details.php:71 admin/page-billing.php:109
#: admin/page-billing.php:113 templates/projects-without-agreement.php:29
msgid "Orbis ID"
msgstr "Orbis ID"
-#: admin/meta-box-project-details.php:77 templates/projects-table-view.php:33
+#: admin/meta-box-project-details.php:79 templates/projects-table-view.php:33
msgid "Client"
msgstr "Klant"
-#: admin/meta-box-project-details.php:80
+#: admin/meta-box-project-details.php:82
msgid "Select Client"
msgstr "Selecteer klant"
-#: admin/meta-box-project-details.php:89 classes/AdminProjectPostType.php:45
+#: admin/meta-box-project-details.php:91 classes/AdminProjectPostType.php:45
msgid "Price"
msgstr "Prijs"
-#: admin/meta-box-project-details.php:97
+#: admin/meta-box-project-details.php:99
msgid "Hourly Rate"
msgstr "Uurtarief"
-#: admin/meta-box-project-details.php:105 admin/page-billing.php:119
+#: admin/meta-box-project-details.php:107 admin/page-billing.php:119
#: admin/page-billing.php:122 admin/page-billing.php:128
#: classes/AdminProjectPostType.php:46
msgid "Time"
msgstr "Tijd"
-#: admin/meta-box-project-details.php:111
+#: admin/meta-box-project-details.php:113
msgid ""
"You can enter time as 1.5 or 1:30 (they both mean 1 hour and 30 minutes)."
msgstr ""
"Je kunt de tijd invoeren als 1.5 of 1:30 (beide zijn 1 uur en 30 minuten)."
-#: admin/meta-box-project-details.php:118
+#: admin/meta-box-project-details.php:120
msgid "Agreement ID"
msgstr "Akkoord ID"
-#: admin/meta-box-project-details.php:125
+#: admin/meta-box-project-details.php:127
msgid "Choose an Agreement"
msgstr "Kies een akkoord"
-#: admin/meta-box-project-details.php:128
+#: admin/meta-box-project-details.php:130
msgid "Set as Agreement"
msgstr "Stel in als akkoord"
-#: admin/meta-box-project-details.php:128
+#: admin/meta-box-project-details.php:130
msgid "Choose a Agreement"
msgstr "Kies een akkoord"
-#: admin/meta-box-project-details.php:131
+#: admin/meta-box-project-details.php:133
msgid "You can select an .PDF or .TXT file from the WordPress media library."
msgstr ""
"Je kunt een .PDF of .TXT bestand selecteren uit de WordPress media "
"bibliotheek."
-#: admin/meta-box-project-details.php:132
+#: admin/meta-box-project-details.php:134
msgid ""
"If you received the agreement by mail print the complete mail conversation "
"with an PDF printer."
@@ -107,63 +102,86 @@ msgstr ""
"Als je een akkoord per e-mail hebt ontvangen print dan de complete e-mail "
"conversatie uit met een PDF-printer."
-#: admin/meta-box-project-details.php:139
+#: admin/meta-box-project-details.php:141
msgid "Finished"
msgstr "Afgerond"
-#: admin/meta-box-project-details.php:145
+#: admin/meta-box-project-details.php:147
msgid "Project is finished"
msgstr "Project is afgerond"
-#: admin/meta-box-project-details.php:153 templates/projects-table-view.php:46
+#: admin/meta-box-project-details.php:155 templates/projects-table-view.php:46
msgid "Invoicable"
msgstr "Factureerbaar"
-#: admin/meta-box-project-details.php:159
+#: admin/meta-box-project-details.php:161
msgid "Project is invoicable"
msgstr "Project is factureerbaar"
#: admin/meta-box-project-details.php:169
+msgid "Declarability"
+msgstr "Declarabiliteit"
+
+#: admin/meta-box-project-details.php:176
+msgid "— Select Declarability —"
+msgstr "— Selecteer declarabiliteit —"
+
+#: admin/meta-box-project-details.php:177
+msgctxt "declarability"
+msgid "Chargeable"
+msgstr "Declarabel"
+
+#: admin/meta-box-project-details.php:178
+msgctxt "declarability"
+msgid "Non-chargeable"
+msgstr "Niet-declarabel"
+
+#: admin/meta-box-project-details.php:179
+msgctxt "declarability"
+msgid "Excluded"
+msgstr "Uitgesloten"
+
+#: admin/meta-box-project-details.php:205
msgid "Invoiced"
msgstr "Gefactureerd"
-#: admin/meta-box-project-details.php:175
+#: admin/meta-box-project-details.php:211
msgid "Project is invoiced"
msgstr "Project is gefactureerd"
-#: admin/meta-box-project-details.php:184 templates/projects-table-view.php:106
+#: admin/meta-box-project-details.php:220 templates/projects-table-view.php:106
msgid "Invoice reference"
msgstr "Factuurreferentie"
-#: admin/meta-box-project-details.php:192
+#: admin/meta-box-project-details.php:228
msgid "Invoice Line Description"
msgstr "Factuurregelbeschrijving"
-#: admin/meta-box-project-details.php:207
+#: admin/meta-box-project-details.php:243
msgid "Payment Method"
msgstr "Betaalmethode"
-#: admin/meta-box-project-details.php:214
+#: admin/meta-box-project-details.php:250
msgid "— Select Payment Method —"
msgstr "— Selecteer betaalmethode —"
#. translators: 1: input for start date, 2: input for end date
-#: admin/meta-box-project-details.php:240
+#: admin/meta-box-project-details.php:276
msgctxt "including"
msgid "%1$s to %2$s"
msgstr "%1$s t/m %2$s"
-#: admin/meta-box-project-details.php:265
+#: admin/meta-box-project-details.php:301
msgctxt "including"
msgid "Billed to"
msgstr "Gefactureerd t/m"
-#: admin/meta-box-project-details.php:273
+#: admin/meta-box-project-details.php:309
msgid "Final invoice number"
msgstr "Eindfactuurnummer"
#: admin/page-billing.php:96 classes/ContentTypes.php:28
-#: classes/ContentTypes.php:30 classes/Plugin.php:159
+#: classes/ContentTypes.php:30 classes/Plugin.php:160
msgid "Projects"
msgstr "Projecten"
@@ -173,7 +191,7 @@ msgid "Principal"
msgstr "Opdrachtgever"
#: admin/page-billing.php:102 classes/ContentTypes.php:31
-#: classes/Plugin.php:162 templates/projects-table-view.php:34
+#: classes/Plugin.php:163 templates/projects-table-view.php:34
msgid "Project"
msgstr "Project"
@@ -271,7 +289,7 @@ msgctxt "orbis_project"
msgid "Add New"
msgstr "Nieuw project"
-#: classes/ContentTypes.php:33 classes/Plugin.php:167
+#: classes/ContentTypes.php:33 classes/Plugin.php:168
msgid "Add New Project"
msgstr "Nieuw project toevoegen"
@@ -279,7 +297,7 @@ msgstr "Nieuw project toevoegen"
msgid "Edit Project"
msgstr "Project bewerken"
-#: classes/ContentTypes.php:35 classes/Plugin.php:166
+#: classes/ContentTypes.php:35 classes/Plugin.php:167
msgid "New Project"
msgstr "Nieuw project"
@@ -295,7 +313,7 @@ msgstr "Toon projecten"
msgid "Search Projects"
msgstr "Projecten zoeken"
-#: classes/ContentTypes.php:39 classes/Plugin.php:164
+#: classes/ContentTypes.php:39 classes/Plugin.php:165
msgid "No projects found."
msgstr "Geen projecten gevonden."
@@ -446,39 +464,39 @@ msgctxt "slug"
msgid "project-status"
msgstr "project-status"
-#: classes/Plugin.php:158
+#: classes/Plugin.php:159
msgid "Involved Persons"
msgstr "Betrokken personen"
-#: classes/Plugin.php:163
+#: classes/Plugin.php:164
msgid "Search project"
msgstr "Zoek project"
-#: classes/Plugin.php:165
+#: classes/Plugin.php:166
msgid "Add Project"
msgstr "Project toevoegen"
-#: classes/Plugin.php:170
+#: classes/Plugin.php:171
msgid "Person"
msgstr "Persoon"
-#: classes/Plugin.php:171
+#: classes/Plugin.php:172
msgid "Search person"
msgstr "Zoek persoon"
-#: classes/Plugin.php:172
+#: classes/Plugin.php:173
msgid "No persons found."
msgstr "Geen personen gevonden."
-#: classes/Plugin.php:173
+#: classes/Plugin.php:174
msgid "Add Person"
msgstr "Persoon toevoegen"
-#: classes/Plugin.php:174
+#: classes/Plugin.php:175
msgid "New Person"
msgstr "Nieuw persoon"
-#: classes/Plugin.php:175
+#: classes/Plugin.php:176
msgid "Add New Person"
msgstr "Nieuw persoon toevoegen"
diff --git a/languages/orbis-projects.pot b/languages/orbis-projects.pot
index 4de9a42..dc76f7b 100644
--- a/languages/orbis-projects.pot
+++ b/languages/orbis-projects.pot
@@ -1,4 +1,4 @@
-# Copyright (C) 2024 Pronamic
+# Copyright (C) 2025 Pronamic
# This file is distributed under the GPL v2 or later.
msgid ""
msgstr ""
@@ -9,62 +9,57 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"POT-Creation-Date: 2024-03-15T10:35:35+00:00\n"
+"POT-Creation-Date: 2025-01-09T11:32:24+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"X-Generator: WP-CLI 2.10.0\n"
+"X-Generator: WP-CLI 2.9.0\n"
"X-Domain: orbis-projects\n"
#. Plugin Name of the plugin
-#: orbis-projects.php
msgid "Orbis Projects"
msgstr ""
#. Plugin URI of the plugin
-#: orbis-projects.php
msgid "https://wp.pronamic.directory/plugins/orbis-projects/"
msgstr ""
#. Description of the plugin
-#: orbis-projects.php
msgid "The Orbis Projects plugin extends your Orbis environment with the option to manage projects."
msgstr ""
#. Author of the plugin
-#: orbis-projects.php
msgid "Pronamic"
msgstr ""
#. Author URI of the plugin
-#: orbis-projects.php
msgid "https://www.pronamic.eu/"
msgstr ""
-#: admin/meta-box-project-details.php:69
+#: admin/meta-box-project-details.php:71
#: admin/page-billing.php:109
#: admin/page-billing.php:113
#: templates/projects-without-agreement.php:29
msgid "Orbis ID"
msgstr ""
-#: admin/meta-box-project-details.php:77
+#: admin/meta-box-project-details.php:79
#: templates/projects-table-view.php:33
msgid "Client"
msgstr ""
-#: admin/meta-box-project-details.php:80
+#: admin/meta-box-project-details.php:82
msgid "Select Client"
msgstr ""
-#: admin/meta-box-project-details.php:89
+#: admin/meta-box-project-details.php:91
#: classes/AdminProjectPostType.php:45
msgid "Price"
msgstr ""
-#: admin/meta-box-project-details.php:97
+#: admin/meta-box-project-details.php:99
msgid "Hourly Rate"
msgstr ""
-#: admin/meta-box-project-details.php:105
+#: admin/meta-box-project-details.php:107
#: admin/page-billing.php:119
#: admin/page-billing.php:122
#: admin/page-billing.php:128
@@ -72,95 +67,118 @@ msgstr ""
msgid "Time"
msgstr ""
-#: admin/meta-box-project-details.php:111
+#: admin/meta-box-project-details.php:113
msgid "You can enter time as 1.5 or 1:30 (they both mean 1 hour and 30 minutes)."
msgstr ""
-#: admin/meta-box-project-details.php:118
+#: admin/meta-box-project-details.php:120
msgid "Agreement ID"
msgstr ""
-#: admin/meta-box-project-details.php:125
+#: admin/meta-box-project-details.php:127
msgid "Choose an Agreement"
msgstr ""
-#: admin/meta-box-project-details.php:128
+#: admin/meta-box-project-details.php:130
msgid "Set as Agreement"
msgstr ""
-#: admin/meta-box-project-details.php:128
+#: admin/meta-box-project-details.php:130
msgid "Choose a Agreement"
msgstr ""
-#: admin/meta-box-project-details.php:131
+#: admin/meta-box-project-details.php:133
msgid "You can select an .PDF or .TXT file from the WordPress media library."
msgstr ""
-#: admin/meta-box-project-details.php:132
+#: admin/meta-box-project-details.php:134
msgid "If you received the agreement by mail print the complete mail conversation with an PDF printer."
msgstr ""
-#: admin/meta-box-project-details.php:139
+#: admin/meta-box-project-details.php:141
msgid "Finished"
msgstr ""
-#: admin/meta-box-project-details.php:145
+#: admin/meta-box-project-details.php:147
msgid "Project is finished"
msgstr ""
-#: admin/meta-box-project-details.php:153
+#: admin/meta-box-project-details.php:155
#: templates/projects-table-view.php:46
msgid "Invoicable"
msgstr ""
-#: admin/meta-box-project-details.php:159
+#: admin/meta-box-project-details.php:161
msgid "Project is invoicable"
msgstr ""
#: admin/meta-box-project-details.php:169
+msgid "Declarability"
+msgstr ""
+
+#: admin/meta-box-project-details.php:176
+msgid "— Select Declarability —"
+msgstr ""
+
+#: admin/meta-box-project-details.php:177
+msgctxt "declarability"
+msgid "Chargeable"
+msgstr ""
+
+#: admin/meta-box-project-details.php:178
+msgctxt "declarability"
+msgid "Non-chargeable"
+msgstr ""
+
+#: admin/meta-box-project-details.php:179
+msgctxt "declarability"
+msgid "Excluded"
+msgstr ""
+
+#: admin/meta-box-project-details.php:205
msgid "Invoiced"
msgstr ""
-#: admin/meta-box-project-details.php:175
+#: admin/meta-box-project-details.php:211
msgid "Project is invoiced"
msgstr ""
-#: admin/meta-box-project-details.php:184
+#: admin/meta-box-project-details.php:220
#: templates/projects-table-view.php:106
msgid "Invoice reference"
msgstr ""
-#: admin/meta-box-project-details.php:192
+#: admin/meta-box-project-details.php:228
msgid "Invoice Line Description"
msgstr ""
-#: admin/meta-box-project-details.php:207
+#: admin/meta-box-project-details.php:243
msgid "Payment Method"
msgstr ""
-#: admin/meta-box-project-details.php:214
+#: admin/meta-box-project-details.php:250
msgid "— Select Payment Method —"
msgstr ""
#. translators: 1: input for start date, 2: input for end date
-#: admin/meta-box-project-details.php:240
+#: admin/meta-box-project-details.php:276
msgctxt "including"
msgid "%1$s to %2$s"
msgstr ""
-#: admin/meta-box-project-details.php:265
+#: admin/meta-box-project-details.php:301
msgctxt "including"
msgid "Billed to"
msgstr ""
-#: admin/meta-box-project-details.php:273
+#: admin/meta-box-project-details.php:309
msgid "Final invoice number"
msgstr ""
#: admin/page-billing.php:96
#: classes/ContentTypes.php:28
#: classes/ContentTypes.php:30
-#: classes/Plugin.php:159
+#: classes/Plugin.php:160
msgid "Projects"
msgstr ""
@@ -172,7 +190,7 @@ msgstr ""
#: admin/page-billing.php:102
#: classes/ContentTypes.php:31
-#: classes/Plugin.php:162
+#: classes/Plugin.php:163
#: templates/projects-table-view.php:34
msgid "Project"
msgstr ""
@@ -280,7 +298,7 @@ msgid "Add New"
msgstr ""
#: classes/ContentTypes.php:33
-#: classes/Plugin.php:167
+#: classes/Plugin.php:168
msgid "Add New Project"
msgstr ""
@@ -289,7 +307,7 @@ msgid "Edit Project"
msgstr ""
#: classes/ContentTypes.php:35
-#: classes/Plugin.php:166
+#: classes/Plugin.php:167
msgid "New Project"
msgstr ""
@@ -306,7 +324,7 @@ msgid "Search Projects"
msgstr ""
#: classes/ContentTypes.php:39
-#: classes/Plugin.php:164
+#: classes/Plugin.php:165
msgid "No projects found."
msgstr ""
@@ -457,39 +475,39 @@ msgctxt "slug"
msgid "project-status"
msgstr ""
-#: classes/Plugin.php:158
+#: classes/Plugin.php:159
msgid "Involved Persons"
msgstr ""
-#: classes/Plugin.php:163
+#: classes/Plugin.php:164
msgid "Search project"
msgstr ""
-#: classes/Plugin.php:165
+#: classes/Plugin.php:166
msgid "Add Project"
msgstr ""
-#: classes/Plugin.php:170
+#: classes/Plugin.php:171
msgid "Person"
msgstr ""
-#: classes/Plugin.php:171
+#: classes/Plugin.php:172
msgid "Search person"
msgstr ""
-#: classes/Plugin.php:172
+#: classes/Plugin.php:173
msgid "No persons found."
msgstr ""
-#: classes/Plugin.php:173
+#: classes/Plugin.php:174
msgid "Add Person"
msgstr ""
-#: classes/Plugin.php:174
+#: classes/Plugin.php:175
msgid "New Person"
msgstr ""
-#: classes/Plugin.php:175
+#: classes/Plugin.php:176
msgid "Add New Person"
msgstr ""