Beispiel #1
0
        }       //	invoiceNew

        /// <summary>
        /// Invoice Line
        /// </summary>
        /// <param name="request">request</param>
        private void InvoiceLine(MRequest request)
        {
            MRequestUpdate[] updates = request.GetUpdates(null);
            for (int i = 0; i < updates.Length; i++)
            {
                Decimal qty = updates[i].GetQtyInvoiced();
                if (Env.Signum(qty) == 0)
                {
                    continue;
                }
                MInvoiceLine il = new MInvoiceLine(_m_invoice);
                _m_linecount++;
                il.SetLine(_m_linecount * 10);
                //
                il.SetQty(qty);
                //	Product
                int M_Product_ID = updates[i].GetM_ProductSpent_ID();
                if (M_Product_ID == 0)
                {
                    M_Product_ID = _M_Product_ID;
                }
                il.SetM_Product_ID(M_Product_ID);
                //
                il.SetPrice();
                il.Save();
            }
        } //	invoiceLine