feat: enhance invoice correction form with item editing and price info display
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
<div class="p-4">
|
||||
<shared-sale-invoice-single-view
|
||||
[loading]="loading()"
|
||||
[invoice]="invoice()"
|
||||
[backRoute]="backRoute()"
|
||||
[sendToTspLoading]="sendToTspLoading()"
|
||||
[inquiryLoading]="inquiryLoading()"
|
||||
(onSendToTsp)="sendToTsp()"
|
||||
(onInquiry)="inquiry()"
|
||||
(onCorrection)="correction($event)"
|
||||
(onReturnFromSale)="returnFromSale($event)"
|
||||
variant="pos" />
|
||||
</div>
|
||||
<shared-sale-invoice-single-view
|
||||
[loading]="loading()"
|
||||
[invoice]="invoice()"
|
||||
[backRoute]="backRoute()"
|
||||
[sendToTspLoading]="sendToTspLoading()"
|
||||
[inquiryLoading]="inquiryLoading()"
|
||||
(onSendToTsp)="sendToTsp()"
|
||||
(onInquiry)="inquiry()"
|
||||
(onCorrection)="correction($event)"
|
||||
(onReturnFromSale)="returnFromSale($event)"
|
||||
variant="pos" />
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
import { PriceMaskDirective } from '@/shared/directives';
|
||||
import { Component, computed, inject } from '@angular/core';
|
||||
import { Component, Input, inject } from '@angular/core';
|
||||
import { Card } from 'primeng/card';
|
||||
import { PosLandingStore } from '../../store/main.store';
|
||||
|
||||
type TOrderPriceInfo = {
|
||||
totalBaseAmount: number;
|
||||
discountAmount: number;
|
||||
taxAmount: number;
|
||||
totalAmount: number;
|
||||
};
|
||||
|
||||
@Component({
|
||||
selector: 'pos-order-price-info-card',
|
||||
templateUrl: './price-info-card.component.html',
|
||||
@@ -10,6 +17,12 @@ import { PosLandingStore } from '../../store/main.store';
|
||||
})
|
||||
export class POSOrderPriceInfoCardComponent {
|
||||
private readonly store = inject(PosLandingStore);
|
||||
@Input() info?: TOrderPriceInfo;
|
||||
|
||||
priceInfo = computed(() => this.store.orderPricingInfo());
|
||||
priceInfo(): TOrderPriceInfo {
|
||||
if (this.info) {
|
||||
return this.info;
|
||||
}
|
||||
return this.store.orderPricingInfo();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user