mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
fix bugs in sales and purchases API.
This commit is contained in:
@@ -132,6 +132,18 @@ const getTotalDeep = (items, deepProp, totalProp) =>
|
||||
return _.sumBy(item, totalProp) + total + acc;
|
||||
}, 0);
|
||||
|
||||
function applyMixins(derivedCtor, baseCtors) {
|
||||
baseCtors.forEach((baseCtor) => {
|
||||
Object.getOwnPropertyNames(baseCtor.prototype).forEach((name) => {
|
||||
Object.defineProperty(
|
||||
derivedCtor.prototype,
|
||||
name,
|
||||
Object.getOwnPropertyDescriptor(baseCtor.prototype, name)
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export {
|
||||
hashPassword,
|
||||
origin,
|
||||
@@ -143,4 +155,5 @@ export {
|
||||
flatToNestedArray,
|
||||
itemsStartWith,
|
||||
getTotalDeep,
|
||||
applyMixins,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user