public static ReportHeader CreateViewPayment(Payment input, TransactionModelContainer container)
        {
            return new ReportHeader
            {
                No = string.Format("GAL-{0}-{1}", DateTime.Now.ToString("yyyy-MM"), input.Id),
                date = DateTime.Now.ToString(ConfigurationManager.Format.Date_Format),
                PaymentId = input.Id.ToString("0000000000"),
                PaymentCode = input.PaymentCode,
                PaymentStatus = input.Status,

                CustomerIdmId = input.CustomerIdmPartyId.ToString("0000000000"),
                CustomerName = input.CustomerName,
                CustomerAddress = input.CustomerAddress,
                CustomerMobilePhoneNo = input.CustomerMobilePhoneNo,
                CustomerAccountNo = input.CustomerRefundAccountNo,
                CustomerAccountName = input.CustomerRefundAccountName,

                Ref1 = input.Ref1,
                Ref2 = input.Ref2,
                Ref3 = input.Ref3,
                Remark = input.Remark,

                GrandTotal_SubTotal = input.TotalUnitAmount().ToString(ConfigurationManager.Format.Decimal_Format),
                GrandTotal_WH_Amount = input.TotalWithholdingTax().ToString(ConfigurationManager.Format.Decimal_Format),
                GrandTotal_VAT_Amount = input.TotalVat().ToString(ConfigurationManager.Format.Decimal_Format),
                GrandTotal_Net_Total = input.GrandTotal().ToString(ConfigurationManager.Format.Decimal_Format),

                Summary_Total = input.TotalNoDiscount().ToString(ConfigurationManager.Format.Decimal_Format),
                Summary_Adjustment = input.TotalDiscount().ToString(ConfigurationManager.Format.Decimal_Format),

                RemainingAmount = input.RemainingAmount().ToString(ConfigurationManager.Format.Decimal_Format),
            };
        }
예제 #2
0
        public void RefreshWhenDomainModelChanged(Payment payment)
        {
            string NumberFormat = ConfigurationManager.Format.Decimal_Format;

            PaymentId = payment.Id.ToString("0000000000");
            PaymentCode = payment.PaymentCode;
            PaymentStatus = payment.Status;

            CustomerIdmId = payment.CustomerIdmPartyId.ToString("0000000000");
            CustomerName = payment.CustomerName;
            CustomerAddress = payment.CustomerAddress;
            CustomerMobilePhoneNo = payment.CustomerMobilePhoneNo;
            CustomerAccountNo = payment.CustomerRefundAccountNo;
            CustomerAccountName = payment.CustomerRefundAccountName;

            Ref1 = payment.Ref1;
            Ref2 = payment.Ref2;
            Ref3 = payment.Ref3;
            Remark = payment.Remark;

            GrandTotal_SubTotal = payment.TotalUnitAmount().ToString(NumberFormat);
            GrandTotal_WH_Amount = payment.TotalWithholdingTax().ToString(NumberFormat);
            GrandTotal_VAT_Amount = payment.TotalVat().ToString(NumberFormat);
            GrandTotal_Net_Total = payment.GrandTotal().ToString(NumberFormat);

            Summary_Total = payment.TotalNoDiscount().ToString(NumberFormat);
            Summary_Adjustment = payment.TotalDiscount().ToString(NumberFormat);

            Installment_Total = payment.InstallmentAmount().ToString(NumberFormat);
            RemainingAmount = payment.RemainingAmount().ToString(NumberFormat);

            // PaymentItems
            Items = payment.PaymentItems.CreateViewPaymentItems();
            // Installments
            InstallmentItems = payment.Installments.CreateInstallment();
        }