mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
- feat: Sales estimates APIs.
- feat: Sales invoices APIs. - feat: Sales receipts APIs. - WIP: Sales payment receipts. - WIP: Purchases bills. - WIP: Purchases payments made.
This commit is contained in:
22
server/src/services/DynamicListing/HasDynamicListing.js
Normal file
22
server/src/services/DynamicListing/HasDynamicListing.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import { DYNAMIC_LISTING_ERRORS } from '@/services/DynamicListing/DynamicListing';
|
||||
|
||||
export const dynamicListingErrorsToResponse = (error) => {
|
||||
let _errors;
|
||||
|
||||
if (error.message === DYNAMIC_LISTING_ERRORS.LOGIC_INVALID) {
|
||||
_errors.push({
|
||||
type: DYNAMIC_LISTING_ERRORS.LOGIC_INVALID,
|
||||
code: 200,
|
||||
});
|
||||
}
|
||||
if (
|
||||
error.message ===
|
||||
DYNAMIC_LISTING_ERRORS.RESOURCE_HAS_NO_FIELDS
|
||||
) {
|
||||
_errors.push({
|
||||
type: DYNAMIC_LISTING_ERRORS.RESOURCE_HAS_NO_FIELDS,
|
||||
code: 300,
|
||||
});
|
||||
}
|
||||
return _errors;
|
||||
};
|
||||
Reference in New Issue
Block a user