Пример #1
0
        /// <summary>
        ///   Converts current object to a PSV row
        /// </summary>
        public string ToPsvRow()
        {
            string[] data =
            {
                OrderId.ToString(),
                ProgramName,
                OrderDate.ToString(Constants.DateTimeIsoFormat),
                LastName,
                FirstName,
                SpouseName,
                string.Join(",",                                  Children),
                Address,
                Suburb,
                State,
                PostCode.ToString(),
                TelNo,
                MobileNo,
                SpouseMobileNo,
                Email1,
                Email2,
                PaymentDate.ToString(Constants.DateTimeIsoFormat),
                OrderStatus
            };

            return(string.Join("|", data));
        }
Пример #2
0
 public JsonResult SetInvoicesPaymentDate(string reason, string paymentDate, string invoices, string associates)
 {
     paymentDate = PaymentDate.PaymentDateRules(paymentDate);
     financeService.SetInvoicesPaymentDate(reason, paymentDate, invoices.Split(','), associates.Split(','));
     this.financeService.SendInvoicesChangeEmail(reason, associates.Split(','), invoices.Split(','), null, paymentDate);
     return(Json("payment date set"));
 }
        public override int GetHashCode()
        {
            int hash = 1;

            if (groupBookingIndicator_ != null)
            {
                hash ^= GroupBookingIndicator.GetHashCode();
            }
            if (paymentId_ != null)
            {
                hash ^= PaymentId.GetHashCode();
            }
            if (PaymentDate.Length != 0)
            {
                hash ^= PaymentDate.GetHashCode();
            }
            if (PaymentReference.Length != 0)
            {
                hash ^= PaymentReference.GetHashCode();
            }
            if (PaymentType.Length != 0)
            {
                hash ^= PaymentType.GetHashCode();
            }
            if (creditAmount_ != null)
            {
                hash ^= CreditAmount.GetHashCode();
            }
            return(hash);
        }
 public override int GetHashCode()
 {
     return(PaymentDate.GetHashCode() ^
            PaymentDeliveryDate.GetHashCode() ^
            PaymentType.GetHashCode() ^
            Currency.GetHashCode() ^
            BankCountry.GetHashCode());
 }
        public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (PaymentAmount?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Receipt?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (PaymentDate?.GetHashCode() ?? 0);
            return(hashCode);
        }
Пример #6
0
        private PaymentDate CalculateStartDate(DateTime startPaymentDate, DateTime filterBeginDate)
        {
            var proposed = new PaymentDate(startPaymentDate);

            while (proposed.Date < filterBeginDate)
            {
                proposed = CalculateNextPaymentDate(proposed);
            }

            this.diagLogger.LogInfo(
                l => l.Format("   Payment Start Date: {0} ({1})", proposed.Date, proposed.ScheduledDate));
            return(proposed);
        }
        public override int GetHashCode()
        {
            int hashCode = 137802613;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(CardNumber);

            hashCode = hashCode * -1521134295 + Amount.GetHashCode();
            hashCode = hashCode * -1521134295 + PaymentDate.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Currency);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(PaymentStatus);

            return(hashCode);
        }
Пример #8
0
 public override string ToString()
 {
     //return PaymentDate.ToString();
     return(string.Format(Template,
                          (int)RecordType,
                          EPaymentId,
                          CorporateID,
                          CorporateName,
                          DebitingAccountNumber,
                          PaymentDate.ToString("ddMMyyyy"),
                          FileBatchNo,
                          TotalDebitingAmount * 100,
                          BussinessRegNo,
                          MailingAddress1,
                          MailingAddress2,
                          ContactNo
                          ));
 }
        private void ScholarNo_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                con = new SqlConnection(cs);

                con.Open();
                cmd = con.CreateCommand();

                cmd.CommandText = "SELECT Student_Name,Course,Branch FROM student WHERE ScholarNo = '" + ScholarNo.Text + "'";
                rdr             = cmd.ExecuteReader();

                if (rdr.Read())
                {
                    StudentName.Text = rdr.GetString(0).Trim();


                    Course.Text = rdr.GetString(1).Trim();

                    Branch.Text = rdr.GetString(2).Trim();
                }


                if ((rdr != null))
                {
                    rdr.Close();
                }
                if (con.State == ConnectionState.Open)
                {
                    con.Close();
                }
                PaymentDate.Focus();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #10
0
        /// <summary>
        ///  Convert current object to PSV row
        /// </summary>
        /// <returns>PSV row</returns>
        public string ToPsvRow()
        {
            string[] data =
            {
                OrderId.ToString(),
                ProgramName,
                OrderDate.ToString(Constants.DateTimeIsoFormat),
                FirstName,
                LastName,
                TelNo,
                MobileNo,
                Email1,
                Email2,
                PaymentDate.ToString(Constants.DateTimeIsoFormat),
                Quantity.ToString(),
                TotalAmount.ToString("f02"),
                TicketType,
                PaymentMode,
                OrderStatus
            };

            return(string.Join("|", data));
        }
Пример #11
0
        private PaymentDate CalculateNextPaymentDate(PaymentDate paymentDate)
        {
            var proposedDate = new PaymentDate(paymentDate.ScheduledDate.AddDays(7 * this.multiplier));

            if (this.filter.BeginDate != null)
            {
                List <DateTime> holidays =
                    NewZealandPublicHolidays.CalculateHolidays(this.filter.BeginDate.Value,
                                                               this.filter.BeginDate.Value.AddYears(1)).ToList();
                while (holidays.Contains(proposedDate.Date))
                {
                    proposedDate.Date = proposedDate.Date.AddDays(1);
                    proposedDate.Date = proposedDate.Date.FindNextWeekday();
                }
            }

            if (proposedDate.Date != proposedDate.ScheduledDate)
            {
                this.diagLogger.LogInfo(
                    l => l.Format("    {0} is a holiday, moved to {1}", proposedDate.ScheduledDate, proposedDate.Date));
            }
            return(proposedDate);
        }
Пример #12
0
        public string ToPrintFormat()
        {
            var sb = new StringBuilder();

            sb.AppendLine("-----------------------------");
            sb.AppendLine("-----Your Payroll System-----");
            sb.AppendLine("-----------------------------");
            sb.AppendLine();
            sb.AppendFormat("Date: {0}", PaymentDate.ToShortDateString());
            sb.AppendLine();
            sb.AppendFormat("Base Pay: {0}", BasePay);
            sb.AppendLine();
            sb.AppendLine("-----Additions-----");
            foreach (var item in Additions)
            {
                sb.AppendLine($"{item.Label}---{item.Amount}");
            }
            sb.AppendLine("-----Deductions-----");
            foreach (var item in Deductions)
            {
                sb.AppendLine($"{item.Label}---{item.Amount}");
            }
            sb.AppendLine("-----Premiums-----");
            foreach (var item in Premiums)
            {
                sb.AppendLine($"{item.Label}---{item.Amount}");
            }
            sb.AppendLine("---Tax------------");
            sb.AppendLine($"Witholding Tax---{WitholdingTax}");
            sb.AppendLine();
            sb.AppendLine();
            sb.AppendLine($"Total: {NetTotal}");
            sb.AppendLine();
            sb.AppendLine();
            sb.AppendLine();
            return(sb.ToString());
        }
Пример #13
0
 public override string ToString()
 {
     return($"{Number};{PaymentDate.ToString("yyyy-MM-dd")};{decimal.Round(PaymentLeft, 2)};{decimal.Round(CreditCovered, 2)};{decimal.Round(Interest, 2)};{decimal.Round(MonthlyPayment)};{decimal.Round(AmountLeftAfterPayment, 2)}");
 }
Пример #14
0
 public override string ToString()
 {
     return(PaymentDate.ToString("dd/MM/yyyy") +
            "-" +
            InstallmentValue.ToString("F2", CultureInfo.InvariantCulture));
 }
Пример #15
0
        private void metroButton1_Click(object sender, EventArgs e)
        {
            //Create Word Application
            word.Application wordApp = new word.Application();
            wordApp.Visible = true;

            //Create the Document
            word.Document wordDoc = wordApp.Documents.Add();

            //Create the Heading Parahraph
            word.Paragraph wordPara = wordDoc.Paragraphs.Add();
            wordPara.Range.Text = "End of Shift Report";
            object styleName = "Intense Quote";

            wordPara.Range.set_Style(ref styleName);
            wordPara.Range.InsertParagraphAfter();

            //Create a New Paragraph
            word.Paragraph wordPara2 = wordDoc.Paragraphs.Add();
            wordPara2.Range.Text = "This Document Contains all the crucial information regarding the Total Sales made per Shift. This information includes the Total Sales Made in the Shift, Each Sale made, their payment type and amounts. The total Amount of Sales Made this shift is: " + lblTotalSalesMade.Text + " " + "The Total Revenue made today is: R" + lblRevenue.Text;
            object styleName2 = "Subtle Emphasis";

            wordPara2.Range.set_Style(ref styleName2);
            wordPara2.Range.InsertParagraphAfter();


            int    PaymentID;
            double PaumentAmount;
            string PaymentDate;
            double PaymentVAT;
            double AmountReceived;
            double Change;
            int    PaymentTypeID;
            string Description;
            string Type;

            SqlConnection sqlcon = new SqlConnection(Globals.ConnectionString);

            sqlcon.Open();
            string        cmd    = "SELECT PaymentID, PaymentAmount, PaymentDate, PaymentVAt, AmountReceived, Change, PaymentTypeID FROM Payment WHERE PaymentDate ='" + lblDate.Text + "'";
            SqlCommand    sqlcom = new SqlCommand(cmd, sqlcon);
            SqlDataReader dr     = sqlcom.ExecuteReader();

            if (dr.HasRows)
            {
                while (dr.Read())
                {
                    PaymentID      = Convert.ToInt32((dr["PaymentID"]));
                    PaumentAmount  = Convert.ToDouble((dr["PaymentAmount"]));
                    PaymentDate    = (dr["PaymentDate"].ToString());
                    PaymentVAT     = Convert.ToDouble((dr["PaymentVAt"]));
                    AmountReceived = Convert.ToDouble((dr["AmountReceived"]));
                    Change         = Convert.ToDouble((dr["Change"]));
                    PaymentTypeID  = Convert.ToInt32((dr["PaymentTypeID"]));

                    if (PaymentTypeID == 1)
                    {
                        Type = "Cash Sale";
                    }
                    else
                    {
                        Type = "Credit Card Sale";
                    }

                    Details = "Payment ID: " + PaymentID.ToString() + "\n" +
                              "Payment Amount: R" + PaumentAmount.ToString() + "\n" +
                              "Payment Date: " + PaymentDate.ToString() + "\n" +
                              "VAT: R" + PaymentVAT.ToString() + "\n" +
                              "Amount Received: R" + AmountReceived.ToString() + "\n" +
                              "Change: R" + Change.ToString() + "\n" +
                              "Payment Type: " + Type.ToString() + "\n";


                    word.Paragraph wordPara3  = wordDoc.Paragraphs.Add();
                    object         styleName3 = "List Paragraph";
                    wordPara3.Range.set_Style(ref styleName3);
                    wordPara3.Range.InsertParagraphAfter();
                    wordPara3.Range.Text = Details;
                }
            }

            dr.Close();
            sqlcon.Close();
        }
Пример #16
0
        private PaymentDate CalculateStartDate(DateTime startPaymentDate, DateTime filterBeginDate)
        {
            var proposed = new PaymentDate(startPaymentDate);
            while (proposed.Date < filterBeginDate)
            {
                proposed = CalculateNextPaymentDate(proposed);
            }

            this.diagLogger.LogInfo(
                l => l.Format("   Payment Start Date: {0} ({1})", proposed.Date, proposed.ScheduledDate));
            return proposed;
        }
Пример #17
0
        private PaymentDate CalculateNextPaymentDate(PaymentDate paymentDate)
        {
            var proposedDate = new PaymentDate(paymentDate.ScheduledDate.AddDays(7 * this.multiplier));
            if (this.filter.BeginDate != null)
            {
                List<DateTime> holidays =
                    NewZealandPublicHolidays.CalculateHolidays(this.filter.BeginDate.Value,
                        this.filter.BeginDate.Value.AddYears(1)).ToList();
                while (holidays.Contains(proposedDate.Date))
                {
                    proposedDate.Date = proposedDate.Date.AddDays(1);
                    proposedDate.Date = proposedDate.Date.FindNextWeekday();
                }
            }

            if (proposedDate.Date != proposedDate.ScheduledDate)
            {
                this.diagLogger.LogInfo(
                    l => l.Format("    {0} is a holiday, moved to {1}", proposedDate.ScheduledDate, proposedDate.Date));
            }
            return proposedDate;
        }
 public override string ToString()
 => $"{PaymentDate.ToLongDateString()} - {Value.ToString("c")} - {Status.DisplayName}";
Пример #19
0
        public void PayFund(float amount)
        {
            string response =
                $"Paid to Mr./Mrs./Miss. {RecepientName} Amount INR. {amount}/- [From A/C: {AccoutnNumber}, Bank: {BankName}] On date of {PaymentDate.ToString(CultureInfo.InvariantCulture)}";

            Console.WriteLine(response);
        }
Пример #20
0
 // generatory zapytań MySQL
 public string GenerateUpdateQuery()
 {
     return(String.Format("UPDATE faktura SET id_kontrahenta={0}, data_wystawienia='{1}', termin_platnosci='{2}', data_sprzedazy='{3}', forma_platnosci='{4}', zaplacona_kwota='{5}' WHERE numer='{6}'", CustomerID, InvoiceDate.ToString(), PaymentDate.ToString(), SellingDate.ToString(), Array.IndexOf(paymentMethods, PaymentMethod) + 1, AmountPaid, Number));
 }
Пример #21
0
 public override string ToString()
 {
     return($"H,{PaymentNumber.Trim()},{PaymentAmount.Trim()},{PayeeId.Trim()},{PaymentDate.Trim()},{FreeFormAddress1?.Trim().EscapeCSV()},{FreeFormAddress2?.Trim().EscapeCSV()},{FreeFormAddress3?.Trim().EscapeCSV()},{FreeFormAddress4?.Trim().EscapeCSV()},{FreeFormAddress5?.Trim().EscapeCSV()}");
 }
Пример #22
0
        protected override bool IsValid()
        {
            var isValid = true;

            if (string.IsNullOrEmpty(PaymentNo))
            {
                AddError(nameof(PaymentNo), ValidationErrorsMessages.PAYMENT_NO_MUST_SUPPLIED);
                isValid = false;
            }
            else
            {
                RemoveError(nameof(PaymentNo), ValidationErrorsMessages.PAYMENT_NO_MUST_SUPPLIED);
            }
            if (!PaymentDate.IsValidDate())
            {
                AddError(nameof(PaymentDate), ValidationErrorsMessages.INVALID_DATE);
                isValid = false;
            }
            else
            {
                RemoveError(nameof(PaymentDate), ValidationErrorsMessages.INVALID_DATE);
            }

            if (SelectedYear == null)
            {
                AddError(nameof(SelectedYear), ValidationErrorsMessages.YEAR_MUST_SUPPLIED);
                isValid = false;
            }
            else
            {
                RemoveError(nameof(SelectedYear), ValidationErrorsMessages.YEAR_MUST_SUPPLIED);
            }
            if (!AllPastPaymentsPosted(SelectedYear))
            {
                AddError(nameof(SelectedYear), ValidationErrorsMessages.PAST_PAYMENTS_MUST_POSTED);
                isValid = false;
            }
            else
            {
                RemoveError(nameof(SelectedYear), ValidationErrorsMessages.PAST_PAYMENTS_MUST_POSTED);
            }
            if (SelectedSequence == null)
            {
                AddError(nameof(SelectedSequence), ValidationErrorsMessages.SEQUENCE_MUST_SUPPLIED);
                isValid = false;
            }
            else
            {
                RemoveError(nameof(SelectedSequence), ValidationErrorsMessages.SEQUENCE_MUST_SUPPLIED);
            }
            if (SequenceAlreadyPaid(SelectedSequence))
            {
                AddError(nameof(SelectedSequence), ValidationErrorsMessages.SEQUENCE_MUST_NOT_ALREADY_PAID);
                isValid = false;
            }
            else
            {
                RemoveError(nameof(SelectedSequence), ValidationErrorsMessages.SEQUENCE_MUST_NOT_ALREADY_PAID);
            }
            if (PaymentAmount <= 0)
            {
                AddError(nameof(PaymentAmount), ValidationErrorsMessages.AMOUNT_MUST_SUPPLIED);
                isValid = false;
            }
            else
            {
                RemoveError(nameof(PaymentAmount), ValidationErrorsMessages.AMOUNT_MUST_SUPPLIED);
            }
            return(isValid);
        }