2026-05-26 12:06:43 +03:30
|
|
|
<p-card class="border-surface-border relative overflow-visible border p-0!">
|
|
|
|
|
<div class="flex w-full items-center justify-between gap-4">
|
2026-05-01 19:45:30 +03:30
|
|
|
<span> {{ saleInvoice.invoice_number }} - {{ saleInvoice.code }} </span>
|
2026-05-03 16:08:26 +03:30
|
|
|
<catalog-tax-provider-status-tag [status]="saleInvoice.status.value" [translate]="saleInvoice.status.translate" />
|
2026-05-01 19:45:30 +03:30
|
|
|
</div>
|
|
|
|
|
<hr />
|
|
|
|
|
<div class="grid grid-cols-1 gap-4">
|
|
|
|
|
<app-key-value alignment="end" label="نوع صورتحساب">
|
|
|
|
|
{{ preparedInvoiceType() }}
|
|
|
|
|
</app-key-value>
|
|
|
|
|
<app-key-value alignment="end" label="مبلغ کل" [value]="saleInvoice.total_amount" type="price" />
|
2026-05-31 13:54:34 +03:30
|
|
|
<app-key-value alignment="end" label="نوع صورتحساب">
|
2026-05-26 12:06:43 +03:30
|
|
|
<catalog-invoice-type-tag [status]="saleInvoice.type.value" />
|
|
|
|
|
</app-key-value>
|
2026-05-31 13:54:34 +03:30
|
|
|
<app-key-value alignment="end" label="تاریخ صورتحساب" [value]="saleInvoice.created_at" type="date" />
|
2026-05-01 19:45:30 +03:30
|
|
|
</div>
|
|
|
|
|
<hr />
|
|
|
|
|
<div class="flex items-center justify-center gap-4">
|
2026-05-28 16:37:58 +03:30
|
|
|
@if (['success'].includes(saleInvoice.status.value.toLowerCase())) {
|
2026-05-04 20:02:10 +03:30
|
|
|
<p-button
|
|
|
|
|
label="ابطال"
|
|
|
|
|
type="button"
|
|
|
|
|
severity="danger"
|
|
|
|
|
(click)="revokeInvoice()"
|
|
|
|
|
[loading]="revokingInvoiceLoading()"
|
2026-05-26 12:06:43 +03:30
|
|
|
[disabled]="onAction()"></p-button>
|
2026-05-04 20:02:10 +03:30
|
|
|
}
|
2026-05-26 12:06:43 +03:30
|
|
|
@if (saleInvoice.status.value.toLowerCase() === 'not_send') {
|
2026-05-04 20:02:10 +03:30
|
|
|
<p-button
|
2026-05-31 13:54:34 +03:30
|
|
|
label="ارسال صورتحساب"
|
2026-05-04 20:02:10 +03:30
|
|
|
type="button"
|
|
|
|
|
(click)="sendInvoice()"
|
|
|
|
|
[loading]="sendingLoading()"
|
2026-05-26 12:06:43 +03:30
|
|
|
[disabled]="onAction()"></p-button>
|
2026-05-01 19:45:30 +03:30
|
|
|
}
|
2026-05-28 16:37:58 +03:30
|
|
|
@if (['queued', 'fiscal_queued'].includes(saleInvoice.status.value.toLowerCase())) {
|
2026-05-01 19:45:30 +03:30
|
|
|
<p-button
|
2026-05-30 19:05:23 +03:30
|
|
|
label="استعلام وضعیت"
|
2026-05-01 19:45:30 +03:30
|
|
|
type="button"
|
2026-05-04 20:02:10 +03:30
|
|
|
severity="info"
|
2026-05-01 19:45:30 +03:30
|
|
|
(click)="getStatus()"
|
|
|
|
|
[loading]="gettingStatusLoading()"
|
2026-05-26 12:06:43 +03:30
|
|
|
[disabled]="onAction()"></p-button>
|
2026-05-01 19:45:30 +03:30
|
|
|
}
|
2026-05-28 16:37:58 +03:30
|
|
|
@if (saleInvoice.status.value.toLowerCase() === 'send_failure') {
|
2026-05-04 20:02:10 +03:30
|
|
|
<p-button
|
|
|
|
|
label="ارسال مجدد"
|
|
|
|
|
type="button"
|
|
|
|
|
(click)="resendInvoice()"
|
|
|
|
|
[loading]="resendingLoading()"
|
2026-05-26 12:06:43 +03:30
|
|
|
[disabled]="onAction()"></p-button>
|
2026-05-01 19:45:30 +03:30
|
|
|
}
|
|
|
|
|
<a [routerLink]="singlePageRoute()" pButton type="button" (click)="viewDetails()" outlined>مشاهده جزییات</a>
|
|
|
|
|
</div>
|
|
|
|
|
</p-card>
|