feat: add cart sales component and lookup service for managing sales orders. Add parameter customerId find payment plans.
This commit is contained in:
@@ -632,7 +632,7 @@ export class CartSalesComponent
|
||||
|
||||
if (billing !== null) {
|
||||
const savePayment = localStorage.getItem('paymentPlan');
|
||||
this.paymentPlan$ = this.lookupService.getPaymentPlan(billing.codcob);
|
||||
this.paymentPlan$ = this.lookupService.getPaymentPlan(billing.codcob, customer !== null ? customer.customerId : 1);
|
||||
this.subscritpionPaymentPlan = this.paymentPlan$.subscribe((data) => {
|
||||
this.paymentPlans = data;
|
||||
if (
|
||||
@@ -798,13 +798,16 @@ export class CartSalesComponent
|
||||
|
||||
setBilling(billing: any) {
|
||||
localStorage.setItem('billing', JSON.stringify(billing));
|
||||
const customer = JSON.parse(localStorage.getItem('customer')) as Customer;
|
||||
this.idBilling = billing.codcob;
|
||||
console.log(JSON.stringify(billing));
|
||||
localStorage.removeItem('paymentPlan');
|
||||
this.formPayment.patchValue({
|
||||
paymentPlan: null,
|
||||
});
|
||||
this.paymentPlan$ = this.lookupService.getPaymentPlan(billing.codcob);
|
||||
this.paymentPlan$ = this.lookupService.getPaymentPlan(billing.codcob,
|
||||
customer !== null ? customer.customerId : 1
|
||||
);
|
||||
this.subscritpionPaymentPlan = this.paymentPlan$
|
||||
.pipe(
|
||||
tap((data) => (this.paymentPlans = data)),
|
||||
|
||||
Reference in New Issue
Block a user