File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public function render(\Magento\Framework\DataObject $row)
60
60
return $ data ;
61
61
}
62
62
63
- $ data = (float )$ data * $ this ->_getRate ($ row );
63
+ $ data = (float ) $ data * $ this ->_getRate ($ row );
64
64
$ data = sprintf ("%f " , $ data );
65
65
$ data = $ this ->_localeCurrency ->getCurrency ($ currencyCode )->toCurrency ($ data );
66
66
return $ data ;
@@ -79,7 +79,9 @@ protected function _getCurrencyCode($row)
79
79
if ($ code = $ this ->getColumn ()->getCurrencyCode ()) {
80
80
return $ code ;
81
81
}
82
- if ($ code = $ row ->getData ($ this ->getColumn ()->getCurrency ())) {
82
+ $ currency = $ this ->getColumn ()->getCurrency ();
83
+
84
+ if ($ currency !== null && $ code = $ row ->getData ($ currency )) {
83
85
return $ code ;
84
86
}
85
87
return false ;
@@ -94,10 +96,12 @@ protected function _getCurrencyCode($row)
94
96
protected function _getRate ($ row )
95
97
{
96
98
if ($ rate = $ this ->getColumn ()->getRate ()) {
97
- return (float )$ rate ;
99
+ return (float ) $ rate ;
98
100
}
99
- if ($ rate = $ row ->getData ($ this ->getColumn ()->getRateField ())) {
100
- return (float )$ rate ;
101
+ $ rateField = $ this ->getColumn ()->getRateField ();
102
+
103
+ if ($ rateField !== null && $ rate = $ row ->getData ($ rateField )) {
104
+ return (float ) $ rate ;
101
105
}
102
106
return 1 ;
103
107
}
You can’t perform that action at this time.
0 commit comments