private string MerchandiseType(CustomerProductDataVO purchaseObject)
        {
            var sMerchandiseType = string.Empty;
            int iGeneralPass     = 0;
            int iJewelryPass     = 0;

            foreach (Item item in purchaseObject.Items)
            {
                string sCategoryCodePrefix = item.CategoryCode.ToString().Substring(0, 1);
                iGeneralPass += sCategoryCodePrefix == "1" ? 0 : 1;
                iJewelryPass += sCategoryCodePrefix == "1" ? 1 : 0;
            }

            if (iGeneralPass > 0 && iJewelryPass > 0)
            {
                sMerchandiseType = "Both";
            }
            else if (iGeneralPass > 0)
            {
                sMerchandiseType = "General";
            }
            else
            {
                sMerchandiseType = "Jewelry";
            }

            return(sMerchandiseType);
        }
        private decimal GetPaidInAmount(CustomerProductDataVO productObject)
        {
            decimal dPaidAmount = 0;

            foreach (var receipt in productObject.Receipts)
            {
                if (receipt.Event == "Extend")
                {
                    dPaidAmount += Utilities.GetDecimalValue(receipt.Amount, 0);
                }
            }
            return(dPaidAmount);
        }
        /*__________________________________________________________________________________________*/
        void initRow(DataRow aRow, CustomerProductDataVO aProduct, int idx_j)
        {
            if (aProduct is SaleVO)
            {
                aRow[IH_History_TransactionNumberColumn.Name] = ((SaleVO)aProduct).RetailItems[idx_j].Icn;
                aRow[IH_History_ItemDescriptionColumn.Name]   = ((SaleVO)aProduct).RetailItems[idx_j].TicketDescription;

                aRow[IH_History_DocType.Name] = ((SaleVO)aProduct).RetailItems[idx_j].mDocType;
                if (aProduct.LoanStatus == ProductStatus.ACT)
                {
                    aRow[IH_History_ItemStatusColumn.Name] = (aProduct is LayawayVO) ? "On Layaway" : "SOLD";
                }
            }

            else
            {
                aRow[IH_History_TransactionNumberColumn.Name] = aProduct.Items[idx_j].Icn;
                aRow[IH_History_ItemDescriptionColumn.Name]   = aProduct.Items[idx_j].TicketDescription;

                aRow[IH_History_DocType.Name] = aProduct.Items[idx_j].mDocType;
                if (GlobalDataAccessor.Instance.DesktopSession.LoanStatus != null)
                {
                    var pairType =
                        GlobalDataAccessor.Instance.DesktopSession.LoanStatus.Find(
                            delegate(PairType <ProductStatus, string> p)
                    {
                        return(p.Left == aProduct.LoanStatus);
                    });

                    aRow[IH_History_ItemStatusColumn.Name] = (pairType != null) ? pairType.Right : aProduct.LoanStatus.ToString();
                }
            }


            aRow[IH_History_StatusDateColumn.Name] =
                Utilities.GetDateTimeValue(aProduct.StatusDate, DateTime.MinValue).ToShortDateString();


            aRow[IH_History_TktNo.Name] = Utilities.GetStringValue(aProduct.TicketNumber, "");
        }