public virtual void _(Events.RowSelected <APPayment> args) { if (args.Row != null && SiteMapExtension.IsChecksAndPaymentsScreenId()) { UpdateJointCheckAvailability(args.Row); SetBillLineNumberVisibility(); UpdateVendorAndJointPaymentAmounts(args.Row); } }
public virtual void APAdjust_RowInserted(PXCache cache, PXRowInsertedEventArgs args) { var adjustment = args.Row as APAdjust; if (adjustment?.AdjdDocType == APDocType.Invoice && IsCheck() && SiteMapExtension.IsChecksAndPaymentsScreenId()) { jointPayeePaymentService.AddJointPayeePayments(adjustment); } }
public virtual void _(Events.RowSelected <JointPayeePayment> args) { var jointPayeePayment = args.Row; if (jointPayeePayment?.JointPayeeId != null && SiteMapExtension.IsChecksAndPaymentsScreenId()) { UpdateJointAmountToPayAvailability(jointPayeePayment); PXUIFieldAttribute.SetDisplayName <JointPayee.billLineNumber>(Base.Caches <JointPayee>(), JointCheckLabels.ApBillLineNumber); } }
/// <summary> /// Returns transactions related to adjustments from the current payment in cache. /// Returns empty collection in case an adjustment relates to multiple transactions with references to /// different projects or commitments. It is possible for a bill without Pay per line feature. /// </summary> public IEnumerable <APTran> GetTransactions() { var insertedAdjustments = graph.Caches <APAdjust>().Inserted.RowCast <APAdjust>().ToList(); var adjustments = SiteMapExtension.IsPreparePaymentsScreenId() ? PreparePaymentsAdjustmentsCache.GetStoredAdjustments().Where(adjust => IsRelatedAdjustment(insertedAdjustments.SingleOrDefault(), adjust)) : graph.Adjustments.Select().FirstTableItems.Concat(insertedAdjustments).ToList(); var transactions = adjustments.Select(GetTransaction).ToList(); return(transactions.Any(t => t == null) ? Enumerable.Empty <APTran>() : transactions); }
public AdjustmentReferenceNumberSelectorAttribute() : base(typeof(Search2 <APAdjust.APInvoice.refNbr, LeftJoin <APAdjust, On <APAdjust.adjdDocType, Equal <APAdjust.APInvoice.docType>, And <APAdjust.adjdRefNbr, Equal <APAdjust.APInvoice.refNbr>, And <APAdjust.released, Equal <False> > > >, LeftJoin <APAdjust2, On <APAdjust2.adjgDocType, Equal <APAdjust.APInvoice.docType>, And <APAdjust2.adjgRefNbr, Equal <APAdjust.APInvoice.refNbr>, And <APAdjust2.released, Equal <False>, And <APAdjust2.voided, Equal <False> > > > >, LeftJoin <APPayment, On <APPayment.docType, Equal <APAdjust.APInvoice.docType>, And <APPayment.refNbr, Equal <APAdjust.APInvoice.refNbr>, And <Where <APPayment.docType, Equal <APDocType.prepayment>, Or <APPayment.docType, Equal <APDocType.debitAdj> > > > > > > > >, Where <APAdjust.APInvoice.vendorID, Equal <Optional <APPayment.vendorID> >, And <APAdjust.APInvoice.docType, Equal <Optional <APAdjust.adjdDocType> >, And2 <Where <APAdjust.APInvoice.released, Equal <True>, Or <APRegister.prebooked, Equal <True> > >, And <APAdjust.APInvoice.openDoc, Equal <True>, And2 <Where <APAdjust.adjgRefNbr, IsNull, Or <APAdjust.adjgRefNbr, Equal <Current <APPayment.refNbr> > > >, And <APAdjust2.adjdRefNbr, IsNull, And2 <Where <APPayment.refNbr, IsNull, And <Current <APPayment.docType>, NotEqual <APDocType.refund>, Or <APPayment.refNbr, IsNotNull, And <Current <APPayment.docType>, Equal <APDocType.refund>, Or <APPayment.docType, Equal <APDocType.debitAdj>, And <Current <APPayment.docType>, Equal <APDocType.check>, Or <APPayment.docType, Equal <APDocType.debitAdj>, And <Current <APPayment.docType>, Equal <APDocType.voidCheck> > > > > > > > >, And2 <Where <APAdjust.APInvoice.docDate, LessEqual <Current <APPayment.adjDate> >, And <APAdjust.APInvoice.tranPeriodID, LessEqual <Current <APPayment.adjTranPeriodID> >, Or <Current <APPayment.adjFinPeriodID>, IsNull, Or <Current <APPayment.docType>, Equal <APDocType.check>, And <Current <APSetup.earlyChecks>, Equal <True>, Or <Current <APPayment.docType>, Equal <APDocType.voidCheck>, And <Current <APSetup.earlyChecks>, Equal <True>, Or <Current <APPayment.docType>, Equal <APDocType.prepayment>, And <Current <APSetup.earlyChecks>, Equal <True> > > > > > > > > >, And2 <Where <Current <APSetup.migrationMode>, NotEqual <True>, Or <APAdjust.APInvoice.isMigratedRecord, Equal <Current <APRegister.isMigratedRecord> > > >, And <Where <APAdjust.APInvoice.pendingPPD, NotEqual <True>, Or <Current <APRegister.pendingPPD>, Equal <True> > > > > > > > > > > > > >), Fields) { Filterable = true; ValidateValue = SiteMapExtension.IsChecksAndPaymentsScreenId(); }
public virtual void APPayment_RowPersisting(PXCache cache, PXRowPersistingEventArgs args) { if (args.Operation != PXDBOperation.Delete && SiteMapExtension.IsChecksAndPaymentsScreenId()) { switch (Base.Document.Current?.DocType) { case APDocType.Check: ValidateCheck(); break; case APDocType.DebitAdj: ValidateDebitAdjustment(); break; case APDocType.Prepayment: ValidatePrepayment(); break; } } }
public static bool IsActive() { return(PXAccess.FeatureInstalled <FeaturesSet.construction>() && !SiteMapExtension.IsTaxBillsAndAdjustmentsScreenId()); }
public static bool IsActive() { return(PXAccess.FeatureInstalled <FeaturesSet.construction>() && !SiteMapExtension.IsInvoicesScreenId()); }