Ejemplo n.º 1
0
        public static ViewPaymentPaymentItems[] CreateViewPaymentItems(this IEnumerable <PaymentItem> input)
        {
            string numberFormat = ConfigurationManager.Format.NUMBER_FORMAT;

            var Items = new ViewPaymentPaymentItems[0];

            if (input.Count() > 0)
            {
                Items = new ViewPaymentPaymentItems[input.Count()];
                var item = input.ToArray();
                for (int i = 0; i < item.Count(); i++)
                {
                    Items[i] = new ViewPaymentPaymentItems
                    {
                        No                    = (i + 1).ToString(numberFormat),
                        Name                  = item[i].ItemDescription,
                        Quantity              = item[i].Qty.ToString(numberFormat),
                        UnitPrice             = item[i].UnitAmount.ToString(ConfigurationManager.Format.Decimal_Format),
                        SubTotal              = item[i].SubTotal().ToString(ConfigurationManager.Format.Decimal_Format),
                        WithholdingTaxPercent = item[i].WithholdingTexPercent.ToString("0"),
                        WithholdingTaxAmount  = item[i].WithHoldingTaxAmount().ToString(ConfigurationManager.Format.Decimal_Format),
                        VatPercent            = item[i].VatPercent.ToString("0"),
                        VatAmount             = item[i].VATAmount().ToString(ConfigurationManager.Format.Decimal_Format),
                        NetAmount             = item[i].NetTotal().ToString(ConfigurationManager.Format.Decimal_Format),
                    };
                }
            }
            return(Items);
        }
Ejemplo n.º 2
0
        public static ViewPaymentPaymentItems[] CreateViewPaymentItems(this IEnumerable<PaymentItem> input)
        {
            string numberFormat = ConfigurationManager.Format.NUMBER_FORMAT;

            var Items = new ViewPaymentPaymentItems[0];
            if (input.Count() > 0)
            {
                Items = new ViewPaymentPaymentItems[input.Count()];
                var item = input.ToArray();
                for (int i = 0; i < item.Count(); i++)
                {
                    Items[i] = new ViewPaymentPaymentItems
                    {
                        No = (i + 1).ToString(numberFormat),
                        Name = item[i].ItemDescription,
                        Quantity = item[i].Qty.ToString(numberFormat),
                        UnitPrice = item[i].UnitAmount.ToString(ConfigurationManager.Format.Decimal_Format),
                        SubTotal = item[i].SubTotal().ToString(ConfigurationManager.Format.Decimal_Format),
                        WithholdingTaxPercent = item[i].WithholdingTexPercent.ToString("0"),
                        WithholdingTaxAmount = item[i].WithHoldingTaxAmount().ToString(ConfigurationManager.Format.Decimal_Format),
                        VatPercent = item[i].VatPercent.ToString("0"),
                        VatAmount = item[i].VATAmount().ToString(ConfigurationManager.Format.Decimal_Format),
                        NetAmount = item[i].NetTotal().ToString(ConfigurationManager.Format.Decimal_Format),
                    };
                }
            }
            return Items;
        }
Ejemplo n.º 3
0
 public ViewPayment()
 {
     Items = new ViewPaymentPaymentItems[0];
     InstallmentItems = new ViewPaymentInstallmentItems[0];
 }
Ejemplo n.º 4
0
 public ViewPayment()
 {
     Items            = new ViewPaymentPaymentItems[0];
     InstallmentItems = new ViewPaymentInstallmentItems[0];
 }