mirror of
https://github.com/frappe/books.git
synced 2024-11-10 15:50:56 +00:00
b5f8e49299
- hide inventory defaults until enabled
13 lines
331 B
TypeScript
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;
|
|
};
|