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%>');