diff --git a/app/Nova/Actions/Sber/SyncWithSystem.php b/app/Nova/Actions/Sber/SyncWithSystem.php index 15685ac..f3d4e90 100644 --- a/app/Nova/Actions/Sber/SyncWithSystem.php +++ b/app/Nova/Actions/Sber/SyncWithSystem.php @@ -60,6 +60,16 @@ class SyncWithSystem extends Action $success = $systemResponse['errCode'] == 0; + if ($success) { + $orderItem->update([ + 'synced_with_system' => true, + ]); + } else { + $orderItem->update([ + 'synced_with_system' => false, + ]); + } + return Action::modal('modal-response', [ 'html' => $success ? "Success" : "Fail", 'title' => $success ? "Success" : "Fail",