File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
Resources/views/admin_order Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -72,8 +72,12 @@ protected function getFormatter(): IntlFormatter
72
72
return \Pimcore::getContainer ()->get (IntlFormatter::class);
73
73
}
74
74
75
- public function toCurrency (float |int |string |Decimal $ value , array |string $ pattern = 'default ' ): string
75
+ public function toCurrency (null | float |int |string |Decimal $ value , array |string $ pattern = 'default ' ): string
76
76
{
77
+ if ($ value == null ) {
78
+ return '' ;
79
+ }
80
+
77
81
if (is_array ($ pattern )) {
78
82
$ symbol = $ pattern ['display ' ] ? $ pattern ['display ' ] : self ::USE_SYMBOL ;
79
83
$ position = $ pattern ['position ' ] ? $ pattern ['position ' ] : self ::RIGHT ;
Original file line number Diff line number Diff line change 391
391
{% endfor %}
392
392
{% endfor %}
393
393
394
- <!-- Separator -->
395
- <div class =" separator text-muted" >
396
- <time >{{ formatter.formatDateTime (order.getOrderdate (), constant (' \\Pimcore\\Localization\\IntlFormatter::DATETIME_MEDIUM' )) }}</time >
397
- </div >
398
- <!-- /Separator -->
394
+ {% if order.getOrderdate () %}
395
+ <!-- Separator -->
396
+ <div class =" separator text-muted" >
397
+ <time >{{ formatter.formatDateTime (order.getOrderdate (), constant (' \\Pimcore\\Localization\\IntlFormatter::DATETIME_MEDIUM' )) }}</time >
398
+ </div >
399
+ <!-- /Separator -->
400
+ {% endif %}
399
401
400
402
<article class =" panel panel-default panel-outline" >
401
403
<div class =" panel-heading icon alert-secondary" >
You can’t perform that action at this time.
0 commit comments