wip
This commit is contained in:
@@ -162,7 +162,6 @@ class CurrencyRate extends Model
|
|||||||
$updates = [];
|
$updates = [];
|
||||||
foreach ($period as $date) {
|
foreach ($period as $date) {
|
||||||
|
|
||||||
dump($date->toDateString());
|
|
||||||
$lookupDate = self::getNearestPastDate($date, $rates);
|
$lookupDate = self::getNearestPastDate($date, $rates);
|
||||||
|
|
||||||
if (is_null($lookupDate)) {
|
if (is_null($lookupDate)) {
|
||||||
@@ -217,6 +216,8 @@ class CurrencyRate extends Model
|
|||||||
// try the day before then
|
// try the day before then
|
||||||
$date = Carbon::parse($date)->subDay();
|
$date = Carbon::parse($date)->subDay();
|
||||||
|
|
||||||
|
dump($date->toDateString());
|
||||||
|
|
||||||
// prevent runaway infinite loops
|
// prevent runaway infinite loops
|
||||||
if ($date->lessThan($date->copy()->subWeek())) {
|
if ($date->lessThan($date->copy()->subWeek())) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user