Add files via upload

This commit is contained in:
gopi17701 2018-09-28 12:41:16 -04:00 committed by GitHub
parent bc42292d2c
commit b7d7dc48c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,7 @@ export class AstuteClientService {
private invoiceUrl = 'http://localhost:8080/astutesystem/invoice';
private invoiceDetailUrl = 'http://localhost:8080/astutesystem/invoice/detail';
private invoiceGenUrl = 'http://localhost:8080/astutesystem/invoice/generatedInvoice';
private invoicePaymentUrl = 'http://localhost:8080/astutesystem/invoicePayment';
private sessionId;
constructor(private http: HttpClient) { }
@ -263,6 +264,58 @@ export class AstuteClientService {
}
// **************************************** Invoice Payment Service methods
public getSumittedInvoices(): Promise<any> {
console.log("*** In getSumittedInvoices()");
const url = `${this.invoiceUrl}/submitted`;
return this.http.get(url)
.toPromise()
.then(response => {
console.log(response['entity']);
return response['entity'];
});
}
public getInvoiceTypes(): Promise<any> {
const url = `${this.invoicePaymentUrl}/paymentTypes`;
console.log("*** In getInvoiceTypes() ... calling " + url);
return this.http.get(url)
.toPromise()
.then(response => {
console.log(response['entity']);
return response['entity'];
});
}
public getInvoicePayments(): Promise<any> {
console.log("*** In getInvoicePayments()");
const url = `${this.invoicePaymentUrl}`;
return this.http.get(url)
.toPromise()
.then(response => {
console.log(response['entity']);
return response['entity'];
});
}
public updateInvoicePayment(invoiceNumber: string, invoicePaymentId: string, data: any): Promise<any> {
console.log("*** In updateInvoicePayment()");
const url = `${this.invoicePaymentUrl}/${invoiceNumber}/${invoicePaymentId}`; //TODO send sessionId
console.log("*** invoicePaymentUrl is " + url);
return this.http.put(url, data)
.toPromise()
.then(response => response['entity']);
}
public addInvoicePayment(data: any): Promise<any> {
console.log("*** In addInvoicePayment()");
const url = `${this.invoicePaymentUrl}`; //TODO send sessionId
return this.http.post(url, data)
.toPromise()
.then(response => response['entity']);
}
// public getRecord(patientId: number): Promise<any> {
// const url = `${this.recordsUrl}/${patientId}?sessionId=${this.getSessionId()}`;
// return this.http.get(url)
@ -365,4 +418,6 @@ export class AstuteClientService {
// return response['entity'];
// });
// }
}