/// <summary> /// Load Invoice Line /// </summary> /// <param name="journal"></param> /// <returns>DocLine Array</returns> private DocLine[] LoadLines(MJournal journal) { List <DocLine> list = new List <DocLine>(); MJournalLine[] lines = journal.GetLines(false); for (int i = 0; i < lines.Length; i++) { MJournalLine line = lines[i]; DocLine docLine = new DocLine(line, this); // -- Source Amounts docLine.SetAmount(line.GetAmtSourceDr(), line.GetAmtSourceCr()); // -- Converted Amounts docLine.SetConvertedAmt(_C_AcctSchema_ID, line.GetAmtAcctDr(), line.GetAmtAcctCr()); // -- Account MAccount account = line.GetAccount(); docLine.SetAccount(account); // -- Quantity docLine.SetQty(line.GetQty(), false); // -- Date docLine.SetDateAcct(journal.GetDateAcct()); // -- Organization of Line was set to Org of Account list.Add(docLine); } // Return Array int size = list.Count; DocLine[] dls = new DocLine[size]; dls = list.ToArray(); return(dls); }