update sale invoice and payload forms of pos

This commit is contained in:
2026-05-28 16:37:58 +03:30
parent 9fdd5e451c
commit 550db47b88
17 changed files with 44 additions and 22 deletions
@@ -16,10 +16,12 @@ export class CatalogTaxProviderStatusTagComponent {
case 'SUCCESS':
return 'success';
case 'FAILURE':
case 'SEND_FAILURE':
return 'danger';
case 'NOT_SEND':
return 'warn';
case 'QUEUED':
case 'FISCAL_QUEUED':
return 'info';
default:
return 'secondary';
@@ -35,7 +37,11 @@ export class CatalogTaxProviderStatusTagComponent {
case 'NOT_SEND':
return 'ارسال نشده';
case 'QUEUED':
return 'در صف ارسال';
return 'در صف ارسال به معتمد';
case 'FISCAL_QUEUED':
return 'در صف ارسال به مالیات';
case 'SEND_FAILURE':
return 'خطا در ارسال';
default:
return 'نامشخص';
}
@@ -3,6 +3,8 @@ export const TspProviderResponseStatus = {
FAILURE: 'FAILURE',
NOT_SEND: 'NOT_SEND',
QUEUED: 'QUEUED',
FISCAL_QUEUED: 'FISCAL_QUEUED',
SEND_FAILURE: 'SEND_FAILURE',
} as const;
export type TspProviderResponseStatus =
@@ -132,7 +132,6 @@ export class SharedLightBottomsheetComponent implements OnInit, OnDestroy, OnCha
this.syncZIndex();
}
if (changes['visible']) {
console.log('changed', this.visible);
this.toggleBodyScrollLock(this.visible);
}
@@ -140,8 +139,6 @@ export class SharedLightBottomsheetComponent implements OnInit, OnDestroy, OnCha
ngOnDestroy() {
this.toggleBodyScrollLock(false);
console.log('destroyed');
this.removeDrawer();
}
@@ -171,8 +168,6 @@ export class SharedLightBottomsheetComponent implements OnInit, OnDestroy, OnCha
}
private toggleBodyScrollLock(locked: boolean) {
console.log('locked', locked);
const body = this.document.body;
if (!body) return;
@@ -7,6 +7,8 @@ export interface ISaleInvoiceFullRawResponse {
id: string;
code: string;
total_amount: string;
discount_amount: string;
tax_amount: string;
invoice_date: string;
consumer_account: ConsumerAccount;
pos: Pos;
@@ -33,6 +33,8 @@
<p-divider align="center"> اطلاعات پرداخت </p-divider>
<div class="grid items-center gap-3 sm:grid-cols-2 sm:gap-4 md:grid-cols-3">
<app-key-value label="مجموع قابل پرداخت" [value]="invoice.total_amount" type="price" />
<app-key-value label="مبلغ تخفیف" [value]="invoice.discount_amount" type="price" />
<app-key-value label="مبلغ مالیات" [value]="invoice.tax_amount" type="price" />
@for (payment of invoice.payments; track $index) {
<app-key-value
[label]="`${payment.payment_method === 'SET_OFF' ? 'تهاتر' : payment.payment_method === 'TERMINAL' ? 'پوز' : 'نقدی/ کارت‌خوان دیگر/ کارت به کارت'}`"
@@ -273,9 +273,19 @@ export class SharedSaleInvoiceSingleViewComponent {
return `${item.quantity} ${item.measure_unit_text}`;
},
},
{
field: 'discount_amount',
header: 'مبلغ تخفیف',
type: 'price',
},
{
field: 'tax_amount',
header: 'مبلغ مالیات',
type: 'price',
},
{
field: 'total_amount',
header: 'قیمت نهایی',
header: 'مبلغ قابل پرداخت',
type: 'price',
},
];