private void addAccountDocItems(ArrayList items)
        {
            int ind = 0;

            MProject firstProj = null;

            foreach (MAuxilaryDocItem ai in items)
            {
                MAccountDocItem di = new MAccountDocItem(new CTable(""));
                di.ExtFlag = "A";

                di.SelectType         = ai.SelectType;
                di.ItemCode           = ai.ItemCode;
                di.ItemNameThai       = ai.ItemNameThai;
                di.ItemId             = ai.ItemId;
                di.FreeText           = ai.FreeText;
                di.ServiceCode        = ai.ServiceCode;
                di.ServiceName        = ai.ServiceName;
                di.ServiceID          = ai.ServiceID;
                di.Quantity           = ai.Quantity;
                di.Discount           = ai.Discount;
                di.UnitPrice          = ai.UnitPrice;
                di.TotalAfterDiscount = ai.TotalAfterDiscount;
                di.VatTaxFlag         = ai.VatTaxFlag;
                di.WHTaxFlag          = ai.WHTaxFlag;
                di.WHTaxPct           = ai.WHTaxPct;
                di.VatTaxPct          = ai.VatTaxPct;
                di.ItemNote           = ai.DocumentNo;
                di.ProjectID          = ai.ProjectID;
                di.ProjectCode        = ai.ProjectCode;
                di.ProjectName        = ai.ProjectName;
                di.ProjectGroupName   = ai.ProjectGroupName;
                di.RefPoNo            = ai.DocumentNo;
                di.WhGroupCriteria    = ai.WhGroup;
                di.PoItemID           = ai.AuxilaryDocItemID;
                di.PoID = ai.AuxilaryDocID;

                if (ind == 0)
                {
                    firstProj = (MProject)di.ProjectObj;
                }

                ind++;

                vw.AddAccountDocItem(di);
            }

            if (vw.ProjectID.Equals("") && (firstProj != null))
            {
                //If not yet been set
                vw.ProjectObj = firstProj;
            }

            String poString = vw.GetRefPoString();

            vw.RefPoNo = poString;
        }