From 12824d114941116a2e8c6c7c8574834624201ee7 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Thu, 15 Dec 2022 16:39:17 +0000 Subject: [PATCH] Clear total charge as well (#1095) --- app/models/lettings_log.rb | 1 + spec/models/lettings_log_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/models/lettings_log.rb b/app/models/lettings_log.rb index 14d0ead2c..d9375d5fd 100644 --- a/app/models/lettings_log.rb +++ b/app/models/lettings_log.rb @@ -555,6 +555,7 @@ private self.scharge = nil self.pscharge = nil self.supcharg = nil + self.tcharge = nil end errors.clear diff --git a/spec/models/lettings_log_spec.rb b/spec/models/lettings_log_spec.rb index 67db22f46..1ea1d35d3 100644 --- a/spec/models/lettings_log_spec.rb +++ b/spec/models/lettings_log_spec.rb @@ -2073,6 +2073,7 @@ RSpec.describe LettingsLog do expect(lettings_log.scharge).to eq(nil) expect(lettings_log.pscharge).to eq(nil) expect(lettings_log.supcharg).to eq(nil) + expect(lettings_log.tcharge).to eq(nil) end it "does not impact other validations" do