From 077cbeb541289933c4f0972546982ca27fc277d0 Mon Sep 17 00:00:00 2001 From: Remco Tolsma <869674+remcotolsma@users.noreply.github.com> Date: Fri, 8 Mar 2024 09:18:27 +0100 Subject: [PATCH] Fix https://github.com/pronamic/orbis.pronamic.nl/issues/45. --- classes/Project.php | 2 + languages/orbis-projects-nl_NL.mo | Bin 7969 -> 8088 bytes languages/orbis-projects-nl_NL.po | 100 +++++++++++++------------- languages/orbis-projects.pot | 115 ++++++++++++++---------------- templates/project-invoices.php | 34 +++++++++ 5 files changed, 141 insertions(+), 110 deletions(-) diff --git a/classes/Project.php b/classes/Project.php index d4a0122..3fb0fa7 100644 --- a/classes/Project.php +++ b/classes/Project.php @@ -144,6 +144,8 @@ public function get_invoices() { invoice.*, invoice_line.amount, invoice_line.seconds, + invoice_line.start_date, + invoice_line.end_date, user.display_name FROM $wpdb->orbis_invoices_lines AS invoice_line diff --git a/languages/orbis-projects-nl_NL.mo b/languages/orbis-projects-nl_NL.mo index bdba8a6de7b902f6981d912b22806d71fd0a47ab..b34cb2dec1079f348f9e357e55456b39e3e546c9 100644 GIT binary patch delta 3042 zcmYk-drZ}39LMnoLGA>iNFeCRD`qO92Sm993FIY}2(!Wn1;vn?my{HanUpP^Yg#ha zq&BzI*-FpYXl;$PE~e{Zo0+X#*~mZGx-eNX+Uor|d};o6zQ5P=Jm>tL=lfiK@OEBD zzVAkS$m@>l5RpPuggDoYZ-#T@YKn3$9-A=?4-bl+mAfFWx~VGLG9g^q>aJFqfj1ewkU0n!sk%@9R)2(27dr5Nd0V z;}|@Jdj1{sX^DC$=)uc434cPh523aqnx~b(c%;dt;6$8*+LA)#<5qD~#}!tuN9N*M zQO~_CF((S_z|l8BC5l0Pzn8lTDsfT9?q8(T@tE&HYQ-M)yq(c zZ$Tx}gj(S?Yd;ak`fCs0qCrd6jarFbRL9?%H&Go7pk|^UsUC|oxm48i^H2k3V+9uC z9PGkmyo}na-%u0n_fgQy2T?N~MlDS+(^UeIsDYAE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iDp#=-^@7N#0ud?V5M{^sCes3b0*womcg-%?JCcX%} z;F@@UEBgH=Y{&dz7bh$_>_b;_F!sO1Z2Cu#PdLSaT*7(02d|>{Z=(ri(eZvR-i5vK zIqZifunA3U2b#cM%wzs=kP|2V7CYk)=zz`98)&IpqV4#y33o@o-y0pc2u)xNx)l}J z2CLBD&qXV;6#ZR2CVFzRJ>K{TE$I<7f#b+0oaS&ZUP8CvH*|u3(1CO4*w5!cj-d#- z70RMh(Q&KMl`ljqv^0nMJ78VBu@)V0Bbwt7+Ca57%MfL-a|jQvc0Y~nr8 zL<%qui{tgl=+@0dE4H{3^|utOxZuDI(I#|&573n)WB(}f31>Js(G{%5>o^!I7_0}b zLbqruy1+(s#k(-I_h>~9COC28L+FG@(TvZa16)I%uW%#Yzm4hivnbCb%*F{=g-)~! zOK?9r&P8m{^tz=8Qo7j?tK%w6}#j8eewQh zXrhPFN}P&bMxUKu(DBm9#){^k2^63SmG-3mzBZLyF!Oow3$^HqHY1A&+t7hNL?`+J zo%jU$yYuK4T#Md96G-P@suOoX=NX6#u^1o1rUWNEkl`4*M;Fk6ub?ab6`lBZv?7_j zb5^V)nn(e%$WVe#Fb)0vTr{zz=>LER<6(wCuLWh!=eSUrTir}bz4)V_?x%6N4pdVNUjO9SB( zyO9_{*ya!uiE_fyjvh^a&w@doh#5t6kXK22*Jm|dD&k$p5hS=#wyJ-u4m{0ou$^T7ZB diff --git a/languages/orbis-projects-nl_NL.po b/languages/orbis-projects-nl_NL.po index 9f1fdce..4bd1bdc 100644 --- a/languages/orbis-projects-nl_NL.po +++ b/languages/orbis-projects-nl_NL.po @@ -4,8 +4,8 @@ msgid "" msgstr "" "Project-Id-Version: Orbis Projects\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/orbis-projects\n" -"POT-Creation-Date: 2024-02-29T15:04:25+00:00\n" -"PO-Revision-Date: 2024-02-29 16:05+0100\n" +"POT-Creation-Date: 2024-03-08T08:17:30+00:00\n" +"PO-Revision-Date: 2024-03-08 09:18+0100\n" "Last-Translator: Remco Tolsma \n" "Language-Team: Pronamic \n" "Language: nl_NL\n" @@ -44,10 +44,8 @@ msgstr "Pronamic" msgid "https://www.pronamic.eu/" msgstr "https://www.pronamic.nl/" -#: admin/meta-box-project-details.php:67 admin/page-billing.php:100 -#: admin/page-billing.php:104 templates/projects-to-invoice.php:180 -#: templates/projects-to-invoice.php:184 -#: templates/projects-without-agreement.php:29 +#: admin/meta-box-project-details.php:67 admin/page-billing.php:109 +#: admin/page-billing.php:113 templates/projects-without-agreement.php:29 msgid "Orbis ID" msgstr "Orbis ID" @@ -67,10 +65,9 @@ msgstr "Prijs" msgid "Hourly Rate" msgstr "Uurtarief" -#: admin/meta-box-project-details.php:103 admin/page-billing.php:109 -#: admin/page-billing.php:112 admin/page-billing.php:118 -#: classes/AdminProjectPostType.php:47 templates/projects-to-invoice.php:189 -#: templates/projects-to-invoice.php:192 templates/projects-to-invoice.php:198 +#: admin/meta-box-project-details.php:103 admin/page-billing.php:119 +#: admin/page-billing.php:122 admin/page-billing.php:128 +#: classes/AdminProjectPostType.php:47 msgid "Time" msgstr "Tijd" @@ -170,10 +167,9 @@ msgstr "Datum" msgid "Invoice Number" msgstr "Factuurnummer" -#: admin/meta-box-project-invoices.php:19 admin/page-billing.php:108 -#: admin/page-billing.php:111 admin/page-billing.php:119 -#: templates/project-invoices.php:17 templates/projects-to-invoice.php:188 -#: templates/projects-to-invoice.php:191 templates/projects-to-invoice.php:199 +#: admin/meta-box-project-invoices.php:19 admin/page-billing.php:118 +#: admin/page-billing.php:121 admin/page-billing.php:129 +#: templates/project-invoices.php:17 msgid "Amount" msgstr "Bedrag" @@ -187,7 +183,7 @@ msgstr "Uren" msgid "Final Invoice" msgstr "Eindfactuur" -#: admin/meta-box-project-invoices.php:22 templates/project-invoices.php:20 +#: admin/meta-box-project-invoices.php:22 templates/project-invoices.php:22 msgid "User" msgstr "Gebruiker" @@ -211,59 +207,59 @@ msgstr "Factuur toevoegen" msgid "Are you sure you want to delete this invoice?" msgstr "Weet je zeker dat je deze factuur wil verwijderen?" -#: admin/page-billing.php:87 classes/ContentTypes.php:28 -#: classes/ContentTypes.php:30 classes/Plugin.php:171 +#: admin/page-billing.php:96 classes/ContentTypes.php:28 +#: classes/ContentTypes.php:30 classes/Plugin.php:159 msgid "Projects" msgstr "Projecten" -#: admin/page-billing.php:92 classes/AdminProjectPostType.php:45 -#: templates/projects-to-invoice.php:172 +#: admin/page-billing.php:101 classes/AdminProjectPostType.php:45 #: templates/projects-without-agreement.php:31 msgid "Principal" msgstr "Opdrachtgever" -#: admin/page-billing.php:93 classes/ContentTypes.php:31 classes/Plugin.php:174 -#: templates/projects-table-view.php:34 templates/projects-to-invoice.php:173 +#: admin/page-billing.php:102 classes/ContentTypes.php:31 +#: classes/Plugin.php:162 templates/projects-table-view.php:34 msgid "Project" msgstr "Project" -#: admin/page-billing.php:94 templates/projects-to-invoice.php:174 +#: admin/page-billing.php:103 msgid "Billable" msgstr "Factureerbaar" -#: admin/page-billing.php:95 templates/projects-to-invoice.php:175 +#: admin/page-billing.php:104 msgid "Billed" msgstr "Gefactureerd" -#: admin/page-billing.php:96 templates/projects-to-invoice.php:176 +#: admin/page-billing.php:105 msgid "Timesheet" msgstr "Urenregistraties" -#: admin/page-billing.php:97 templates/projects-to-invoice.php:177 +#: admin/page-billing.php:106 msgid "To Bill" msgstr "Te factureren" -#: admin/page-billing.php:101 admin/page-billing.php:105 -#: templates/projects-to-invoice.php:181 templates/projects-to-invoice.php:185 +#: admin/page-billing.php:110 admin/page-billing.php:114 msgid "Post ID" msgstr "Bericht-ID" -#: admin/page-billing.php:102 admin/page-billing.php:106 -#: templates/projects-to-invoice.php:182 templates/projects-to-invoice.php:186 +#: admin/page-billing.php:111 admin/page-billing.php:115 #: templates/projects.php:155 msgid "Name" msgstr "Naam" -#: admin/page-billing.php:113 classes/Theme.php:51 -#: templates/projects-to-invoice.php:193 +#: admin/page-billing.php:116 +msgid "Hourly rate" +msgstr "Uurtarief" + +#: admin/page-billing.php:123 classes/Theme.php:51 msgid "Invoices" msgstr "Facturen" -#: admin/page-billing.php:115 templates/projects-to-invoice.php:195 +#: admin/page-billing.php:125 msgid "Registered" msgstr "Geregistreerd" -#: admin/page-billing.php:116 templates/projects-to-invoice.php:196 +#: admin/page-billing.php:126 msgid "Available" msgstr "Beschikbaar" @@ -314,7 +310,7 @@ msgctxt "orbis_project" msgid "Add New" msgstr "Nieuw project" -#: classes/ContentTypes.php:33 classes/Plugin.php:179 +#: classes/ContentTypes.php:33 classes/Plugin.php:167 msgid "Add New Project" msgstr "Nieuw project toevoegen" @@ -322,7 +318,7 @@ msgstr "Nieuw project toevoegen" msgid "Edit Project" msgstr "Project bewerken" -#: classes/ContentTypes.php:35 classes/Plugin.php:178 +#: classes/ContentTypes.php:35 classes/Plugin.php:166 msgid "New Project" msgstr "Nieuw project" @@ -338,7 +334,7 @@ msgstr "Toon projecten" msgid "Search Projects" msgstr "Projecten zoeken" -#: classes/ContentTypes.php:39 classes/Plugin.php:176 +#: classes/ContentTypes.php:39 classes/Plugin.php:164 msgid "No projects found." msgstr "Geen projecten gevonden." @@ -489,39 +485,39 @@ msgctxt "slug" msgid "project-status" msgstr "project-status" -#: classes/Plugin.php:170 +#: classes/Plugin.php:158 msgid "Involved Persons" msgstr "Betrokken personen" -#: classes/Plugin.php:175 +#: classes/Plugin.php:163 msgid "Search project" msgstr "Zoek project" -#: classes/Plugin.php:177 +#: classes/Plugin.php:165 msgid "Add Project" msgstr "Project toevoegen" -#: classes/Plugin.php:182 +#: classes/Plugin.php:170 msgid "Person" msgstr "Persoon" -#: classes/Plugin.php:183 +#: classes/Plugin.php:171 msgid "Search person" msgstr "Zoek persoon" -#: classes/Plugin.php:184 +#: classes/Plugin.php:172 msgid "No persons found." msgstr "Geen personen gevonden." -#: classes/Plugin.php:185 +#: classes/Plugin.php:173 msgid "Add Person" msgstr "Persoon toevoegen" -#: classes/Plugin.php:186 +#: classes/Plugin.php:174 msgid "New Person" msgstr "Nieuw persoon" -#: classes/Plugin.php:187 +#: classes/Plugin.php:175 msgid "Add New Person" msgstr "Nieuw persoon toevoegen" @@ -533,15 +529,23 @@ msgstr "facturen" msgid "Invoice" msgstr "Factuur" -#: templates/project-invoices.php:69 +#: templates/project-invoices.php:20 +msgid "Start date" +msgstr "Startdatum" + +#: templates/project-invoices.php:21 +msgid "End date" +msgstr "Einddatum" + +#: templates/project-invoices.php:71 msgid "This is the final invoice." msgstr "Dit is de eindfactuur." -#: templates/project-invoices.php:82 +#: templates/project-invoices.php:114 msgid "Total:" msgstr "Totaal:" -#: templates/project-invoices.php:108 +#: templates/project-invoices.php:142 msgid "No invoices found." msgstr "Geen facturen gevonden." diff --git a/languages/orbis-projects.pot b/languages/orbis-projects.pot index e194731..44b041a 100644 --- a/languages/orbis-projects.pot +++ b/languages/orbis-projects.pot @@ -9,7 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-02-29T15:04:25+00:00\n" +"POT-Creation-Date: 2024-03-08T08:17:30+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.10.0\n" "X-Domain: orbis-projects\n" @@ -40,10 +40,8 @@ msgid "https://www.pronamic.eu/" msgstr "" #: admin/meta-box-project-details.php:67 -#: admin/page-billing.php:100 -#: admin/page-billing.php:104 -#: templates/projects-to-invoice.php:180 -#: templates/projects-to-invoice.php:184 +#: admin/page-billing.php:109 +#: admin/page-billing.php:113 #: templates/projects-without-agreement.php:29 msgid "Orbis ID" msgstr "" @@ -67,13 +65,10 @@ msgid "Hourly Rate" msgstr "" #: admin/meta-box-project-details.php:103 -#: admin/page-billing.php:109 -#: admin/page-billing.php:112 -#: admin/page-billing.php:118 +#: admin/page-billing.php:119 +#: admin/page-billing.php:122 +#: admin/page-billing.php:128 #: classes/AdminProjectPostType.php:47 -#: templates/projects-to-invoice.php:189 -#: templates/projects-to-invoice.php:192 -#: templates/projects-to-invoice.php:198 msgid "Time" msgstr "" @@ -170,13 +165,10 @@ msgid "Invoice Number" msgstr "" #: admin/meta-box-project-invoices.php:19 -#: admin/page-billing.php:108 -#: admin/page-billing.php:111 -#: admin/page-billing.php:119 +#: admin/page-billing.php:118 +#: admin/page-billing.php:121 +#: admin/page-billing.php:129 #: templates/project-invoices.php:17 -#: templates/projects-to-invoice.php:188 -#: templates/projects-to-invoice.php:191 -#: templates/projects-to-invoice.php:199 msgid "Amount" msgstr "" @@ -192,7 +184,7 @@ msgid "Final Invoice" msgstr "" #: admin/meta-box-project-invoices.php:22 -#: templates/project-invoices.php:20 +#: templates/project-invoices.php:22 msgid "User" msgstr "" @@ -216,76 +208,67 @@ msgstr "" msgid "Are you sure you want to delete this invoice?" msgstr "" -#: admin/page-billing.php:87 +#: admin/page-billing.php:96 #: classes/ContentTypes.php:28 #: classes/ContentTypes.php:30 -#: classes/Plugin.php:171 +#: classes/Plugin.php:159 msgid "Projects" msgstr "" -#: admin/page-billing.php:92 +#: admin/page-billing.php:101 #: classes/AdminProjectPostType.php:45 -#: templates/projects-to-invoice.php:172 #: templates/projects-without-agreement.php:31 msgid "Principal" msgstr "" -#: admin/page-billing.php:93 +#: admin/page-billing.php:102 #: classes/ContentTypes.php:31 -#: classes/Plugin.php:174 +#: classes/Plugin.php:162 #: templates/projects-table-view.php:34 -#: templates/projects-to-invoice.php:173 msgid "Project" msgstr "" -#: admin/page-billing.php:94 -#: templates/projects-to-invoice.php:174 +#: admin/page-billing.php:103 msgid "Billable" msgstr "" -#: admin/page-billing.php:95 -#: templates/projects-to-invoice.php:175 +#: admin/page-billing.php:104 msgid "Billed" msgstr "" -#: admin/page-billing.php:96 -#: templates/projects-to-invoice.php:176 +#: admin/page-billing.php:105 msgid "Timesheet" msgstr "" -#: admin/page-billing.php:97 -#: templates/projects-to-invoice.php:177 +#: admin/page-billing.php:106 msgid "To Bill" msgstr "" -#: admin/page-billing.php:101 -#: admin/page-billing.php:105 -#: templates/projects-to-invoice.php:181 -#: templates/projects-to-invoice.php:185 +#: admin/page-billing.php:110 +#: admin/page-billing.php:114 msgid "Post ID" msgstr "" -#: admin/page-billing.php:102 -#: admin/page-billing.php:106 -#: templates/projects-to-invoice.php:182 -#: templates/projects-to-invoice.php:186 +#: admin/page-billing.php:111 +#: admin/page-billing.php:115 #: templates/projects.php:155 msgid "Name" msgstr "" -#: admin/page-billing.php:113 +#: admin/page-billing.php:116 +msgid "Hourly rate" +msgstr "" + +#: admin/page-billing.php:123 #: classes/Theme.php:51 -#: templates/projects-to-invoice.php:193 msgid "Invoices" msgstr "" -#: admin/page-billing.php:115 -#: templates/projects-to-invoice.php:195 +#: admin/page-billing.php:125 msgid "Registered" msgstr "" -#: admin/page-billing.php:116 -#: templates/projects-to-invoice.php:196 +#: admin/page-billing.php:126 msgid "Available" msgstr "" @@ -339,7 +322,7 @@ msgid "Add New" msgstr "" #: classes/ContentTypes.php:33 -#: classes/Plugin.php:179 +#: classes/Plugin.php:167 msgid "Add New Project" msgstr "" @@ -348,7 +331,7 @@ msgid "Edit Project" msgstr "" #: classes/ContentTypes.php:35 -#: classes/Plugin.php:178 +#: classes/Plugin.php:166 msgid "New Project" msgstr "" @@ -365,7 +348,7 @@ msgid "Search Projects" msgstr "" #: classes/ContentTypes.php:39 -#: classes/Plugin.php:176 +#: classes/Plugin.php:164 msgid "No projects found." msgstr "" @@ -516,39 +499,39 @@ msgctxt "slug" msgid "project-status" msgstr "" -#: classes/Plugin.php:170 +#: classes/Plugin.php:158 msgid "Involved Persons" msgstr "" -#: classes/Plugin.php:175 +#: classes/Plugin.php:163 msgid "Search project" msgstr "" -#: classes/Plugin.php:177 +#: classes/Plugin.php:165 msgid "Add Project" msgstr "" -#: classes/Plugin.php:182 +#: classes/Plugin.php:170 msgid "Person" msgstr "" -#: classes/Plugin.php:183 +#: classes/Plugin.php:171 msgid "Search person" msgstr "" -#: classes/Plugin.php:184 +#: classes/Plugin.php:172 msgid "No persons found." msgstr "" -#: classes/Plugin.php:185 +#: classes/Plugin.php:173 msgid "Add Person" msgstr "" -#: classes/Plugin.php:186 +#: classes/Plugin.php:174 msgid "New Person" msgstr "" -#: classes/Plugin.php:187 +#: classes/Plugin.php:175 msgid "Add New Person" msgstr "" @@ -561,15 +544,23 @@ msgstr "" msgid "Invoice" msgstr "" -#: templates/project-invoices.php:69 +#: templates/project-invoices.php:20 +msgid "Start date" +msgstr "" + +#: templates/project-invoices.php:21 +msgid "End date" +msgstr "" + +#: templates/project-invoices.php:71 msgid "This is the final invoice." msgstr "" -#: templates/project-invoices.php:82 +#: templates/project-invoices.php:114 msgid "Total:" msgstr "" -#: templates/project-invoices.php:108 +#: templates/project-invoices.php:142 msgid "No invoices found." msgstr "" diff --git a/templates/project-invoices.php b/templates/project-invoices.php index dcfcfc1..9d8be59 100644 --- a/templates/project-invoices.php +++ b/templates/project-invoices.php @@ -17,6 +17,8 @@ + + @@ -71,6 +73,36 @@ } ?> + + start_date ) { + $start_date = \DateTimeImmutable::createFromFormat( 'Y-m-d', $invoice->start_date, new \DateTimeZone( 'UTC' ) ); + + if ( false !== $start_date ) { + $start_date = $start_date->setTime( 0, 0 ); + + echo \esc_html( \date_i18n( 'D j M Y', $start_date->getTimestamp() ) ); + } + } + + ?> + + + end_date ) { + $end_date = \DateTimeImmutable::createFromFormat( 'Y-m-d', $invoice->end_date, new \DateTimeZone( 'UTC' ) ); + + if ( false !== $end_date ) { + $end_date = $end_date->setTime( 0, 0 ); + + echo \esc_html( \date_i18n( 'D j M Y', $end_date->getTimestamp() ) ); + } + } + + ?> + display_name ); ?> @@ -94,6 +126,8 @@ + +