VAT report work; secondary bank tx descriptor

This commit is contained in:
Rick Falkvinge
2017-10-21 20:15:57 +02:00
parent 33407ee810
commit 7b40d02751
3 changed files with 22 additions and 8 deletions
+13 -2
View File
@@ -131,10 +131,21 @@ namespace Swarmops.Logic.Financial
ExternalBankDataRecord newRecord = new ExternalBankDataRecord();
if (fieldNameLookup.ContainsKey (ExternalBankDataFieldName.Description))
if (fieldNameLookup.ContainsKey (ExternalBankDataFieldName.DescriptionPrimary))
{
newRecord.Description =
StripQuotes (lineFields[fieldNameLookup[ExternalBankDataFieldName.Description]]);
StripQuotes (lineFields[fieldNameLookup[ExternalBankDataFieldName.DescriptionPrimary]]);
}
// If primary description is empty, try to apply a secondary description
if (String.IsNullOrEmpty(newRecord.Description))
{
if (fieldNameLookup.ContainsKey(ExternalBankDataFieldName.DescriptionSecondary))
{
newRecord.Description =
StripQuotes(lineFields[fieldNameLookup[ExternalBankDataFieldName.DescriptionSecondary]]);
}
}
if (fieldNameLookup.ContainsKey (ExternalBankDataFieldName.AccountBalance))
+6 -4
View File
@@ -74,7 +74,7 @@ namespace Swarmops.Logic.Financial
result.Culture = "sv-SE";
result.FieldNames[ExternalBankDataFieldName.Date] = "Bokföringsdatum";
result.FieldNames[ExternalBankDataFieldName.Description] = "Text/mottagare";
result.FieldNames[ExternalBankDataFieldName.DescriptionPrimary] = "Text/mottagare";
result.FieldNames[ExternalBankDataFieldName.TransactionNet] = "Belopp";
result.FieldNames[ExternalBankDataFieldName.AccountBalance] = "Saldo";
result.FieldNames[ExternalBankDataFieldName.NotUniqueId] = "Verifikationsnummer";
@@ -98,7 +98,7 @@ namespace Swarmops.Logic.Financial
result.FieldNames[ExternalBankDataFieldName.Date] = "Date";
result.FieldNames[ExternalBankDataFieldName.Time] = "Time";
result.FieldNames[ExternalBankDataFieldName.TimeZone] = "Time Zone";
result.FieldNames[ExternalBankDataFieldName.Description] = "Name";
result.FieldNames[ExternalBankDataFieldName.DescriptionPrimary] = "Name";
result.FieldNames[ExternalBankDataFieldName.Currency] = "Currency";
result.FieldNames[ExternalBankDataFieldName.TransactionGross] = "Gross";
result.FieldNames[ExternalBankDataFieldName.TransactionFee] = "Fee";
@@ -125,7 +125,8 @@ namespace Swarmops.Logic.Financial
result.InitialReplacements = ";|\t| €|";
result.FieldNames[ExternalBankDataFieldName.Date] = "Buchungstag";
result.FieldNames[ExternalBankDataFieldName.Description] = "Buchungsdetails";
result.FieldNames[ExternalBankDataFieldName.DescriptionPrimary] = "Buchungsdetails";
result.FieldNames[ExternalBankDataFieldName.DescriptionSecondary] = "Umsatzart";
result.FieldNames[ExternalBankDataFieldName.TransactionNet] = "Betrag (€)";
result.FieldNames[ExternalBankDataFieldName.AccountBalance] = "Saldo (€)";
@@ -150,7 +151,8 @@ namespace Swarmops.Logic.Financial
TransactionGross,
TransactionFee,
TransactionNet,
Description,
DescriptionPrimary,
DescriptionSecondary,
UniqueId,
NotUniqueId,
Date,
+3 -2
View File
@@ -260,7 +260,7 @@ namespace Swarmops.Logic.Financial
}
}
public new int OpenTransactionId
private new int OpenTransactionId
{
get
{
@@ -283,7 +283,7 @@ namespace Swarmops.Logic.Financial
set { this.OpenTransactionId = value.Identity; }
}
public new int CloseTransactionId
private new int CloseTransactionId
{
get { return base.CloseTransactionId; }
set
@@ -305,6 +305,7 @@ namespace Swarmops.Logic.Financial
if (value != null)
{
this.CloseTransactionId = value.Identity;
value.Dependency = this;
this.Open = false;
}
else