Added notification on payout of cash advance / expense claim

This commit is contained in:
Rick Falkvinge
2014-09-24 18:07:28 +02:00
parent 9b8bbf0d00
commit 30f18ef98d
4 changed files with 66 additions and 2 deletions
@@ -99,6 +99,26 @@ namespace Swarmops.Logic.App_GlobalResources {
}
}
/// <summary>
/// Looks up a localized string similar to Your request for a cash advance with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been marked as paid out by the organization&apos;s accountants.
///
///This means you should see the amount on your account shortly..
/// </summary>
internal static string CashAdvance_PaidOut_Body {
get {
return ResourceManager.GetString("CashAdvance_PaidOut_Body", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [OrganizationName] Cash Advance Paid: [CurrencyCode] [BudgetAmountFloat].
/// </summary>
internal static string CashAdvance_PaidOut_Subject {
get {
return ResourceManager.GetString("CashAdvance_PaidOut_Subject", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [ConcernedPersonName] has requested a cash advance of [CurrencyCode] [BudgetAmountFloat] for the purpose of [RequestPurpose]. This money is part of your budget, [BudgetName].
///
@@ -215,6 +235,26 @@ namespace Swarmops.Logic.App_GlobalResources {
}
}
/// <summary>
/// Looks up a localized string similar to Your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been marked as paid out by the organization&apos;s accountants.
///
///This means you should see the amount on your account shortly..
/// </summary>
internal static string ExpenseClaim_PaidOut_Body {
get {
return ResourceManager.GetString("ExpenseClaim_PaidOut_Body", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [OrganizationName] Expense Claim Paid: [CurrencyCode] [BudgetAmountFloat].
/// </summary>
internal static string ExpenseClaim_PaidOut_Subject {
get {
return ResourceManager.GetString("ExpenseClaim_PaidOut_Subject", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The receipts for your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], have been validated by people responsible for keeping the records in order.
///
@@ -112,10 +112,10 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="CashAdvance_Attested_Body" xml:space="preserve">
<value>Your requested cash advance with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been attested by the budget owner. It will now proceed to payout to you.</value>
@@ -131,6 +131,14 @@ Expect more communication from the budget owner to follow on the matter.</value>
<data name="CashAdvance_Deattested_Subject" xml:space="preserve">
<value>[OrganizationName] Cash Advance DE-attested: [CurrencyCode] [BudgetAmountFloat]</value>
</data>
<data name="CashAdvance_PaidOut_Body" xml:space="preserve">
<value>Your request for a cash advance with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been marked as paid out by the organization's accountants.
This means you should see the amount on your account shortly.</value>
</data>
<data name="CashAdvance_PaidOut_Subject" xml:space="preserve">
<value>[OrganizationName] Cash Advance Paid: [CurrencyCode] [BudgetAmountFloat]</value>
</data>
<data name="CashAdvance_Requested_Body" xml:space="preserve">
<value>[ConcernedPersonName] has requested a cash advance of [CurrencyCode] [BudgetAmountFloat] for the purpose of [RequestPurpose]. This money is part of your budget, [BudgetName].
@@ -181,6 +189,14 @@ Expect more communication to follow on the matter. If you don't hear from record
<data name="ExpenseClaim_Devalidated_Subject" xml:space="preserve">
<value>[OrganizationName] Expense Claim Receipts DE-validated: [CurrencyCode] [BudgetAmountFloat]</value>
</data>
<data name="ExpenseClaim_PaidOut_Body" xml:space="preserve">
<value>Your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been marked as paid out by the organization's accountants.
This means you should see the amount on your account shortly.</value>
</data>
<data name="ExpenseClaim_PaidOut_Subject" xml:space="preserve">
<value>[OrganizationName] Expense Claim Paid: [CurrencyCode] [BudgetAmountFloat]</value>
</data>
<data name="ExpenseClaim_Validated_Body" xml:space="preserve">
<value>The receipts for your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], have been validated by people responsible for keeping the records in order.
@@ -95,6 +95,7 @@ namespace Swarmops.Logic.Communications.Transmission
CashAdvance_Denied,
CashAdvance_Adjusted,
CashAdvance_Rebudgeted,
CashAdvance_PaidOut,
ExpenseClaim_Created,
ExpenseClaim_Attested,
ExpenseClaim_Deattested,
@@ -103,6 +104,7 @@ namespace Swarmops.Logic.Communications.Transmission
ExpenseClaim_Denied,
ExpenseClaim_Adjusted,
ExpenseClaim_Rebudgeted,
ExpenseClaim_PaidOut,
Payout_Settled,
InboundInvoice_Created,
Receipts_Filed
+6
View File
@@ -6,6 +6,8 @@ using Swarmops.Basic.Enums;
using Swarmops.Basic.Types;
using Swarmops.Basic.Types.Financial;
using Swarmops.Database;
using Swarmops.Logic.Communications;
using Swarmops.Logic.Communications.Transmission;
using Swarmops.Logic.Support.LogEntries;
using Swarmops.Logic.Swarm;
using Swarmops.Logic.Structure;
@@ -229,6 +231,8 @@ namespace Swarmops.Logic.Financial
"Cash Advance Paid Out"),
advance.Person, advance);
OutboundComm.CreateNotificationOfFinancialValidation(advance.Budget, advance.Person, (double)advance.AmountCents / 100.0, advance.Description, NotificationResource.CashAdvance_PaidOut);
}
string referenceString = string.Empty;
@@ -289,6 +293,8 @@ namespace Swarmops.Logic.Financial
claim.Repaid = true;
claim.Close();
OutboundComm.CreateNotificationOfFinancialValidation(claim.Budget, claim.Claimer, (double)claim.AmountCents / 100.0, claim.Description, NotificationResource.ExpenseClaim_PaidOut);
}
else if (component[0] == 'a')
{