mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 06:40:31 +00:00
spelling: average
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
@@ -49,7 +49,7 @@ export default class InventoryAverageCostMethod
|
|||||||
public async computeItemCost() {
|
public async computeItemCost() {
|
||||||
const { InventoryTransaction } = this.tenantModels;
|
const { InventoryTransaction } = this.tenantModels;
|
||||||
const { averageCost, openingQuantity, openingCost } =
|
const { averageCost, openingQuantity, openingCost } =
|
||||||
await this.getOpeningAvaregeCost(this.startingDate, this.itemId);
|
await this.getOpeningAverageCost(this.startingDate, this.itemId);
|
||||||
|
|
||||||
const afterInvTransactions: IInventoryTransaction[] =
|
const afterInvTransactions: IInventoryTransaction[] =
|
||||||
await InventoryTransaction.query()
|
await InventoryTransaction.query()
|
||||||
@@ -75,12 +75,12 @@ export default class InventoryAverageCostMethod
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get items Avarege cost from specific date from inventory transactions.
|
* Get items Average cost from specific date from inventory transactions.
|
||||||
* @async
|
* @async
|
||||||
* @param {Date} closingDate
|
* @param {Date} closingDate
|
||||||
* @return {number}
|
* @return {number}
|
||||||
*/
|
*/
|
||||||
public async getOpeningAvaregeCost(closingDate: Date, itemId: number) {
|
public async getOpeningAverageCost(closingDate: Date, itemId: number) {
|
||||||
const { InventoryCostLotTracker } = this.tenantModels;
|
const { InventoryCostLotTracker } = this.tenantModels;
|
||||||
|
|
||||||
const commonBuilder = (builder: any) => {
|
const commonBuilder = (builder: any) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user