More Expensify output tests

This commit is contained in:
Rick Falkvinge
2018-02-15 18:13:22 +01:00
parent e3e53a4ec8
commit 666c52df2d
3 changed files with 23 additions and 15 deletions
@@ -224,10 +224,10 @@
idField="expenseId">
<thead>
<tr>
<th data-options="field:'Budget',width:150"><asp:Label ID="LabelGridHeaderBudget" runat="server" Text="XYZ Budget" /></th>
<th data-options="field:'CreatedDateTime',width:60"><asp:Label ID="LabelGridHeaderCreatedDate" runat="server" Text="XYZ Created" /></th>
<th data-options="field:'Budget',width:130"><asp:Label ID="LabelGridHeaderBudget" runat="server" Text="XYZ Due" /></th>
<th data-options="field:'Description',width:140"><asp:Label ID="LabelExpensifyHeaderDescription" runat="server" Text="XYZ Person / Organization" /></th>
<th data-options="field:'AmountVat',width:180,align:'right'"><asp:Label ID="LabelExpensifyHeaderVat" runat="server" Text="XYZ Description" /></th>
<th data-options="field:'Description',width:200"><asp:Label ID="LabelExpensifyHeaderDescription" runat="server" Text="XYZ Description" /></th>
<th data-options="field:'AmountVat',width:90,align:'right'"><asp:Label ID="LabelExpensifyHeaderVat" runat="server" Text="XYZ Vat" /></th>
<th data-options="field:'Amount',width:90,align:'right'"><asp:Label ID="LabelExpensifyHeaderAmount" runat="server" Text="XYZ Amount" /></th>
<th data-options="field:'Docs',width:43,align:'center'"><asp:Label ID="LabelExpensifyHeaderDocs" runat="server" Text="XYZAct" /></th>
</tr>
@@ -383,6 +383,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
newRecord.ReceiptUrl = csvReader.GetField(fieldMap[ExpensifyColumns.ReceiptUrl]);
newRecord.Timestamp = DateTime.Parse(csvReader.GetField(fieldMap[ExpensifyColumns.Timestamp]));
newRecord.Guid = Guid.NewGuid().ToString();
if (vatEnabled)
{
@@ -456,7 +457,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
string expensifyFileName = (string) txInfo["receiptFilename"];
string actualReceiptUrl = "https://s3.amazonaws.com/receipts.expensify.com/" + expensifyFileName;
string newGuidString = Guid.NewGuid().ToString();
string newGuidString = recordList[loop].Guid;
string fullyQualifiedFileName = Document.DailyStorageFolder + newGuidString;
string relativeFileName = relativePath + newGuidString;
@@ -514,8 +515,11 @@ namespace Swarmops.Frontend.Pages.v5.Financial
{
outputRecords.Add(new ExpensifyOutputRecord
{
Description = record.Description,
Amount = (record.AmountCents / 100.0).ToString("N2")
Description = record.CategoryCustom + " / " + record.CategoryStandard + " / " + record.Description,
CreatedDateTime = record.Timestamp.ToString("MMM dd"),
Amount = (record.AmountCents / 100.0).ToString("N2"),
AmountVat = (record.VatCents / 100.0).ToString("N2"),
Guid = record.Guid
});
}
@@ -573,6 +577,8 @@ namespace Swarmops.Frontend.Pages.v5.Financial
public string ExtendedInfo { get; set; }
public string ReceiptFileNameHere { get; set; }
public Documents Documents { get; set; }
public string Guid { get; set; }
}
@@ -719,6 +725,8 @@ namespace Swarmops.Frontend.Pages.v5.Financial
public string Budget { get; set; }
public string Amount { get; set; }
public string AmountVat { get; set; }
public string CreatedDateTime { get; set; }
public string Guid { get; set; }
}
+9 -9
View File
@@ -237,15 +237,6 @@ namespace Swarmops.Frontend.Pages.v5.Financial {
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelExpensifyProcessingComplete;
/// <summary>
/// LabelGridHeaderCreatedDate control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelGridHeaderCreatedDate;
/// <summary>
/// LabelGridHeaderBudget control.
/// </summary>
@@ -255,6 +246,15 @@ namespace Swarmops.Frontend.Pages.v5.Financial {
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelGridHeaderBudget;
/// <summary>
/// LabelGridHeaderCreatedDate control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label LabelGridHeaderCreatedDate;
/// <summary>
/// LabelExpensifyHeaderDescription control.
/// </summary>