Merge branch 'develop' into 5.8-dev

This commit is contained in:
James Cole 2022-04-13 14:11:48 +02:00
commit b10c1044bd
3 changed files with 5 additions and 6 deletions

View File

@ -555,7 +555,9 @@ trait TimeCollection
*/ */
public function setObjectBefore(Carbon $date, string $field): GroupCollectorInterface public function setObjectBefore(Carbon $date, string $field): GroupCollectorInterface
{ {
die('a'); $afterStr = $date->format('Y-m-d 00:00:00');
$this->query->where(sprintf('transaction_journals.%s', $field), '<=', $afterStr);
return $this;
} }
/** /**

View File

@ -1374,7 +1374,7 @@ class OperatorQuerySearch implements SearchInterface
foreach ($range as $key => $value) { foreach ($range as $key => $value) {
switch ($key) { switch ($key) {
default: default:
throw new FireflyException(sprintf('Cannot handle key "%s" in setDateAfterParams()', $key)); throw new FireflyException(sprintf('Cannot handle key "%s" in setObjectDateBeforeParams()', $key));
case 'exact': case 'exact':
$this->collector->setObjectBefore($value, $field); $this->collector->setObjectBefore($value, $field);
$this->operators->push(['type' => sprintf('%s_before', $field), 'value' => $value->format('Y-m-d'),]); $this->operators->push(['type' => sprintf('%s_before', $field), 'value' => $value->format('Y-m-d'),]);
@ -1413,7 +1413,7 @@ class OperatorQuerySearch implements SearchInterface
foreach ($range as $key => $value) { foreach ($range as $key => $value) {
switch ($key) { switch ($key) {
default: default:
throw new FireflyException(sprintf('Cannot handle key "%s" in setDateAfterParams()', $key)); throw new FireflyException(sprintf('Cannot handle key "%s" in setObjectDateAfterParams()', $key));
case 'exact': case 'exact':
$this->collector->setObjectAfter($value, $field); $this->collector->setObjectAfter($value, $field);
$this->operators->push(['type' => sprintf('%s_after', $field), 'value' => $value->format('Y-m-d'),]); $this->operators->push(['type' => sprintf('%s_after', $field), 'value' => $value->format('Y-m-d'),]);

View File

@ -807,9 +807,6 @@ class FireflyValidator extends Validator
->where('response', $response) ->where('response', $response)
->where('delivery', $delivery) ->where('delivery', $delivery)
->where('url', $url)->count(); ->where('url', $url)->count();
// find similar webhook for user:
//= var_dump($this->data);
//exit;
} }
return false; return false;