REFACTOR, TERMINOLOGY: It's not Attest costs in English, it's Approve

This commit is contained in:
Rick Falkvinge
2019-01-31 12:41:22 +01:00
parent cc5f8bccad
commit 236709e3f4
44 changed files with 514 additions and 473 deletions
+6 -6
View File
@@ -8,14 +8,14 @@ namespace Swarmops.Common.Enums
Unknown = 0,
/// <summary>
/// An attestation of an expenditure from a budget.
/// An approval of an expenditure from a budget.
/// </summary>
Attestation,
Approval,
/// <summary>
/// Removal of attested status.
/// Removal of approved status.
/// </summary>
Deattestation,
UndoApproval,
/// <summary>
/// Validation of expenditure documents.
@@ -23,9 +23,9 @@ namespace Swarmops.Common.Enums
Validation,
/// <summary>
/// Devalidation - removal of validated status.
/// Removal of validated status.
/// </summary>
Devalidation,
UndoValidation,
/// <summary>
/// Kill: close this financial doc as not valid.
+1 -1
View File
@@ -280,7 +280,7 @@ namespace Swarmops.Logic.Communications
public static OutboundComm CreateNotificationAttestationNeeded (FinancialAccount budget, Person concernedPerson,
public static OutboundComm CreateNotificationApprovalNeeded (FinancialAccount budget, Person concernedPerson,
string supplier, double amountRequested, string purpose, NotificationResource notification)
{
NotificationPayload payload = new NotificationPayload (notification.ToString());
@@ -153,17 +153,17 @@ namespace Swarmops.Logic.Communications.Payload
System_PublicRootReset,
System_UnrecognizedPayload,
CashAdvance_Requested,
CashAdvance_Attested,
CashAdvance_Deattested,
CashAdvance_Approved,
CashAdvance_ApprovalRetracted,
CashAdvance_Denied,
CashAdvance_Adjusted,
CashAdvance_Rebudgeted,
CashAdvance_PaidOut,
ExpenseClaim_Created,
ExpenseClaim_Attested,
ExpenseClaim_Deattested,
ExpenseClaim_Approved,
ExpenseClaim_ApprovalRetracted,
ExpenseClaim_Validated,
ExpenseClaim_Devalidated,
ExpenseClaim_ValidationRetracted,
ExpenseClaim_Denied,
ExpenseClaim_Adjusted,
ExpenseClaim_Rebudgeted,
+1 -1
View File
@@ -75,7 +75,7 @@ namespace Swarmops.Logic.DashboardTasks
lookupNavigateUrl[TaskGroupType.AttestationWarning] = "/Pages/v4/Financial/ViewInboundInvoices.aspx";
lookupIconUrl[TaskGroupType.AttestationWarning] =
"/Images/Public/Fugue/icons-shadowless/receipt-invoice.png";
lookupDescriptionSingle[TaskGroupType.AttestationWarning] = "Attestation for invoice {0} is running late";
lookupDescriptionSingle[TaskGroupType.AttestationWarning] = "Approval for invoice {0} is running late";
lookupDescriptionMany[TaskGroupType.AttestationWarning] = "Attestations for invoices {0} are running late";
}
+13 -13
View File
@@ -45,7 +45,7 @@ namespace Swarmops.Logic.Financial
budget.Identity, amountCents,
description));
OutboundComm.CreateNotificationAttestationNeeded (budget, forPerson, string.Empty, amountCents/100.0,
OutboundComm.CreateNotificationApprovalNeeded (budget, forPerson, string.Empty, amountCents/100.0,
description, NotificationResource.CashAdvance_Requested);
// Slightly misplaced logic, but failsafer here
SwarmopsLogEntry.Create (forPerson,
@@ -53,36 +53,36 @@ namespace Swarmops.Logic.Financial
newAdvance);
// Clear a cache
FinancialAccount.ClearAttestationAdjustmentsCache (organization);
FinancialAccount.ClearApprovalAdjustmentsCache (organization);
return newAdvance;
}
#endregion
#region Implementation of IAttestable
#region Implementation of IApprovable
public void Attest (Person attester)
public void Approve (Person approvingPerson)
{
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.Attestation,
FinancialDependencyType.CashAdvance, Identity, DateTime.UtcNow, attester.Identity, AmountCents/100.0);
SwarmDb.GetDatabaseForWriting().SetCashAdvanceAttested (Identity, true, attester.Identity);
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.Approval,
FinancialDependencyType.CashAdvance, Identity, DateTime.UtcNow, approvingPerson.Identity, AmountCents/100.0);
SwarmDb.GetDatabaseForWriting().SetCashAdvanceAttested (Identity, true, approvingPerson.Identity);
OutboundComm.CreateNotificationOfFinancialValidation (Budget, Person, AmountCents/100.0, Description,
NotificationResource.CashAdvance_Attested);
NotificationResource.CashAdvance_Approved);
}
public void Deattest (Person deattester)
public void RetractApproval (Person retractingPerson)
{
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.Deattestation,
FinancialDependencyType.CashAdvance, Identity, DateTime.UtcNow, deattester.Identity, AmountCents/100.0);
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.UndoApproval,
FinancialDependencyType.CashAdvance, Identity, DateTime.UtcNow, retractingPerson.Identity, AmountCents/100.0);
SwarmDb.GetDatabaseForWriting().SetCashAdvanceAttested (Identity, false, Person.NobodyId);
OutboundComm.CreateNotificationOfFinancialValidation (Budget, Person, AmountCents/100.0, Description,
NotificationResource.CashAdvance_Deattested);
NotificationResource.CashAdvance_ApprovalRetracted);
}
public void DenyAttestation (Person denyingPerson, string reason)
public void DenyApproval (Person denyingPerson, string reason)
{
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation(FinancialValidationType.Kill,
FinancialDependencyType.CashAdvance, Identity, DateTime.UtcNow, denyingPerson.Identity, AmountCents / 100.0);
+19 -19
View File
@@ -13,7 +13,7 @@ using Swarmops.Logic.Swarm;
namespace Swarmops.Logic.Financial
{
public class ExpenseClaim : BasicExpenseClaim, IValidatable, IAttestable, IPayable
public class ExpenseClaim : BasicExpenseClaim, IValidatable, IApprovable, IPayable
{
#region Construction and Creation
@@ -101,7 +101,7 @@ namespace Swarmops.Logic.Financial
// Create notifications
OutboundComm.CreateNotificationAttestationNeeded(budget, claimer, string.Empty,
OutboundComm.CreateNotificationApprovalNeeded(budget, claimer, string.Empty,
newClaim.BudgetAmountCents/100.0,
description, NotificationResource.ExpenseClaim_Created);
// Slightly misplaced logic, but failsafer here
@@ -113,7 +113,7 @@ namespace Swarmops.Logic.Financial
vatCents/100.0, budget, description), newClaim);
// Clear a cache
FinancialAccount.ClearAttestationAdjustmentsCache(organization);
FinancialAccount.ClearApprovalAdjustmentsCache(organization);
}
return newClaim;
@@ -395,47 +395,47 @@ namespace Swarmops.Logic.Financial
NotificationResource.ExpenseClaim_Validated);
}
public void Devalidate (Person devalidator)
public void RetractValidation (Person retractor)
{
SwarmDb.GetDatabaseForWriting().SetExpenseClaimValidated (Identity, false);
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.Devalidation,
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.UndoValidation,
FinancialDependencyType.ExpenseClaim, Identity,
DateTime.UtcNow, devalidator.Identity, (double) Amount);
DateTime.UtcNow, retractor.Identity, (double) Amount);
base.Validated = false;
OutboundComm.CreateNotificationOfFinancialValidation (Budget, Claimer, AmountCents/100.0, Description,
NotificationResource.ExpenseClaim_Devalidated);
NotificationResource.ExpenseClaim_ValidationRetracted);
}
#endregion
#region IAttestable Members
#region IApprovable Members
public void Attest (Person attester)
public void Approve (Person approvingPerson)
{
Attested = true;
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation(FinancialValidationType.Attestation,
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation(FinancialValidationType.Approval,
FinancialDependencyType.ExpenseClaim, Identity,
DateTime.UtcNow, attester.Identity, (double) Amount);
DateTime.UtcNow, approvingPerson.Identity, (double) Amount);
OutboundComm.CreateNotificationOfFinancialValidation (Budget, Claimer, AmountCents/100.0, Description,
NotificationResource.ExpenseClaim_Attested);
NotificationResource.ExpenseClaim_Approved);
UpdateFinancialTransaction(attester); // will re-enable tx if it was zeroed out earlier
UpdateFinancialTransaction(approvingPerson); // will re-enable tx if it was zeroed out earlier
}
public void Deattest (Person deattester)
public void RetractApproval (Person retractingPerson)
{
Attested = false;
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation(FinancialValidationType.Deattestation,
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation(FinancialValidationType.UndoApproval,
FinancialDependencyType.ExpenseClaim, Identity,
DateTime.UtcNow, deattester.Identity, (double) Amount);
DateTime.UtcNow, retractingPerson.Identity, (double) Amount);
OutboundComm.CreateNotificationOfFinancialValidation (Budget, Claimer, AmountCents/100.0, Description,
NotificationResource.ExpenseClaim_Deattested);
NotificationResource.ExpenseClaim_ApprovalRetracted);
}
public void DenyAttestation (Person denyingPerson, string reason)
public void DenyApproval (Person denyingPerson, string reason)
{
Attested = false;
Open = false;
@@ -493,7 +493,7 @@ namespace Swarmops.Logic.Financial
if (Validated)
{
// Reset validation, since amount was changed
Devalidate (settingPerson);
RetractValidation (settingPerson);
}
}
+1 -1
View File
@@ -812,7 +812,7 @@ namespace Swarmops.Logic.Financial
return result;
}
public static void ClearAttestationAdjustmentsCache (Organization organization)
public static void ClearApprovalAdjustmentsCache (Organization organization)
{
if (_organizationBudgetAttestationSpaceLookup.ContainsKey (organization.Identity))
{
+13
View File
@@ -0,0 +1,13 @@
using Swarmops.Logic.Swarm;
namespace Swarmops.Logic.Financial
{
public interface IApprovable
{
FinancialAccount Budget { get; }
void Approve (Person approvingPerson);
void RetractApproval (Person retractingPerson);
void DenyApproval(Person denyingPerson, string reason);
}
}
-13
View File
@@ -1,13 +0,0 @@
using Swarmops.Logic.Swarm;
namespace Swarmops.Logic.Financial
{
public interface IAttestable
{
FinancialAccount Budget { get; }
void Attest (Person attester);
void Deattest (Person deattester);
void DenyAttestation(Person denyingPerson, string reason);
}
}
+1 -1
View File
@@ -8,7 +8,7 @@ using Swarmops.Logic.Swarm;
namespace Swarmops.Logic.Financial
{
public interface IPayable: IAttestable, IHasIdentity
public interface IPayable: IApprovable, IHasIdentity
{
new FinancialAccount Budget { get; }
void SetBudget (FinancialAccount newBudget, Person settingPerson);
+1 -1
View File
@@ -5,6 +5,6 @@ namespace Swarmops.Logic.Financial
public interface IValidatable
{
void Validate (Person validator);
void Devalidate (Person devalidator);
void RetractValidation (Person retractor);
}
}
+12 -12
View File
@@ -14,7 +14,7 @@ using Swarmops.Logic.Swarm;
namespace Swarmops.Logic.Financial
{
public class InboundInvoice : BasicInboundInvoice, IAttestable, IPayable
public class InboundInvoice : BasicInboundInvoice, IApprovable, IPayable
{
private InboundInvoice (BasicInboundInvoice basicInstance) :
base (basicInstance)
@@ -143,29 +143,29 @@ namespace Swarmops.Logic.Financial
}
#region IAttestable Members
#region IApprovable Members
public void Attest (Person attester)
public void Approve (Person approvingPerson)
{
SwarmDb.GetDatabaseForWriting().SetInboundInvoiceAttested (Identity, true);
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.Attestation,
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.Approval,
FinancialDependencyType.InboundInvoice, Identity,
DateTime.UtcNow, attester.Identity, BudgetAmountCents);
DateTime.UtcNow, approvingPerson.Identity, BudgetAmountCents);
base.Attested = true;
UpdateTransaction(attester); // will re-enable the tx if denied and reopened earlier
UpdateTransaction(approvingPerson); // will re-enable the tx if denied and reopened earlier
}
public void Deattest (Person deattester)
public void RetractApproval (Person retractingPerson)
{
SwarmDb.GetDatabaseForWriting().SetInboundInvoiceAttested (Identity, false);
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.Deattestation,
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.UndoApproval,
FinancialDependencyType.InboundInvoice, Identity,
DateTime.UtcNow, deattester.Identity, BudgetAmountCents);
DateTime.UtcNow, retractingPerson.Identity, BudgetAmountCents);
base.Attested = false;
}
public void DenyAttestation (Person denyingPerson, string reason)
public void DenyApproval (Person denyingPerson, string reason)
{
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation(FinancialValidationType.Kill,
FinancialDependencyType.InboundInvoice, Identity,
@@ -232,7 +232,7 @@ namespace Swarmops.Logic.Financial
// Create notification (slightly misplaced logic, but this is failsafest place)
OutboundComm.CreateNotificationAttestationNeeded (budget, creatingPerson, supplier, (amountCents-vatCents)/100.0,
OutboundComm.CreateNotificationApprovalNeeded (budget, creatingPerson, supplier, (amountCents-vatCents)/100.0,
description, NotificationResource.InboundInvoice_Created);
// Slightly misplaced logic, but failsafer here
SwarmopsLogEntry.Create (creatingPerson,
@@ -240,7 +240,7 @@ namespace Swarmops.Logic.Financial
newInvoice);
// Clear a cache
FinancialAccount.ClearAttestationAdjustmentsCache(organization);
FinancialAccount.ClearApprovalAdjustmentsCache(organization);
return newInvoice;
}
+11 -11
View File
@@ -12,7 +12,7 @@ using Swarmops.Logic.Swarm;
namespace Swarmops.Logic.Financial
{
public class Salary : BasicSalary, IAttestable
public class Salary : BasicSalary, IApprovable
{
internal Salary (BasicSalary basic) : base (basic)
{
@@ -154,23 +154,23 @@ namespace Swarmops.Logic.Financial
}
#region IAttestable Members
#region IApprovable Members
public void Attest (Person attester)
public void Approve (Person approvingPerson)
{
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.Attestation,
FinancialDependencyType.Salary, Identity, DateTime.Now, attester.Identity, CostTotalCents/100.0);
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.Approval,
FinancialDependencyType.Salary, Identity, DateTime.Now, approvingPerson.Identity, CostTotalCents/100.0);
this.Attested = true;
}
public void Deattest (Person deattester)
public void RetractApproval (Person retractingPerson)
{
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.Deattestation,
FinancialDependencyType.Salary, Identity, DateTime.Now, deattester.Identity, CostTotalCents/100.0);
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.UndoApproval,
FinancialDependencyType.Salary, Identity, DateTime.Now, retractingPerson.Identity, CostTotalCents/100.0);
this.Attested = false;
}
public void DenyAttestation (Person denyingPerson, string reason)
public void DenyApproval (Person denyingPerson, string reason)
{
this.Attested = false;
this.Open = false;
@@ -188,7 +188,7 @@ namespace Swarmops.Logic.Financial
#endregion
public FinancialAccount Budget // needed for IAttestable
public FinancialAccount Budget // needed for IApprovable
{
get { return PayrollItem.Budget; }
}
@@ -328,7 +328,7 @@ namespace Swarmops.Logic.Financial
}
// Clear a cache
FinancialAccount.ClearAttestationAdjustmentsCache(payrollItem.Organization);
FinancialAccount.ClearApprovalAdjustmentsCache(payrollItem.Organization);
+1 -1
View File
@@ -304,7 +304,7 @@
<Compile Include="DataObjects\PeopleDataObject.cs" />
<Compile Include="Financial\FinancialValidation.cs" />
<Compile Include="Financial\FinancialValidations.cs" />
<Compile Include="Financial\IAttestable.cs" />
<Compile Include="Financial\IApprovable.cs" />
<Compile Include="Financial\InboundInvoice.cs" />
<Compile Include="Financial\InboundInvoices.cs" />
<Compile Include="Financial\IValidatable.cs" />
@@ -259,40 +259,40 @@ namespace Swarmops.Logic.Resources {
}
/// <summary>
/// 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..
/// </summary>
internal static string CashAdvance_Attested_Body {
get {
return ResourceManager.GetString("CashAdvance_Attested_Body", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [[OrganizationName]] Cash Advance Attested: [CurrencyCode] [BudgetAmountFloat].
/// </summary>
internal static string CashAdvance_Attested_Subject {
get {
return ResourceManager.GetString("CashAdvance_Attested_Subject", resourceCulture);
}
}
/// <summary>
/// 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.
/// Looks up a localized string similar to Your previously approved cash advance with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has had its approval RETRACTED by the budget owner. This cash advance is no longer approved. This usually indicates some sort of problem with your request.
///
///Expect more communication from the budget owner to follow on the matter..
/// </summary>
internal static string CashAdvance_Deattested_Body {
internal static string CashAdvance_ApprovalRetracted_Body {
get {
return ResourceManager.GetString("CashAdvance_Deattested_Body", resourceCulture);
return ResourceManager.GetString("CashAdvance_ApprovalRetracted_Body", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [[OrganizationName]] Cash Advance DE-attested: [CurrencyCode] [BudgetAmountFloat].
/// Looks up a localized string similar to [[OrganizationName]] Approval for Cash Advance RETRACTED: [CurrencyCode] [BudgetAmountFloat].
/// </summary>
internal static string CashAdvance_Deattested_Subject {
internal static string CashAdvance_ApprovalRetracted_Subject {
get {
return ResourceManager.GetString("CashAdvance_Deattested_Subject", resourceCulture);
return ResourceManager.GetString("CashAdvance_ApprovalRetracted_Subject", resourceCulture);
}
}
/// <summary>
/// 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..
/// </summary>
internal static string CashAdvance_Approved_Body {
get {
return ResourceManager.GetString("CashAdvance_Approved_Body", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [[OrganizationName]] Cash Advance Approveed: [CurrencyCode] [BudgetAmountFloat].
/// </summary>
internal static string CashAdvance_Approved_Subject {
get {
return ResourceManager.GetString("CashAdvance_Approved_Subject", resourceCulture);
}
}
@@ -340,7 +340,7 @@ namespace Swarmops.Logic.Resources {
/// <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].
///
///Please log on to [InstallationName] at [ExternalUrl]Financial/AttestCosts to attest or deny..
///Please log on to [InstallationName] at [ExternalUrl]Financial/ApproveCosts to attest or deny..
/// </summary>
internal static string CashAdvance_Requested_Body {
get {
@@ -349,7 +349,7 @@ namespace Swarmops.Logic.Resources {
}
/// <summary>
/// Looks up a localized string similar to [[OrganizationName] - ACTION ITEM] Cash Advance Requested: [CurrencyCode] [BudgetAmountFloat] - Attestation Needed.
/// Looks up a localized string similar to [[OrganizationName] - ACTION ITEM] Cash Advance Requested: [CurrencyCode] [BudgetAmountFloat] - Approveation Needed.
/// </summary>
internal static string CashAdvance_Requested_Subject {
get {
@@ -358,27 +358,47 @@ namespace Swarmops.Logic.Resources {
}
/// <summary>
/// Looks up a localized string similar to Your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been attested by the budget owner. It will be paid out to you when the receipts are confirmed valid..
/// Looks up a localized string similar to Your previously approved expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has had its approval RETRACTED by the budget owner. This expense claim is no longer approved. This usually indicates some sort of problem with your expense claim.
///
///Expect more communication from the budget owner to follow on the matter..
/// </summary>
internal static string ExpenseClaim_Attested_Body {
internal static string ExpenseClaim_ApprovalRetracted_Body {
get {
return ResourceManager.GetString("ExpenseClaim_Attested_Body", resourceCulture);
return ResourceManager.GetString("ExpenseClaim_ApprovalRetracted_Body", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [[OrganizationName]] Expense Claim Attested: [CurrencyCode] [BudgetAmountFloat].
/// Looks up a localized string similar to [[OrganizationName]] Approval for Expense Claim RETRACTED: [CurrencyCode] [BudgetAmountFloat].
/// </summary>
internal static string ExpenseClaim_Attested_Subject {
internal static string ExpenseClaim_ApprovalRetracted_Subject {
get {
return ResourceManager.GetString("ExpenseClaim_Attested_Subject", resourceCulture);
return ResourceManager.GetString("ExpenseClaim_ApprovalRetracted_Subject", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been attested by the budget owner. It will be paid out to you when the receipts are confirmed valid..
/// </summary>
internal static string ExpenseClaim_Approved_Body {
get {
return ResourceManager.GetString("ExpenseClaim_Approved_Body", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [[OrganizationName]] Expense Claim Approveed: [CurrencyCode] [BudgetAmountFloat].
/// </summary>
internal static string ExpenseClaim_Approved_Subject {
get {
return ResourceManager.GetString("ExpenseClaim_Approved_Subject", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [ConcernedPersonName] has created an expense claim against the budget of [BudgetName] for the amount of [CurrencyCode] [BudgetAmountFloat]. The claim concerns [RequestPurpose]. You will need to attest this expense claim.
///
///Please log on to [InstallationName] at [ExternalUrl]Financial/AttestCosts to attest or deny..
///Please log on to [InstallationName] at [ExternalUrl]Financial/ApproveCosts to attest or deny..
/// </summary>
internal static string ExpenseClaim_Created_Body {
get {
@@ -387,7 +407,7 @@ namespace Swarmops.Logic.Resources {
}
/// <summary>
/// Looks up a localized string similar to [[OrganizationName] - ACTION ITEM] Expense Claim Created: [CurrencyCode] [BudgetAmountFloat] - Attestation Needed.
/// Looks up a localized string similar to [[OrganizationName] - ACTION ITEM] Expense Claim Created: [CurrencyCode] [BudgetAmountFloat] - Approveation Needed.
/// </summary>
internal static string ExpenseClaim_Created_Subject {
get {
@@ -395,26 +415,6 @@ namespace Swarmops.Logic.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been DE-attested by the budget owner. This usually indicates some sort of problem with your expense claim.
///
///Expect more communication from the budget owner to follow on the matter..
/// </summary>
internal static string ExpenseClaim_Deattested_Body {
get {
return ResourceManager.GetString("ExpenseClaim_Deattested_Body", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [[OrganizationName]] Expense Claim DE-attested: [CurrencyCode] [BudgetAmountFloat].
/// </summary>
internal static string ExpenseClaim_Deattested_Subject {
get {
return ResourceManager.GetString("ExpenseClaim_Deattested_Subject", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat] concerning [RequestPurpose] has been denied. The text below was given as reason for denying it:
///
@@ -436,26 +436,6 @@ namespace Swarmops.Logic.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to The receipts for your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], have been DE-validated by the financial record keepers of the organization. This usually indicates some sort of problem with the documentation of your expense claim.
///
///Expect more communication to follow on the matter. If you don&apos;t hear from record keepers in short time on this matter, do follow up with them..
/// </summary>
internal static string ExpenseClaim_Devalidated_Body {
get {
return ResourceManager.GetString("ExpenseClaim_Devalidated_Body", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [[OrganizationName]] Expense Claim Receipts DE-validated: [CurrencyCode] [BudgetAmountFloat].
/// </summary>
internal static string ExpenseClaim_Devalidated_Subject {
get {
return ResourceManager.GetString("ExpenseClaim_Devalidated_Subject", resourceCulture);
}
}
/// <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.
///
@@ -496,10 +476,30 @@ namespace Swarmops.Logic.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to The validation of receipts for your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been RETRACTED by the financial record keepers of the organization. The receipts are no longer considered valid. This usually indicates some sort of problem with the documentation of your expense claim.
///
///Expect more communication to follow on the matter. If you don&apos;t hear from record keepers in short time on this matter, do follow up with them..
/// </summary>
internal static string ExpenseClaim_ValidationRetracted_Body {
get {
return ResourceManager.GetString("ExpenseClaim_ValidationRetracted_Body", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to [[OrganizationName]] Validation for Expense Claim Receipts RETRACTED: [CurrencyCode] [BudgetAmountFloat].
/// </summary>
internal static string ExpenseClaim_ValidationRetracted_Subject {
get {
return ResourceManager.GetString("ExpenseClaim_ValidationRetracted_Subject", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to An invoice from [Supplier], concerning [Description], has been filed against your budget of [BudgetName] for the amount of [CurrencyCode] [BudgetAmountFloat]. You must attest this invoice before it proceeds to payout.
///
///Please log on to [InstallationName] at [ExternalUrl]Financial/AttestCosts to attest or deny..
///Please log on to [InstallationName] at [ExternalUrl]Financial/ApproveCosts to attest or deny..
/// </summary>
internal static string InboundInvoice_Created_Body {
get {
@@ -508,7 +508,7 @@ namespace Swarmops.Logic.Resources {
}
/// <summary>
/// Looks up a localized string similar to [[OrganizationName] - ACTION ITEM] Invoice Filed: [CurrencyCode] [BudgetAmountFloat] - Attestation Needed.
/// Looks up a localized string similar to [[OrganizationName] - ACTION ITEM] Invoice Filed: [CurrencyCode] [BudgetAmountFloat] - Approveation Needed.
/// </summary>
internal static string InboundInvoice_Created_Subject {
get {
@@ -195,19 +195,19 @@ Swarmops will keep trying and will keep sending these notifications as long as i
<data name="Bitcoin_Shortage_Critical_Subject" xml:space="preserve">
<value>[[OrganizationName] - ACTION ITEM] Bitcoin Cash hotwallet insufficient for payments - top up immediately</value>
</data>
<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>
</data>
<data name="CashAdvance_Attested_Subject" xml:space="preserve">
<value>[[OrganizationName]] Cash Advance Attested: [CurrencyCode] [BudgetAmountFloat]</value>
</data>
<data name="CashAdvance_Deattested_Body" xml:space="preserve">
<value>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.
<data name="CashAdvance_ApprovalRetracted_Body" xml:space="preserve">
<value>Your previously approved cash advance with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has had its approval RETRACTED by the budget owner. This cash advance is no longer approved. This usually indicates some sort of problem with your request.
Expect more communication from the budget owner to follow on the matter.</value>
</data>
<data name="CashAdvance_Deattested_Subject" xml:space="preserve">
<value>[[OrganizationName]] Cash Advance DE-attested: [CurrencyCode] [BudgetAmountFloat]</value>
<data name="CashAdvance_ApprovalRetracted_Subject" xml:space="preserve">
<value>[[OrganizationName]] Approval for Cash Advance RETRACTED: [CurrencyCode] [BudgetAmountFloat]</value>
</data>
<data name="CashAdvance_Approved_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>
</data>
<data name="CashAdvance_Approved_Subject" xml:space="preserve">
<value>[[OrganizationName]] Cash Advance Approveed: [CurrencyCode] [BudgetAmountFloat]</value>
</data>
<data name="CashAdvance_Denied_Body" xml:space="preserve">
<value>Your cash advance with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat] concerning [RequestPurpose] has been denied. The text below was given as reason for denying it:
@@ -229,38 +229,38 @@ This means you should see the amount on your account shortly.</value>
<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].
Please log on to [InstallationName] at [ExternalUrl]Financial/AttestCosts to attest or deny.</value>
Please log on to [InstallationName] at [ExternalUrl]Financial/ApproveCosts to attest or deny.</value>
<comment>This is sent to the budget owner(s) only.</comment>
</data>
<data name="CashAdvance_Requested_Subject" xml:space="preserve">
<value>[[OrganizationName] - ACTION ITEM] Cash Advance Requested: [CurrencyCode] [BudgetAmountFloat] - Attestation Needed</value>
<value>[[OrganizationName] - ACTION ITEM] Cash Advance Requested: [CurrencyCode] [BudgetAmountFloat] - Approveation Needed</value>
<comment>ACTION ITEM should be translated.</comment>
</data>
<data name="ExpenseClaim_Attested_Body" xml:space="preserve">
<value>Your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been attested by the budget owner. It will be paid out to you when the receipts are confirmed valid.</value>
<comment>This is sent to the claimer.</comment>
</data>
<data name="ExpenseClaim_Attested_Subject" xml:space="preserve">
<value>[[OrganizationName]] Expense Claim Attested: [CurrencyCode] [BudgetAmountFloat]</value>
</data>
<data name="ExpenseClaim_Created_Body" xml:space="preserve">
<value>[ConcernedPersonName] has created an expense claim against the budget of [BudgetName] for the amount of [CurrencyCode] [BudgetAmountFloat]. The claim concerns [RequestPurpose]. You will need to attest this expense claim.
Please log on to [InstallationName] at [ExternalUrl]Financial/AttestCosts to attest or deny.</value>
<comment>This is sent to the budget owner(s)only.</comment>
</data>
<data name="ExpenseClaim_Created_Subject" xml:space="preserve">
<value>[[OrganizationName] - ACTION ITEM] Expense Claim Created: [CurrencyCode] [BudgetAmountFloat] - Attestation Needed</value>
<comment>ACTION ITEM should be translated.</comment>
</data>
<data name="ExpenseClaim_Deattested_Body" xml:space="preserve">
<value>Your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been DE-attested by the budget owner. This usually indicates some sort of problem with your expense claim.
<data name="ExpenseClaim_ApprovalRetracted_Body" xml:space="preserve">
<value>Your previously approved expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has had its approval RETRACTED by the budget owner. This expense claim is no longer approved. This usually indicates some sort of problem with your expense claim.
Expect more communication from the budget owner to follow on the matter.</value>
<comment>This is sent to the claimer.</comment>
</data>
<data name="ExpenseClaim_Deattested_Subject" xml:space="preserve">
<value>[[OrganizationName]] Expense Claim DE-attested: [CurrencyCode] [BudgetAmountFloat]</value>
<data name="ExpenseClaim_ApprovalRetracted_Subject" xml:space="preserve">
<value>[[OrganizationName]] Approval for Expense Claim RETRACTED: [CurrencyCode] [BudgetAmountFloat]</value>
</data>
<data name="ExpenseClaim_Approved_Body" xml:space="preserve">
<value>Your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been attested by the budget owner. It will be paid out to you when the receipts are confirmed valid.</value>
<comment>This is sent to the claimer.</comment>
</data>
<data name="ExpenseClaim_Approved_Subject" xml:space="preserve">
<value>[[OrganizationName]] Expense Claim Approveed: [CurrencyCode] [BudgetAmountFloat]</value>
</data>
<data name="ExpenseClaim_Created_Body" xml:space="preserve">
<value>[ConcernedPersonName] has created an expense claim against the budget of [BudgetName] for the amount of [CurrencyCode] [BudgetAmountFloat]. The claim concerns [RequestPurpose]. You will need to attest this expense claim.
Please log on to [InstallationName] at [ExternalUrl]Financial/ApproveCosts to attest or deny.</value>
<comment>This is sent to the budget owner(s)only.</comment>
</data>
<data name="ExpenseClaim_Created_Subject" xml:space="preserve">
<value>[[OrganizationName] - ACTION ITEM] Expense Claim Created: [CurrencyCode] [BudgetAmountFloat] - Approveation Needed</value>
<comment>ACTION ITEM should be translated.</comment>
</data>
<data name="ExpenseClaim_Denied_Body" xml:space="preserve">
<value>Your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat] concerning [RequestPurpose] has been denied. The text below was given as reason for denying it:
@@ -272,14 +272,6 @@ Expect more communication from the budget owner to follow on the matter.</value>
<data name="ExpenseClaim_Denied_Subject" xml:space="preserve">
<value>[[OrganizationName]] Expense Claim DENIED: [CurrencyCode] [BudgetAmountFloat]</value>
</data>
<data name="ExpenseClaim_Devalidated_Body" xml:space="preserve">
<value>The receipts for your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], have been DE-validated by the financial record keepers of the organization. This usually indicates some sort of problem with the documentation of your expense claim.
Expect more communication to follow on the matter. If you don't hear from record keepers in short time on this matter, do follow up with them.</value>
</data>
<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.
@@ -297,13 +289,21 @@ The claim will be paid out to you when the amount has also been attested by the
<data name="ExpenseClaim_Validated_Subject" xml:space="preserve">
<value>[[OrganizationName]] Expense Claim Receipts Validated: [CurrencyCode] [BudgetAmountFloat]</value>
</data>
<data name="ExpenseClaim_ValidationRetracted_Body" xml:space="preserve">
<value>The validation of receipts for your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been RETRACTED by the financial record keepers of the organization. The receipts are no longer considered valid. This usually indicates some sort of problem with the documentation of your expense claim.
Expect more communication to follow on the matter. If you don't hear from record keepers in short time on this matter, do follow up with them.</value>
</data>
<data name="ExpenseClaim_ValidationRetracted_Subject" xml:space="preserve">
<value>[[OrganizationName]] Validation for Expense Claim Receipts RETRACTED: [CurrencyCode] [BudgetAmountFloat]</value>
</data>
<data name="InboundInvoice_Created_Body" xml:space="preserve">
<value>An invoice from [Supplier], concerning [Description], has been filed against your budget of [BudgetName] for the amount of [CurrencyCode] [BudgetAmountFloat]. You must attest this invoice before it proceeds to payout.
Please log on to [InstallationName] at [ExternalUrl]Financial/AttestCosts to attest or deny.</value>
Please log on to [InstallationName] at [ExternalUrl]Financial/ApproveCosts to attest or deny.</value>
</data>
<data name="InboundInvoice_Created_Subject" xml:space="preserve">
<value>[[OrganizationName] - ACTION ITEM] Invoice Filed: [CurrencyCode] [BudgetAmountFloat] - Attestation Needed</value>
<value>[[OrganizationName] - ACTION ITEM] Invoice Filed: [CurrencyCode] [BudgetAmountFloat] - Approveation Needed</value>
<comment>ACTION ITEM should be translated.</comment>
</data>
<data name="Membership_New_Added_Body" xml:space="preserve">
@@ -181,7 +181,7 @@ Det betyder att du borde se beloppet på ditt konto inom kort.</value>
<data name="CashAdvance_Requested_Body" xml:space="preserve">
<value>[ConcernedPersonName] har begärt ett kontantförskott på [CurrencyCode] [BudgetAmountFloat] för [RequestPurpose]. Dessa pengar är en del av din budget, [BudgetName].
Vänligen logga in på [InstallationName] på [ExternalUrl]Financial/AttestCosts att attestera eller neka.</value>
Vänligen logga in på [InstallationName] på [ExternalUrl]Financial/ApproveCosts att attestera eller neka.</value>
<comment>This is sent to the budget owner(s) only.</comment>
</data>
<data name="CashAdvance_Requested_Subject" xml:space="preserve">
@@ -198,7 +198,7 @@ Vänligen logga in på [InstallationName] på [ExternalUrl]Financial/AttestCosts
<data name="ExpenseClaim_Created_Body" xml:space="preserve">
<value>[ConcernedPersonName] har lagt ett utläggsanspråk mot budgeten [BudgetName] på [CurrencyCode] [BudgetAmountFloat]. Anspråket gäller [RequestPurpose]. Det betalas bara ut om du attesterar kostnaden.
Logga in på [InstallationName] på [ExternalUrl]Financial/AttestCosts för att attestera eller neka anspråket.</value>
Logga in på [InstallationName] på [ExternalUrl]Financial/ApproveCosts för att attestera eller neka anspråket.</value>
<comment>This is sent to the budget owner(s)only.</comment>
</data>
<data name="ExpenseClaim_Created_Subject" xml:space="preserve">
@@ -252,7 +252,7 @@ Utläggsanspråket kommer att betalas ut till dig när beloppet också är attes
<data name="InboundInvoice_Created_Body" xml:space="preserve">
<value>En faktura från [Supplier] gällande [Description] har inkommit mot din budget [BudgetName]. Fakturan är på [CurrencyCode] [BudgetAmountFloat]. Du måste attestera fakturan innan den går till betalning.
Logga in på [InstallationName] på [ExternalUrl]Financial/AttestCosts för att attestera eller neka fakturan.</value>
Logga in på [InstallationName] på [ExternalUrl]Financial/ApproveCosts för att attestera eller neka fakturan.</value>
</data>
<data name="InboundInvoice_Created_Subject" xml:space="preserve">
<value>[[OrganizationName] - ÅTGÄRD KRÄVS] Faktura mottagen: [CurrencyCode] [BudgetAmountFloat] - attest behövs</value>
+4 -4
View File
@@ -61,7 +61,7 @@ namespace Swarmops.Logic.Resources {
}
/// <summary>
/// Looks up a localized string similar to Attest cash advances {0}.
/// Looks up a localized string similar to Approve cash advances {0}.
/// </summary>
internal static string Attest_CashAdvance_Many {
get {
@@ -70,7 +70,7 @@ namespace Swarmops.Logic.Resources {
}
/// <summary>
/// Looks up a localized string similar to Attest cash advance #{0}.
/// Looks up a localized string similar to Approve cash advance #{0}.
/// </summary>
internal static string Attest_CashAdvance_One {
get {
@@ -79,7 +79,7 @@ namespace Swarmops.Logic.Resources {
}
/// <summary>
/// Looks up a localized string similar to Attest expense claims {0}.
/// Looks up a localized string similar to Approve expense claims {0}.
/// </summary>
internal static string Attest_ExpenseClaim_Many {
get {
@@ -88,7 +88,7 @@ namespace Swarmops.Logic.Resources {
}
/// <summary>
/// Looks up a localized string similar to Attest expense claim #{0}.
/// Looks up a localized string similar to Approve expense claim #{0}.
/// </summary>
internal static string Attest_ExpenseClaim_One {
get {
@@ -118,16 +118,16 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Attest_CashAdvance_Many" xml:space="preserve">
<value>Attest cash advances {0}</value>
<value>Approve cash advances {0}</value>
</data>
<data name="Attest_CashAdvance_One" xml:space="preserve">
<value>Attest cash advance #{0}</value>
<value>Approve cash advance #{0}</value>
</data>
<data name="Attest_ExpenseClaim_Many" xml:space="preserve">
<value>Attest expense claims {0}</value>
<value>Approve expense claims {0}</value>
</data>
<data name="Attest_ExpenseClaim_One" xml:space="preserve">
<value>Attest expense claim #{0}</value>
<value>Approve expense claim #{0}</value>
</data>
<data name="Bitcoin_SetPayoutAddress" xml:space="preserve">
<value>Set Bitcoin Cash payout address</value>
+13 -13
View File
@@ -9,7 +9,7 @@ using Swarmops.Logic.Support;
namespace Swarmops.Logic.Swarm
{
public class Parley : BasicParley, IAttestable
public class Parley : BasicParley, IApprovable
{
private Parley (BasicParley basic) : base (basic)
{
@@ -87,7 +87,7 @@ namespace Swarmops.Logic.Swarm
foreach (BasicFinancialValidation validation in validations)
{
if (validation.ValidationType == FinancialValidationType.Attestation)
if (validation.ValidationType == FinancialValidationType.Approval)
{
return true;
}
@@ -97,7 +97,7 @@ namespace Swarmops.Logic.Swarm
}
}
#region Implementation of IAttestable
#region Implementation of IApprovable
public FinancialAccount ParentBudget
{
@@ -113,7 +113,7 @@ namespace Swarmops.Logic.Swarm
}
}
public void Attest (Person attester)
public void Approve (Person approvingPerson)
{
if (Attested)
{
@@ -163,37 +163,37 @@ namespace Swarmops.Logic.Swarm
FinancialTransaction guaranteeFundsTx = FinancialTransaction.Create (OrganizationId, DateTime.Now,
"Conference #" +
Identity + " Guarantee");
guaranteeFundsTx.AddRow (Budget, -GuaranteeCents, attester);
guaranteeFundsTx.AddRow (Budget.Parent, GuaranteeCents, attester);
guaranteeFundsTx.AddRow (Budget, -GuaranteeCents, approvingPerson);
guaranteeFundsTx.AddRow (Budget.Parent, GuaranteeCents, approvingPerson);
// Finally, set as attested
PWEvents.CreateEvent (
EventSource.PirateWeb, EventType.ParleyAttested, attester.Identity,
EventSource.PirateWeb, EventType.ParleyAttested, approvingPerson.Identity,
OrganizationId, 0, 0, Identity, string.Empty);
base.Attested = true;
SwarmDb.GetDatabaseForWriting().SetParleyAttested (Identity, true);
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.Attestation,
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation (FinancialValidationType.Approval,
FinancialDependencyType.Parley, Identity,
DateTime.Now, attester.Identity, (double) (GuaranteeDecimal));
DateTime.Now, approvingPerson.Identity, (double) (GuaranteeDecimal));
}
public void Deattest (Person deattester)
public void RetractApproval (Person retractingPerson)
{
throw new NotImplementedException();
/*
base.Attested = false;
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation(FinancialValidationType.Deattestation,
SwarmDb.GetDatabaseForWriting().CreateFinancialValidation(FinancialValidationType.RetractApproval,
FinancialDependencyType.Parley, this.Identity,
DateTime.Now, deattester.Identity, (double)(this.GuaranteeDecimal+this.BudgetDecimal));*/
DateTime.Now, retractingPerson.Identity, (double)(this.GuaranteeDecimal+this.BudgetDecimal));*/
// TODO: Remove budget, remove financial account, set unattested
// this.BudgetId = this.Budget.ParentIdentity;
}
public void DenyAttestation (Person denyingPerson, string denyReason)
public void DenyApproval (Person denyingPerson, string denyReason)
{
// Re-implement if and when parleys are resurrected
+1 -1
View File
@@ -8,7 +8,7 @@ namespace Swarmops.Logic.Swarm
{
public class Parleys : PluralBase<Parleys, Parley, BasicParley>
{
public Parleys WhereUnattested
public Parleys WhereNotApproved
{
get
{
+1 -1
View File
@@ -340,7 +340,7 @@ namespace Resources {
}
/// <summary>
/// Looks up a localized string similar to Attest Costs.
/// Looks up a localized string similar to Approve Costs.
/// </summary>
internal static string Menu5_Financial_AttestCosts {
get {
+2 -1
View File
@@ -181,7 +181,8 @@
<value>Financial</value>
</data>
<data name="Menu5_Financial_AttestCosts" xml:space="preserve">
<value>Attest Costs</value>
<value>Approve Costs</value>
<comment>This approves costs for payout from the organization</comment>
</data>
<data name="Menu5_Financial_ClaimExpense" xml:space="preserve">
<value>Claim Refund for Expense</value>
+26 -26
View File
@@ -61,7 +61,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Cash Advance #{0:N0} for {1} has been attested for {3:N2}..
/// Looks up a localized string similar to Cash Advance #{0:N0} for {1} has been approved for {3:N2}..
/// </summary>
internal static string AttestCosts_AdvanceAttested {
get {
@@ -70,7 +70,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Cash Advance #{0:N0} for {1} was UN-attested. It will not be paid out unless attested again..
/// Looks up a localized string similar to The approval for Cash Advance #{0:N0} for {1} was RETRACTED. It will not be paid out unless approved again..
/// </summary>
internal static string AttestCosts_AdvanceDeattested {
get {
@@ -79,7 +79,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to You cannot attest this amount. The budget is empty for the year {0}..
/// Looks up a localized string similar to You cannot approve this amount. The budget is empty for the year {0}..
/// </summary>
internal static string AttestCosts_BudgetIsEmpty {
get {
@@ -88,7 +88,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to You cannot attest a negative amount..
/// Looks up a localized string similar to You cannot approve a negative amount..
/// </summary>
internal static string AttestCosts_CannotAttestNegative {
get {
@@ -97,7 +97,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to You cannot attest a zero amount..
/// Looks up a localized string similar to You cannot approve a zero amount..
/// </summary>
internal static string AttestCosts_CannotAttestZero {
get {
@@ -133,7 +133,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Expense Claim #{0:N0} from {1} for {2} {3:N2} has been attested..
/// Looks up a localized string similar to Expense Claim #{0:N0} from {1} for {2} {3:N2} has been approved..
/// </summary>
internal static string AttestCosts_ExpenseAttested {
get {
@@ -142,7 +142,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Expense Claim #{0:N0} from {1} was DE-attested. It will not be paid out unless attested again..
/// Looks up a localized string similar to Approval for Expense Claim #{0:N0} from {1} was RETRACTED. It will not be paid unless approved again..
/// </summary>
internal static string AttestCosts_ExpenseDeattested {
get {
@@ -214,7 +214,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Costs waiting for your attestation.
/// Looks up a localized string similar to Costs waiting for your approval.
/// </summary>
internal static string AttestCosts_Header_CostsAwaitingAttestation {
get {
@@ -223,7 +223,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to This is where you attest costs that other people are requesting from your budgets. Nothing is paid before you have attested it..
/// Looks up a localized string similar to This is where you approve costs that other people are requesting from your budgets. Nothing is paid before you have approved it..
/// </summary>
internal static string AttestCosts_Info {
get {
@@ -232,7 +232,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Invoice #{0:N0} from {1} for {2} {3:N2} has been attested..
/// Looks up a localized string similar to Invoice #{0:N0} from {1} for {2} {3:N2} has been approved..
/// </summary>
internal static string AttestCosts_InvoiceAttested {
get {
@@ -241,7 +241,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Invoice #{0:N0} from {1} was UN-attested. It will not be paid unless attested again..
/// Looks up a localized string similar to Approval for Invoice #{0:N0} from {1} was RETRACTED. It will not be paid unless approved again..
/// </summary>
internal static string AttestCosts_InvoiceDeattested {
get {
@@ -250,7 +250,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Attest.
/// Looks up a localized string similar to Approve.
/// </summary>
internal static string AttestCosts_Modal_ButtonAmount {
get {
@@ -259,7 +259,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Attest.
/// Looks up a localized string similar to Approve.
/// </summary>
internal static string AttestCosts_Modal_ButtonCorrect {
get {
@@ -340,7 +340,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Fix problems or deny attestation.
/// Looks up a localized string similar to Fix problems or deny approval.
/// </summary>
internal static string AttestCosts_Modal_Header {
get {
@@ -349,7 +349,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to I will attest this, but for a different amount..
/// Looks up a localized string similar to I will approve this, but for a different amount..
/// </summary>
internal static string AttestCosts_Modal_RadioOptionAmount {
get {
@@ -358,7 +358,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to The amount is wrong. I will attest it with the correct amount..
/// Looks up a localized string similar to The amount is wrong. I will approve it for the correct amount..
/// </summary>
internal static string AttestCosts_Modal_RadioOptionCorrect {
get {
@@ -367,7 +367,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to I will not attest this record. It is scratched..
/// Looks up a localized string similar to I will not approve this record. It is scratched..
/// </summary>
internal static string AttestCosts_Modal_RadioOptionDeny {
get {
@@ -394,7 +394,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to There are not enough funds remaining in the budget to attest this cost..
/// Looks up a localized string similar to There are not enough funds remaining in the budget to approve this cost..
/// </summary>
internal static string AttestCosts_OutOfBudget {
get {
@@ -403,7 +403,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to There are not enough funds to attest this. You can attest up to {0} {1:N2} more in this budget for the year {2}..
/// Looks up a localized string similar to There are not enough funds to approve this. You can attest up to {0} {1:N2} more in this budget for the year {2}..
/// </summary>
internal static string AttestCosts_OutOfBudgetPrecise {
get {
@@ -412,7 +412,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to &lt;strong&gt;OVERDRAFT BUDGET?&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;There are not enough funds remaining in the budget to attest this expense. Normally, it would be blocked from attestation. However, you may override this limitation and attest anyway, thereby causing the account to overdraft its budget.&lt;br/&gt;&lt;br/&gt;Do you want to attest the expense, thereby forcing an overdraft, or do you want to cancel attestation, staying on budget instead?&lt;br/&gt;&lt;br/&gt;.
/// Looks up a localized string similar to &lt;strong&gt;OVERDRAFT BUDGET?&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;There are not enough funds remaining in the budget to approve this expense. Normally, it would be blocked from approval. However, you may override this limitation and attest anyway, thereby causing the account to overdraft its budget.&lt;br/&gt;&lt;br/&gt;Do you want to approve the expense, thereby forcing an overdraft, or do you want to cancel, staying on budget instead?&lt;br/&gt;&lt;br/&gt;.
/// </summary>
internal static string AttestCosts_OverdraftConfirm {
get {
@@ -448,7 +448,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Attest Costs.
/// Looks up a localized string similar to Approve Costs.
/// </summary>
internal static string AttestCosts_PageTitle {
get {
@@ -457,7 +457,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Conference #{0:N0}, arranged by {1}, has been attested for {3:N2}..
/// Looks up a localized string similar to Conference #{0:N0}, arranged by {1}, has been approved for {3:N2}..
/// </summary>
internal static string AttestCosts_ParleyAttested {
get {
@@ -466,7 +466,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Conference #{0:N0} by {1} was UN-attested. It will not be greenlighted unless attested again..
/// Looks up a localized string similar to Approval for Conference #{0:N0} by {1} was RETRACTED. It will not be greenlighted unless approved again..
/// </summary>
internal static string AttestCosts_ParleyDeattested {
get {
@@ -484,7 +484,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Salary #{0:N0} for {1} was DE-attested. It will not be paid out unless attested again..
/// Looks up a localized string similar to Approval for Salary #{0:N0} for {1} was RETRACTED. It will not be paid out unless approved again..
/// </summary>
internal static string AttestCosts_SalaryDeattested {
get {
@@ -493,7 +493,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to &lt;strong&gt;WARNING: UNINITIALIZED BUDGET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;The cost you&apos;re approving belongs to an uninitialized budget -- an account in the ledger that lacks owner and doesn&apos;t have a set budget allowance for the year. Consider visiting the Account Plan and allocating budgets for the expected revenue and expenses.&lt;br/&gt;&lt;br/&gt;This message will only display once per visit to Attestations.&lt;br/&gt;.
/// Looks up a localized string similar to &lt;strong&gt;WARNING: BUDGET NOT SET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;The cost you&apos;re approving belongs to an account in the ledger that lacks owner and doesn&apos;t have a defined budget allowance for the year. Consider visiting the Chart of Accounts and allocating budgets for the expected revenue and expenses.&lt;br/&gt;&lt;br/&gt;This message will only display once per visit to Cost Approvals.&lt;br/&gt;.
/// </summary>
internal static string AttestCosts_Warn_UninitializedBudget {
get {
@@ -1699,7 +1699,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to The receipts for Expense Claim #{0:N0} for {1} {2:N2} have been DE-validated. The expense claim will not proceed to payout unless re-validated..
/// Looks up a localized string similar to Validation for receipts for Expense Claim #{0:N0} for {1} {2:N2} was RETRACTED. The expense claim will not proceed to payout unless re-validated..
/// </summary>
internal static string ValidateReceipts_ReceiptsDevalidated {
get {
+33 -33
View File
@@ -118,21 +118,21 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AttestCosts_AdvanceAttested" xml:space="preserve">
<value>Cash Advance #{0:N0} for {1} has been attested for {3:N2}.</value>
<value>Cash Advance #{0:N0} for {1} has been approved for {3:N2}.</value>
<comment>Status message.</comment>
</data>
<data name="AttestCosts_AdvanceDeattested" xml:space="preserve">
<value>Cash Advance #{0:N0} for {1} was UN-attested. It will not be paid out unless attested again.</value>
<comment>When somebody undoes a previous attestation.</comment>
<value>The approval for Cash Advance #{0:N0} for {1} was RETRACTED. It will not be paid out unless approved again.</value>
<comment>When somebody undoes a previous approval.</comment>
</data>
<data name="AttestCosts_BudgetIsEmpty" xml:space="preserve">
<value>You cannot attest this amount. The budget is empty for the year {0}.</value>
<value>You cannot approve this amount. The budget is empty for the year {0}.</value>
</data>
<data name="AttestCosts_CannotAttestNegative" xml:space="preserve">
<value>You cannot attest a negative amount.</value>
<value>You cannot approve a negative amount.</value>
</data>
<data name="AttestCosts_CannotAttestZero" xml:space="preserve">
<value>You cannot attest a zero amount.</value>
<value>You cannot approve a zero amount.</value>
</data>
<data name="AttestCosts_Error_CantRebudgetSalary" xml:space="preserve">
<value>Sorry, you cannot rebudget a salary payout.</value>
@@ -144,13 +144,9 @@
<value>Please select a budget to retarget the charge for.</value>
</data>
<data name="AttestCosts_ExpenseAttested" xml:space="preserve">
<value>Expense Claim #{0:N0} from {1} for {2} {3:N2} has been attested.</value>
<value>Expense Claim #{0:N0} from {1} for {2} {3:N2} has been approved.</value>
<comment>{2} is the currency.</comment>
</data>
<data name="AttestCosts_ExpenseDeattested" xml:space="preserve">
<value>Expense Claim #{0:N0} from {1} was DE-attested. It will not be paid out unless attested again.</value>
<comment>When somebody undoes a previous attestation.</comment>
</data>
<data name="AttestCosts_GridHeader_Action" xml:space="preserve">
<value>Action</value>
<comment>Yes / No buttons. Keep short!</comment>
@@ -178,25 +174,25 @@
<comment>Header for the requested amount.</comment>
</data>
<data name="AttestCosts_Header_CostsAwaitingAttestation" xml:space="preserve">
<value>Costs waiting for your attestation</value>
<value>Costs waiting for your approval</value>
</data>
<data name="AttestCosts_Info" xml:space="preserve">
<value>This is where you attest costs that other people are requesting from your budgets. Nothing is paid before you have attested it.</value>
<value>This is where you approve costs that other people are requesting from your budgets. Nothing is paid before you have approved it.</value>
</data>
<data name="AttestCosts_InvoiceAttested" xml:space="preserve">
<value>Invoice #{0:N0} from {1} for {2} {3:N2} has been attested.</value>
<value>Invoice #{0:N0} from {1} for {2} {3:N2} has been approved.</value>
<comment>{2} is the currency.</comment>
</data>
<data name="AttestCosts_InvoiceDeattested" xml:space="preserve">
<value>Invoice #{0:N0} from {1} was UN-attested. It will not be paid unless attested again.</value>
<comment>When somebody undoes a previous attestation.</comment>
<value>Approval for Invoice #{0:N0} from {1} was RETRACTED. It will not be paid unless approved again.</value>
<comment>When somebody undoes a previous approval.</comment>
</data>
<data name="AttestCosts_Modal_ButtonAmount" xml:space="preserve">
<value>Attest</value>
<value>Approve</value>
<comment>keep short</comment>
</data>
<data name="AttestCosts_Modal_ButtonCorrect" xml:space="preserve">
<value>Attest</value>
<value>Approve</value>
</data>
<data name="AttestCosts_Modal_ButtonDeny" xml:space="preserve">
<value>Deny</value>
@@ -224,16 +220,16 @@
<value>Move the charge to this budget instead:</value>
</data>
<data name="AttestCosts_Modal_Header" xml:space="preserve">
<value>Fix problems or deny attestation</value>
<value>Fix problems or deny approval</value>
</data>
<data name="AttestCosts_Modal_RadioOptionAmount" xml:space="preserve">
<value>I will attest this, but for a different amount.</value>
<value>I will approve this, but for a different amount.</value>
</data>
<data name="AttestCosts_Modal_RadioOptionCorrect" xml:space="preserve">
<value>The amount is wrong. I will attest it with the correct amount.</value>
<value>The amount is wrong. I will approve it for the correct amount.</value>
</data>
<data name="AttestCosts_Modal_RadioOptionDeny" xml:space="preserve">
<value>I will not attest this record. It is scratched.</value>
<value>I will not approve this record. It is scratched.</value>
<comment>This is a Monty Python reference. When translating, translate to "Deny attestation of this record altogether."</comment>
</data>
<data name="AttestCosts_Modal_RadioOptionRebudget" xml:space="preserve">
@@ -243,14 +239,14 @@
<value>What seems to be the problem with this record?</value>
</data>
<data name="AttestCosts_OutOfBudget" xml:space="preserve">
<value>There are not enough funds remaining in the budget to attest this cost.</value>
<value>There are not enough funds remaining in the budget to approve this cost.</value>
</data>
<data name="AttestCosts_OutOfBudgetPrecise" xml:space="preserve">
<value>There are not enough funds to attest this. You can attest up to {0} {1:N2} more in this budget for the year {2}.</value>
<value>There are not enough funds to approve this. You can attest up to {0} {1:N2} more in this budget for the year {2}.</value>
<comment>The {0} is the currency and the {1} is the remaining budget. The {2} is the current year.</comment>
</data>
<data name="AttestCosts_OverdraftConfirm" xml:space="preserve">
<value>&lt;strong&gt;OVERDRAFT BUDGET?&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;There are not enough funds remaining in the budget to attest this expense. Normally, it would be blocked from attestation. However, you may override this limitation and attest anyway, thereby causing the account to overdraft its budget.&lt;br/&gt;&lt;br/&gt;Do you want to attest the expense, thereby forcing an overdraft, or do you want to cancel attestation, staying on budget instead?&lt;br/&gt;&lt;br/&gt;</value>
<value>&lt;strong&gt;OVERDRAFT BUDGET?&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;There are not enough funds remaining in the budget to approve this expense. Normally, it would be blocked from approval. However, you may override this limitation and attest anyway, thereby causing the account to overdraft its budget.&lt;br/&gt;&lt;br/&gt;Do you want to approve the expense, thereby forcing an overdraft, or do you want to cancel, staying on budget instead?&lt;br/&gt;&lt;br/&gt;</value>
</data>
<data name="AttestCosts_OverdraftConfirmNo" xml:space="preserve">
<value>Stay on Budget</value>
@@ -263,24 +259,24 @@
<comment>The UPPERCASE is intentional.</comment>
</data>
<data name="AttestCosts_PageTitle" xml:space="preserve">
<value>Attest Costs</value>
<value>Approve Costs</value>
</data>
<data name="AttestCosts_ParleyAttested" xml:space="preserve">
<value>Conference #{0:N0}, arranged by {1}, has been attested for {3:N2}.</value>
<value>Conference #{0:N0}, arranged by {1}, has been approved for {3:N2}.</value>
</data>
<data name="AttestCosts_ParleyDeattested" xml:space="preserve">
<value>Conference #{0:N0} by {1} was UN-attested. It will not be greenlighted unless attested again.</value>
<comment>When somebody undoes a previous attestation.</comment>
<value>Approval for Conference #{0:N0} by {1} was RETRACTED. It will not be greenlighted unless approved again.</value>
<comment>When somebody undoes a previous approval.</comment>
</data>
<data name="AttestCosts_SalaryAttested" xml:space="preserve">
<value>Salary #{0:N0} for {1} was attested for {3:N2}.</value>
</data>
<data name="AttestCosts_SalaryDeattested" xml:space="preserve">
<value>Salary #{0:N0} for {1} was DE-attested. It will not be paid out unless attested again.</value>
<comment>When somebody undoes a previous attestation.</comment>
<value>Approval for Salary #{0:N0} for {1} was RETRACTED. It will not be paid out unless approved again.</value>
<comment>When somebody undoes a previous approval.</comment>
</data>
<data name="AttestCosts_Warn_UninitializedBudget" xml:space="preserve">
<value>&lt;strong&gt;WARNING: UNINITIALIZED BUDGET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;The cost you're approving belongs to an uninitialized budget -- an account in the ledger that lacks owner and doesn't have a set budget allowance for the year. Consider visiting the Account Plan and allocating budgets for the expected revenue and expenses.&lt;br/&gt;&lt;br/&gt;This message will only display once per visit to Attestations.&lt;br/&gt;</value>
<value>&lt;strong&gt;WARNING: BUDGET NOT SET&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;The cost you're approving belongs to an account in the ledger that lacks owner and doesn't have a defined budget allowance for the year. Consider visiting the Chart of Accounts and allocating budgets for the expected revenue and expenses.&lt;br/&gt;&lt;br/&gt;This message will only display once per visit to Cost Approvals.&lt;br/&gt;</value>
</data>
<data name="CreateInboundInvoice_Amount" xml:space="preserve">
<value>Invoice amount total (in {0})</value>
@@ -580,7 +576,7 @@
<value>Validate Receipts</value>
</data>
<data name="ValidateReceipts_ReceiptsDevalidated" xml:space="preserve">
<value>The receipts for Expense Claim #{0:N0} for {1} {2:N2} have been DE-validated. The expense claim will not proceed to payout unless re-validated.</value>
<value>Validation for receipts for Expense Claim #{0:N0} for {1} {2:N2} was RETRACTED. The expense claim will not proceed to payout unless re-validated.</value>
</data>
<data name="ValidateReceipts_ReceiptsValidated" xml:space="preserve">
<value>The receipts for Expense Claim #{0:N0} for {1} {2:N2} have been validated.</value>
@@ -731,4 +727,8 @@
<data name="FileExpenseClaim_Expensify_SuccessSeveral" xml:space="preserve">
<value>Successfully filed {0} claims.</value>
</data>
<data name="AttestCosts_ExpenseDeattested" xml:space="preserve">
<value>Approval for Expense Claim #{0:N0} from {1} was RETRACTED. It will not be paid unless approved again.</value>
<comment>When somebody undoes a previous attestation.</comment>
</data>
</root>
@@ -280,7 +280,7 @@
<comment>When somebody undoes a previous attestation.</comment>
</data>
<data name="AttestCosts_Warn_UninitializedBudget" xml:space="preserve">
<value>&lt;strong&gt;AVERTISSEMENT: BUDGET NON INITIALISÉ&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;Le coût que vous approuvez appartient à un budget non initialisé -- un compte dans le grand livre qui manque de propriétaire et qui ne dispose pas d'une allocation budgétaire définie pour l'année. Envisagez de consulter le plan du compte et d’allouer des budgets aux revenus et aux dépenses prévues.&lt;br/&gt;&lt;br/&gt; Ce message ne s'affiche qu'une fois par visite dans Attestations.&lt;br/&gt;</value>
<value>&lt;strong&gt;AVERTISSEMENT: BUDGET NON INITIALISÉ&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;Le coût que vous approuvez appartient à un budget non initialisé -- un compte dans le grand livre qui manque de propriétaire et qui ne dispose pas d'une allocation budgétaire définie pour l'année. Envisagez de consulter le plan du compte et d’allouer des budgets aux revenus et aux dépenses prévues.&lt;br/&gt;&lt;br/&gt; Ce message ne s'affiche qu'une fois par visite dans Approvals.&lt;br/&gt;</value>
</data>
<data name="CreateInboundInvoice_Amount" xml:space="preserve">
<value>Montant total de la facture (en {0})</value>
@@ -1,4 +1,4 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.v5.Financial.AttestCosts" Codebehind="AttestCosts.aspx.cs" %>
<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.v5.Financial.AttestCosts" Codebehind="ApproveCosts.aspx.cs" %>
<%@ Register src="~/Controls/v5/Base/ModalDialog.ascx" tagname="ModalDialog" tagprefix="Swarmops5" %>
<%@ Register src="~/Controls/v5/Financial/ComboBudgets.ascx" tagname="ComboBudgets" tagprefix="Swarmops5" %>
<%@ Register src="~/Controls/v5/Financial/CurrencyTextBox.ascx" tagname="CurrencyTextBox" tagprefix="Swarmops5" %>
@@ -35,13 +35,13 @@
loadUninitializedBudgets(); // no need to wait for doc.ready to load operating params
SwarmopsJS.ajaxCall("/Pages/v5/Financial/AttestCosts.aspx/GetRemainingBudgets", {}, function(data) {
SwarmopsJS.ajaxCall("/Pages/v5/Financial/ApproveCosts.aspx/GetRemainingBudgets", {}, function(data) {
data.forEach(function(accountData, dummy1, dummy2) {
budgetRemainingLookup[accountData.AccountId] = accountData.Remaining;
});
if (budgetRemainingLookup.rowsLoaded == true) {
setAttestability();
setApprovability();
}
budgetRemainingLookup.budgetsLoaded = true;
@@ -50,7 +50,7 @@
// Doc.ready:
$(document).ready(function () {
$('#TableAttestableCosts').datagrid(
$('#tableApprovableCosts').datagrid(
{
rowStyler: function (index, rowData) {
if (rowData.approved != null) {
@@ -72,7 +72,7 @@
$(".LocalIconDenied").attr("src", "/Images/Icons/iconshock-red-cross-circled-128x96px.png").hide();
$(".LocalIconUndo").attr("src", "/Images/Icons/iconshock-balloon-undo-128x96px.png");
$(".LocalIconWait").attr("src", "/Images/Abstract/ajaxloader-48x36px.gif"); // initializes as wait cursor here until budgets loaded
$(".LocalIconApproval.LocalNew, .LocalIconApproved.LocalNew, .LocalIconUndo.LocalNew, .LocalIconDenied.LocalNew, .LocalIconApproval.LocalPreviouslyAttested, .LocalIconWait.LocalPreviouslyAttested, .LocalIconDenial.LocalPreviouslyAttested, .LocalIconDenied.LocalPreviouslyAttested").hide();
$(".LocalIconApproval.LocalNew, .LocalIconApproved.LocalNew, .LocalIconUndo.LocalNew, .LocalIconDenied.LocalNew, .LocalIconApproval.LocalApproved, .LocalIconWait.LocalApproved, .LocalIconDenial.LocalApproved, .LocalIconDenied.LocalApproved").hide();
$(".LocalIconDenial").attr("src", "/Images/Icons/iconshock-balloon-no-128x96px.png");
@@ -136,11 +136,11 @@
var accountId = $("#IconApproval" + baseid).attr("accountid");
var funds = parseFloat($("#IconApproval" + baseid).attr("amount"));
budgetRemainingLookup[accountId] -= funds;
setAttestability();
setApprovability();
$.ajax({
type: "POST",
url: "/Pages/v5/Financial/AttestCosts.aspx/Deattest",
url: "/Pages/v5/Financial/ApproveCosts.aspx/RetractApproval",
data: "{'identifier': '" + escape($(this).attr("baseid")) + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
@@ -199,7 +199,7 @@
// Check if budgets have been fetched, and if so, initialize attestability
if (budgetRemainingLookup.budgetsLoaded == true) {
setAttestability();
setApprovability();
}
budgetRemainingLookup.rowsLoaded = true;
@@ -238,7 +238,7 @@
var accountId = $("#IconApproval" + baseid).attr("accountid");
var funds = parseFloat($("#IconApproval" + baseid).attr("amount"));
budgetRemainingLookup[accountId] += funds;
setAttestability();
setApprovability();
if (budgetUninitializedLookup[accountId] == true && uninitializedPopupDisplayed == false) {
@@ -248,7 +248,6 @@
}
});
alertify.alert(SwarmopsJS.unescape('<%=this.Localized_WarnUninitializedBudget%>'));
uninitializedPopupDisplayed = true;
}
@@ -256,7 +255,7 @@
$.ajax({
type: "POST",
url: "/Pages/v5/Financial/AttestCosts.aspx/Attest",
url: "/Pages/v5/Financial/ApproveCosts.aspx/ApproveItem",
data: "{'identifier': '" + escape($(approvalIcon).attr("baseid")) + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
@@ -293,18 +292,18 @@
function recheckBudgets() {
SwarmopsJS.ajaxCall("/Pages/v5/Financial/AttestCosts.aspx/GetRemainingBudgets", {}, function(data) {
SwarmopsJS.ajaxCall("/Pages/v5/Financial/ApproveCosts.aspx/GetRemainingBudgets", {}, function(data) {
data.forEach(function(accountData, dummy1, dummy2) {
budgetRemainingLookup[accountData.AccountId] = accountData.Remaining;
// console.log("Rechecking budget " + accountData.AccountId + ": remaining is " + accountData.Remaining);
});
setAttestability();
setApprovability();
});
}
function loadUninitializedBudgets() {
SwarmopsJS.ajaxCall("/Pages/v5/Financial/AttestCosts.aspx/GetUninitializedBudgets", {}, function(data) {
SwarmopsJS.ajaxCall("/Pages/v5/Financial/ApproveCosts.aspx/GetUninitializedBudgets", {}, function(data) {
console.log(data);
data.forEach(function(accountData, dummy1, dummy2) {
budgetUninitializedLookup[accountData] = true;
@@ -314,7 +313,7 @@
}
function setAttestability() {
function setApprovability() {
$('.LocalIconApproval').each(function() {
var accountId = $(this).attr('accountid');
@@ -361,7 +360,7 @@
<%= this.DialogDeny.ClientID %>_close();
SwarmopsJS.ajaxCall(
"/Pages/v5/Financial/AttestCosts.aspx/DenyItem",
"/Pages/v5/Financial/ApproveCosts.aspx/DenyItem",
{ recordId: recordId, reason: reason },
$.proxy(function(result) {
if (result.Success) {
@@ -372,7 +371,7 @@
// entire grid to cover our bases
alertify.error(result.DisplayMessage);
recheckBudgets();
$('#TableAttestableCosts').datagrid('reload');
$('#tableApprovableCosts').datagrid('reload');
}
}, $('#IconDenied' + recordId)));
}
@@ -396,11 +395,11 @@
<%= this.DialogDeny.ClientID %>_close();
SwarmopsJS.ajaxCall(
"/Pages/v5/Financial/AttestCosts.aspx/RebudgetItem",
"/Pages/v5/Financial/ApproveCosts.aspx/RebudgetItem",
{ recordId: recordId, newAccountId: newAccountId },
function(data) {
// this is when the change is completed
$('#TableAttestableCosts').datagrid('reload');
$('#tableApprovableCosts').datagrid('reload');
});
}
@@ -411,7 +410,7 @@
}
SwarmopsJS.ajaxCall(
"/Pages/v5/Financial/AttestCosts.aspx/AttestCorrectedItem",
"/Pages/v5/Financial/ApproveCosts.aspx/ApproveCorrectedItem",
{ recordId: recordId, amountString: <%=this.TextCorrectAmount.ClientID%>_val() },
function(result) {
console.log(result);
@@ -420,7 +419,7 @@
} else {
// Succeeded, attested for new amount. Since amount was changed, reload grid and budgets
recheckBudgets();
$('#TableAttestableCosts').datagrid('reload');
$('#tableApprovableCosts').datagrid('reload');
<%= this.DialogDeny.ClientID %>_close();
}
});
@@ -469,8 +468,8 @@
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
<h2><asp:Label runat="server" ID="LabelAttestCostsHeader" Text="XYZ Costs Awaiting Your Attestation" /></h2>
<table id="TableAttestableCosts" class="easyui-datagrid" style="width:680px;height:400px"
<h2><asp:Label runat="server" ID="LabelAttestCostsHeader" Text="XYZ Costs Awaiting Your Approval" /></h2>
<table id="tableApprovableCosts" class="easyui-datagrid" style="width:680px;height:400px"
data-options="rownumbers:false,singleSelect:false,fit:false,loading:false,selectOnCheck:true,checkOnSelect:true,url:'Json-AttestableCosts.aspx'"
idField="itemId">
<thead>
@@ -488,7 +487,7 @@
<Swarmops5:ModalDialog ID="DialogDeny" runat="server" >
<DialogCode>
<h2><asp:Label ID="LabelModalDenyHeader" runat="server" Text="Fix Problems Or Deny Attestation XYZ" /></h2>
<h2><asp:Label ID="LabelModalDenyHeader" runat="server" Text="Fix Problems Or Deny Approval XYZ" /></h2>
<p><asp:Literal ID="LabelWhatProblem" runat="server" Text="What seems to be the problem? XYZ" /></p>
<p><input type="radio" id="RadioDeny" name="ModalOptions" value="Deny" onclick="$('#<%=this.TextDenyReason.ClientID%>').focus();" /><label for="RadioDeny"><asp:Label runat="server" ID="LabelRadioDeny" Text="I will not attest this record. It is scratched. XYZ" /></label></p>
<div id="radioOptionDeny" class="radioOption">
@@ -156,7 +156,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
}
static protected IAttestable AttestableFromRecordId(string recordId)
static protected IApprovable AttestableFromRecordId(string recordId)
{
char recordType = recordId[0];
int itemId = Int32.Parse(recordId.Substring(1));
@@ -181,8 +181,8 @@ namespace Swarmops.Frontend.Pages.v5.Financial
public static AjaxCallResult DenyItem (string recordId, string reason)
{
AuthenticationData authData = GetAuthenticationDataAndCulture();
IAttestable attestable = AttestableFromRecordId (recordId);
FinancialAccount budget = attestable.Budget;
IApprovable approvable = AttestableFromRecordId (recordId);
FinancialAccount budget = approvable.Budget;
if (budget.OrganizationId != authData.CurrentOrganization.Identity ||
(budget.OwnerPersonId != authData.CurrentUser.Identity &&
@@ -196,7 +196,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
reason = Resources.Global.Global_NoReasonGiven;
}
attestable.DenyAttestation (authData.CurrentUser, reason);
approvable.DenyApproval (authData.CurrentUser, reason);
return new AjaxCallResult { Success = true };
}
@@ -293,7 +293,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
}
payable.SetAmountCents (amountCents, authData.CurrentUser);
payable.Attest (authData.CurrentUser);
payable.Approve (authData.CurrentUser);
return new AjaxCallResult
{
@@ -359,7 +359,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
{
AuthenticationData authData = GetAuthenticationDataAndCulture();
IAttestable attestableItem;
IApprovable approvableItem;
string attestedTemplate;
string deattestedTemplate;
@@ -385,7 +385,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
throw new SecurityException ("Called without attestation privileges");
}
attestableItem = advance;
approvableItem = advance;
attestedTemplate = Resources.Pages.Financial.AttestCosts_AdvanceAttested;
deattestedTemplate = Resources.Pages.Financial.AttestCosts_AdvanceDeattested;
beneficiary = advance.Person.Name;
@@ -404,7 +404,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
throw new SecurityException ("Called without attestation privileges");
}
attestableItem = expense;
approvableItem = expense;
attestedTemplate = Resources.Pages.Financial.AttestCosts_ExpenseAttested;
deattestedTemplate = Resources.Pages.Financial.AttestCosts_ExpenseDeattested;
beneficiary = expense.Claimer.Name;
@@ -423,7 +423,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
throw new SecurityException ("Called without attestation privileges");
}
attestableItem = invoice;
approvableItem = invoice;
attestedTemplate = Resources.Pages.Financial.AttestCosts_InvoiceAttested;
deattestedTemplate = Resources.Pages.Financial.AttestCosts_InvoiceDeattested;
beneficiary = invoice.Supplier;
@@ -442,7 +442,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
throw new SecurityException ("Called without attestation privileges");
}
attestableItem = salary;
approvableItem = salary;
attestedTemplate = Resources.Pages.Financial.AttestCosts_SalaryAttested;
deattestedTemplate = Resources.Pages.Financial.AttestCosts_SalaryDeattested;
beneficiary = salary.PayrollItem.PersonCanonical;
@@ -461,7 +461,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
throw new SecurityException ("Called without attestation privileges");
}
attestableItem = parley;
approvableItem = parley;
attestedTemplate = Resources.Pages.Financial.AttestCosts_ParleyAttested;
deattestedTemplate = Resources.Pages.Financial.AttestCosts_ParleyDeattested;
beneficiary = parley.Person.Name;
@@ -477,7 +477,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
if (mode == AttestationMode.Attestation)
{
Int64 budgetRemaining = attestableItem.Budget.GetBudgetCentsRemaining();
Int64 budgetRemaining = approvableItem.Budget.GetBudgetCentsRemaining();
result = string.Empty;
@@ -491,7 +491,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
// Unless budget was nonzero and allocated, set protest message
if (attestableItem.Budget.Owner != null || attestableItem.Budget.GetBudgetCents() != 0)
if (approvableItem.Budget.Owner != null || approvableItem.Budget.GetBudgetCents() != 0)
result = Resources.Pages.Financial.AttestCosts_Overdrafted + " ";
}
@@ -507,24 +507,24 @@ namespace Swarmops.Frontend.Pages.v5.Financial
}
}
attestableItem.Attest (authData.CurrentUser);
approvableItem.Approve (authData.CurrentUser);
result += string.Format (attestedTemplate, itemId, beneficiary,
authData.CurrentOrganization.Currency.Code,
amountCents/100.0);
}
else if (mode == AttestationMode.Deattestation)
{
attestableItem.Deattest (authData.CurrentUser);
approvableItem.RetractApproval (authData.CurrentUser);
result = string.Format (deattestedTemplate, itemId, beneficiary,
authData.CurrentOrganization.Currency.Code,
amountCents/100.0);
}
else
{
throw new InvalidOperationException ("Unknown Attestation Mode: " + mode);
throw new InvalidOperationException ("Unknown Approval Mode: " + mode);
}
FinancialAccount.ClearAttestationAdjustmentsCache (authData.CurrentOrganization);
FinancialAccount.ClearApprovalAdjustmentsCache (authData.CurrentOrganization);
return new AjaxCallResult {DisplayMessage = CommonV5.JavascriptEscape(result), Success = true};
}
+1 -1
View File
@@ -36,7 +36,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
{
if (salary.PayrollItem.Person.BitcoinPayoutAddress.Length > 0 && salary.Attested == false)
{
salary.Attest (salary.PayrollItem.Person); // null for system apparently isn't allowed here
salary.Approve (salary.PayrollItem.Person); // null for system apparently isn't allowed here
}
}*/
@@ -1020,7 +1020,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
successMessage += "<br/><br/>" +
Resources.Pages.Financial.FileExpenseClaim_SuccessMessagePartTwoOwnBudget +
"<br/>";
claim.Attest (CurrentUser);
claim.Approve (CurrentUser);
}
DashboardMessage.Set (successMessage);
@@ -1 +1 @@
<%@ Page Language="C#" AutoEventWireup="true" Inherits="Pages_v5_Finance_Json_AttestableCosts" Codebehind="Json-AttestableCosts.aspx.cs" %>
<%@ Page Language="C#" AutoEventWireup="true" Inherits="Pages_v5_Finance_Json_ApprovableCosts" Codebehind="Json-ApprovableCosts.aspx.cs" %>
@@ -9,19 +9,19 @@ using Swarmops.Logic.Financial;
using Swarmops.Logic.Support;
using Swarmops.Logic.Swarm;
public partial class Pages_v5_Finance_Json_AttestableCosts : DataV5Base
public partial class Pages_v5_Finance_Json_ApprovableCosts : DataV5Base
{
private Dictionary<int, Int64> _attestationRights;
private AttestableItems _items;
private AttestableItems _attestedItems;
private Dictionary<int, Int64> _approvalRights;
private ApprovableCosts _approvableCosts;
private ApprovableCosts _approvedCosts;
protected void Page_Load (object sender, EventArgs e)
{
// Get all attestable items
this._attestationRights = GetAttestationRights();
this._items = new AttestableItems();
this._attestedItems = new AttestableItems();
this._approvalRights = GetApprovalRights();
this._approvableCosts = new ApprovableCosts();
this._approvedCosts = new ApprovableCosts();
PopulateCashAdvances();
PopulateExpenses();
@@ -46,12 +46,12 @@ public partial class Pages_v5_Finance_Json_AttestableCosts : DataV5Base
result.Append ("{\"rows\":[");
foreach (AttestableItem item in this._items)
foreach (ApprovableCost cost in this._approvableCosts)
{
result.Append("{");
result.AppendFormat(
"\"item\":\"{0}\",\"beneficiary\":\"{1}\",\"description\":\"{2}\",\"budgetName\":\"{3}\",\"amountRequested\":\"{4:N2}\",\"itemId\":\"{5}\"," +
"\"dox\":\"" + (item.HasDox ? hasDoxString : "&nbsp;") + "\"," +
"\"dox\":\"" + (cost.HasDox ? hasDoxString : "&nbsp;") + "\"," +
"\"actions\":\"<span style='position:relative;left:-2px'>" +
"<img id='IconApproval{5}' class='LocalIconApproval LocalNew LocalFundsInsufficient action-icon' accountid='{6}' amount='{4}' baseid='{5}' />" +
"<img id='IconApproved{5}' class='LocalIconApproved LocalNew status-icon' baseid='{5}' />" +
@@ -60,31 +60,32 @@ public partial class Pages_v5_Finance_Json_AttestableCosts : DataV5Base
"<img id='IconDenial{5}' class='LocalIconDenial LocalNew action-icon' baseid='{5}' />" +
"<img id='IconDenied{5}' class='LocalIconDenied LocalNew status-icon' baseid='{5}' />" +
"</span>\"",
JsonSanitize(GetGlobalResourceObject("Global", item.IdentityDisplay).ToString()),
JsonSanitize(item.Beneficiary), JsonSanitize(TryLocalize(item.Description)),
JsonSanitize(item.BudgetName),
item.AmountRequestedCents / 100.0, item.Identity, item.Budget.Identity);
JsonSanitize(GetGlobalResourceObject("Global", cost.IdentityDisplay).ToString()),
JsonSanitize(cost.Beneficiary), JsonSanitize(TryLocalize(cost.Description)),
JsonSanitize(cost.BudgetName),
cost.AmountRequestedCents / 100.0, cost.Identity, cost.Budget.Identity);
result.Append("},");
}
foreach (AttestableItem item in this._attestedItems)
foreach (ApprovableCost cost in this._approvedCosts)
{
result.Append("{");
result.AppendFormat(
"\"item\":\"{0}\",\"beneficiary\":\"{1}\",\"description\":\"{2}\",\"budgetName\":\"{3}\",\"approved\":\"yes\",\"amountRequested\":\"{4:N2}\",\"itemId\":\"{5}\"," +
"\"dox\":\"" + (item.HasDox ? hasDoxString : "&nbsp;") + "\"," +
"\"dox\":\"" + (cost.HasDox ? hasDoxString : "&nbsp;") + "\"," +
"\"actions\":\"<span style='position:relative;left:-2px'>" +
"<img id='IconApproval{5}' class='LocalIconApproval LocalFundsInsufficient LocalPreviouslyAttested action-icon' accountid='{6}' amount='{4}' baseid='{5}' />" +
"<img id='IconApproved{5}' class='LocalIconApproved LocalPreviouslyAttested status-icon' baseid='{5}' />" +
"<img id='IconUndo{5}' class='LocalIconUndo LocalPreviouslyAttested action-icon' baseid='{5}' />" +
"<img id='IconWait{5}' class='LocalIconWait LocalPreviouslyAttested status-icon' baseid='{5}' />" +
"<img id='IconDenial{5}' class='LocalIconDenial LocalPreviouslyAttested action-icon' baseid='{5}' />" +
"<img id='IconDenied{5}' class='LocalIconDenied LocalPreviouslyAttested status-icon' baseid='{5}' />" +
"<img id='IconApproval{5}' class='LocalIconApproval LocalFundsInsufficient LocalApproved action-icon' accountid='{6}' amount='{4}' baseid='{5}' />" +
"<img id='IconApproved{5}' class='LocalIconApproved LocalApproved status-icon' baseid='{5}' />" +
"<img id='IconUndo{5}' class='LocalIconUndo LocalApproved action-icon' baseid='{5}' />" +
"<img id='IconWait{5}' class='LocalIconWait LocalApproved status-icon' baseid='{5}' />" +
"<img id='IconDenial{5}' class='LocalIconDenial LocalApproved action-icon' baseid='{5}' />" +
"<img id='IconDenied{5}' class='LocalIconDenied LocalApproved status-icon' baseid='{5}' />" +
"</span>\"",
JsonSanitize(GetGlobalResourceObject("Global", item.IdentityDisplay).ToString()),
JsonSanitize(item.Beneficiary), JsonSanitize(TryLocalize(item.Description)),
JsonSanitize(item.BudgetName),
item.AmountRequestedCents / 100.0, item.Identity, item.Budget.Identity);
JsonSanitize(GetGlobalResourceObject("Global", cost.IdentityDisplay).ToString()),
JsonSanitize(cost.Beneficiary), JsonSanitize(TryLocalize(cost.Description)),
JsonSanitize(cost.BudgetName),
cost.AmountRequestedCents / 100.0, cost.Identity, cost.Budget.Identity);
result.Append("},");
}
@@ -96,10 +97,10 @@ public partial class Pages_v5_Finance_Json_AttestableCosts : DataV5Base
}
private Dictionary<int, Int64> GetAttestationRights()
private Dictionary<int, Int64> GetApprovalRights()
{
// Right now, this function is quite primitive. At some point in the future, it needs to take into
// account that a budget may have several attesters. Right now, it just loops over all accounts and
// account that a budget may have several approvers. Right now, it just loops over all accounts and
// checks the owner.
Dictionary<int, Int64> result = new Dictionary<int, Int64>();
@@ -130,21 +131,21 @@ public partial class Pages_v5_Finance_Json_AttestableCosts : DataV5Base
foreach (CashAdvance advance in advances)
{
if (this._attestationRights.ContainsKey (advance.BudgetId) ||
if (this._approvalRights.ContainsKey (advance.BudgetId) ||
advance.Budget.OwnerPersonId == Person.NobodyId)
{
AttestableItem item = new AttestableItem (
ApprovableCost cost = new ApprovableCost (
"A" + advance.Identity.ToString (CultureInfo.InvariantCulture),
advance.Person.Name, advance.AmountCents, advance.Budget,
advance.Description, "Financial_CashAdvance", false, advance);
if (!advance.Attested) // if not attested
{
this._items.Add (item);
this._approvableCosts.Add (cost);
}
else if (!advance.PaidOut) // if attested, but still reversible
{
this._attestedItems.Add (item);
this._approvedCosts.Add (cost);
}
}
}
@@ -158,24 +159,24 @@ public partial class Pages_v5_Finance_Json_AttestableCosts : DataV5Base
foreach (ExpenseClaim expenseClaim in expenses)
{
if (this._attestationRights.ContainsKey (expenseClaim.BudgetId) ||
if (this._approvalRights.ContainsKey (expenseClaim.BudgetId) ||
expenseClaim.Budget.OwnerPersonId == Person.NobodyId)
{
Documents dox = expenseClaim.Documents;
bool hasDox = (dox.Count > 0 ? true : false);
AttestableItem item = null;
ApprovableCost cost = null;
if (vatEnabled)
{
item = new AttestableItem(
cost = new ApprovableCost(
"E" + expenseClaim.Identity.ToString(CultureInfo.InvariantCulture),
expenseClaim.ClaimerCanonical, expenseClaim.AmountCents - expenseClaim.VatCents, expenseClaim.Budget,
expenseClaim.Description, "Financial_ExpenseClaim", hasDox, expenseClaim);
}
else
{
item = new AttestableItem(
cost = new ApprovableCost(
"E" + expenseClaim.Identity.ToString(CultureInfo.InvariantCulture),
expenseClaim.ClaimerCanonical, expenseClaim.AmountCents, expenseClaim.Budget,
expenseClaim.Description, "Financial_ExpenseClaim", hasDox, expenseClaim);
@@ -183,11 +184,11 @@ public partial class Pages_v5_Finance_Json_AttestableCosts : DataV5Base
if (expenseClaim.Attested)
{
this._attestedItems.Add (item);
this._approvedCosts.Add (cost);
}
else
{
this._items.Add (item);
this._approvableCosts.Add (cost);
}
}
}
@@ -203,20 +204,20 @@ public partial class Pages_v5_Finance_Json_AttestableCosts : DataV5Base
Documents dox = invoice.Documents;
bool hasDox = (dox.Count > 0 ? true : false);
if (this._attestationRights.ContainsKey (invoice.BudgetId) ||
if (this._approvalRights.ContainsKey (invoice.BudgetId) ||
invoice.Budget.OwnerPersonId == Person.NobodyId)
{
AttestableItem item = new AttestableItem ("I" + invoice.Identity.ToString (CultureInfo.InvariantCulture),
ApprovableCost cost = new ApprovableCost ("I" + invoice.Identity.ToString (CultureInfo.InvariantCulture),
invoice.Supplier, invoice.BudgetAmountCents, invoice.Budget, invoice.Description,
"Financial_InvoiceInbound", hasDox, invoice);
if (invoice.Attested)
{
this._attestedItems.Add (item);
this._approvedCosts.Add (cost);
}
else
{
this._items.Add (item);
this._approvableCosts.Add (cost);
}
}
}
@@ -231,19 +232,19 @@ public partial class Pages_v5_Finance_Json_AttestableCosts : DataV5Base
foreach (Salary salary in salaries)
{
if (this._attestationRights.ContainsKey (salary.PayrollItem.BudgetId) ||
if (this._approvalRights.ContainsKey (salary.PayrollItem.BudgetId) ||
salary.PayrollItem.Budget.OwnerPersonId == Person.NobodyId)
{
if (!salary.Attested)
{
this._items.Add(new AttestableItem("S" + salary.Identity.ToString(CultureInfo.InvariantCulture),
this._approvableCosts.Add(new ApprovableCost("S" + salary.Identity.ToString(CultureInfo.InvariantCulture),
salary.PayrollItem.PersonCanonical, salary.CostTotalCents, salary.PayrollItem.Budget,
"[Loc]Financial_SalarySpecification|[Date]" +
salary.PayoutDate.ToString(CultureInfo.InvariantCulture), "Financial_Salary", false, salary));
}
else
{
this._attestedItems.Add(new AttestableItem("S" + salary.Identity.ToString(CultureInfo.InvariantCulture),
this._approvedCosts.Add(new ApprovableCost("S" + salary.Identity.ToString(CultureInfo.InvariantCulture),
salary.PayrollItem.PersonCanonical, salary.CostTotalCents, salary.PayrollItem.Budget,
"[Loc]Financial_SalarySpecification|[Date]" +
salary.PayoutDate.ToString(CultureInfo.InvariantCulture), "Financial_Salary", false, salary));
@@ -255,13 +256,13 @@ public partial class Pages_v5_Finance_Json_AttestableCosts : DataV5Base
private void PopulateParleys()
{
Parleys parleys = Parleys.ForOrganization (CurrentOrganization).WhereUnattested;
Parleys parleys = Parleys.ForOrganization (CurrentOrganization).WhereNotApproved;
foreach (Parley parley in parleys)
{
if (this._attestationRights.ContainsKey (parley.BudgetId) || parley.Budget.OwnerPersonId == Person.NobodyId)
if (this._approvalRights.ContainsKey (parley.BudgetId) || parley.Budget.OwnerPersonId == Person.NobodyId)
{
this._items.Add (new AttestableItem ("P" + parley.Identity.ToString (CultureInfo.InvariantCulture),
this._approvableCosts.Add (new ApprovableCost ("P" + parley.Identity.ToString (CultureInfo.InvariantCulture),
parley.Person.Canonical, parley.BudgetCents, parley.ParentBudget, parley.Name, "Financial_Parley",
false, parley));
}
@@ -269,9 +270,9 @@ public partial class Pages_v5_Finance_Json_AttestableCosts : DataV5Base
}
protected class AttestableItem
protected class ApprovableCost
{
public AttestableItem (string identity, string beneficiary, Int64 amountCents, FinancialAccount account,
public ApprovableCost (string identity, string beneficiary, Int64 amountCents, FinancialAccount account,
string description, string identityDisplay, bool hasDox, IHasIdentity item)
{
IdentityDisplay = identityDisplay;
@@ -300,7 +301,7 @@ public partial class Pages_v5_Finance_Json_AttestableCosts : DataV5Base
public bool HasDox { get; private set; }
}
protected class AttestableItems : List<AttestableItem>
protected class ApprovableCosts : List<ApprovableCost>
{
// empty class, we just want the name definition
}
@@ -9,5 +9,5 @@
public partial class Pages_v5_Finance_Json_AttestableCosts {
public partial class Pages_v5_Finance_Json_ApprovableCosts {
}
@@ -41,7 +41,7 @@
});
if (budgetRemainingLookup.rowsLoaded == true) {
setAttestability();
setApprovability();
}
budgetRemainingLookup.budgetsLoaded = true;
@@ -83,7 +83,7 @@
function setAttestability() {
function setApprovability() {
$('.LocalIconApproval').each(function() {
var accountId = $(this).attr('accountid');
@@ -189,7 +189,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
reason = Resources.Global.Global_NoReasonGiven;
}
payable.DenyAttestation (authData.CurrentUser, reason);
payable.DenyApproval (authData.CurrentUser, reason);
return new AjaxCallResult { Success = true };
}
@@ -286,7 +286,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
}
payable.SetAmountCents (amountCents, authData.CurrentUser);
payable.Attest (authData.CurrentUser);
payable.Approve (authData.CurrentUser);
return new AjaxCallResult
{
@@ -352,7 +352,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
{
AuthenticationData authData = GetAuthenticationDataAndCulture();
IAttestable attestableItem;
IApprovable approvableItem;
string attestedTemplate;
string deattestedTemplate;
@@ -378,7 +378,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
throw new SecurityException ("Called without attestation privileges");
}
attestableItem = advance;
approvableItem = advance;
attestedTemplate = Resources.Pages.Financial.AttestCosts_AdvanceAttested;
deattestedTemplate = Resources.Pages.Financial.AttestCosts_AdvanceDeattested;
beneficiary = advance.Person.Name;
@@ -397,7 +397,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
throw new SecurityException ("Called without attestation privileges");
}
attestableItem = expense;
approvableItem = expense;
attestedTemplate = Resources.Pages.Financial.AttestCosts_ExpenseAttested;
deattestedTemplate = Resources.Pages.Financial.AttestCosts_ExpenseDeattested;
beneficiary = expense.Claimer.Name;
@@ -416,7 +416,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
throw new SecurityException ("Called without attestation privileges");
}
attestableItem = invoice;
approvableItem = invoice;
attestedTemplate = Resources.Pages.Financial.AttestCosts_InvoiceAttested;
deattestedTemplate = Resources.Pages.Financial.AttestCosts_InvoiceDeattested;
beneficiary = invoice.Supplier;
@@ -435,7 +435,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
throw new SecurityException ("Called without attestation privileges");
}
attestableItem = salary;
approvableItem = salary;
attestedTemplate = Resources.Pages.Financial.AttestCosts_SalaryAttested;
deattestedTemplate = Resources.Pages.Financial.AttestCosts_SalaryDeattested;
beneficiary = salary.PayrollItem.PersonCanonical;
@@ -454,7 +454,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
throw new SecurityException ("Called without attestation privileges");
}
attestableItem = parley;
approvableItem = parley;
attestedTemplate = Resources.Pages.Financial.AttestCosts_ParleyAttested;
deattestedTemplate = Resources.Pages.Financial.AttestCosts_ParleyDeattested;
beneficiary = parley.Person.Name;
@@ -470,7 +470,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
if (mode == AttestationMode.Attestation)
{
Int64 budgetRemaining = attestableItem.Budget.GetBudgetCentsRemaining();
Int64 budgetRemaining = approvableItem.Budget.GetBudgetCentsRemaining();
result = string.Empty;
@@ -484,7 +484,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
// Unless budget was nonzero and allocated, set protest message
if (attestableItem.Budget.Owner != null || attestableItem.Budget.GetBudgetCents() != 0)
if (approvableItem.Budget.Owner != null || approvableItem.Budget.GetBudgetCents() != 0)
result = Resources.Pages.Financial.AttestCosts_Overdrafted + " ";
}
@@ -500,24 +500,24 @@ namespace Swarmops.Frontend.Pages.v5.Financial
}
}
attestableItem.Attest (authData.CurrentUser);
approvableItem.Approve (authData.CurrentUser);
result += string.Format (attestedTemplate, itemId, beneficiary,
authData.CurrentOrganization.Currency.Code,
amountCents/100.0);
}
else if (mode == AttestationMode.Deattestation)
{
attestableItem.Deattest (authData.CurrentUser);
approvableItem.RetractApproval (authData.CurrentUser);
result = string.Format (deattestedTemplate, itemId, beneficiary,
authData.CurrentOrganization.Currency.Code,
amountCents/100.0);
}
else
{
throw new InvalidOperationException ("Unknown Attestation Mode: " + mode);
throw new InvalidOperationException ("Unknown Approval Mode: " + mode);
}
FinancialAccount.ClearAttestationAdjustmentsCache (authData.CurrentOrganization);
FinancialAccount.ClearApprovalAdjustmentsCache (authData.CurrentOrganization);
return new AjaxCallResult {DisplayMessage = result, Success = true};
}
@@ -30,7 +30,7 @@
});
if (budgetRemainingLookup.rowsLoaded == true) {
setAttestability();
setApprovability();
}
budgetRemainingLookup.budgetsLoaded = true;
@@ -96,7 +96,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
successMessage += "<br/><br/>" +
Resources.Pages.Financial.RequestCashAdvance_SuccessMessagePartTwoOwnBudget +
"<br/>";
cashAdvance.Attest (CurrentUser);
cashAdvance.Approve (CurrentUser);
}
DashboardMessage.Set (successMessage);
+49 -34
View File
@@ -53,26 +53,33 @@
$(".LocalIconApproval").click(function () {
var itemId = $(this).attr("baseid");
$(this).hide();
$("#IconWait" + $(this).attr("baseid")).show();
$("#IconDenial" + $(this).attr("baseid")).fadeTo(1000, 0.01);
var thisIcon = this;
$.ajax({
type: "POST",
url: "/Pages/v5/Financial/ValidateReceipts.aspx/Validate",
data: "{'identifier': '" + escape($(this).attr("baseid")) + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
var baseId = $(thisIcon).attr("baseid");
$('.row' + baseId).addClass("action-list-item-approved");
$("#IconWait" + baseId).hide();
$("#IconDenial" + baseId).hide();
$("#IconApproved" + baseId).fadeTo(200, 0.5); // half opacity is intentional
$("#IconUndo" + baseId).fadeTo(1000, 1); // the longer delay is intentional
alertify.success(unescape(msg.d));
$("#IconWait" + itemId).show();
$("#IconDenial" + itemId).fadeTo(1000, 0.01);
SwarmopsJS.proxiedAjaxCall(
"/Pages/v5/Financial/ValidateReceipts.aspx/Validate",
{ identifier: itemId },
function (result) {
if (result.Success) {
var itemId = $(this).attr("baseid");
$('.row' + itemId).addClass("action-list-item-approved");
$("#IconWait" + itemId).hide();
$("#IconDenial" + itemId).hide();
$("#IconApproved" + itemId).fadeTo(200, 0.5); // half opacity is intentional
$("#IconUndo" + itemId).fadeTo(1000, 1); // the longer delay is intentional
alertify.success(result.DisplayMessage);
} else {
// There's probably a concurrency error.
// The socket handler will take care of updating the UI on
// receiving the cause of the concurrency error.
alertify.log(result.DisplayMessage);
}
}
});
);
});
$(".LocalIconUndo").click(function () {
@@ -80,22 +87,30 @@
$(this).hide();
$("#IconApproved" + $(this).attr("baseid")).fadeTo(1000, 0.01);
$("#IconWait" + $(this).attr("baseid")).show();
$.ajax({
type: "POST",
url: "/Pages/v5/Financial/ValidateReceipts.aspx/Devalidate",
data: "{'identifier': '" + escape($(this).attr("baseid")) + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
var baseId = $(thisIcon).attr("baseid");
$('.row' + baseId).removeClass("action-list-item-approved");
$("#IconWait" + baseId).hide();
$("#IconApproved" + baseId).hide();
$("#IconApproval" + baseId).fadeTo(200, 1);
$("#IconDenial" + baseId).fadeTo(200, 1);
alertify.log(unescape(msg.d).replace('+', ' '));
SwarmopsJS.proxiedAjaxCall(
"/Pages/v5/Financial/ValidateReceipts.aspx/RetractValidation",
{ identifier: $(this).attr("baseid") },
function(result) {
if (result.Success) {
var itemId = $(this).attr("baseid");
$('.row' + itemId).removeClass("action-list-item-approved");
$("#IconWait" + itemId).hide();
$("#IconApproved" + itemId).hide();
$("#IconApproval" + itemId).fadeTo(200, 1);
$("#IconDenial" + itemId,Id).fadeTo(200, 1);
alertify.log(result.DisplayMessage);
} else {
// There's probably a concurrency error.
// The socket handler will take care of updating the UI on
// receiving the cause of the concurrency error.
alertify.log(result.DisplayMessage);
}
}
});
);
});
@@ -128,7 +143,7 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
<h2><asp:Label runat="server" ID="LabelAttestCostsHeader" Text="XYZ Costs Awaiting Your Attestation" /></h2>
<h2><asp:Label runat="server" ID="LabelAttestCostsHeader" Text="XYZ Costs Awaiting Your Approval" /></h2>
<table id="TableAttestableCosts" class="easyui-datagrid" style="width:680px;height:400px"
data-options="rownumbers:false,singleSelect:false,fit:false,loading:false,selectOnCheck:true,checkOnSelect:true,url:'Json-ValidatableReceipts.aspx'"
idField="itemId">
@@ -5,6 +5,7 @@ using System.Text;
using System.Web;
using System.Web.Services;
using Resources;
using Swarmops.Common.Exceptions;
using Swarmops.Logic.Financial;
using Swarmops.Logic.Security;
using Swarmops.Logic.Support;
@@ -50,7 +51,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
Resources.Pages.Financial.ValidateReceipts_Header_ReceiptsAwaitingValidation;
this.LabelGridHeaderAction.Text = Global.Global_Action;
this.LabelGridHeaderBudget.Text = Resources.Pages.Financial.AttestCosts_GridHeader_Budget;
// Reuse some strings from Attest Costs
// Reuse some strings from Approve Costs
this.LabelGridHeaderDescription.Text = Resources.Pages.Financial.AttestCosts_GridHeader_Description;
this.LabelGridHeaderDocs.Text = Resources.Pages.Financial.AttestCosts_GridHeader_Docs;
this.LabelGridHeaderRequested.Text = Resources.Pages.Financial.AttestCosts_GridHeader_Requested;
@@ -87,33 +88,45 @@ namespace Swarmops.Frontend.Pages.v5.Financial
}
[WebMethod]
public new static string Validate (string identifier)
public new static AjaxCallResult Validate (string identifier)
{
identifier = HttpUtility.UrlDecode (identifier);
string result = HandleValidationDevalidation (identifier, AttestationMode.Attestation);
return HttpUtility.UrlEncode (result).Replace ("+", "%20");
try
{
string resultMessage = HandleValidationDevalidation(identifier, ApprovalMode.Approval);
return new AjaxCallResult { Success = true, DisplayMessage = resultMessage };
}
catch (ConcurrencyException)
{
return new AjaxCallResult {Success = false, DisplayMessage = Resources.Global.Error_DatabaseConcurrency};
}
}
[WebMethod]
public static string Devalidate (string identifier)
public static AjaxCallResult RetractValidation (string identifier)
{
identifier = HttpUtility.UrlDecode (identifier);
string result = HandleValidationDevalidation (identifier, AttestationMode.Deattestation);
return HttpUtility.UrlEncode (result).Replace ("+", "%20");
try
{
string resultMessage = HandleValidationDevalidation(identifier, ApprovalMode.Retraction);
return new AjaxCallResult { Success = true, DisplayMessage = resultMessage };
}
catch (ConcurrencyException)
{
return new AjaxCallResult { Success = false, DisplayMessage = Resources.Global.Error_DatabaseConcurrency };
}
}
private static string HandleValidationDevalidation (string identifier, AttestationMode mode)
private static string HandleValidationDevalidation (string identifier, ApprovalMode mode)
{
AuthenticationData authData = GetAuthenticationDataAndCulture();
IValidatable validatableItem = null;
string validatedTemplate = string.Empty;
string devalidatedTemplate = string.Empty;
string retractedTemplate = string.Empty;
char costType = identifier[0];
int itemId = Int32.Parse (identifier.Substring (1));
@@ -140,7 +153,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
validatableItem = expense;
validatedTemplate = Resources.Pages.Financial.ValidateReceipts_ReceiptsValidated;
devalidatedTemplate = Resources.Pages.Financial.ValidateReceipts_ReceiptsDevalidated;
retractedTemplate = Resources.Pages.Financial.ValidateReceipts_ReceiptsDevalidated;
amountCents = expense.AmountCents;
break;
@@ -151,21 +164,21 @@ namespace Swarmops.Frontend.Pages.v5.Financial
// Finally, attest or deattest
if (mode == AttestationMode.Attestation)
if (mode == ApprovalMode.Approval)
{
validatableItem.Validate (authData.CurrentUser);
result = string.Format (validatedTemplate, itemId, authData.CurrentOrganization.Currency.Code,
amountCents/100.0);
}
else if (mode == AttestationMode.Deattestation)
else if (mode == ApprovalMode.Retraction)
{
validatableItem.Devalidate (authData.CurrentUser);
result = string.Format (devalidatedTemplate, itemId, authData.CurrentOrganization.Currency.Code,
validatableItem.RetractValidation (authData.CurrentUser);
result = string.Format (retractedTemplate, itemId, authData.CurrentOrganization.Currency.Code,
amountCents/100.0);
}
else
{
throw new InvalidOperationException ("Unknown Attestation Mode: " + mode);
throw new InvalidOperationException ("Unknown Approval Mode: " + mode);
}
return result;
@@ -204,11 +217,11 @@ namespace Swarmops.Frontend.Pages.v5.Financial
}
}
private enum AttestationMode
private enum ApprovalMode
{
Unknown = 0,
Attestation,
Deattestation
Approval,
Retraction
};
public class RepeatedDocument
+1 -1
View File
@@ -385,7 +385,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
foreach (FinancialValidation validation in validations)
{
if (validation.ValidationType == FinancialValidationType.Attestation)
if (validation.ValidationType == FinancialValidationType.Approval)
{
result += String.Format (Resources.Pages.Ledgers.InspectLedgers_TxDetail_AttestedByX + ". ",
validation.Person.Canonical,
+12
View File
@@ -448,6 +448,18 @@ var SwarmopsJS = (function () {
}
// Preserves the "this" object into success and error functions
publicSymbols.proxiedAjaxCall = proxiedAjaxCall;
function proxiedAjaxCall(url, params, successFunction, errorFunction) {
ajaxCall(
url,
params,
$.proxy(successFunction, this),
errorFunction !== undefined? $.proxy(errorFunction, this) : undefined
);
}
publicSymbols.fancyBoxInit = fancyBoxInit;
function fancyBoxInit(selector) {
+10 -10
View File
@@ -1021,12 +1021,12 @@
<Compile Include="Pages\v5\Financial\ListInvoicesInbound.aspx.designer.cs">
<DependentUpon>ListInvoicesInbound.aspx</DependentUpon>
</Compile>
<Compile Include="Pages\v5\Financial\AttestCosts.aspx.cs">
<DependentUpon>AttestCosts.aspx</DependentUpon>
<Compile Include="Pages\v5\Financial\ApproveCosts.aspx.cs">
<DependentUpon>ApproveCosts.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\v5\Financial\AttestCosts.aspx.designer.cs">
<DependentUpon>AttestCosts.aspx</DependentUpon>
<Compile Include="Pages\v5\Financial\ApproveCosts.aspx.designer.cs">
<DependentUpon>ApproveCosts.aspx</DependentUpon>
</Compile>
<Compile Include="Pages\v5\Financial\BitcoinHotwalletNotEnabled.aspx.cs">
<DependentUpon>BitcoinHotwalletNotEnabled.aspx</DependentUpon>
@@ -1070,12 +1070,12 @@
<Compile Include="Pages\v5\Financial\FileExpenseClaim.aspx.designer.cs">
<DependentUpon>FileExpenseClaim.aspx</DependentUpon>
</Compile>
<Compile Include="Pages\v5\Financial\Json-AttestableCosts.aspx.cs">
<DependentUpon>Json-AttestableCosts.aspx</DependentUpon>
<Compile Include="Pages\v5\Financial\Json-ApprovableCosts.aspx.cs">
<DependentUpon>Json-ApprovableCosts.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Pages\v5\Financial\Json-AttestableCosts.aspx.designer.cs">
<DependentUpon>Json-AttestableCosts.aspx</DependentUpon>
<Compile Include="Pages\v5\Financial\Json-ApprovableCosts.aspx.designer.cs">
<DependentUpon>Json-ApprovableCosts.aspx</DependentUpon>
</Compile>
<Compile Include="Pages\v5\Financial\Json-PayableCosts.aspx.cs">
<DependentUpon>Json-PayableCosts.aspx</DependentUpon>
@@ -1941,14 +1941,14 @@
<Content Include="Pages\v5\Financial\Json-ListInvoicesInbound.aspx" />
<Content Include="Pages\v5\Financial\ListInvoicesOutbound.aspx" />
<Content Include="Pages\v5\Financial\ListInvoicesInbound.aspx" />
<Content Include="Pages\v5\Financial\AttestCosts.aspx" />
<Content Include="Pages\v5\Financial\ApproveCosts.aspx" />
<Content Include="Pages\v5\Financial\BitcoinHotwalletNotEnabled.aspx" />
<Content Include="Pages\v5\Financial\CreateOutboundInvoice.aspx" />
<Content Include="Pages\v5\Financial\CreateInboundInvoice.aspx" />
<Content Include="Pages\v5\Financial\Donate.aspx" />
<Content Include="Pages\v5\Financial\EconomyNotEnabled.aspx" />
<Content Include="Pages\v5\Financial\FileExpenseClaim.aspx" />
<Content Include="Pages\v5\Financial\Json-AttestableCosts.aspx" />
<Content Include="Pages\v5\Financial\Json-ApprovableCosts.aspx" />
<Content Include="Pages\v5\Financial\Json-PayableCosts.aspx" />
<Content Include="Pages\v5\Financial\Json-PayableCostsOcr.aspx" />
<Content Include="Pages\v5\Financial\Json-ValidatableReceipts.aspx" />
+4 -4
View File
@@ -910,7 +910,7 @@ namespace Swarmops.Utility.BotCode
"Description: " + expenseClaim.Description + "\r\n" +
"Amount: " + expenseClaim.Amount.ToString("N2", CultureInfo.InvariantCulture) + "\r\n" +
"Budget: " + expenseClaim.Budget.Name + "\r\n\r\n" +
"Attestation mechanisms are available on PirateWeb. The claimer will not be refunded until " +
"Approval mechanisms are available on PirateWeb. The claimer will not be refunded until " +
"YOU, as the budget owner, have attested that this claim should be drawn from your budget. " +
"Go to this link and attest the claim, if it is correct:\r\n" +
"https://pirateweb.net/Pages/v4/Financial/AttestCosts.aspx\r\n\r\n";
@@ -920,7 +920,7 @@ namespace Swarmops.Utility.BotCode
concernedPeople = People.FromSingle(budgetOwner);
new MailTransmitter(Strings.MailSenderNameFinancial, Strings.MailSenderAddress,
"Attestation Required [" + expenseClaim.Identity + "]: [" + expenser.Name +
"Approval Required [" + expenseClaim.Identity + "]: [" + expenser.Name +
"], [" + organization.NameShort + "], [" +
expenseClaim.Budget.Name + "], [" +
expenseClaim.Amount.ToString("N2", CultureInfo.InvariantCulture) + "]",
@@ -951,7 +951,7 @@ namespace Swarmops.Utility.BotCode
"Due Date: " + invoice.DueDate.ToLongDateString() + "\r\n" +
"Amount: " + invoice.Amount.ToString("N2", CultureInfo.InvariantCulture) + "\r\n" +
"Budget: " + invoice.Budget.Name + "\r\n\r\n" +
"Attestation mechanisms are available on PirateWeb. The invoice will not be available for payment until " +
"Approval mechanisms are available on PirateWeb. The invoice will not be available for payment until " +
"YOU, as the budget owner, have attested that this invoice should be drawn from your budget. " +
"Go to this link and attest the invoice, if it is correct; you can also see the invoice scan here:\r\n" +
"https://pirateweb.net/Pages/v4/Financial/AttestCosts.aspx\r\n\r\n";
@@ -961,7 +961,7 @@ namespace Swarmops.Utility.BotCode
People concernedPeople = People.FromSingle(budgetOwner);
new MailTransmitter(Strings.MailSenderNameFinancial, Strings.MailSenderAddress,
"Attestation Required [" + invoice.Identity + "]: [" + invoice.Supplier +
"Approval Required [" + invoice.Identity + "]: [" + invoice.Supplier +
"], [" + organization.NameShort + "], [" +
invoice.Budget.Name + "], [" +
invoice.Amount.ToString("N2", CultureInfo.InvariantCulture) + "]",