fix: C-7 webhook tenant lookup, C-5 full tax calc §15, M-2/M-3/M-4/M-8/L-7/L-8/L-9 gap fixes
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
import { IsString, IsOptional, IsNumber, Min } from "class-validator";
|
||||
import { IsString, IsOptional, IsNumber, IsBoolean, Min } from "class-validator";
|
||||
import { Injectable, NotFoundException } from "@nestjs/common";
|
||||
import { PrismaService } from "../prisma/prisma.service";
|
||||
import { generateTrackingId } from "../common/utils/tracking-id.util";
|
||||
|
||||
export class CreateB2BDto {
|
||||
@IsString() contactName!: string;
|
||||
@IsString() contactEmail!: string;
|
||||
@IsOptional() @IsString() contactPhone?: string;
|
||||
@IsOptional() @IsString() companyName?: string;
|
||||
@IsOptional() @IsString() contactPhone?: string;
|
||||
@IsOptional() @IsString() companyName?: string;
|
||||
@IsString() merchandiseType!: string;
|
||||
@IsString() description!: string;
|
||||
@IsOptional() @IsNumber() @Min(0) commercialValue?: number;
|
||||
@IsOptional() @IsNumber() @Min(0) estimatedWeightKg?: number;
|
||||
@IsOptional() @IsNumber() @Min(0) pallets?: number;
|
||||
@IsOptional() @IsString() originCity?: string;
|
||||
@IsOptional() @IsBoolean() requiresInen?: boolean;
|
||||
}
|
||||
|
||||
export class UpdateB2BStatusDto {
|
||||
@@ -37,13 +40,17 @@ export class B2BService {
|
||||
data: {
|
||||
tenantId,
|
||||
trackingId,
|
||||
contactName: dto.contactName,
|
||||
contactEmail: dto.contactEmail,
|
||||
contactPhone: dto.contactPhone,
|
||||
companyName: dto.companyName,
|
||||
merchandiseType: dto.merchandiseType,
|
||||
description: dto.description,
|
||||
commercialValue: dto.commercialValue ?? null,
|
||||
contactName: dto.contactName,
|
||||
contactEmail: dto.contactEmail,
|
||||
contactPhone: dto.contactPhone,
|
||||
companyName: dto.companyName,
|
||||
merchandiseType: dto.merchandiseType,
|
||||
description: dto.description,
|
||||
commercialValue: dto.commercialValue ?? null,
|
||||
estimatedWeightKg: dto.estimatedWeightKg ?? null,
|
||||
pallets: dto.pallets ?? null,
|
||||
originCity: dto.originCity ?? null,
|
||||
requiresInen: dto.requiresInen ?? false,
|
||||
status: "PENDIENTE",
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user