mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
feat: Re-compute the given items cost job.
feat: Optimize the architecture.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { omit, difference, sumBy, mixin } from 'lodash';
|
||||
import moment from 'moment';
|
||||
import { SaleEstimate, ItemEntry } from '@/models';
|
||||
import HasItemsEntries from '@/services/Sales/HasItemsEntries';
|
||||
|
||||
@@ -11,6 +12,7 @@ export default class SaleEstimateService {
|
||||
*/
|
||||
static async createEstimate(estimate: any) {
|
||||
const amount = sumBy(estimate.entries, 'amount');
|
||||
|
||||
const storedEstimate = await SaleEstimate.tenant()
|
||||
.query()
|
||||
.insert({
|
||||
|
||||
Reference in New Issue
Block a user