From f255e75b929395208d44af999c75bdd3a79e3ca7 Mon Sep 17 00:00:00 2001 From: Roberto Guido Date: Sat, 30 Dec 2023 17:00:16 +0100 Subject: [PATCH] fix invalidazione pagamento ordine. closes #246 --- code/app/Movement.php | 4 ++-- code/tests/Services/UsersServiceTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/app/Movement.php b/code/app/Movement.php index 56a02f88..0a7aef3c 100644 --- a/code/app/Movement.php +++ b/code/app/Movement.php @@ -213,12 +213,12 @@ public function attachToTarget($field = 'payment_id') public function detachFromSender($field = 'payment_id') { - $this->wiring('sender', $field, 0); + $this->wiring('sender', $field, null); } public function detachFromTarget($field = 'payment_id') { - $this->wiring('target', $field, 0); + $this->wiring('target', $field, null); } public static function generate($type, $sender, $target, $amount) diff --git a/code/tests/Services/UsersServiceTest.php b/code/tests/Services/UsersServiceTest.php index c118e351..1099bc91 100644 --- a/code/tests/Services/UsersServiceTest.php +++ b/code/tests/Services/UsersServiceTest.php @@ -202,7 +202,7 @@ public function testStoreAndMail() */ public function testStoreFriend() { - $initial_count = $users->count(); + $initial_count = User::query()->creditable()->count(); $this->actingAs($this->userWithViewPerm);