mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
fix: formating dates in sale estimate service.
This commit is contained in:
@@ -16,6 +16,13 @@ export default class SaleEstimate extends TenantModel {
|
||||
return ['createdAt', 'updatedAt'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows to mark model as resourceable to viewable and filterable.
|
||||
*/
|
||||
static get resourceable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Relationship mapping.
|
||||
*/
|
||||
|
||||
@@ -95,7 +95,7 @@ export default class SaleEstimateService {
|
||||
const amount = sumBy(estimateDTO.entries, e => ItemEntry.calcAmount(e));
|
||||
const estimateObj = {
|
||||
amount,
|
||||
...formatDateFields(estimateDTO, ['estimate_date', 'expiration_date']),
|
||||
...formatDateFields(estimateDTO, ['estimateDate', 'expirationDate']),
|
||||
};
|
||||
|
||||
// Validate estimate number uniquiness on the storage.
|
||||
@@ -140,7 +140,7 @@ export default class SaleEstimateService {
|
||||
const amount = sumBy(estimateDTO.entries, (e) => ItemEntry.calcAmount(e));
|
||||
const estimateObj = {
|
||||
amount,
|
||||
...formatDateFields(estimateDTO, ['estimate_date', 'expiration_date']),
|
||||
...formatDateFields(estimateDTO, ['estimateDate', 'expirationDate']),
|
||||
};
|
||||
|
||||
// Validate estimate number uniquiness on the storage.
|
||||
|
||||
Reference in New Issue
Block a user