Skip to content

Commit

Permalink
bugfix 修正 PURCHASEHISTORY 命令
Browse files Browse the repository at this point in the history
  • Loading branch information
chr233 committed Jul 2, 2024
1 parent 4134761 commit a6d5d03
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion ASFEnhance/Account/CurrencyHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ internal static class CurrencyHelper
{ "¥", "CNY" },
{ "COL$", "COP" },
{ "", "CRC" },
{ "--€", "EUR" },
{ "", "EUR" },
{ "£", "GBP" },
{ "HK$", "HKD" },
Expand Down Expand Up @@ -102,6 +103,7 @@ internal static class CurrencyHelper
"BRL",
"NOK",
"EUR",
"PLN"
"PLN",
"VND",
];
}
3 changes: 2 additions & 1 deletion ASFEnhance/Account/HtmlParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ decimal ParseMoneyString(string strMoney)

string strItem = whtItem?.Text().Trim().Replace("\t", "") ?? "";
string strType = whtType?.Text().Trim().Replace("\t", "") ?? "";
string strTotal = whtTotal?.Text().Trim().Replace("\t", "") ?? "";
string strTotal = whtTotal?.Text().Replace("资金", "").Trim().Replace("\t", "") ?? "";
string strChange = whtChange?.Text().Trim().Replace("\t", "") ?? "";

if (!string.IsNullOrEmpty(strType))
Expand All @@ -174,6 +174,7 @@ decimal ParseMoneyString(string strMoney)
if (!string.IsNullOrEmpty(strType) && !strType.StartsWith("转换") && !strType.StartsWith("退款"))
{
int total = (int)(ParseMoneyString(strTotal) * 100);

int walletChange;
int walletChangeAbs;

Expand Down
2 changes: 1 addition & 1 deletion ASFEnhance/RegexUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal static partial class RegexUtils
[GeneratedRegex("g_historyCursor = ([^;]+)")]
public static partial Regex MatchHistortyCursor();

[GeneratedRegex(@"^\s*([-+])?([^\d,.]*)([\d,.]+)([^\d,.]*)$")]
[GeneratedRegex(@"^([-+])?([^\d,.]*)([\d,.]+)\s*([^\d,.]*|[pуб.]*)$")]
public static partial Regex MatchHistoryItem();

[GeneratedRegex(@"\( (\d+),")]
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>2.1.10.3</Version>
<Version>2.1.10.4</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit a6d5d03

Please sign in to comment.