Deploying some work to tweak looks in Chrome

This commit is contained in:
Rick Falkvinge
2012-12-01 14:48:18 +00:00
parent 18f52f307b
commit ea102e5829
27 changed files with 219 additions and 225 deletions
+25
View File
@@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using System.Web;
using Activizr.Logic.Pirates;
using Activizr.Logic.Security;
using Activizr.Logic.Structure;
/// <summary>
/// Summary description for MasterV4Base
@@ -15,6 +18,12 @@ public class MasterV5Base : System.Web.UI.MasterPage
public string CurrentPageTitle = string.Empty;
public string CurrentPageIcon = string.Empty;
public string CurrentPageInfoBoxLiteral = string.Empty;
protected Person _currentUser = null; // These are set in Master-v5.master.cs
protected Authority _authority = null;
protected Organization _currentOrganization = null;
public DateTime PermissionCacheTimestamp
{
get
@@ -32,6 +41,22 @@ public class MasterV5Base : System.Web.UI.MasterPage
Session["MainMenu-v5_Enabling_TimeStamp"] = value.Ticks;
}
}
public Person CurrentUser
{
get { return this._currentUser; }
}
public Organization CurrentOrganization
{
get { return this._currentOrganization; }
}
public Authority CurrentAuthority
{
get { return this._authority; }
}
}
+22 -8
View File
@@ -19,10 +19,6 @@ public class PageV5Base : System.Web.UI.Page
public PermissionSet pagePermissionDefault = new PermissionSet(Permission.CanSeeSelf); //Use from menu;
public Access PageAccessRequired = null; // v5 mechanism
public Person _currentUser = null;
public Authority _authority = null;
public Organization _currentOrganization = null;
/// <param name="e">An <see cref="T:System.EventArgs"></see> that contains the event data.</param>
protected override void OnInitComplete(System.EventArgs e)
{
@@ -39,9 +35,6 @@ public class PageV5Base : System.Web.UI.Page
currentUserId = Convert.ToInt32(userIdentityString);
currentOrganizationId = Convert.ToInt32(organizationIdentityString);
_currentUser = Person.FromIdentity(currentUserId);
_currentOrganization = Organization.FromIdentity(currentOrganizationId);
_authority = _currentUser.GetAuthority();
}
protected new MasterV5Base Master
@@ -59,6 +52,27 @@ public class PageV5Base : System.Web.UI.Page
set { this.Master.CurrentPageIcon = value; }
}
protected string InfoBoxLiteral
{
get { return this.Master.CurrentPageInfoBoxLiteral; }
set { this.Master.CurrentPageInfoBoxLiteral = value; }
}
protected Person CurrentUser
{
get { return this.Master.CurrentUser; }
}
protected Organization CurrentOrganization
{
get { return this.Master.CurrentOrganization; }
}
protected Authority CurrentAuthority
{
get { return this.Master.CurrentAuthority; }
}
protected override void OnPreInit(EventArgs e)
{
// Unlock Telerik
@@ -121,7 +135,7 @@ public class PageV5Base : System.Web.UI.Page
{
// Check security of page against users's credentials
if (!_currentUser.HasAccess (this.PageAccessRequired))
if (!CurrentUser.HasAccess (this.PageAccessRequired))
{
Response.Redirect("/Pages/v5/Security/AccessDenied.aspx");
}
+1 -1
View File
@@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="RequestCashAdvance_Info" xml:space="preserve">
<value>If you are about to make a purchase on behalf of the organization, but need the money in advance rather than claiming them back afterwards, you can request a cash advance for a specific purpose here.</value>
<value>If you are about to make a purchase on behalf of the organization, but need the money in advance rather than claiming them back afterwards, you can request a cash advance for a specific purpose.</value>
</data>
<data name="RequestCashAdvance_PageTitle" xml:space="preserve">
<value>Request Cash Advance</value>
-31
View File
@@ -10,36 +10,5 @@
<asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderSide" Runat="Server">
<h2 class="blue"><asp:Label ID="LabelSidebarInfo" runat="server" /><span class="arrow"></span></h2>
<div class="box">
<div class="content">
<asp:Label ID="LabelDashboardInfo" runat="server" /> <a href="/Pages/v5/Governance/Vote.aspx"><asp:Label ID="LabelGoThere" runat="server" /></a>
</div>
</div>
<h2 class="blue"><asp:Label ID="LabelSidebarActions" runat="server" /><span class="arrow"></span></h2>
<div class="box">
<div class="content">
<div class="link-row-encaps" onclick="document.location='/Pages/v5/Governance/Vote.aspx';" >
<div class="link-row-icon" style="background-image:url('/Images/PageIcons/iconshock-vote-16px.png')"></div>
<asp:Label ID="LabelActionVote" runat="server" />
</div>
<div class="link-row-encaps" onclick="document.location='/Pages/v5/Governance/ListMotions.aspx';" >
<div class="link-row-icon" style="background-image:url('/Images/PageIcons/iconshock-motions-16px.png')"></div>
<asp:Label ID="LabelActionListMotions" runat="server" />
</div>
</div>
</div>
<h2 class="orange"><asp:Label ID="LabelSidebarTodo" runat="server" /><span class="arrow"></span></h2>
<div class="box">
<div class="content">
<asp:Label ID="LabelActionItemsHere" runat="server" />
</div>
</div>
</asp:Content>
+3 -8
View File
@@ -16,17 +16,12 @@ public partial class Default : PageV5Base
this.PageTitle = Resources.Global.Dashboard_PageTitle;
this.PageIcon = "iconshock-steering-wheel";
/*
this.LabelActionListMotions.Text = Resources.Pages.Governance.ListMotions_PageTitle;
this.LabelActionVote.Text = Resources.Pages.Governance.Vote_PageTitle;
this.LabelActionVote.Text = Resources.Pages.Governance.Vote_PageTitle;*/
this.LabelSidebarInfo.Text = Resources.Global.Sidebar_Information;
this.LabelSidebarActions.Text = Resources.Global.Sidebar_Actions;
this.LabelSidebarTodo.Text = Resources.Global.Sidebar_Todo;
this.LabelActionItemsHere.Text = Resources.Global.Sidebar_Todo_Placeholder;
this.LabelGoThere.Text = Resources.Global.Global_GoThere;
this.LabelDashboardTemporaryContent.Text = Resources.Global.Dashboard_Main_Temporary;
this.LabelDashboardInfo.Text = Resources.Global.Dashboard_Info_Temporary;
this.InfoBoxLiteral = Resources.Global.Dashboard_Info_Temporary;
this.LabelGoThere2.Text = Resources.Global.Global_GoThere;
}
}
+36 -1
View File
@@ -106,7 +106,7 @@
<div class="center980px">
<div class="currentuserinfo">
<div style="background-image:url('/Images/Icons/iconshock-user-16px.png');background-repeat:no-repeat;padding-left:16px;float:left"><asp:Label ID="LabelCurrentUserName" runat="server" /> | </div>
<div style="background-image:url('/Images/Icons/iconshock-workchair-16px.png');background-repeat:no-repeat;padding-left:17px;float:left"><span class="hasTooltip" rel="Logged into Sandbox" title="Click here to switch to another organization."><a href="#" id="LinkChangeOrganizations"><asp:Label ID="LabelCurrentOrganizationName" runat="server" /></a></span> |&nbsp;</div>
<div style="background-image:url('/Images/Icons/iconshock-workchair-16px.png');background-repeat:no-repeat;padding-left:17px;float:left"><span class="hasTooltip" rel="Logged into <%=this.CurrentOrganization.Name %>" title="Click here to switch to another organization."><a href="#" id="LinkChangeOrganizations"><asp:Label ID="LabelCurrentOrganizationName" runat="server" /></a></span> |&nbsp;</div>
<div style="background-image:url('/Images/Icons/iconshock-gamepad-16px.png');background-repeat:no-repeat;padding-left:20px;float:left"><asp:Label ID="LabelPreferences" runat="server" /> | </div>
<div style="background-image:url('/Images/Icons/iconshock-lock-16px.png');background-repeat:no-repeat;padding-left:16px;float:left"><asp:LinkButton ID="LinkLogout" runat="server" OnClick="LinkLogout_Click" /> |&nbsp;</div>
<asp:Image ID="ImageCultureIndicator" runat="server" ImageUrl="~/Images/Flags/uk.png" /> <asp:LinkButton ID="LinkTranslate" Visible="false" Text="Translate Into" OnClick="LinkTranslate_Click" runat="server" />
@@ -251,8 +251,43 @@
</div>
</div>
<div class="sidebar">
<h2 class="blue"><asp:Label ID="LabelSidebarInfo" runat="server" /><span class="arrow"></span></h2>
<div class="box">
<div class="content">
<asp:Literal ID="LiteralSidebarInfo" runat="server" />
</div>
</div>
<h2 class="blue"><asp:Label ID="LabelSidebarActions" runat="server" /><span class="arrow"></span></h2>
<div class="box">
<div class="content">
<div class="link-row-encaps" onclick="document.location='/Pages/v5/Governance/Vote.aspx';" >
<div class="link-row-icon" style="background-image:url('/Images/PageIcons/iconshock-vote-16px.png')"></div>
<asp:Label ID="LabelActionPlaceholder1" runat="server" />
</div>
<div class="link-row-encaps" onclick="document.location='/Pages/v5/Governance/ListMotions.aspx';" >
<div class="link-row-icon" style="background-image:url('/Images/PageIcons/iconshock-motions-16px.png')"></div>
<asp:Label ID="LabelActionPlaceholder2" runat="server" />
</div>
</div>
</div>
<asp:ContentPlaceHolder ID="PlaceHolderSide" runat="server" />
<h2 class="orange"><asp:Label ID="LabelSidebarTodo" runat="server" /><span class="arrow"></span></h2>
<div class="box">
<div class="content">
<asp:Label ID="LabelActionItemsHere" runat="server" />
</div>
</div>
</div>
</div>
+33 -27
View File
@@ -22,12 +22,30 @@ namespace Activizr
this.LanguageSelector.LanguageChanged += new EventHandler(LanguageSelector_LanguageChanged);
// Titles etc
// Security stuff
// Current authentication
string identity = HttpContext.Current.User.Identity.Name;
string[] identityTokens = identity.Split(',');
string userIdentityString = identityTokens[0];
string organizationIdentityString = identityTokens[1];
int currentUserId = Convert.ToInt32(userIdentityString);
int currentOrganizationId = Convert.ToInt32(organizationIdentityString);
_currentUser = Person.FromIdentity(currentUserId);
_authority = _currentUser.GetAuthority();
_currentOrganization = Organization.FromIdentity(currentOrganizationId);
// Titles and other page elements
this.IconPage.ImageUrl = "/Images/PageIcons/" + this.CurrentPageIcon + "-40px.png";
this.LabelPageTitle.Text = this.CurrentPageTitle;
this.Page.Title = "Activizr - " + this.CurrentPageTitle;
this.LiteralSidebarInfo.Text = this.CurrentPageInfoBoxLiteral;
// Check for SSL and force it
if (!Request.IsSecureConnection)
@@ -40,25 +58,12 @@ namespace Activizr
Localize();
// Current authentication
this.LabelCurrentUserName.Text = _currentUser.Name;
this.LabelCurrentOrganizationName.Text = _currentOrganization.Name;
string identity = HttpContext.Current.User.Identity.Name;
string[] identityTokens = identity.Split(',');
string userIdentityString = identityTokens[0];
string organizationIdentityString = identityTokens[1];
int currentUserId = Convert.ToInt32(userIdentityString);
int currentOrganizationId = Convert.ToInt32(organizationIdentityString);
this.LabelCurrentUserName.Text = Person.FromIdentity(currentUserId).Name;
this.LabelCurrentOrganizationName.Text = Organization.FromIdentity(currentOrganizationId).Name;
// Security stuff
_viewingPerson = Person.FromIdentity(currentUserId);
_authority = _viewingPerson.GetAuthority();
_organization = Organization.FromIdentity(currentOrganizationId);
this.LabelActionPlaceholder1.Text = "Action shortcut 1 (TODO)";
this.LabelActionPlaceholder2.Text = "Action shortcut 2 (TODO)";
this.LabelActionItemsHere.Text = "Action items here (TODO)";
RadMenu mainMenu = FindControl("MainMenu") as RadMenu;
@@ -104,14 +109,14 @@ namespace Activizr
}
}
private Person _viewingPerson;
private Organization _organization;
private Authority _authority;
private static string _buildIdentity;
private void Localize()
{
this.LabelSidebarInfo.Text = Resources.Global.Sidebar_Information;
this.LabelSidebarActions.Text = Resources.Global.Sidebar_Actions;
this.LabelSidebarTodo.Text = Resources.Global.Sidebar_Todo;
string cultureString = Thread.CurrentThread.CurrentCulture.ToString();
string cultureStringLower = cultureString.ToLowerInvariant();
@@ -187,9 +192,9 @@ namespace Activizr
break;
case "CloseLedgers":
int year = DateTime.Today.Year;
int booksClosedUntil = _organization.Parameters.FiscalBooksClosedUntilYear;
int booksClosedUntil = _currentOrganization.Parameters.FiscalBooksClosedUntilYear;
if (_organization.Parameters.EconomyEnabled && booksClosedUntil < year - 1)
if (_currentOrganization.Parameters.EconomyEnabled && booksClosedUntil < year - 1)
{
item.Text = String.Format(Resources.Menu5.Menu5_Ledgers_CloseBooks, booksClosedUntil + 1);
}
@@ -341,7 +346,7 @@ namespace Activizr
{
// Received event from control - refire
_viewingPerson.PreferredCulture = System.Threading.Thread.CurrentThread.CurrentCulture.Name;
_currentUser.PreferredCulture = System.Threading.Thread.CurrentThread.CurrentCulture.Name;
this.LiteralCrowdinScript.Text = string.Empty;
if (LanguageChanged != null)
@@ -374,7 +379,7 @@ namespace Activizr
protected void ButtonSwitchOrganizations_Click(object sender, EventArgs e)
{
int currentUserId = _viewingPerson.Identity;
int currentUserId = _currentUser.Identity;
int desiredOrganizationId = Int32.Parse(this.TextSwitchToOrganizationId.Text);
if (desiredOrganizationId != 0)
@@ -383,5 +388,6 @@ namespace Activizr
Response.Redirect("/");
}
}
}
}
+17 -32
View File
@@ -5,42 +5,27 @@
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
<div class="entryLabels">
Amount (SEK)<br/>
Purpose<br/>
Budget<br/>
</div>
<div class="entryFields">
<asp:TextBox runat="server" ID="TextAmount" />&nbsp;<br/>
<asp:TextBox runat="server" ID="TextPurpose" />&nbsp;<br/>
<asp:TextBox runat="server" ID="Budget" />&nbsp;<br/>
<asp:Button runat="server" CssClass="buttonAccentColor" Text="Request"/>
</div>
<div class="entryvalidation">
For example, <strong>1000</strong>.<br/>
Describe briefly. For example, "Bus tickets to rally."<br/>
Where this money will come from.<br/>
</div>
<div style="clear:both"></div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderSide" Runat="Server">
<h2 class="blue"><asp:Label ID="LabelSidebarInfo" runat="server" /><span class="arrow"></span></h2>
<div class="box">
<div class="content">
<asp:Label ID="LabelDashboardInfo" runat="server" /> <a href="/Pages/v5/Governance/Vote.aspx"><asp:Label ID="LabelGoThere" runat="server" /></a>
</div>
</div>
<h2 class="blue"><asp:Label ID="LabelSidebarActions" runat="server" /><span class="arrow"></span></h2>
<div class="box">
<div class="content">
<div class="link-row-encaps" onclick="document.location='/Pages/v5/Governance/Vote.aspx';" >
<div class="link-row-icon" style="background-image:url('/Images/PageIcons/iconshock-vote-16px.png')"></div>
<asp:Label ID="LabelActionVote" runat="server" />
</div>
<div class="link-row-encaps" onclick="document.location='/Pages/v5/Governance/ListMotions.aspx';" >
<div class="link-row-icon" style="background-image:url('/Images/PageIcons/iconshock-motions-16px.png')"></div>
<asp:Label ID="LabelActionListMotions" runat="server" />
</div>
</div>
</div>
<h2 class="orange"><asp:Label ID="LabelSidebarTodo" runat="server" /><span class="arrow"></span></h2>
<div class="box">
<div class="content">
<asp:Label ID="LabelActionItemsHere" runat="server" />
</div>
</div>
</asp:Content>
@@ -11,5 +11,6 @@ public partial class Pages_v5_Finance_RequestCashAdvance : PageV5Base
{
this.PageTitle = Resources.Pages.Finance.RequestCashAdvance_PageTitle;
this.PageIcon = "iconshock-walletmoney";
this.InfoBoxLiteral = Resources.Pages.Finance.RequestCashAdvance_Info;
}
}
+2 -2
View File
@@ -12,13 +12,13 @@
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
<div class="entrylabels" style="width:150px">
<div class="entryLabels" style="width:150px">
<asp:Label ID="LabelTitle" runat="server" /><br />
<asp:Label ID="LabelSubmitter" runat="server" /><br />
<div style="height:214px"><asp:Label ID="LabelText" runat="server" /></div>
<asp:Label ID="LabelDecisions" runat="server" />
</div>
<div class="entryfields">
<div class="entryFields">
<div style="height:30px; margin-top:4px"><asp:TextBox CssClass="textinput" ID="TextTitle" runat="server" /></div>
<div style="height:30px"><act5:ComboPerson ID="PersonSubmitter" runat="server" /></div>
<asp:TextBox CssClass="textinput" TextMode="MultiLine" Rows="10" ID="TextMotionText" runat="server" />&nbsp;<br />
+3 -3
View File
@@ -47,13 +47,13 @@ namespace Activizr.Pages.Governance
if (!Page.IsPostBack)
{
this.PersonSubmitter.SelectedPerson = _currentUser;
this.PersonSubmitter.SelectedPerson = CurrentUser;
// HACK: Hardcode the presidency of this meeting
bool isPresidency = false;
switch (_currentUser.Identity)
switch (CurrentUser.Identity)
{
case 1681: // Nils Agnesson
case 15719: // Andreas Bjärnemalm
@@ -86,7 +86,7 @@ namespace Activizr.Pages.Governance
return; // Do nothing if validators fail the page
}
Motion newMotion = Motion.Create(_meeting, this.PersonSubmitter.SelectedPerson, _currentUser,
Motion newMotion = Motion.Create(_meeting, this.PersonSubmitter.SelectedPerson, CurrentUser,
this.TextTitle.Text, this.TextMotionText.Text, this.TextDecisionPoints.Text);
this.LabelMotionSaved.Text = String.Format(Resources.Pages.Governance.AddMotion_MotionSubmittedAs,
@@ -12,13 +12,13 @@
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
<div class="entrylabels" style="width:150px">
<div class="entryLabels" style="width:150px">
<asp:Label ID="LabelTitle" runat="server" /><br />
<asp:Label ID="LabelSubmitter" runat="server" /><br />
<div style="height:214px"><asp:Label ID="LabelText" runat="server" /></div>
<asp:Label ID="LabelDecision" runat="server" />
</div>
<div class="entryfields">
<div class="entryFields">
<div style="height:30px; margin-top:4px"><asp:TextBox CssClass="textinput" ID="TextTitle" runat="server" /></div>
<div style="height:30px"><act5:ComboPerson ID="PersonSubmitter" runat="server" /></div>
<asp:TextBox CssClass="textinput" TextMode="MultiLine" Rows="10" ID="TextAmendmentText" runat="server" />&nbsp;<br />
@@ -48,13 +48,13 @@ namespace Activizr.Pages.Governance
if (!Page.IsPostBack)
{
this.PersonSubmitter.SelectedPerson = _currentUser;
this.PersonSubmitter.SelectedPerson = CurrentUser;
// HACK: Hardcode the presidency of this meeting
bool isPresidency = false;
switch (_currentUser.Identity)
switch (CurrentUser.Identity)
{
case 1681: // Nils Agnesson
case 15719: // Andreas Bjärnemalm
@@ -101,7 +101,7 @@ namespace Activizr.Pages.Governance
MotionAmendment newAmendment = MotionAmendment.Create(_motion, this.TextTitle.Text, this.TextAmendmentText.Text,
this.TextDecisionPoint.Text,
this.PersonSubmitter.SelectedPerson, _currentUser);
this.PersonSubmitter.SelectedPerson, this.CurrentUser);
this.LabelAmendmentSaved.Text = String.Format(Resources.Pages.Governance.AddMotionAmendment_AmendmentSubmittedAs,
_motion.SequenceNumber, (char) ((int)('A') + newAmendment.SequenceNumber - 1));
+1 -1
View File
@@ -24,7 +24,7 @@ namespace Activizr.Pages.Governance
this.LabelActionItemsHere.Text = Resources.Global.Sidebar_Todo_Placeholder;
this.LabelActionListMotions.Text = Resources.Pages.Governance.ListMotions_PageTitle;
this.LabelVotingInfo.Text = String.Format(Resources.Pages.Governance.Vote_Info, _currentOrganization.Name);
this.LabelVotingInfo.Text = String.Format(Resources.Pages.Governance.Vote_Info, CurrentOrganization.Name);
this.LabelPointsOfOrderHeader.Text = Resources.Pages.Governance.Vote_PointsOfOrder;
this.LabelPointsOfOrderTemp.Text = Resources.Pages.Governance.Vote_PointsOfOrderTemp;
@@ -85,7 +85,7 @@ namespace Activizr.Pages.Governance
this.DropRecommendations.Items.Clear();
this.DropRecommendations.Items.Add(new ListItem(Resources.Pages.Governance.VoteAmendments_SelectRecommendation, "0"));
this.DropRecommendations.Items.Add(new ListItem(Resources.Pages.Governance.VoteAmendments_BoardRecommendation, "-1"));
this.DropRecommendations.Items.Add(new ListItem("DinLista - " + _currentUser.Canonical, "3"));
this.DropRecommendations.Items.Add(new ListItem("DinLista - " + CurrentUser.Canonical, "3"));
this.DropRecommendations.Items.Add(new ListItem("TestList - Rick Falkvinge (#1)", "1"));
}
+8 -8
View File
@@ -487,12 +487,12 @@
<p>However, before we proceed, we need to make sure that you are indeed the sysadmin of this server, and not a remote bot who just discovered an unfinished Activizr installation. To do that, answer these simple questions:</p> <asp:Label runat="server" ID="LabelTest" />
<div class="entrylabels" style="width:250px">
<div class="entryLabels" style="width:250px">
What is this server's /etc/hostname?<br />
What is this server's internal IP?<br />
What is your favorite color?
</div>
<div class="entryfields">
<div class="entryFields">
<asp:TextBox CssClass="textinput" ID="TextServerName" runat="server" />&nbsp;<br />
<asp:TextBox CssClass="textinput" ID="TextServerAddress" runat="server" />&nbsp;<br />
<asp:DropDownList ID="DropFavoriteColor" runat="server" />&nbsp;<br />
@@ -509,28 +509,28 @@
<h2>Connect to database</h2>
<p>Before you fill this in, you will need to have created a database on a MySQL server that this web server can access, and set up user accounts that can access it. We <strong>very strongly</strong> recommend having three separate accounts - one for reading (needs SELECT only), one for writing (SELECT and EXECUTE), and one for admin. All three accounts also need SELECT permissions on the mysql database.</p>
<div class="entrylabels" style="width:120px">
<div class="entryLabels" style="width:120px">
&nbsp;<br/>
Database<br />
Server<br />
User<br/>
Password
</div>
<div class="entryfields" style="width:80px">
<div class="entryFields" style="width:80px">
<strong>Read access</strong><br/>
<asp:TextBox CssClass="textinput" ID="TextCredentialsReadDatabase" runat="server" />&nbsp;<br />
<asp:TextBox CssClass="textinput" ID="TextCredentialsReadServer" runat="server" />&nbsp;<br />
<asp:TextBox CssClass="textinput" ID="TextCredentialsReadUser" runat="server" />&nbsp;<br />
<asp:TextBox CssClass="textinput" ID="TextCredentialsReadPassword" runat="server" />&nbsp;<br />
</div>
<div class="entryfields" style="width:80px;margin-left:10px">
<div class="entryFields" style="width:80px;margin-left:10px">
<strong>Write access</strong><br/>
<asp:TextBox CssClass="textinput" ID="TextCredentialsWriteDatabase" runat="server" />&nbsp;<br />
<asp:TextBox CssClass="textinput" ID="TextCredentialsWriteServer" runat="server" />&nbsp;<br />
<asp:TextBox CssClass="textinput" ID="TextCredentialsWriteUser" runat="server" />&nbsp;<br />
<asp:TextBox CssClass="textinput" ID="TextCredentialsWritePassword" runat="server" />&nbsp;<br />
</div>
<div class="entryfields" style="width:80px;margin-left:10px">
<div class="entryFields" style="width:80px;margin-left:10px">
<strong>Admin access</strong><br/>
<asp:TextBox CssClass="textinput" ID="TextCredentialsAdminDatabase" runat="server" />&nbsp;<br />
<asp:TextBox CssClass="textinput" ID="TextCredentialsAdminServer" runat="server" />&nbsp;<br />
@@ -553,13 +553,13 @@
<p>(You can add other people to the <em>System Administrator</em> role later.)</p>
<div class="entrylabels" style="width:250px">
<div class="entryLabels" style="width:250px">
Your full name<br />
Your email<br />
Your password<br/>
Repeat password
</div>
<div class="entryfields">
<div class="entryFields">
<asp:TextBox CssClass="textinput" ID="TextFirstUserName" runat="server" />&nbsp;<br />
<asp:TextBox CssClass="textinput" ID="TextFirstUserMail" runat="server" />&nbsp;<br />
<asp:TextBox CssClass="textinput" ID="TextFirstUserPassword1" TextMode="Password" runat="server" />&nbsp;<br />
+9 -9
View File
@@ -12,14 +12,14 @@ public partial class Pages_v5_Ledgers_CloseLedgers : PageV5Base
{
protected void Page_Load(object sender, EventArgs e)
{
this.PageAccessRequired = new Access(_currentOrganization, AccessAspect.Bookkeeping, AccessType.Write);
this.PageAccessRequired = new Access(this.CurrentOrganization, AccessAspect.Bookkeeping, AccessType.Write);
this.PageTitle = "Close Ledgers";
this.PageIcon = "iconshock-calculator-lock";
// Check if on a closable year
if (_currentOrganization.Parameters.EconomyEnabled == false || _currentOrganization.Parameters.FiscalBooksClosedUntilYear == DateTime.Today.Year - 1)
if (this.CurrentOrganization.Parameters.EconomyEnabled == false || this.CurrentOrganization.Parameters.FiscalBooksClosedUntilYear == DateTime.Today.Year - 1)
{
this.PanelCannotClose.Visible = true;
this.PanelSuccess.Visible = false;
@@ -29,7 +29,7 @@ public partial class Pages_v5_Ledgers_CloseLedgers : PageV5Base
// Check if all transactions are balanced, so we can close
FinancialTransactions unbalancedTransactions = FinancialTransactions.GetUnbalanced(_currentOrganization); // TODO: this fn should move to Organization
FinancialTransactions unbalancedTransactions = FinancialTransactions.GetUnbalanced(this.CurrentOrganization); // TODO: this fn should move to Organization
if (unbalancedTransactions.Count > 0)
{
@@ -40,11 +40,11 @@ public partial class Pages_v5_Ledgers_CloseLedgers : PageV5Base
// Start actually closing the ledgers
int closingYear = _currentOrganization.Parameters.FiscalBooksClosedUntilYear + 1;
int closingYear = this.CurrentOrganization.Parameters.FiscalBooksClosedUntilYear + 1;
// First, roll over virtual balances.
if (true) // if _currentOrganization.Parameters.VirtualBankingEnabled
if (true) // if this.CurrentOrganization.Parameters.VirtualBankingEnabled
{
FinancialAccount rootAccount = FinancialAccount.FromIdentity(29); // HACK: Hardcoded account; should be _organization.FinancialAccount.CostsVirtualBankingRoot
FinancialAccount tempAccount = FinancialAccount.FromIdentity(98); // HACK: Hardcoded account; should be _organization.FinancialAccount.AssetsVirtualRollover
@@ -84,7 +84,7 @@ public partial class Pages_v5_Ledgers_CloseLedgers : PageV5Base
// Then, actually close the ledgers.
FinancialAccounts accounts = FinancialAccounts.ForOrganization(_currentOrganization);
FinancialAccounts accounts = FinancialAccounts.ForOrganization(this.CurrentOrganization);
Int64 balanceDeltaCents = 0;
Int64 resultsDeltaCents = 0;
@@ -106,9 +106,9 @@ public partial class Pages_v5_Ledgers_CloseLedgers : PageV5Base
if (balanceDeltaCents == -resultsDeltaCents && closingYear < DateTime.Today.Year)
{
FinancialTransaction resultTransaction = FinancialTransaction.Create(_currentOrganization.Identity, new DateTime(closingYear, 12, 31, 23, 59, 00), "Årets resultat " + closingYear.ToString()); // TODO: Localize string
resultTransaction.AddRow(_currentOrganization.FinancialAccounts.CostsYearlyResult, -resultsDeltaCents, null);
resultTransaction.AddRow(_currentOrganization.FinancialAccounts.DebtsCapital, -balanceDeltaCents, null);
FinancialTransaction resultTransaction = FinancialTransaction.Create(this.CurrentOrganization.Identity, new DateTime(closingYear, 12, 31, 23, 59, 00), "Årets resultat " + closingYear.ToString()); // TODO: Localize string
resultTransaction.AddRow(this.CurrentOrganization.FinancialAccounts.CostsYearlyResult, -resultsDeltaCents, null);
resultTransaction.AddRow(this.CurrentOrganization.FinancialAccounts.DebtsCapital, -balanceDeltaCents, null);
// Ledgers are now at zero-sum for the year's result accounts and from the start up until end-of-closing-year for the balance accounts.
+3 -3
View File
@@ -10,7 +10,7 @@ public partial class Pages_v5_Ledgers_DebugLedgers : PageV5Base
{
protected void Page_Load(object sender, EventArgs e)
{
this.PageAccessRequired = new Access(_currentOrganization, AccessAspect.Bookkeeping, AccessType.Write);
this.PageAccessRequired = new Access(this.CurrentOrganization, AccessAspect.Bookkeeping, AccessType.Write);
this.PageTitle = "Debug Ledgers";
this.PageIcon = "iconshock-tester";
@@ -21,8 +21,8 @@ public partial class Pages_v5_Ledgers_DebugLedgers : PageV5Base
// Iterate over all open payment groups and try to map them to unbalanced transactions
FinancialTransactions unbalancedTransactions = FinancialTransactions.GetUnbalanced(_currentOrganization); // TODO: this fn should move to Organization
PaymentGroups openGroups = PaymentGroups.ForOrganization(_currentOrganization, false);
FinancialTransactions unbalancedTransactions = FinancialTransactions.GetUnbalanced(this.CurrentOrganization); // TODO: this fn should move to Organization
PaymentGroups openGroups = PaymentGroups.ForOrganization(this.CurrentOrganization, false);
foreach (PaymentGroup openGroup in openGroups)
{
+3 -3
View File
@@ -9,13 +9,13 @@
<h2><asp:Label ID="LabelRootBudgetHeader" Text="Root Budgets For Org [LOC]" runat="server" /><div style="float:right"><asp:DropDownList ID="DropYears" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropYears_SelectedIndexChanged" /></div></h2>
<div class="entrylabels" style="margin-right:30px;width:200px">
<div class="entryLabels" style="margin-right:30px;width:200px">
<strong><asp:Label ID="LabelAccountHeader" Text="Account [LOC]" runat="server" /></strong><br/>
<asp:Repeater ID="RepeaterAccountNames" runat="server" OnItemDataBound="RepeaterAccountNames_ItemDataBound" ><ItemTemplate><asp:Label ID="LabelAccountName" runat="server" Text="Unset Account Name" /> <em>(<asp:Label ID="LabelAccountType" runat="server" Text="Type [LOC]" />)</em><br /></ItemTemplate></asp:Repeater>
<em><asp:Label ID="LabelYearlyResultLabel" runat="server" Text="Yearly Result [LOC]" /></em>
</div>
<div class="entryfields">
<div class="entryFields">
<strong><asp:Label ID="LabelBudgetOwnerHeader" runat="server" Text="Budget, Owner [LOC]" /></strong><br/>
<asp:Repeater ID="RepeaterAccountBudgets" OnItemDataBound="RepeaterAccountBudgets_ItemDataBound" runat="server"><ItemTemplate><asp:HiddenField runat="server" ID="HiddenAccountId" /><asp:HiddenField runat="server" ID="HiddenCurrentBudget" /><asp:TextBox ID="TextBudget" runat="server" Text="Not set" />&nbsp;&nbsp;<span style="border-bottom: dashed 1px #808080;cursor:pointer"><asp:Label ID="LabelBudgetOwner" runat="server" /></span><telerik:RadToolTip ID="ToolTip" runat="server" AnimationDuration="150" AutoCloseDelay="200000" ShowDelay="0"
EnableShadow="true" HideDelay="1" Width="288px" Height="96px" HideEvent="ManualClose" OffsetX="30" OffsetY="0"
@@ -25,7 +25,7 @@
<asp:Button ID="ButtonSetBudgets" Text="Set New Budgets [LOC]" OnClick="ButtonSetBudgets_Click" runat="server" />&nbsp;
</div>
<div class="entrylabels" style="margin-left:20px;width:100px;text-align:right">
<div class="entryLabels" style="margin-left:20px;width:100px;text-align:right">
<strong><asp:Label ID="LabelActualsHeader" Text="Actuals [LOC]" runat="server" /></strong><br/>
<asp:Repeater ID="RepeaterAccountActuals" runat="server" OnItemDataBound="RepeaterAccountActuals_ItemDataBound"><ItemTemplate><asp:Label ID="LabelAccountActuals" Text="Unset actuals" runat="server" /><br/></ItemTemplate></asp:Repeater>
<asp:Label ID="LabelYearlyResultActuals" runat="server" Text="Yearly Result [LOC]" /><br/>
@@ -29,9 +29,9 @@ public partial class Pages_v5_Ledgers_SetRootBudgets : PageV5Base
protected void Page_Load(object sender, EventArgs e)
{
this.PageAccessRequired = new Access(_currentOrganization, AccessAspect.Bookkeeping, AccessType.Write);
this.PageAccessRequired = new Access(this.CurrentOrganization, AccessAspect.Bookkeeping, AccessType.Write);
this.HiddenInitOrganizationId.Value = _currentOrganization.Identity.ToString();
this.HiddenInitOrganizationId.Value = this.CurrentOrganization.Identity.ToString();
this.PageIcon = "iconshock-moneybag";
this.PageTitle = Resources.Pages.Ledgers.SetRootBudgets_PageTitle;
@@ -62,7 +62,7 @@ public partial class Pages_v5_Ledgers_SetRootBudgets : PageV5Base
UpdateYearlyResult(accounts);
this.LabelRootBudgetHeader.Text = String.Format(Resources.Pages.Ledgers.SetRootBudgets_PageHeader, _currentOrganization.Name);
this.LabelRootBudgetHeader.Text = String.Format(Resources.Pages.Ledgers.SetRootBudgets_PageHeader, this.CurrentOrganization.Name);
this.LabelAccountHeader.Text = Resources.Global.Financial_BookkeepingAccountShort;
this.LabelYearlyResultLabel.Text = Resources.Global.Financial_YearlyResult;
this.ButtonSetBudgets.Text = Resources.Pages.Ledgers.SetRootBudgets_SetNewBudgets;
@@ -90,7 +90,7 @@ public partial class Pages_v5_Ledgers_SetRootBudgets : PageV5Base
private void LocalizeActualsHeader()
{
if (_currentOrganization.Parameters.FiscalBooksClosedUntilYear >= _year)
if (this.CurrentOrganization.Parameters.FiscalBooksClosedUntilYear >= _year)
{
this.LabelActualsHeader.Text = Resources.Global.Financial_Actuals;
}
@@ -181,7 +181,7 @@ public partial class Pages_v5_Ledgers_SetRootBudgets : PageV5Base
Controls_v5_PersonDetailPopup personDetail = (Controls_v5_PersonDetailPopup)toolTip.FindControl("PersonDetail");
personDetail.PersonChanged += new PersonChangedEventHandler(PersonDetail_PersonChanged);
if (!Page.IsPostBack && _authority != null)
if (!Page.IsPostBack && this.CurrentAuthority != null)
{
personDetail.Person = accountOwner;
personDetail.Cookie = account;
@@ -230,11 +230,11 @@ public partial class Pages_v5_Ledgers_SetRootBudgets : PageV5Base
private FinancialAccounts GetRootLevelResultAccounts()
{
Organization org = _currentOrganization;
Organization org = this.CurrentOrganization;
if (org == null && Page.IsPostBack)
{
// If we're being called from Page_Init to create controls just to catch events, then _currentOrganization won't be set.
// If we're being called from Page_Init to create controls just to catch events, then this.CurrentOrganization won't be set.
// We need to create it temporarily from a hidden field:
org = Organization.FromIdentity(Int32.Parse(Request["ctl00$PlaceHolderMain$HiddenInitOrganizationId"]));
@@ -201,37 +201,5 @@ div.BankUploadInstructionsImage
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PlaceHolderSide" Runat="Server">
<h2 class="blue"><asp:Label ID="LabelSidebarInfo" runat="server" /><span class="arrow"></span></h2>
<div class="box">
<div class="content">
<asp:Label ID="LabelUploadBankFilesInfo" runat="server" />
</div>
</div>
<h2 class="blue"><asp:Label ID="LabelSidebarActions" runat="server" /><span class="arrow"></span></h2>
<div class="box">
<div class="content"><!--
<div class="link-row-encaps" onclick="document.location='/Pages/v5/Governance/Vote.aspx';" >
<div class="link-row-icon" style="background-image:url('/Images/PageIcons/iconshock-vote-16px.png')"></div>
<asp:Label ID="LabelActionVote" runat="server" />
</div>
<div class="link-row-encaps" onclick="document.location='/Pages/v5/Governance/ListMotions.aspx';" >
<div class="link-row-icon" style="background-image:url('/Images/PageIcons/iconshock-motions-16px.png')"></div>
<asp:Label ID="LabelActionListMotions" runat="server" />
</div>-->
</div>
</div>
<h2 class="orange"><asp:Label ID="LabelSidebarTodo" runat="server" /><span class="arrow"></span></h2>
<div class="box">
<div class="content">
<asp:Label ID="LabelActionItemsHere" runat="server" />
</div>
</div>
</asp:Content>
+22 -26
View File
@@ -27,20 +27,16 @@ namespace Activizr.Site.Pages.Ledgers
{
this.PageTitle = Resources.Pages.Ledgers.UploadBankFiles_PageTitle;
this.PageIcon = "iconshock-bank";
this.PageAccessRequired = new Access(_currentOrganization, AccessAspect.Bookkeeping, AccessType.Write);
this.PageAccessRequired = new Access(this.CurrentOrganization, AccessAspect.Bookkeeping, AccessType.Write);
if (!IsPostBack)
{
// Localize
this.LabelSidebarInfo.Text = Resources.Global.Sidebar_Information;
this.LabelSidebarActions.Text = Resources.Global.Sidebar_Actions;
this.LabelSidebarTodo.Text = Resources.Global.Sidebar_Todo;
this.LabelDownloadInstructions.Text = Resources.Pages.Ledgers.UploadBankFiles_DownloadInstructions;
this.LabelClickImage.Text = Resources.Global.Global_ClickImageToEnlarge;
this.LabelUploadBankFilesInfo.Text = Resources.Pages.Ledgers.UploadBankFiles_Info;
this.LabelActionItemsHere.Text = Resources.Global.Sidebar_Todo_Placeholder;
this.InfoBoxLiteral = Resources.Pages.Ledgers.UploadBankFiles_Info;
this.LabelSelectBankAndAccount.Text = Resources.Pages.Ledgers.UploadBankFiles_SelectBankAndAccount;
this.LabelSelectFileType.Text = Resources.Pages.Ledgers.UploadBankFiles_SelectBankFileType;
@@ -172,7 +168,7 @@ namespace Activizr.Site.Pages.Ledgers
private void PopulateAccountDropDown()
{
FinancialAccounts accounts = FinancialAccounts.ForOrganization(_currentOrganization,
FinancialAccounts accounts = FinancialAccounts.ForOrganization(this.CurrentOrganization,
FinancialAccountType.Asset);
this.DropAccounts.Items.Clear();
@@ -366,8 +362,8 @@ namespace Activizr.Site.Pages.Ledgers
protected ImportResults ProcessImportedData(ImportedBankData import)
{
FinancialAccount assetAccount = FinancialAccount.FromIdentity(Int32.Parse(this.DropAccounts.SelectedValue));
FinancialAccount autoDepositAccount = _currentOrganization.FinancialAccounts.IncomeDonations;
int autoDepositLimit = 1000; // TODO: _currentOrganization.Parameters.AutoDonationLimit;
FinancialAccount autoDepositAccount = this.CurrentOrganization.FinancialAccounts.IncomeDonations;
int autoDepositLimit = 1000; // TODO: this.CurrentOrganization.Parameters.AutoDonationLimit;
ImportResults result = new ImportResults();
int count = 0;
@@ -434,10 +430,10 @@ namespace Activizr.Site.Pages.Ledgers
amountCents = row.AmountCentsGross;
}
FinancialTransaction transaction = FinancialTransaction.ImportWithStub(_currentOrganization.Identity, row.DateTime,
FinancialTransaction transaction = FinancialTransaction.ImportWithStub(this.CurrentOrganization.Identity, row.DateTime,
assetAccount.Identity, amountCents,
row.Comment, importKey,
_currentUser.Identity);
this.CurrentUser.Identity);
if (transaction != null)
{
@@ -454,23 +450,23 @@ namespace Activizr.Site.Pages.Ledgers
Geography geography = accounts[0].AssignedGeography;
FinancialAccount localAccount = accounts[0];
transaction.AddRow(_currentOrganization.FinancialAccounts.IncomeDonations, -amountCents, _currentUser);
transaction.AddRow(_currentOrganization.FinancialAccounts.CostsLocalDonationTransfers,
amountCents, _currentUser);
transaction.AddRow(localAccount, -amountCents, _currentUser);
transaction.AddRow(this.CurrentOrganization.FinancialAccounts.IncomeDonations, -amountCents, this.CurrentUser);
transaction.AddRow(this.CurrentOrganization.FinancialAccounts.CostsLocalDonationTransfers,
amountCents, this.CurrentUser);
transaction.AddRow(localAccount, -amountCents, this.CurrentUser);
Activizr.Logic.Support.PWEvents.CreateEvent(EventSource.PirateWeb, EventType.LocalDonationReceived,
_currentUser.Identity, _currentOrganization.Identity,
this.CurrentUser.Identity, this.CurrentOrganization.Identity,
geography.Identity, 0,
transaction.Identity, localAccount.Identity.ToString());
}
else if (row.Comment.ToLowerInvariant().StartsWith(_currentOrganization.IncomingPaymentTag))
else if (row.Comment.ToLowerInvariant().StartsWith(this.CurrentOrganization.IncomingPaymentTag))
{
// Check for previously imported payment group
PaymentGroup group = PaymentGroup.FromTag(_currentOrganization,
PaymentGroup group = PaymentGroup.FromTag(this.CurrentOrganization,
"SEBGM" + DateTime.Today.Year.ToString() + // TODO: Get tags from org
row.Comment.Substring(_currentOrganization.IncomingPaymentTag.Length).Trim());
row.Comment.Substring(this.CurrentOrganization.IncomingPaymentTag.Length).Trim());
if (group != null && group.Open)
{
@@ -479,7 +475,7 @@ namespace Activizr.Site.Pages.Ledgers
transaction.Dependency = group;
group.Open = false;
transaction.AddRow(_currentOrganization.FinancialAccounts.AssetsOutboundInvoices, -amountCents, _currentUser);
transaction.AddRow(this.CurrentOrganization.FinancialAccounts.AssetsOutboundInvoices, -amountCents, this.CurrentUser);
}
}
else if (amountCents < 0)
@@ -492,14 +488,14 @@ namespace Activizr.Site.Pages.Ledgers
{
// This is always an autodeposit, if there is a fee (which is never > 0.0)
transaction.AddRow(_currentOrganization.FinancialAccounts.CostsBankFees, -row.FeeCents, _currentUser);
transaction.AddRow(autoDepositAccount, -row.AmountCentsGross, _currentUser);
transaction.AddRow(this.CurrentOrganization.FinancialAccounts.CostsBankFees, -row.FeeCents, this.CurrentUser);
transaction.AddRow(autoDepositAccount, -row.AmountCentsGross, this.CurrentUser);
}
else if (amountCents < autoDepositLimit * 100)
{
// Book against autoDeposit account.
transaction.AddRow(autoDepositAccount, -amountCents, _currentUser);
transaction.AddRow(autoDepositAccount, -amountCents, this.CurrentUser);
}
}
}
@@ -524,7 +520,7 @@ namespace Activizr.Site.Pages.Ledgers
if (databaseAccountBalanceCents - beyondEofCents == import.CurrentBalanceCents)
{
Payouts.AutomatchAgainstUnbalancedTransactions(_currentOrganization);
Payouts.AutomatchAgainstUnbalancedTransactions(this.CurrentOrganization);
result.AccountBalanceMatchesBank = true;
}
else
@@ -722,13 +718,13 @@ namespace Activizr.Site.Pages.Ledgers
// Dupe check
PaymentGroup dupe = PaymentGroup.FromTag(_currentOrganization, tag);
PaymentGroup dupe = PaymentGroup.FromTag(this.CurrentOrganization, tag);
if (dupe == null)
{
// Commit all recorded payments
PaymentGroup newGroup = PaymentGroup.Create(_currentOrganization, timestamp, currency, _currentUser);
PaymentGroup newGroup = PaymentGroup.Create(this.CurrentOrganization, timestamp, currency, this.CurrentUser);
result.PaymentGroupCount++;
Int64 reportedAmountCents = Int64.Parse(line.Substring(50, 18), CultureInfo.InvariantCulture); // may differ because of duplicates
+1 -1
View File
@@ -14,6 +14,6 @@ public partial class Security_AccessDenied : PageV5Base
this.LabelAccessDeniedHeader.Text = Resources.Pages.Security.AccessDenied_Header;
this.LabelSidebarInfo.Text = Resources.Global.Sidebar_Information;
this.LabelAccessDeniedInfo.Text = Resources.Pages.Security.AccessDenied_Info;
this.LiteralAccessDeniedRant.Text = String.Format(Resources.Pages.Security.AccessDenied_Rant, _currentOrganization.Name);
this.LiteralAccessDeniedRant.Text = String.Format(Resources.Pages.Security.AccessDenied_Rant, this.CurrentOrganization.Name);
}
}
+2 -2
View File
@@ -33,11 +33,11 @@
<div style="width:64px;height:64px;float:left"><img src="/Security/Images/iconshock-fingerprint-scanner-unlock-64px.png" alt="unlock icon" /></div><h1>ACTIVIZR<span class="loginalphabetasign">&beta;</span> LOGIN</h1>
<div class="box">
<div class="content">
<div class="entrylabels">
<div class="entryLabels">
Login:<br />
Password:<br />
</div>
<div class="entryfields">
<div class="entryFields">
<asp:TextBox ID="TextLogin" runat="server" CssClass="textinput" />&nbsp;<br />
<asp:TextBox ID="TextPassword" runat="server" CssClass="textinput" TextMode="Password" />&nbsp;<br />
<div class="button-orange-encaps" style="float:right; margin-top:5px; margin-right:2px;margin-bottom:3px;">
+3 -3
View File
@@ -397,7 +397,7 @@ span.loginalphabetasign
.buttonAccentColor {
display:block;
float:right;
margin:5px 3px 8px 3px;
margin:15px 3px 8px 3px;
padding:5px;
text-decoration: none;
text-align: center;
@@ -490,7 +490,7 @@ span.loginalphabetasign
/* ENTRY FIELDS */
.entrylabels
.entryLabels
{
margin-top: 10px;
line-height: 30px;
@@ -498,7 +498,7 @@ span.loginalphabetasign
width: 100px;
}
.entryfields
.entryFields
{
background: #A2BEFF;
-moz-border-radius: 2px;
+2 -2
View File
@@ -4,8 +4,8 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" Runat="Server">
<br/>
<div class="entrylabels" style="width:150px">Organization<br/>Year<br/>&nbsp;<br/>EOY Balance<br/>EOLY Owncapital<br/>EOCY Owncapital<br/>Diff<br/>Actual OC Delta<br/>Results-all<br/>Results-noted</div>
<div class="entryfields">
<div class="entryLabels" style="width:150px">Organization<br/>Year<br/>&nbsp;<br/>EOY Balance<br/>EOLY Owncapital<br/>EOCY Owncapital<br/>Diff<br/>Actual OC Delta<br/>Results-all<br/>Results-noted</div>
<div class="entryFields">
<asp:Label ID="LabelThisOrganization" runat="server" /><br/>
<asp:DropDownList runat="server" ID="DropYear" AutoPostBack="true" OnSelectedIndexChanged="DropYear_SelectedIndexChanged" />&nbsp;<br/>&nbsp;<br/>
<asp:Label ID="LabelEoyBalance" runat="server" /><br/>
+9 -9
View File
@@ -22,7 +22,7 @@ public partial class Tests_TestBookkeepingIntegrity : PageV5Base
this.DropYear.Items.Add(new ListItem("2011", "2011"));
}
this.LabelThisOrganization.Text = _currentOrganization.Name;
this.LabelThisOrganization.Text = this.CurrentOrganization.Name;
}
protected void DropYear_SelectedIndexChanged(object sender, EventArgs e)
@@ -31,24 +31,24 @@ public partial class Tests_TestBookkeepingIntegrity : PageV5Base
if (year < 2000) return;
FinancialAccounts balanceAccounts = FinancialAccounts.ForOrganization(_currentOrganization,
FinancialAccounts balanceAccounts = FinancialAccounts.ForOrganization(this.CurrentOrganization,
FinancialAccountType.Balance);
FinancialAccounts resultAccounts = FinancialAccounts.ForOrganization(_currentOrganization,
FinancialAccounts resultAccounts = FinancialAccounts.ForOrganization(this.CurrentOrganization,
FinancialAccountType.Result);
FinancialAccount ownCapital = _currentOrganization.FinancialAccounts.DebtsCapital;
FinancialAccount resultAsNoted = _currentOrganization.FinancialAccounts.CostsYearlyResult;
FinancialAccount ownCapital = this.CurrentOrganization.FinancialAccounts.DebtsCapital;
FinancialAccount resultAsNoted = this.CurrentOrganization.FinancialAccounts.CostsYearlyResult;
FinancialAccounts balancesWithoutCapital =
FinancialAccounts.ForOrganization(_currentOrganization, FinancialAccountType.Balance);
FinancialAccounts.ForOrganization(this.CurrentOrganization, FinancialAccountType.Balance);
balancesWithoutCapital.Remove(ownCapital);
FinancialAccounts resultAccountsWithoutNotedResult = FinancialAccounts.ForOrganization(_currentOrganization,
FinancialAccounts resultAccountsWithoutNotedResult = FinancialAccounts.ForOrganization(this.CurrentOrganization,
FinancialAccountType.Result);
resultAccountsWithoutNotedResult.Remove(_currentOrganization.FinancialAccounts.CostsYearlyResult);
resultAccountsWithoutNotedResult.Remove(this.CurrentOrganization.FinancialAccounts.CostsYearlyResult);
Currency currency = _currentOrganization.DefaultCountry.Currency;
Currency currency = this.CurrentOrganization.DefaultCountry.Currency;
this.LabelResultsAll.Text = String.Format("{0} {1:N2}", currency.Code,
resultAccounts.GetDeltaCents(new DateTime(year, 1, 1),