Class PaymentWorker


  • public final class PaymentWorker
    extends java.lang.Object
    Worker methods for Payments
    • Field Detail

      • module

        public static final java.lang.String module
    • Method Detail

      • getPartyPaymentMethodValueMaps

        public static java.util.List<java.util.Map<java.lang.String,​GenericValue>> getPartyPaymentMethodValueMaps​(Delegator delegator,
                                                                                                                        java.lang.String partyId)
      • getPartyPaymentMethodValueMaps

        public static java.util.List<java.util.Map<java.lang.String,​GenericValue>> getPartyPaymentMethodValueMaps​(Delegator delegator,
                                                                                                                        java.lang.String partyId,
                                                                                                                        java.lang.Boolean showOld)
      • getPaymentMethodAndRelated

        public static java.util.Map<java.lang.String,​java.lang.Object> getPaymentMethodAndRelated​(ServletRequest request,
                                                                                                        java.lang.String partyId)
      • getPaymentAddress

        public static GenericValue getPaymentAddress​(Delegator delegator,
                                                     java.lang.String partyId)
      • getPaymentsTotal

        public static java.math.BigDecimal getPaymentsTotal​(java.util.List<GenericValue> payments)
        Returns the total from a list of Payment entities
        Parameters:
        payments - List of Payment GenericValue items
        Returns:
        total payments as BigDecimal
      • getPaymentApplied

        public static java.math.BigDecimal getPaymentApplied​(Delegator delegator,
                                                             java.lang.String paymentId)
        Method to return the total amount of an payment which is applied to a payment
        Parameters:
        delegator - the delegator
        paymentId - paymentId of the Payment
        Returns:
        the applied total as BigDecimal
      • getPaymentApplied

        public static java.math.BigDecimal getPaymentApplied​(Delegator delegator,
                                                             java.lang.String paymentId,
                                                             java.lang.Boolean actual)
      • getPaymentAppliedAmount

        public static java.math.BigDecimal getPaymentAppliedAmount​(Delegator delegator,
                                                                   java.lang.String paymentApplicationId)
        Method to return the amount applied converted to the currency of payment
        Parameters:
        paymentApplicationId - the payment application id
        Returns:
        appliedAmount the applied amount as BigDecimal
      • getPaymentApplied

        public static java.math.BigDecimal getPaymentApplied​(GenericValue payment)
        Method to return the total amount of an payment which is applied to a payment
        Parameters:
        payment - GenericValue object of the Payment
        Returns:
        the applied total as BigDecimal in the currency of the payment
      • getPaymentApplied

        public static java.math.BigDecimal getPaymentApplied​(GenericValue payment,
                                                             java.lang.Boolean actual)
        Method to return the total amount of a payment which is applied to a payment
        Parameters:
        payment - GenericValue object of the Payment
        actual - false for currency of the payment, true for the actual currency
        Returns:
        the applied total as BigDecimal in the currency of the payment
      • getPaymentNotApplied

        public static java.math.BigDecimal getPaymentNotApplied​(GenericValue payment)
      • getPaymentNotApplied

        public static java.math.BigDecimal getPaymentNotApplied​(GenericValue payment,
                                                                java.lang.Boolean actual)
      • getPaymentNotApplied

        public static java.math.BigDecimal getPaymentNotApplied​(Delegator delegator,
                                                                java.lang.String paymentId)
      • getPaymentNotApplied

        public static java.math.BigDecimal getPaymentNotApplied​(Delegator delegator,
                                                                java.lang.String paymentId,
                                                                java.lang.Boolean actual)