diff --git a/Site/App_GlobalResources/Pages.Ledgers.designer.cs b/Site/App_GlobalResources/Pages.Ledgers.designer.cs index ea60e07e..36c5b9fa 100644 --- a/Site/App_GlobalResources/Pages.Ledgers.designer.cs +++ b/Site/App_GlobalResources/Pages.Ledgers.designer.cs @@ -619,7 +619,7 @@ namespace Resources.Pages { } /// - /// Looks up a localized string similar to Mark Purchase. + /// Looks up a localized string similar to Mark as Direct Purchase. /// internal static string BalanceTransactions_ModalDialog_ButtonPurchase { get { diff --git a/Site/App_GlobalResources/Pages.Ledgers.resx b/Site/App_GlobalResources/Pages.Ledgers.resx index 67bdd6a8..5764aa4e 100644 --- a/Site/App_GlobalResources/Pages.Ledgers.resx +++ b/Site/App_GlobalResources/Pages.Ledgers.resx @@ -921,7 +921,7 @@ Displayed as description of footer - Mark Purchase + Mark as Direct Purchase Charge purchase to this budget diff --git a/Site/Controls/v5/Base/FileUpload.ascx b/Site/Controls/v5/Base/FileUpload.ascx index aea76503..337dfc54 100644 --- a/Site/Controls/v5/Base/FileUpload.ascx +++ b/Site/Controls/v5/Base/FileUpload.ascx @@ -102,6 +102,11 @@ } + function <%=this.ClientID%>_clear() { + // Note that this only clears the UI -- the uploaded docs must be disassociated elsewhere + $('#<%=this.ClientID%>_DivUploadCount').empty(); + } +
diff --git a/Site/Pages/v5/Ledgers/BalanceTransactions.aspx b/Site/Pages/v5/Ledgers/BalanceTransactions.aspx index 5515758e..668fa4ba 100644 --- a/Site/Pages/v5/Ledgers/BalanceTransactions.aspx +++ b/Site/Pages/v5/Ledgers/BalanceTransactions.aspx @@ -201,7 +201,22 @@ $('#gridTransactions').datagrid('reload'); }); - } } + } + } + + function onCreateDirectPurchase() { + var budgetId = <%=this.DropBudgetsPurchase%>_val(); + var vatAmount = <%=this.CurrencyPurchaseVat.ClientID%>_val(); + var txDescription = $("#inputTextPurchaseDescription").val(); + + alert("BudgetId: " + budgetId + "\r\nVAT amount: " + vatAmount + "\r\nDescription: " + txDescription); + + // TODO HERE: AJAX CALL + + <%=this.UploadPurchase.ClientID%>_clear(); + <%=this.CurrencyPurchaseVat.ClientID%>_val(""); + // Keep the budget selection + } var buttonBalanceValue = SwarmopsJS.unescape('<%=this.Localized_ButtonBalance%>'); var buttonPayoutValue = SwarmopsJS.unescape('<%=this.Localized_ButtonPayout%>');