Work on direct purchases

This commit is contained in:
Rick Falkvinge
2017-12-30 12:41:28 +01:00
parent 9d1b22b5e0
commit 26d87c9dbd
4 changed files with 23 additions and 3 deletions
+1 -1
View File
@@ -619,7 +619,7 @@ namespace Resources.Pages {
}
/// <summary>
/// Looks up a localized string similar to Mark Purchase.
/// Looks up a localized string similar to Mark as Direct Purchase.
/// </summary>
internal static string BalanceTransactions_ModalDialog_ButtonPurchase {
get {
+1 -1
View File
@@ -921,7 +921,7 @@
<comment>Displayed as description of footer</comment>
</data>
<data name="BalanceTransactions_ModalDialog_ButtonPurchase" xml:space="preserve">
<value>Mark Purchase</value>
<value>Mark as Direct Purchase</value>
</data>
<data name="BalanceTransactions_ModalDialog_DescribePurchaseBudget" xml:space="preserve">
<value>Charge purchase to this budget</value>
+5
View File
@@ -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();
}
</script>
<div class="stacked-input-control">
+16 -1
View File
@@ -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%>');