Skip to content

Commit 117e6e8

Browse files
committed
Corrected the Renewr sync script to handle translatable task.detail values.
1 parent ebd9874 commit 117e6e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Console/Commands/RenewrSync.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ private function processRenewals($matter, $renewrPatent)
219219

220220
$task = $matter->tasks()
221221
->where('task.code', 'REN')
222-
->whereRaw('CAST(task.detail AS UNSIGNED) = ?', [$renewal->renewalYearNumber])
222+
->whereRaw("CAST(task.detail->>'$.en' AS UNSIGNED) = ?", [$renewal->renewalYearNumber])
223223
->first();
224224

225225
if ($task) {
@@ -297,7 +297,7 @@ private function insertNewRenewal($matter, $renewal, $renewrPatent)
297297

298298
$task = Task::create([
299299
'code' => 'REN',
300-
'detail' => $renewal->renewalYearNumber,
300+
'detail' => ['en' => $renewal->renewalYearNumber],
301301
'due_date' => $renewal->renewalDate,
302302
'currency' => $renewal->fees->invoiceCurrency ?? 'EUR',
303303
'cost' => $cost,

0 commit comments

Comments
 (0)