refactor: update import paths for sale invoice models; add VAT handling in payload forms
This commit is contained in:
@@ -1,22 +1,5 @@
|
||||
import ISummary from '@/core/models/summary';
|
||||
import { TspProviderResponseStatus } from '@/shared/catalog';
|
||||
import { IEnumTranslate } from '@/shared/models/enum_translate.type';
|
||||
|
||||
export interface ISaleInvoiceFullRawResponse {
|
||||
id: string;
|
||||
code: string;
|
||||
total_amount: string;
|
||||
invoice_date: string;
|
||||
consumer_account: ConsumerAccount;
|
||||
pos: Pos;
|
||||
payments: Payment[];
|
||||
items: Item[];
|
||||
created_at: string;
|
||||
notes?: string;
|
||||
customer?: Customer;
|
||||
unknown_customer?: UnknownCustomer;
|
||||
status: IEnumTranslate<TspProviderResponseStatus>;
|
||||
}
|
||||
import { ISaleInvoiceFullRawResponse } from '@/shared/components/invoices/sale-invoice-full-response.model';
|
||||
|
||||
export interface ISaleInvoiceFullResponse extends ISaleInvoiceFullRawResponse {}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import ISummary from '@/core/models/summary';
|
||||
import { ISaleInvoiceFullRawResponse } from '@/domains/consumer/models';
|
||||
import { ISaleInvoiceFullRawResponse } from '@/shared/components/invoices/sale-invoice-full-response.model';
|
||||
import { CustomerType } from '@/shared/localEnum/constants/customerTypes';
|
||||
import { CustomerIndividual, CustomerLegal } from './io';
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { IPaginatedQuery, IPaginatedResponse } from '@/core/models/service.model';
|
||||
import { ISaleInvoiceFullRawResponse, ISaleInvoiceFullResponse } from '@/domains/consumer/models';
|
||||
import { ISaleInvoiceFullResponse } from '@/domains/consumer/models';
|
||||
import { ISaleInvoiceFullRawResponse } from '@/shared/components/invoices/sale-invoice-full-response.model';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
@@ -12,7 +13,9 @@ export class ConsumerSaleInvoicesService {
|
||||
|
||||
private apiRoutes = CONSUMER_SALE_INVOICES_API_ROUTES;
|
||||
|
||||
getAll(paginationQuery?: IPaginatedQuery): Observable<IPaginatedResponse<IConsumerSaleInvoicesResponse>> {
|
||||
getAll(
|
||||
paginationQuery?: IPaginatedQuery,
|
||||
): Observable<IPaginatedResponse<IConsumerSaleInvoicesResponse>> {
|
||||
return this.http.get<IPaginatedResponse<IConsumerSaleInvoicesRawResponse>>(
|
||||
this.apiRoutes.list(paginationQuery),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user