[AD_Table_ID=318] development

59 views
Skip to first unread message

StabilisOne

unread,
Feb 15, 2020, 4:30:35 AM2/15/20
to iDempiere
I'm testing new 'c_bankaccount_id', not mandatory column in C_Invoice tab, that should enable to determine 'Client Bank Account' printed on 'Invoice (Customer)' [AD_Window_ID=167]:
  • Name: cbankaccount_cinvoice
  • Associated Entity: c_bankaccount
  • Referenced Constraint: c_bankacount_pkey 
with new  Validation code:
C_BankAccount.AD_Client_ID=@AD_Client_ID@ AND C_BankAccount.BankAccountType='S'

It is of course implemented in AD_Window_ID=167 as a new Field with Display Logic triggered by PaymentRule, ex.:
@PaymentRule@='P' | @PaymentRule@='D'

It seems to be correct implemented - it appears only at Invoice (Customer) window with PaymentRule assigned as 'P' or 'D' and presents drop-down List with only BankAccountType assigned as 'S'

 - but maybe some of more experienced members of community have encountered some problems with such a case and would like to share their experiences? I would be grateful for any kind of guidance,  before I start struggling with unexpected problems in production.

BestRegards,
AWieclawski

Screenshot from 2020-02-13 16-59-23.png
Screenshot from 2020-02-13 16-26-46.png

StabilisOne

unread,
Feb 18, 2020, 4:09:08 AM2/18/20
to iDempiere
I think it's worth of mentioning, that Validation should be, as follow:
C_BankAccount.AD_Client_ID = @AD_Client_ID@ -- only for the Customer / exhibitor
AND C_BankAccount.BankAccountType IN ('S') -- only for the 'Savings' account
AND '@IsSOTrx@' = 'Y' -- only when the transaction is a sale
AND C_BankAccount.IsActive = 'Y' -- only when the bank account is active

It is good to enter value 1 in the Default Logic field of the Table> Columns tab. It transforms the foreign key added to the 'Numeric' type if it were interpreted by the iD platform as 'Character Varying'.
Reply all
Reply to author
Forward
0 new messages