コード例 #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="line"></param>
        /// <param name="doc"></param>
        public DocLine_Cash(MCashLine line, Doc_Cash doc)
            : base(line, doc)
        {
            _CashType         = line.GetCashType();
            _C_BankAccount_ID = line.GetC_BankAccount_ID();
            _C_CashBook_ID    = line.GetC_CashBook_ID();
            _C_Invoice_ID     = line.GetC_Invoice_ID();
            //
            if (_C_Invoice_ID != 0)
            {
                MInvoice invoice = MInvoice.Get(line.GetCtx(), _C_Invoice_ID);
                SetC_BPartner_ID(invoice.GetC_BPartner_ID());
            }

            //
            _Amount            = line.GetAmount();
            _DiscountAmt       = line.GetDiscountAmt();
            _WriteOffAmt       = line.GetWriteOffAmt();
            _C_CashLine_Ref_ID = line.GetC_CashLine_ID_1();
            SetAmount(_Amount);
        }