Exemplo n.º 1
0
        }       //	SetC_Invoice_ID

        /**
         *  Set Pay Amt - Callout
         *	@param oldPayAmt old value
         *	@param newPayAmt new value
         *	@param windowNo window
         *	@throws Exception
         */
        //@UICallout
        public void SetPayAmt(String oldPayAmt, String newPayAmt, int windowNo)
        {
            if (newPayAmt == null || newPayAmt.Length == 0)
            {
                return;
            }
            Decimal PayAmt = (Decimal)PO.ConvertToBigDecimal(newPayAmt);

            Decimal OpenAmt       = GetOpenAmt();
            Decimal DiscountAmt   = GetDiscountAmt();
            Decimal DifferenceAmt = Decimal.Subtract(Decimal.Subtract(OpenAmt, PayAmt), DiscountAmt);

            //	Get invoice info
            int C_Invoice_ID = GetC_Invoice_ID();

            if (C_Invoice_ID == 0)
            {
                PayAmt        = Env.ZERO;
                DifferenceAmt = Env.ZERO;
                DiscountAmt   = Env.ZERO;
                SetDiscountAmt(DiscountAmt);
            }
            log.Fine("OpenAmt=" + OpenAmt + " - PayAmt=" + PayAmt
                     + ", Discount=" + DiscountAmt + ", Difference=" + DifferenceAmt);

            SetPayAmt(PayAmt);
            SetDifferenceAmt(DifferenceAmt);
        }
Exemplo n.º 2
0
        /**
         *  Set WriteOff Amt - Callout
         *	@param oldWriteOffAmt old value
         *	@param newWriteOffAmt new value
         *	@param windowNo window
         *	@throws Exception
         */
        ////@UICallout
        public void SetWriteOffAmt(String oldWriteOffAmt, String newWriteOffAmt, int windowNo)
        {
            if (newWriteOffAmt == null || newWriteOffAmt.Length == 0)
            {
                return;
            }
            Decimal writeOffAmt = (Decimal)PO.ConvertToBigDecimal(newWriteOffAmt);

            SetWriteOffAmt(writeOffAmt);
            CheckAmt(windowNo, "WriteOffAmt");
        }
Exemplo n.º 3
0
        /**
         *  Set Over Under Amt - Callout
         *	@param oldOverUnderAmt old value
         *	@param newOverUnderAmt new value
         *	@param windowNo window
         *	@throws Exception
         */
        //@UICallout
        public void SetOverUnderAmt(String oldOverUnderAmt, String newOverUnderAmt, int windowNo)
        {
            if (newOverUnderAmt == null || newOverUnderAmt.Length == 0)
            {
                return;
            }
            Decimal overUnderAmt = (Decimal)PO.ConvertToBigDecimal(newOverUnderAmt);

            SetOverUnderAmt(overUnderAmt);
            CheckAmt(windowNo, "OverUnderAmt");
        }
Exemplo n.º 4
0
        /**
         *  Set Discount - Callout
         *	@param oldDiscountAmt old value
         *	@param newDiscountAmt new value
         *	@param windowNo window
         *	@throws Exception
         */
        //@UICallout
        public void SetDiscountAmt(String oldDiscountAmt, String newDiscountAmt, int windowNo)
        {
            if (newDiscountAmt == null || newDiscountAmt.Length == 0)
            {
                return;
            }
            Decimal discountAmt = (Decimal)PO.ConvertToBigDecimal(newDiscountAmt);

            SetDiscountAmt(discountAmt);
            CheckAmt(windowNo, "DiscountAmt");
        }
Exemplo n.º 5
0
        /**
         *  Set Allocation Amt - Callout
         *	@param oldAmount old value
         *	@param newAmount new value
         *	@param windowNo window
         *	@throws Exception
         */
        //@UICallout
        public void SetAmount(String oldAmount, String newAmount, int windowNo)
        {
            if (newAmount == null || newAmount.Length == 0)
            {
                return;
            }
            Decimal amount = (Decimal)PO.ConvertToBigDecimal(newAmount);

            SetAmount(amount);
            CheckAmt(windowNo, "PayAmt");
        }