diff --git a/Site5/App_GlobalResources/Pages.Financial.resx b/Site5/App_GlobalResources/Pages.Financial.resx index 4051d403..16622b00 100644 --- a/Site5/App_GlobalResources/Pages.Financial.resx +++ b/Site5/App_GlobalResources/Pages.Financial.resx @@ -118,19 +118,19 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - Cash Advance #{0} for {1} has been attested for {3:N2}. + Cash Advance #{0:N0} for {1} has been attested for {3:N2}. Status message. - Cash Advance #{0} for {1} was UN-attested. It will not be paid out unless attested again. + Cash Advance #{0:N0} for {1} was UN-attested. It will not be paid out unless attested again. When somebody undoes a previous attestation. - Expense Claim #{0} from {1} for {2} {3:N2} has been attested. + Expense Claim #{0:N0} from {1} for {2} {3:N2} has been attested. {2} is the currency. - Expense Claim #{0} from {1} was DE-attested. It will not be paid out unless attested again. + Expense Claim #{0:N0} from {1} was DE-attested. It will not be paid out unless attested again. When somebody undoes a previous attestation. @@ -166,28 +166,28 @@ This is where you attest costs that other people are requesting from your budgets. Nothing is paid before you have attested it. - Invoice #{0} from {1} for {2} {3:N2} has been attested. + Invoice #{0:N0} from {1} for {2} {3:N2} has been attested. {2} is the currency. - Invoice #{0} from {1} was UN-attested. It will not be paid unless attested again. + Invoice #{0:N0} from {1} was UN-attested. It will not be paid unless attested again. When somebody undoes a previous attestation. Attest Costs - Conference #{0}, arranged by {1}, has been attested for {3:N2}. + Conference #{0:N0}, arranged by {1}, has been attested for {3:N2}. - Conference #{0} by {1} was UN-attested. It will not be greenlighted unless attested again. + Conference #{0:N0} by {1} was UN-attested. It will not be greenlighted unless attested again. When somebody undoes a previous attestation. - Salary #{0} for {1} was attested for {3:N2}. + Salary #{0:N0} for {1} was attested for {3:N2}. - Salary #{0} for {1} was DE-attested. It will not be paid out unless attested again. + Salary #{0:N0} for {1} was DE-attested. It will not be paid out unless attested again. When somebody undoes a previous attestation. @@ -222,6 +222,10 @@ Manual Other invoices come without automated processing and a manual + + Inbound Invoice #{0:N0} filed. + The {0:N0} is just an identity number (formatted for culture). This message is displayed on success. + Account Free text input, intended to convey everything needed to get the money right @@ -229,6 +233,9 @@ Upload image file + + Please enter the supplier's bank account or equivalent. + Expense claim amount (in {0}) {0} is the currency. @@ -329,11 +336,11 @@ Cannot undo payout #{0}: it has already settled or closed. - Payout #{0} to {1} was created. + Payout #{0:N0} to {1} was created. Written as log message when the user confirms a payout has been made. - Payout #{0} was undone and everything restored. + Payout #{0:N0} was undone and everything restored. Advance amount (in {0}) @@ -403,9 +410,9 @@ Validate Receipts - The receipts for Expense Claim #{0} for {1} {2:N2} have been DE-validated. The expense claim will not proceed to payout unless re-validated. + 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. - The receipts for Expense Claim #{0} for {1} {2:N2} have been validated. + The receipts for Expense Claim #{0:N0} for {1} {2:N2} have been validated. \ No newline at end of file diff --git a/Site5/Controls/v5/Base/FileUpload.ascx.cs b/Site5/Controls/v5/Base/FileUpload.ascx.cs index 88778eee..ff502f28 100644 --- a/Site5/Controls/v5/Base/FileUpload.ascx.cs +++ b/Site5/Controls/v5/Base/FileUpload.ascx.cs @@ -43,6 +43,13 @@ namespace Swarmops.Controls.Base public string ClientUploadCompleteCallback { get; set; } + public void Reset() + { + Guid newGuid = Guid.NewGuid(); + this.HiddenGuid.Value = GuidString = newGuid.ToString(); + } + + public enum UploadFilter { Unknown = 0, diff --git a/Site5/Pages/v5/Financial/CreateInboundInvoice.aspx b/Site5/Pages/v5/Financial/CreateInboundInvoice.aspx index 79123e35..7996421a 100644 --- a/Site5/Pages/v5/Financial/CreateInboundInvoice.aspx +++ b/Site5/Pages/v5/Financial/CreateInboundInvoice.aspx @@ -14,7 +14,7 @@ diff --git a/Site5/Pages/v5/Financial/CreateInboundInvoice.aspx.cs b/Site5/Pages/v5/Financial/CreateInboundInvoice.aspx.cs index f792734e..580d7590 100644 --- a/Site5/Pages/v5/Financial/CreateInboundInvoice.aspx.cs +++ b/Site5/Pages/v5/Financial/CreateInboundInvoice.aspx.cs @@ -124,7 +124,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial this.LiteralErrorAmount.Text = Resources.Pages.Financial.FileExpenseClaim_ValidationError_Amount; // TODO: Validation errors this.LiteralErrorPurpose.Text = Resources.Pages.Financial.FileExpenseClaim_ValidationError_Purpose; this.LiteralErrorBudget.Text = Resources.Pages.Financial.RequestCashAdvance_ValidationError_Budget; - this.LiteralErrorBankAccount.Text = Resources.Pages.Financial.RequestCashAdvance_ValidationError_BankAccount; + this.LiteralErrorBankAccount.Text = Resources.Pages.Financial.CreateInboundInvoice_ValidationError_Account; this.LiteralErrorDocuments.Text = Resources.Pages.Financial.FileExpenseClaim_ValidationError_Documents; } @@ -185,8 +185,24 @@ namespace Swarmops.Frontend.Pages.v5.Financial documents.SetForeignObjectForAll(invoice); - // TODO: Clear fields, show success message, return to blank fields + // Display success message + this.LiteralSuccess.Text = HttpUtility.UrlEncode(String.Format(Resources.Pages.Financial.CreateInboundInvoice_SuccessMessage, + invoice.Identity)).Replace("+", "%20"); + + // Reset all fields for next invoice + + this.FileUpload.Reset(); + this.TextSupplier.Text = String.Empty; + this.TextAccount.Text = String.Empty; + this.TextPurpose.Text = String.Empty; + this.TextReference.Text = String.Empty; + this.TextAmount.Text = 0.ToString("N2"); + this.TextDueDate.Text = DateTime.Today.AddDays(30).ToShortDateString(); // Use current culture + + // the easyUI combo fields should reset automatically on form submission unless we explicitly reconstruct + + this.TextSupplier.Focus(); }