add salesInvoice in pos of consumer domain
This commit is contained in:
+6
-6
@@ -24,23 +24,23 @@ export class CustomerIndividualFormComponent extends AbstractForm<
|
||||
override showSuccessMessage = false;
|
||||
form = this.fb.group({
|
||||
first_name: [
|
||||
this.store.customer().info?.customerIndividuals?.first_name || '',
|
||||
this.store.customer().info?.customer_individual?.first_name || '',
|
||||
[Validators.required],
|
||||
],
|
||||
last_name: [
|
||||
this.store.customer().info?.customerIndividuals?.last_name || '',
|
||||
this.store.customer().info?.customer_individual?.last_name || '',
|
||||
[Validators.required],
|
||||
],
|
||||
national_id: [
|
||||
this.store.customer().info?.customerIndividuals?.national_id || '',
|
||||
this.store.customer().info?.customer_individual?.national_id || '',
|
||||
[Validators.required, nationalIdValidator()],
|
||||
],
|
||||
economic_code: [
|
||||
this.store.customer().info?.customerIndividuals?.economic_code || '',
|
||||
this.store.customer().info?.customer_individual?.economic_code || '',
|
||||
[Validators.required],
|
||||
],
|
||||
postal_code: [
|
||||
this.store.customer().info?.customerIndividuals?.postal_code || '',
|
||||
this.store.customer().info?.customer_individual?.postal_code || '',
|
||||
[postalCodeValidator()],
|
||||
],
|
||||
});
|
||||
@@ -52,7 +52,7 @@ export class CustomerIndividualFormComponent extends AbstractForm<
|
||||
customer_id: '',
|
||||
type: CustomerType.INDIVIDUAL,
|
||||
info: {
|
||||
customerIndividuals: info,
|
||||
customer_individual: info,
|
||||
},
|
||||
});
|
||||
return observer.next(info);
|
||||
|
||||
@@ -21,19 +21,19 @@ export class CustomerLegalFormComponent extends AbstractForm<ILegalCustomer, ILe
|
||||
|
||||
form = this.fb.group({
|
||||
company_name: [
|
||||
this.store.customer().info?.customerLegals?.company_name || '',
|
||||
this.store.customer().info?.customer_legal?.company_name || '',
|
||||
[Validators.required],
|
||||
],
|
||||
registration_number: [
|
||||
this.store.customer().info?.customerLegals?.registration_number || '',
|
||||
this.store.customer().info?.customer_legal?.registration_number || '',
|
||||
[Validators.required],
|
||||
],
|
||||
economic_code: [
|
||||
this.store.customer().info?.customerLegals?.economic_code || '',
|
||||
this.store.customer().info?.customer_legal?.economic_code || '',
|
||||
[Validators.required],
|
||||
],
|
||||
postal_code: [
|
||||
this.store.customer().info?.customerLegals?.postal_code || '',
|
||||
this.store.customer().info?.customer_legal?.postal_code || '',
|
||||
[postalCodeValidator()],
|
||||
],
|
||||
});
|
||||
@@ -45,7 +45,7 @@ export class CustomerLegalFormComponent extends AbstractForm<ILegalCustomer, ILe
|
||||
customer_id: '',
|
||||
type: CustomerType.LEGAL,
|
||||
info: {
|
||||
customerLegals: info,
|
||||
customer_legal: info,
|
||||
},
|
||||
});
|
||||
return observer.next(info);
|
||||
|
||||
@@ -20,10 +20,10 @@ export class CustomerUnknownFormComponent extends AbstractForm<IUnknownCustomer,
|
||||
override showSuccessMessage = false;
|
||||
form = this.fb.group({
|
||||
national_id: [
|
||||
this.store?.customer().info?.customerUnknown?.national_id || '',
|
||||
this.store?.customer().info?.customer_unknown?.national_id || '',
|
||||
[nationalIdValidator()],
|
||||
],
|
||||
name: [this.store?.customer().info?.customerUnknown?.name || ''],
|
||||
name: [this.store?.customer().info?.customer_unknown?.name || ''],
|
||||
});
|
||||
|
||||
override submitForm() {
|
||||
@@ -33,7 +33,7 @@ export class CustomerUnknownFormComponent extends AbstractForm<IUnknownCustomer,
|
||||
customer_id: '',
|
||||
type: CustomerType.UNKNOWN,
|
||||
info: {
|
||||
customerUnknown: info,
|
||||
customer_unknown: info,
|
||||
},
|
||||
});
|
||||
return observer.next(info);
|
||||
|
||||
Reference in New Issue
Block a user