update sale invoices models and some ui fix
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Maybe } from '@/core';
|
||||
import ISummary from '@/core/models/summary';
|
||||
import { TspProviderResponseStatus } from '@/shared/catalog';
|
||||
import { InvoiceTypes, TspProviderResponseStatus } from '@/shared/catalog';
|
||||
import { IEnumTranslate } from '@/shared/models/enum_translate.type';
|
||||
|
||||
export interface ISaleInvoiceFullRawResponse {
|
||||
@@ -11,11 +12,16 @@ export interface ISaleInvoiceFullRawResponse {
|
||||
pos: Pos;
|
||||
payments: Payment[];
|
||||
items: Item[];
|
||||
invoice_number: number;
|
||||
type: IEnumTranslate<InvoiceTypes>;
|
||||
created_at: string;
|
||||
notes?: string;
|
||||
customer?: Customer;
|
||||
unknown_customer?: UnknownCustomer;
|
||||
status: IEnumTranslate<TspProviderResponseStatus>;
|
||||
main_id: Maybe<string>;
|
||||
tax_id: Maybe<string>;
|
||||
reference_invoice: Maybe<string>;
|
||||
notes: Maybe<string>;
|
||||
}
|
||||
|
||||
export interface ISaleInvoiceFullResponse extends ISaleInvoiceFullRawResponse {}
|
||||
|
||||
@@ -17,14 +17,17 @@
|
||||
</ng-template>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="listKeyValue">
|
||||
<app-key-value label="کد رهگیری" [value]="invoice.code" />
|
||||
<app-key-value label="شماره صورتحساب" [value]="invoice.invoice_number" />
|
||||
<app-key-value label="تاریخ فاکتور" [value]="invoice.invoice_date" type="dateTime" />
|
||||
<app-key-value label="تاریخ ایجاد فاکتور" [value]="invoice.created_at" type="dateTime" />
|
||||
<app-key-value label="نوع صورتحساب">
|
||||
<catalog-invoice-type-tag [status]="invoice.type.value" />
|
||||
</app-key-value>
|
||||
<app-key-value label="وضعیت صدور به سامانهی مودیان">
|
||||
<catalog-tax-provider-status-tag [status]="invoice.status.value" [translate]="invoice.status.translate" />
|
||||
</app-key-value>
|
||||
<div class="col-span-full">
|
||||
<app-key-value label="توضیحات" [value]="invoice.notes" />
|
||||
<app-key-value label="توضیحات" [value]="invoice.notes || '----'" />
|
||||
</div>
|
||||
</div>
|
||||
<p-divider align="center"> اطلاعات پرداخت </p-divider>
|
||||
|
||||
@@ -3,7 +3,10 @@ import { NativeBridgeService } from '@/core/services';
|
||||
import { ToastService } from '@/core/services/toast.service';
|
||||
import { PosConfigPrintService } from '@/domains/pos/modules/configs/components/print/services/main.service';
|
||||
import { PosInfoStore } from '@/domains/pos/store';
|
||||
import { CatalogTaxProviderStatusTagComponent } from '@/shared/catalog';
|
||||
import {
|
||||
CatalogInvoiceTypeTagComponent,
|
||||
CatalogTaxProviderStatusTagComponent,
|
||||
} from '@/shared/catalog';
|
||||
import { AppCardComponent, KeyValueComponent } from '@/shared/components';
|
||||
import { ISaleInvoiceFullResponse } from '@/shared/components/invoices/sale-invoice-full-response.model';
|
||||
import { PageLoadingComponent } from '@/shared/components/page-loading.component';
|
||||
@@ -45,6 +48,7 @@ export type TSaleInvoiceSingleViewVariant = 'full' | 'customer' | 'pos';
|
||||
UikitEmptyStateComponent,
|
||||
PriceMaskDirective,
|
||||
CatalogTaxProviderStatusTagComponent,
|
||||
CatalogInvoiceTypeTagComponent,
|
||||
],
|
||||
})
|
||||
export class SharedSaleInvoiceSingleViewComponent {
|
||||
|
||||
Reference in New Issue
Block a user