Some tests for Outbound Invoices

This commit is contained in:
Rick Falkvinge
2017-11-30 21:02:00 +01:00
parent bd40d9886e
commit 9644fcb5a9
5 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ namespace Swarmops.Logic.Support
}
else if (foreignObject is OutboundInvoice)
{
return Common.Enums.DocumentType.OutboundInvoice;
return DocumentType.OutboundInvoice;
}
else if (foreignObject is VatReport)
{
@@ -61,7 +61,7 @@ public partial class Pages_v5_Finance_Json_ListInvoicesOutbound : DataV5Base
//"<img id=\\\"IconDenied{5}\\\" class=\\\"LocalIconDenied LocalNew\\\" baseid=\\\"{5}\\\" height=\\\"18\\\" width=\\\"24\\\" />" +
//"<img id=\\\"IconUndo{5}\\\" class=\\\"LocalIconUndo LocalNew\\\" baseid=\\\"{5}\\\" height=\\\"18\\\" width=\\\"24\\\" />" +
"</span>\"",
"#" + invoice.Identity.ToString("N0"),
"#" + invoice.OrganizationSequenceId.ToString("N0"),
JsonSanitize(invoice.DueDate.ToString(invoice.DueDate < dueDateFormatBreakDate ? "yyyy-MMM" : "MMM-dd")),
"Supplier",
@@ -47,7 +47,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
CurrentAuthority.HasAccess (new Access (CurrentOrganization, AccessAspect.Administration)).ToString(CultureInfo.InvariantCulture).ToLowerInvariant();
PopulateInboundInvoices();
PopulateExpenses();
// PopulateExpenses();
// PopulateSalaries();
RegisterControl(EasyUIControl.DataGrid);
@@ -65,6 +65,8 @@
onLoadSuccess: function () {
$(".LocalViewDox").click(function () {
alertify.log($(this).attr("baseid"));
$("a.FancyBox_Gallery[rel='" + $(this).attr("baseid") + "']").first().click();
});
@@ -189,9 +189,12 @@ namespace Swarmops.Frontend.Pages.v5.Financial
Documents dox = invoice.Documents;
bool hasDox = (dox.Count > 0 ? true : false);
AddDocuments(invoice.Documents, "O" + invoice.Identity.ToString(CultureInfo.InvariantCulture),
if (hasDox)
{
AddDocuments(invoice.Documents, "O" + invoice.Identity.ToString(CultureInfo.InvariantCulture),
String.Format(Global.Financial_OutboundInvoiceSpecificationWithCustomer + " - ",
invoice.OrganizationSequenceId, invoice.CustomerName) + Global.Global_ImageSpecification);
}
}
}