Work on outbound invoices; inbound invoice list

This commit is contained in:
Rick Falkvinge
2017-09-15 18:49:40 +02:00
parent f37c8c95c7
commit 680b749bfb
16 changed files with 1035 additions and 65 deletions
+3 -5
View File
@@ -228,9 +228,7 @@ namespace Swarmops.Logic.Financial
return result;
}
public static OutboundInvoice Create (Organization organization, Person createdByPerson, DateTime dueDate,
FinancialAccount budget, string customerName, string invoiceAddressMail, string invoiceAddressPaper,
Currency currency, bool domestic, string theirReference)
public static OutboundInvoice Create (Organization organization, DateTime dueDate, FinancialAccount budget, string customerName, string invoiceAddressMail, string invoiceAddressPaper, Currency currency, bool domestic, string theirReference, Person createdByPerson)
{
OutboundInvoice invoice =
FromIdentity (SwarmDb.GetDatabaseForWriting()
@@ -272,11 +270,11 @@ namespace Swarmops.Logic.Financial
public OutboundInvoice Credit (Person creditingPerson)
{
OutboundInvoice credit = Create (Organization, creditingPerson, DateTime.Now,
OutboundInvoice credit = Create (Organization, DateTime.Now,
Budget, CustomerName,
InvoiceAddressMail,
InvoiceAddressPaper, Currency,
Domestic, TheirReference);
Domestic, TheirReference, creditingPerson);
if (Domestic) // TODO: LANGUAGE
{
credit.AddItem ("Kredit för faktura " + Reference, -AmountCents);
+2 -2
View File
@@ -79,11 +79,11 @@ namespace Swarmops.Logic.Swarm
invoiceDue = maxInvoiceDue;
}
OutboundInvoice invoice = OutboundInvoice.Create (Parley.Organization, Parley.Person, invoiceDue,
OutboundInvoice invoice = OutboundInvoice.Create (Parley.Organization, invoiceDue,
Parley.Budget, Person.Name, Person.Mail,
string.Empty,
Parley.Organization.DefaultCountry.Currency, true,
string.Empty);
string.Empty, Parley.Person);
invoice.AddItem ("Deltagarkostnad " + Parley.Name, Parley.AttendanceFeeCents); // TODO: Localize