mirror of
https://github.com/frappe/books.git
synced 2025-01-03 15:17:30 +00:00
fix: StockTransfer item filter
This commit is contained in:
parent
5f66cfe5d5
commit
b460e96c97
@ -11,6 +11,7 @@ import { ValidationError } from 'fyo/utils/errors';
|
||||
import { ModelNameEnum } from 'models/types';
|
||||
import { Money } from 'pesa';
|
||||
import { safeParseFloat } from 'utils/index';
|
||||
import { StockTransfer } from './StockTransfer';
|
||||
|
||||
export class StockTransferItem extends Doc {
|
||||
item?: string;
|
||||
@ -28,6 +29,12 @@ export class StockTransferItem extends Doc {
|
||||
hsnCode?: number;
|
||||
batch?: string;
|
||||
|
||||
parentdoc?: StockTransfer;
|
||||
|
||||
get isSales() {
|
||||
return this.schemaName === ModelNameEnum.ShipmentItem;
|
||||
}
|
||||
|
||||
formulas: FormulaMap = {
|
||||
description: {
|
||||
formula: async () =>
|
||||
@ -198,6 +205,7 @@ export class StockTransferItem extends Doc {
|
||||
static filters: FiltersMap = {
|
||||
item: (doc: Doc) => {
|
||||
let itemNotFor = 'Sales';
|
||||
console.log(doc.schemaName, doc.isSales);
|
||||
if (doc.isSales) {
|
||||
itemNotFor = 'Purchases';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user