mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
BIG-60: fix response [object] when delete any sale estimate.
This commit is contained in:
@@ -413,11 +413,6 @@ export default class SalesEstimatesController extends BaseController {
|
||||
errors: [{ type: 'NOT_SELL_ABLE_ITEMS', code: 800 }],
|
||||
});
|
||||
}
|
||||
if (error.errorType === 'SALE_ESTIMATE_ALREADY_APPROVED') {
|
||||
return res.boom.badRequest(null, {
|
||||
errors: [{ type: 'CUSTOMER_NOT_FOUND', code: 900 }],
|
||||
});
|
||||
}
|
||||
if (error.errorType === 'SALE_ESTIMATE_ALREADY_APPROVED') {
|
||||
return res.boom.badRequest(null, {
|
||||
errors: [{ type: 'CUSTOMER_NOT_FOUND', code: 1000 }],
|
||||
@@ -443,6 +438,16 @@ export default class SalesEstimatesController extends BaseController {
|
||||
errors: [{ type: 'SALE_ESTIMATE_NO_IS_REQUIRED', code: 1400 }],
|
||||
});
|
||||
}
|
||||
if (error.errorType === 'SALE_ESTIMATE_CONVERTED_TO_INVOICE') {
|
||||
return res.boom.badRequest(null, {
|
||||
errors: [{ type: 'SALE_ESTIMATE_CONVERTED_TO_INVOICE', code: 1500 }],
|
||||
});
|
||||
}
|
||||
if (error.errorType === 'SALE_ESTIMATE_ALREADY_DELIVERED') {
|
||||
return res.boom.badRequest(null, {
|
||||
errors: [{ type: 'SALE_ESTIMATE_ALREADY_DELIVERED', code: 1600 }],
|
||||
});
|
||||
}
|
||||
}
|
||||
next(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user