mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
fix: handle sale receipt number require service error.
This commit is contained in:
@@ -360,6 +360,15 @@ export default class SalesReceiptsController extends BaseController {
|
|||||||
errors: [{ type: 'SALE_RECEIPT_IS_ALREADY_CLOSED', code: 1000 }],
|
errors: [{ type: 'SALE_RECEIPT_IS_ALREADY_CLOSED', code: 1000 }],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (error.errorType === 'SALE_RECEIPT_NO_IS_REQUIRED') {
|
||||||
|
return res.boom.badRequest(null, {
|
||||||
|
errors: [{
|
||||||
|
type: 'SALE_RECEIPT_NO_IS_REQUIRED',
|
||||||
|
message: 'The sale receipt number is required.',
|
||||||
|
code: 1100,
|
||||||
|
}],
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
next(error);
|
next(error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user