Work on payment history

This commit is contained in:
Rick Falkvinge
2019-01-29 09:23:29 +01:00
parent 49fccfcada
commit 613e6d5004
2 changed files with 12 additions and 3 deletions
@@ -17,7 +17,12 @@ namespace Swarmops.Frontend.Automation
{
this._authenticationData = GetAuthenticationDataAndCulture();
int personId = Int32.Parse(Request.QueryString["PersonId"]); // may throw and that's okay
int personId = Int32.Parse(Request.QueryString["PersonId"]); // may throw and that's okay, returning a 500 instead of Json the caller shouldn't see
if (personId == 0)
{
personId = _authenticationData.CurrentUser.Identity;
}
this._person = Person.FromIdentity(personId);
/*
+6 -2
View File
@@ -387,8 +387,8 @@
<th field="name" width="178"><asp:Literal ID="MasterPersonEditLiteralHeaderItemName" Text="Item Type XYZ" runat="server"/></th>
<th field="description" width="180"><asp:Literal ID="MasterPersonEditLiteralHeaderItemDescription" Text="Description XYZ" runat="server"/></th>
<th field="opened" width="120"><asp:Literal ID="MasterPersonEditLiteralHeaderItemOpenedDate" Text="Opened date XYZ" runat="server"/></th>
<th field="owedtouser" width="120" align="right"><asp:Literal ID="MasterPersonEditLiteralHeaderAmountOwed" Text="Owed to you XYZ" runat="server"/></th>
<th field="paidtouser" width="120" align="right"><asp:Literal ID="MasterPersonEditLiteralHeaderAmountPaid" Text="Payment XYZ" runat="server"/></th>
<th field="owedtoperson" width="120" align="right"><asp:Literal ID="MasterPersonEditLiteralHeaderAmountOwed" Text="Payment XYZ" runat="server"/></th>
<th field="paidtoperson" width="120" align="right"><asp:Literal ID="MasterPersonEditLiteralHeaderAmountPaid" Text="Owed to you XYZ" runat="server"/></th>
<th field="closed" width="120"><asp:Literal ID="MasterPersonEditLiteralHeaderItemClosedDate" Text="Closed date XYZ" runat="server"/></th>
<th field="notes" width="80"><asp:Literal ID="MasterPersonEditLiteralHeaderItemNotes" Text="Notes XYZ" runat="server"/></th>
</tr>
@@ -610,6 +610,10 @@
_master_PersonEditLoading = false;
_master_PersonEditedId = personId;
$('#masterPersonEditTablePaymentHistory').treegrid({
url: '/Automation/Json-MasterPersonEditPaymentHistory.aspx?PersonId=' + personId
});
SwarmopsJS.ajaxCall('/Automation/SwarmFunctions.aspx/GetPersonEditorData', personEditorData, function(data) {
if (data != null && data.Success) {
$('span.spanModalEditingPersonName').text(data.Name);