feat(accounting): add frequent postings component

Add frequent postings component to create a journal entry.

Fixes #136
This commit is contained in:
abhay_1806
2018-07-21 21:06:58 +05:30
committed by Abhay Chawla
parent d8d05466a1
commit a22bd6d1e5
9 changed files with 362 additions and 6 deletions
+33
View File
@@ -0,0 +1,33 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class AccountingService {
constructor(private http: HttpClient) { }
getOffices(): Observable<any> {
return this.http.get('/offices?orderBy=id');
}
getAccountingRules(): Observable<any> {
return this.http.get('/accountingrules?associations=all');
}
getCurrencies(): Observable<any> {
return this.http.get('/currencies');
}
getPaymentTypes(): Observable<any> {
return this.http.get('/paymenttypes');
}
createJournalEntry(journalEntry: any): Observable<any> {
return this.http.post('/journalentries', journalEntry);
}
}