diff --git a/src/Admin/Views/Shared/_BillingInformation.cshtml b/src/Admin/Views/Shared/_BillingInformation.cshtml
index 3d3e040808..e01fe2fc0e 100644
--- a/src/Admin/Views/Shared/_BillingInformation.cshtml
+++ b/src/Admin/Views/Shared/_BillingInformation.cshtml
@@ -1,21 +1,26 @@
-@model Bit.Core.Models.Business.BillingInfo
+@model BillingInformationModel
- - Account @(Model.Balance <= 0 ? "Credit" : "Balance")
- - @Math.Abs(Model.Balance).ToString("C")
+ - Account @(Model.BillingInfo.Balance <= 0 ? "Credit" : "Balance")
+ - @Math.Abs(Model.BillingInfo.Balance).ToString("C")
- Invoices
-
- @if(Model.Invoices?.Any() ?? false)
+ @if(Model.BillingInfo.Invoices?.Any() ?? false)
{
- @foreach(var invoice in Model.Invoices)
+ @foreach(var invoice in Model.BillingInfo.Invoices)
{
@invoice.Date |
@invoice.Number |
@invoice.Amount.ToString("C") |
@(invoice.Paid ? "Paid" : "Unpaid") |
+
+
+
+
+ |
}
@@ -29,11 +34,11 @@
- Transactions
-
- @if(Model.Transactions?.Any() ?? false)
+ @if(Model.BillingInfo.Transactions?.Any() ?? false)
{
- @foreach(var transaction in Model.Transactions)
+ @foreach(var transaction in Model.BillingInfo.Transactions)
{
@transaction.CreatedDate |
@@ -41,6 +46,10 @@
@transaction.PaymentMethodType.ToString() |
@transaction.Details |
@transaction.Amount.ToString("C") |
+
+
+ |
}
@@ -48,7 +57,11 @@
}
else
{
- @: No transactions.
+ No transactions.
}
+
+ New Transaction
+
diff --git a/src/Admin/Views/Shared/_Layout.cshtml b/src/Admin/Views/Shared/_Layout.cshtml
index 0344b52767..d9ee5816d1 100644
--- a/src/Admin/Views/Shared/_Layout.cshtml
+++ b/src/Admin/Views/Shared/_Layout.cshtml
@@ -49,6 +49,9 @@
Charge Braintree Customer
+
+ Create Transaction
+
-
diff --git a/src/Admin/Views/Tools/ChargeBraintree.cshtml b/src/Admin/Views/Tools/ChargeBraintree.cshtml
index d9081ac1fa..aaf3bbf167 100644
--- a/src/Admin/Views/Tools/ChargeBraintree.cshtml
+++ b/src/Admin/Views/Tools/ChargeBraintree.cshtml
@@ -39,6 +39,6 @@ else
-
+
}
diff --git a/src/Admin/Views/Tools/CreateUpdateTransaction.cshtml b/src/Admin/Views/Tools/CreateUpdateTransaction.cshtml
new file mode 100644
index 0000000000..2e9c308382
--- /dev/null
+++ b/src/Admin/Views/Tools/CreateUpdateTransaction.cshtml
@@ -0,0 +1,109 @@
+@model CreateUpdateTransactionModel
+@{
+ var action = Model.Edit ? "Edit" : "Create";
+ ViewData["Title"] = $"{action} Transaction";
+}
+
+
@action Transaction
+
+
diff --git a/src/Admin/Views/Users/Edit.cshtml b/src/Admin/Views/Users/Edit.cshtml
index c25a5c99f6..8e44e76c81 100644
--- a/src/Admin/Views/Users/Edit.cshtml
+++ b/src/Admin/Views/Users/Edit.cshtml
@@ -59,7 +59,8 @@
User Information
@await Html.PartialAsync("_ViewInformation", Model)
Billing Information
-@await Html.PartialAsync("_BillingInformation", Model.BillingInfo)
+@await Html.PartialAsync("_BillingInformation",
+ new BillingInformationModel { BillingInfo = Model.BillingInfo, UserId = Model.User.Id })