Accounting Service
The accounting service is currently responsible for gathering all Invoice and Credit Notes being issued as well as all Payment and Receipts coming in and out of the system. It uses this data to create various statements for tenants, properties and agencies.
All these events go through an Entity to ensure nothing is recorded twice. The readside is responsible for inserting the entries into the Database which is queried by the client.
sequenceDiagram
participant L as Listener
participant E as Entity
participant R as Readside
participant C as Connector
note over L,C: Invoice Issued
L->>E: Issue an Invoice
alt New entry
E->>L: Done
E-->R: InvoiceIssued
R->>C: Insert Invoice
else Already Recorded
E->>L: Invalid: Already Recorded
end
note over L,C: Credit Note Issued
L->>E: Issue Credit Note
alt New entry
E->>L: Done
E-->R: CreditNoteIssued
R->>C: Insert Credit Note
else Already Recorded
E->>L: Invalid: Already Recorded
end
note over L,C: Payment Approved
L->>E: Approve Payment
alt New entry
E->>L: Done
E-->R: Payment Approved
R->>C: Insert Payment Agency Table
R->>C: Insert Payment Property Table
else Already Recorded
E->>L: Invalid: Already Recorded
end
note over L,C: Receipt Received
L->>E: Receipt Received
alt New entry
E->>L: Done
E-->R: ReceiptReceived
R->>C: Insert Receipt Agency Table
R->>C: Insert Receipt Property Table
R->>C: Insert Receipt Tenant Table
else Already Recorded
E->>L: Invalid: Already Recorded
end
In future we plan to add additional Readside Processors to process Income and Expense Reports for Owners.
PDF
The accounting service is also responsible for generating PDF Documents. Theses documents are available via an API call. We use https://github.com/cloudify/sPDF
to generate PDF from html.