feat: Add backoffice list controller and service for various data lookups and new sales customer, order, and pre-order services. Add parameter customerId para find payment plans
This commit is contained in:
@@ -469,9 +469,9 @@ export class CustomerService {
|
||||
async InitializeCustomer() {
|
||||
const cliente = new Pcclient();
|
||||
cliente.codusur1 = 1;
|
||||
cliente.codplpag = 10;
|
||||
cliente.codpraca = 119;
|
||||
cliente.codcob = "D";
|
||||
cliente.codplpag = 18;
|
||||
cliente.codpraca = 169;
|
||||
cliente.codcob = "CAR";
|
||||
cliente.dtcadastro = new Date();
|
||||
cliente.codcontab = "1";
|
||||
cliente.aceitavendafracao = "N";
|
||||
@@ -502,7 +502,7 @@ export class CustomerService {
|
||||
cliente.tv10usacustoproduto = "N";
|
||||
cliente.inscestadual = "ISENTO";
|
||||
cliente.codpais = 1058; //Brasil
|
||||
cliente.observacao = "Importado do E-Commerce";
|
||||
cliente.observacao = "Cadastrado Venda Web";
|
||||
cliente.aceitachterceiros = "S";
|
||||
cliente.agregarvalorstdescfin = "N";
|
||||
cliente.anvisa = "N";
|
||||
|
||||
@@ -954,7 +954,7 @@ export class OrderService {
|
||||
const partners = await this.listsService.GetPartners();
|
||||
const address = await this.addressCustomerService.getAddress(order[0].customerId, order[0].addressId);
|
||||
const billing = billinds.find(data => data.codcob === order[0].billindId);
|
||||
const paymentPlans = await this.listsService.GetPaymentPlan(billing.codcob);
|
||||
const paymentPlans = await this.listsService.GetPaymentPlan(billing.codcob, order[0].customerId);
|
||||
const paymentPlan = paymentPlans.find(data => data.codplpag === order[0].paymentPlanId);
|
||||
const partner = partners.find(data => data.id === order[0].partnerId);
|
||||
|
||||
|
||||
@@ -425,7 +425,7 @@ export class PreOrderService {
|
||||
}
|
||||
// const address = await this.addressCustomerService.getAddress(preOrder[0].customerId, preOrder[0].addressId);
|
||||
const billing = billinds.find(data => data.codcob === preOrder[0].billindId);
|
||||
const paymentPlans = await this.listsService.GetPaymentPlan((billing !== null && billing !== undefined) ? billing.codcob : '9999');
|
||||
const paymentPlans = await this.listsService.GetPaymentPlan((billing !== null && billing !== undefined) ? billing.codcob : '9999', preOrder[0].customerId);
|
||||
const paymentPlan = paymentPlans.find(data => data.codplpag === preOrder[0].paymentPlanId);
|
||||
const partner = partners.find(data => data.id === preOrder[0].partnerId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user