2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 15:50:56 +00:00
books/models/inventory/helpers.ts
18alantom b5f8e49299 incr: improve stockmovement ux
- hide inventory defaults until enabled
2022-11-16 14:05:38 +05:30

13 lines
331 B
TypeScript

import { Doc } from "fyo/model/doc";
import { FilterFunction } from "fyo/model/types";
import { QueryFilter } from "utils/db/types";
export const locationFilter: FilterFunction = (doc: Doc) => {
const item = doc.item;
if (!doc.item) {
return { item: null };
}
return { item: ['in', [null, item]] } as QueryFilter;
};