예제 #1
0
        //Bind Company Details
        private void BindData_Company()
        {
            Company company = handlerCompany.GetCompanyDetails();

            tbxBusinessName.Text  = company.Name;
            tbxAddress1.Text      = company.Address1;
            tbxAddress2.Text      = company.Address2;
            tbxSuburb.Text        = company.Suburb;
            tbxCity.Text          = company.City;
            tbxPostalCode.Text    = company.PostalCode;
            tbxPhone.Text         = company.Phone;
            tbxFax.Text           = company.Fax;
            tbxEmail.Text         = company.Email;
            numRefundPeriod.Value = Convert.ToInt32(company.RefundPeriod.ToString());
        }
예제 #2
0
        //Get Refund Period
        private int GetRefundPeriod()
        {
            int refund = 0;

            try
            {
                Company company = handlerCompany.GetCompanyDetails();
                refund = company.RefundPeriod;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error retrieving refund period!" + Environment.NewLine + Environment.NewLine +
                                ex.Message);
            }

            return(refund);
        }
예제 #3
0
        public PrintReceipt(List <OrderLine> orderItems, string date, string time, string orderNumber,
                            double total, double cash, double change, double discount, string customer)
        {
            handlerCompany = new Handler_Company();
            company        = handlerCompany.GetCompanyDetails();

            this.orderItems  = orderItems;
            this.date        = date.Substring(0, 10);
            this.time        = time.Substring(11);
            this.orderNumber = orderNumber;
            this.total       = total;
            this.cash        = cash;
            this.change      = change;
            this.discount    = discount;
            this.customer    = customer;

            VAT = VAT / 100;

            discountTotal = total - (total / 100 * discount);

            //===http://vatcalconline.com/ ===//
            totalVat = discountTotal - (((discountTotal / (1 + VAT)) - discountTotal) / -1);
        }