Test build of a zero setter for ComboBudgets
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ComboBudgets.ascx.cs" Inherits="Swarmops.Controls.Financial.ComboBudgets" %>
|
||||
<%@ Import Namespace="System.Threading" %>
|
||||
<%@ Import Namespace="Swarmops.Common.Enums" %>
|
||||
<%@ Import Namespace="Swarmops.Frontend" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
@@ -14,7 +15,7 @@
|
||||
<%
|
||||
if (!SuppressPrompt)
|
||||
{
|
||||
Response.Write ("$('#" + this.ClientID + "_SpanBudgets span.combo input.textbox-text').val(\"" + Resources.Global.Global_DropInits_SelectFinancialAccount + "\");");
|
||||
Response.Write ("$('#" + this.ClientID + "_SpanBudgets span.combo input.textbox-text').val('" + SwarmopsJS.unescape('<%=CommonV5.JavascriptEscape(Resources.Global.Global_DropInits_SelectFinancialAccount)%>') + "');");
|
||||
}
|
||||
if (!String.IsNullOrEmpty(this.OnClientLoaded))
|
||||
{
|
||||
@@ -58,7 +59,16 @@
|
||||
return $('#<%=this.ClientID %>_DropBudgets').combotree('getValue');
|
||||
} else {
|
||||
// setter
|
||||
$('#<%=this.ClientID %>_DropBudgets').combotree('setValue', newValue);
|
||||
|
||||
if (newValue > 0) {
|
||||
$('#<%=this.ClientID %>_DropBudgets').combotree('setValue', newValue);
|
||||
} else {
|
||||
$('#<%=this.ClientID %>_DropBudgets').combotree('setValue', {
|
||||
id: 0,
|
||||
text: SwarmopsJS.unescape('<%=CommonV5.JavascriptEscape(Resources.Global.Global_DropInits_SelectFinancialAccount)%>')
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -645,6 +645,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
|
||||
AmountVat = (recordList[index].VatCents / 100.0).ToString("N2"),
|
||||
Description = recordList[index].Description,
|
||||
DocumentId = recordList[index].Documents.First().Identity,
|
||||
BudgetId = recordList[index].BudgetId,
|
||||
Guid = recordGuid,
|
||||
ExistNext = (index < recordList.Count - 1? true: false),
|
||||
Success = true
|
||||
@@ -706,6 +707,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
|
||||
public string ExtendedInfo { get; set; }
|
||||
public string ReceiptFileNameHere { get; set; }
|
||||
public Documents Documents { get; set; }
|
||||
public int BudgetId { get; set; } // Initializes to 0
|
||||
|
||||
public string Guid { get; set; }
|
||||
}
|
||||
@@ -851,7 +853,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
|
||||
public class ExpensifyOutputRecord
|
||||
{
|
||||
public string Description { get; set; }
|
||||
public string Budget { get; set; }
|
||||
public int BudgetId { get; set; }
|
||||
public string Amount { get; set; }
|
||||
public string AmountVat { get; set; }
|
||||
public string CreatedDateTime { get; set; }
|
||||
@@ -875,6 +877,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
|
||||
public string AmountVat { get; set; }
|
||||
public string Description { get; set; }
|
||||
public int DocumentId { get; set; }
|
||||
public int BudgetId { get; set; }
|
||||
public string Guid { get; set; }
|
||||
public bool ExistNext { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user