PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.4.3
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.4.3
2.4.3 2.4.4 2.4.2 2.4.0 2.4.1 2.3.8 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.2.0 2.1.21 2.1.20 2.1.19 2.1.18 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 All 60 releases
← All changes | includes/Forms/Quote/QuoteFieldRegistration.php +10 -1 2.3.5 → 2.4.3 View file →
@@ -206,9 +206,9 @@
206 206 'name' => 'issue_date',
207 207 'required' => true,
208 208 'grid_cols' => 'sm:col-span-3',
209 209 'order' => 4,
210 - 'default_value' => date('Y-m-d'),
210 + 'default_value' => current_time('Y-m-d'),
211 211 'sanitize_callback' => 'sanitize_text_field',
212 212 'validate_callback' => function($value) {
213 213 return !empty($value) && strtotime($value) ? true : __('Please enter a valid quote date.', 'easy-invoice');
214 214 }
@@ -221,8 +221,17 @@
221 221 'name' => 'expiry_date',
222 222 'required' => true,
223 223 'grid_cols' => 'sm:col-span-3',
224 224 'order' => 5,
225 + // Required but shipped with no default, so saving a brand-new quote
226 + // always failed first time with "Expiry Date is required" — the same
227 + // defect the invoice form had with its issue/due dates. The quote date
228 + // field just above already defaults; this one was missed.
229 + //
230 + // 30 days matches the validity period used elsewhere in the plugin
231 + // (see QuoteController's quote defaults). There is no site setting for
232 + // quote validity yet; when one is added, read it here.
233 + 'default_value' => gmdate('Y-m-d', strtotime('+30 days', strtotime(current_time('Y-m-d')))),
225 234 'sanitize_callback' => 'sanitize_text_field',
226 235 'validate_callback' => function($value) {
227 236 return !empty($value) && strtotime($value) ? true : __('Please enter a valid expiry date.', 'easy-invoice');
228 237 }