update saleinvoice single and create return from sale form, update agent.md file,
This commit is contained in:
@@ -43,6 +43,7 @@ import { ProgressSpinner } from 'primeng/progressspinner';
|
||||
import { TableModule } from 'primeng/table';
|
||||
import { Observable } from 'rxjs';
|
||||
import { AppConfirmationService } from '../confirmationDialog/confirmation-dialog.service';
|
||||
import { SharedReturnFormComponent } from './returnForm/form.component';
|
||||
|
||||
export type TSaleInvoiceSingleViewVariant = 'full' | 'customer' | 'pos';
|
||||
|
||||
@@ -65,6 +66,7 @@ export type TSaleInvoiceSingleViewVariant = 'full' | 'customer' | 'pos';
|
||||
CatalogInvoiceSettlementTypeTagComponent,
|
||||
SharedLightBottomsheetComponent,
|
||||
ProgressSpinner,
|
||||
SharedReturnFormComponent,
|
||||
],
|
||||
})
|
||||
export class SharedSaleInvoiceSingleViewComponent {
|
||||
@@ -90,6 +92,8 @@ export class SharedSaleInvoiceSingleViewComponent {
|
||||
@ViewChild('totalAmount', { static: false }) totalAmount!: TemplateRef<any>;
|
||||
|
||||
moreActionMenuItems = signal<MenuItem[]>([]);
|
||||
showCorrectionForm = signal(false);
|
||||
showBackFromSaleForm = signal(false);
|
||||
|
||||
constructor() {
|
||||
this.showErrors = this.showErrors.bind(this);
|
||||
@@ -112,16 +116,17 @@ export class SharedSaleInvoiceSingleViewComponent {
|
||||
send() {
|
||||
this.onSendToTsp.emit();
|
||||
}
|
||||
showRevokeConfirmation() {
|
||||
this.confirmationService.ask({
|
||||
async showRevokeConfirmation() {
|
||||
await this.confirmationService.ask({
|
||||
header: `ابطال صورتحساب شماره ${this.invoice!.invoice_number}`,
|
||||
message: `در صورت تایید ابطال صورتحساب شماره ${this.invoice!.invoice_number} بر روی دکمهی ابطال کلیک کنید.`,
|
||||
acceptLabel: 'ابطال',
|
||||
acceptButtonProps: {
|
||||
severity: 'dangerdock',
|
||||
},
|
||||
variant: 'danger',
|
||||
|
||||
accept: () => {
|
||||
accept: async () => {
|
||||
// this.deferredInstallPrompt.prompt();
|
||||
// this.deferredInstallPrompt.userChoice.finally(() => {
|
||||
// this.deferredInstallPrompt = null;
|
||||
@@ -133,7 +138,9 @@ export class SharedSaleInvoiceSingleViewComponent {
|
||||
});
|
||||
}
|
||||
showCorrection() {}
|
||||
showBackFromSale() {}
|
||||
showBackFromSale() {
|
||||
this.showBackFromSaleForm.set(true);
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
if (changes['invoice'] && this.invoice) {
|
||||
@@ -320,21 +327,18 @@ export class SharedSaleInvoiceSingleViewComponent {
|
||||
{
|
||||
label: 'اجرت',
|
||||
value: formatWithCurrency(item.payload.wages),
|
||||
show:
|
||||
mustPrintConfig.items?.wage && item.good_snapshot.good.pricing_model === 'GOLD',
|
||||
show: mustPrintConfig.items?.wage && item.good_snapshot.pricing_model === 'GOLD',
|
||||
},
|
||||
{
|
||||
label: 'سود',
|
||||
value: formatWithCurrency(item.payload.wages),
|
||||
show:
|
||||
mustPrintConfig.items?.profit && item.good_snapshot.good.pricing_model === 'GOLD',
|
||||
show: mustPrintConfig.items?.profit && item.good_snapshot.pricing_model === 'GOLD',
|
||||
},
|
||||
{
|
||||
label: 'حقالعمل',
|
||||
value: formatWithCurrency(item.payload.commission),
|
||||
show:
|
||||
mustPrintConfig.items?.commission &&
|
||||
item.good_snapshot.good.pricing_model === 'GOLD',
|
||||
mustPrintConfig.items?.commission && item.good_snapshot.pricing_model === 'GOLD',
|
||||
},
|
||||
{
|
||||
label: 'مالیات بر ارزش افزوده',
|
||||
|
||||
Reference in New Issue
Block a user