BIG-15: fix filtering payment receive by given customer.

BIG-16: fix filtering payment mades by payment account.
This commit is contained in:
a.bouhuolia
2021-09-11 17:23:29 +02:00
parent 1ebb5cd8ad
commit 6493fcbcfe
3 changed files with 8 additions and 8 deletions

View File

@@ -29,13 +29,13 @@ export default {
payment_account: { payment_account: {
name: 'bill_payment.field.payment_account', name: 'bill_payment.field.payment_account',
column: 'payment_account_id', column: 'payment_account_id',
fieldType: 'relation', fieldType: 'relation',
fieldRelation: 'paymentAccount',
fieldRelationType: 'enumeration', relationType: 'enumeration',
relationLabelField: 'name', relationKey: 'paymentAccount',
relationKeyField: 'slug',
relationEntityLabel: 'name',
relationEntityKey: 'slug',
}, },
payment_number: { payment_number: {
name: 'bill_payment.field.payment_number', name: 'bill_payment.field.payment_number',

View File

@@ -9,7 +9,7 @@ export default {
relationType: 'enumeration', relationType: 'enumeration',
relationKey: 'customer', relationKey: 'customer',
relationEntityLabel: 'name', relationEntityLabel: 'display_name',
relationEntityKey: 'id', relationEntityKey: 'id',
}, },
payment_date: { payment_date: {

View File

@@ -38,13 +38,13 @@ export default class PaymentReceive extends mixin(TenantModel, [
static get relationMappings() { static get relationMappings() {
const PaymentReceiveEntry = require('models/PaymentReceiveEntry'); const PaymentReceiveEntry = require('models/PaymentReceiveEntry');
const AccountTransaction = require('models/AccountTransaction'); const AccountTransaction = require('models/AccountTransaction');
const Contact = require('models/Contact'); const Customer = require('models/Customer');
const Account = require('models/Account'); const Account = require('models/Account');
return { return {
customer: { customer: {
relation: Model.BelongsToOneRelation, relation: Model.BelongsToOneRelation,
modelClass: Contact.default, modelClass: Customer.default,
join: { join: {
from: 'payment_receives.customerId', from: 'payment_receives.customerId',
to: 'contacts.id', to: 'contacts.id',