Added tx desc to priming

This commit is contained in:
Rick Falkvinge
2017-12-29 22:15:47 +01:00
parent 528c0ca296
commit 9d1b22b5e0
2 changed files with 4 additions and 0 deletions
@@ -32,6 +32,7 @@
$('#buttonExecutePayoutForeign').val(buttonPayoutForeignValue);
$('#buttonExecuteOutboundInvoice').val(buttonOutboundInvoiceValue);
$('#buttonExecuteVatReport').val(buttonVatReportValue);
$('#buttonExecutePurchase').val(buttonPurchaseValue);
if (isVatEnabled) {
$(".onVatEnabled").show();
@@ -68,6 +69,7 @@
function(data) {
$('#spanTransactionUnbalancedBy').text(data.DifferingAmount);
$('span#spanModalTransactionDate').text(data.TransactionDate);
$('input#inputTextPurchaseDescription').val(data.TransactionDescription);
if (data.OpenPayoutData == null) // amount is positive
{
@@ -74,6 +74,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
{
public string TransactionDate { get; set; }
public string DifferingAmount { get; set; }
public string TransactionDescription { get; set; }
public DropdownOptions OpenPayoutData { get; set; }
public DropdownOptions OpenOutboundInvoiceData { get; set; }
public DropdownOption[] OpenVatReportData { get; set; }
@@ -119,6 +120,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers
TransactionMatchabilityData result = new TransactionMatchabilityData();
result.TransactionDate = transaction.DateTime.ToString ("yyyy-MMM-dd HH:mm");
result.TransactionDescription = transaction.Description;
result.DifferingAmount = String.Format ("{0} {1:+#,#.00;−#,#.00;0}",
// this is a UNICODE MINUS (U+2212), not the hyphen on the keyboard
authData.CurrentOrganization.Currency.DisplayCode, transaction.Rows.AmountCentsTotal/100.0);