remove unused codes and update

This commit is contained in:
2026-05-10 09:44:30 +03:30
parent a138034c06
commit 048e292bdd
107 changed files with 317 additions and 17930 deletions
@@ -91,7 +91,6 @@
[showRefresh]="false"
>
<ng-template #totalAmount let-item>
aaa
@if (!item.discount_amount) {
<span [appPriceMask]="item.total_amount"></span>
} @else {
@@ -1,5 +1,6 @@
import { Maybe } from '@/core';
import { NativeBridgeService } from '@/core/services';
import { PosInfoStore } from '@/domains/pos/store';
import { CatalogTaxProviderStatusTagComponent } from '@/shared/catalog';
import { AppCardComponent, KeyValueComponent } from '@/shared/components';
import { PageLoadingComponent } from '@/shared/components/page-loading.component';
@@ -9,9 +10,10 @@ import {
} from '@/shared/components/pageDataList/page-data-list.component';
import { PriceMaskDirective } from '@/shared/directives';
import { UikitEmptyStateComponent } from '@/uikit';
import { getGoodUnitTypeProperties } from '@/utils';
import { formatJalali, getGoodUnitTypeProperties } from '@/utils';
import {
Component,
computed,
EventEmitter,
inject,
Input,
@@ -54,22 +56,30 @@ export class ConsumerSaleInvoiceSharedComponent {
@Output() onRefresh = new EventEmitter<void>();
@ViewChild('totalAmount', { static: false }) totalAmount!: TemplateRef<any>;
private readonly posInfoStore = inject(PosInfoStore);
readonly posName = computed(() => {
if (this.posInfoStore.entity()) {
const { name, businessActivity, complex } = this.posInfoStore.entity()!;
return `${name} (${businessActivity.name} - ${complex.name})`;
}
return '';
});
printInvoice = () => {
if (this.nativeBridge.isEnabled() && this.invoice) {
const result = this.nativeBridge.print({
title: 'salam',
if (this.invoice) {
const printResult = this.nativeBridge.print({
title: `فروشگاه ${this.posName()}`,
items: [
{
label: 'مجموع قیمت',
value: this.invoice?.total_amount,
label: 'شماره فاکتور',
value: this.invoice?.code,
},
{ label: 'تاریخ', value: formatJalali(this.invoice.invoice_date, 'YYYY/MM/DD') },
{ label: 'مبلغ کل', value: this.invoice.total_amount },
],
});
if (result.success) return;
}
window.print();
};
columns: IColumn[] = [