mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
fix: make unique number of sales and purchases transactions is optional.
This commit is contained in:
@@ -99,8 +99,9 @@ export default class SaleEstimateService {
|
||||
};
|
||||
|
||||
// Validate estimate number uniquiness on the storage.
|
||||
await this.validateEstimateNumberExistance(tenantId, estimateDTO.estimateNumber);
|
||||
|
||||
if (estimateDTO.estimateNumber) {
|
||||
await this.validateEstimateNumberExistance(tenantId, estimateDTO.estimateNumber);
|
||||
}
|
||||
// Retrieve the given customer or throw not found service error.
|
||||
await this.customersService.getCustomer(tenantId, estimateDTO.customerId);
|
||||
|
||||
@@ -146,8 +147,9 @@ export default class SaleEstimateService {
|
||||
};
|
||||
|
||||
// Validate estimate number uniquiness on the storage.
|
||||
await this.validateEstimateNumberExistance(tenantId, estimateDTO.estimateNumber, estimateId);
|
||||
|
||||
if (estimateDTO.estimateNumber) {
|
||||
await this.validateEstimateNumberExistance(tenantId, estimateDTO.estimateNumber, estimateId);
|
||||
}
|
||||
// Retrieve the given customer or throw not found service error.
|
||||
await this.customersService.getCustomer(tenantId, estimateDTO.customerId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user