Skip to content

Commit 659a779

Browse files
committed
Fix: remove quarter property
- since it is no longer needed
1 parent b149b7a commit 659a779

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

DebitExpress.VatRelief/Models/Info.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
public readonly struct Info
44
{
55
public Info(string tin,
6-
int quarter,
76
int month,
87
int year,
98
string regName = "",
@@ -20,7 +19,6 @@ public Info(string tin,
2019
Tin = tin;
2120
Month = month;
2221
Year = year;
23-
Quarter = quarter;
2422
RegName = regName;
2523
LastName = lastName;
2624
FirstName = firstName;
@@ -34,7 +32,6 @@ public Info(string tin,
3432
}
3533

3634
public string Tin { get; }
37-
public int Quarter { get; }
3835
public int Month { get; }
3936
public int Year { get; }
4037
public string RegName { get; }

DebitExpress.VatRelief/Utils/VatTemplateReader.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,23 +74,17 @@ private Info GetInfo(IXLWorkbook workbook)
7474

7575
var nonIndividual = infoSheet.Cell("B12").Value.ToString() ?? string.Empty;
7676

77-
var quarterStr = infoSheet.Cell("B15").Value.ToString();
78-
if (string.IsNullOrEmpty(quarterStr)) throw new ArgumentException("Quarter is required in INFO sheet cell B15");
79-
var quarterGet = int.TryParse(quarterStr, out var quarter);
80-
if (!quarterGet) throw new ArgumentException("Invalid [Quarter] value in INFO sheet cell B15");
81-
82-
var monthStr = infoSheet.Cell("B16").Value.ToString();
77+
var monthStr = infoSheet.Cell("B15").Value.ToString();
8378
if (string.IsNullOrEmpty(monthStr)) throw new ArgumentException("Starting month is required in INFO sheet cell B16");
8479
var monthGet = _months.TryGetValue(monthStr, out var month);
8580
if (!monthGet) throw new ArgumentException("Invalid [Starting Month] value in INFO sheet cell B16");
8681

87-
var yearStr = infoSheet.Cell("B17").Value.ToString();
82+
var yearStr = infoSheet.Cell("B16").Value.ToString();
8883
if (string.IsNullOrEmpty(yearStr)) throw new ArgumentException("Year is required in INFO sheet cell B17");
8984
var yearGet = int.TryParse(yearStr, out var year);
9085
if (!yearGet) throw new ArgumentException("Invalid [Year] value in INFO sheet cell B17");
9186

9287
return new Info(tin.Strip(),
93-
quarter,
9488
month,
9589
year,
9690
regName.CleanUp(),

0 commit comments

Comments
 (0)