diff --git a/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.Designer.cs b/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.Designer.cs index 93dd43ed..f32667f2 100644 --- a/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.Designer.cs +++ b/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.Designer.cs @@ -61,6 +61,44 @@ namespace Swarmops.Logic.App_GlobalResources { } } + /// + /// Looks up a localized string similar to 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.. + /// + internal static string CashAdvance_Attested_Body { + get { + return ResourceManager.GetString("CashAdvance_Attested_Body", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [OrganizationName] Cash Advance Attested: [Currency Code] [BudgetAmountFloat]. + /// + internal static string CashAdvance_Attested_Subject { + get { + return ResourceManager.GetString("CashAdvance_Attested_Subject", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your requested cash advance with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been DE-attested by the budget owner. This usually indicates some sort of problem with your request. + /// + ///Expect more communication from the budget owner to follow on the matter.. + /// + internal static string CashAdvance_Deattested_Body { + get { + return ResourceManager.GetString("CashAdvance_Deattested_Body", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [OrganizationName] Cash Advance DE-attested: [Currency Code] [BudgetAmountFloat]. + /// + internal static string CashAdvance_Deattested_Subject { + get { + return ResourceManager.GetString("CashAdvance_Deattested_Subject", resourceCulture); + } + } + /// /// Looks up a localized string similar to [ConcernedPersonName] has requested a cash advance of [CurrencyCode] [BudgetAmountFloat] for the purpose of [RequestReason]. This money is part of your budget, [BudgetName]. /// diff --git a/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.resx b/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.resx index e54d0b98..cc334bd8 100644 --- a/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.resx +++ b/Logic/App_GlobalResources/Logic.Communications.Transmission.NotificationPayload.resx @@ -117,6 +117,20 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 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. + + + [OrganizationName] Cash Advance Attested: [Currency Code] [BudgetAmountFloat] + + + Your requested cash advance with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been DE-attested by the budget owner. This usually indicates some sort of problem with your request. + +Expect more communication from the budget owner to follow on the matter. + + + [OrganizationName] Cash Advance DE-attested: [Currency Code] [BudgetAmountFloat] + [ConcernedPersonName] has requested a cash advance of [CurrencyCode] [BudgetAmountFloat] for the purpose of [RequestReason]. This money is part of your budget, [BudgetName]. diff --git a/Logic/Communications/Transmission/NotificationPayload.cs b/Logic/Communications/Transmission/NotificationPayload.cs index 7005ebdb..090ea206 100644 --- a/Logic/Communications/Transmission/NotificationPayload.cs +++ b/Logic/Communications/Transmission/NotificationPayload.cs @@ -91,12 +91,18 @@ namespace Swarmops.Logic.Communications.Transmission System_Exception, CashAdvance_Requested, CashAdvance_Attested, + CashAdvance_Deattested, + CashAdvance_Denied, + CashAdvance_Adjusted, + CashAdvance_Rebudgeted, ExpenseClaim_Created, ExpenseClaim_Attested, ExpenseClaim_Deattested, ExpenseClaim_Validated, ExpenseClaim_Devalidated, ExpenseClaim_Denied, + ExpenseClaim_Adjusted, + ExpenseClaim_Rebudgeted, Payout_Settled } diff --git a/Logic/Financial/CashAdvance.cs b/Logic/Financial/CashAdvance.cs index ceea8340..4ab1474a 100644 --- a/Logic/Financial/CashAdvance.cs +++ b/Logic/Financial/CashAdvance.cs @@ -61,6 +61,8 @@ namespace Swarmops.Logic.Financial SwarmDb.GetDatabaseForWriting().CreateFinancialValidation(FinancialValidationType.Attestation, FinancialDependencyType.CashAdvance, this.Identity, DateTime.Now, attester.Identity, this.AmountCents / 100.0); SwarmDb.GetDatabaseForWriting().SetCashAdvanceAttested(this.Identity, true, attester.Identity); + + OutboundComm.CreateNotificationOfFinancialValidation(this.Budget, this.Person, (double)this.AmountCents / 100.0, this.Description, NotificationResource.CashAdvance_Attested); } public void Deattest(Person deattester) @@ -68,6 +70,8 @@ namespace Swarmops.Logic.Financial SwarmDb.GetDatabaseForWriting().CreateFinancialValidation(FinancialValidationType.Deattestation, FinancialDependencyType.CashAdvance, this.Identity, DateTime.Now, deattester.Identity, this.AmountCents / 100.0); SwarmDb.GetDatabaseForWriting().SetCashAdvanceAttested(this.Identity, false, Person.NobodyId); + + OutboundComm.CreateNotificationOfFinancialValidation(this.Budget, this.Person, (double)this.AmountCents / 100.0, this.Description, NotificationResource.CashAdvance_Deattested); } #endregion