mirror of
https://github.com/frappe/books.git
synced 2024-11-08 14:50:56 +00:00
fix: payment reference filter
This commit is contained in:
parent
1e457ddcf2
commit
87971b8a6b
@ -76,14 +76,18 @@ export class PaymentFor extends Doc {
|
||||
|
||||
static filters: FiltersMap = {
|
||||
referenceName: (doc) => {
|
||||
const zero =
|
||||
'0.' +
|
||||
'0'.repeat(doc.fyo.singles.SystemSettings?.internalPrecision ?? 11);
|
||||
|
||||
const baseFilters = {
|
||||
outstandingAmount: ['>', 0],
|
||||
outstandingAmount: ['!=', zero],
|
||||
submitted: true,
|
||||
cancelled: false,
|
||||
};
|
||||
|
||||
const party = doc?.parentdoc?.party as undefined | string;
|
||||
if (party === undefined) {
|
||||
if (!party) {
|
||||
return baseFilters;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user