add salesInvoice in pos of consumer domain

This commit is contained in:
2026-03-30 13:17:34 +03:30
parent c10623bc3f
commit 44097fe1ac
35 changed files with 855 additions and 122 deletions
@@ -1,3 +1,4 @@
export * from './complexes_io';
export * from './io';
export * from './poses_io';
export * from './salesInvoices_io';
@@ -15,10 +15,4 @@ export interface IPosResponse extends IPosRawResponse {}
export interface IPosRequest {
name: string;
serial: string;
model?: string;
status: string;
pos_type: string;
device_id: string;
provider_id: string;
}
@@ -0,0 +1,51 @@
import ISummary from '@/core/models/summary';
import { TCustomerInfo, TPosOrderGoodPayload } from '@/domains/pos/modules/landing/models';
import { UnitType } from '@/utils';
export interface ISalesInvoicesRawResponse {
id: string;
code: string;
invoice_date: string;
total_amount: string;
items: Item[];
payments: Payment[];
customer?: TCustomerInfo;
notes?: string;
unknown_customer?: UnknownCustomer;
}
export interface ISalesInvoicesResponse extends ISalesInvoicesRawResponse {}
export interface ISalesInvoicesRequest {}
interface UnknownCustomer {
name?: string;
national_code?: string;
}
interface Payment {
amount: string;
paid_at: string;
payment_method: string;
}
interface Item {
unit_type: UnitType;
discount: string;
quantity: string;
total_amount: string;
unit_price: string;
payload: TPosOrderGoodPayload;
good: Good;
notes?: string;
}
interface Good {
id: string;
name: string;
sku: string;
barcode: null;
local_sku: null;
pricing_model: string;
unit_type: string;
category: ISummary;
}