| 123456789101112131415161718192021222324252627282930313233343536 | 
							- using System;
 
- using InABox.Core;
 
- namespace Comal.Classes
 
- {
 
-     public abstract class AbstractPaymentTermsLookup<T> : LookupDefinitionGenerator<PaymentTerms, T>
 
-         where T : Entity
 
-     {
 
-         
 
-         public override Columns<PaymentTerms> DefineColumns()
 
-         {
 
-             return base.DefineColumns()
 
-                 .Add(x=>x.Code)
 
-                 .Add(x=>x.Description);
 
-         }
 
-         public override string? FormatDisplay(CoreRow row)
 
-             => $"{row.Get<PaymentTerms, String>(x => x.Code)}: {row.Get<PaymentTerms, String>(x => x.Description)}";
 
-     }
 
-     public class AccountsReceivablePaymentTermsLookup<T> : AbstractPaymentTermsLookup<T>
 
-         where T : Entity
 
-     {
 
-         public override Filter<PaymentTerms> DefineFilter(T[] items)
 
-             => new Filter<PaymentTerms>(x=>x.Active).IsEqualTo(true).And(x => x.AccountsReceivable).IsEqualTo(true);
 
-     }
 
-     
 
-     public class AccountsPayablePaymentTermsLookup<T> : AbstractPaymentTermsLookup<T>
 
-         where T : Entity
 
-     {
 
-         public override Filter<PaymentTerms> DefineFilter(T[] items)
 
-             => new Filter<PaymentTerms>(x=>x.Active).IsEqualTo(true).And(x => x.AccountsPayable).IsEqualTo(true);
 
-     }
 
- }
 
 
  |