You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
3.9 KiB
138 lines
3.9 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using BiskLog_Point_Of_Sale.Properties;
|
|
using Point_Of_Sale_Managment;
|
|
|
|
namespace BiskLog_Point_Of_Sale
|
|
{
|
|
public partial class SalesTax : Form
|
|
{
|
|
SystemSettings systemSettings;
|
|
public SalesTax(SystemSettings settings)
|
|
{
|
|
InitializeComponent();
|
|
systemSettings = settings;
|
|
}
|
|
|
|
private void Button1_Click(object sender, EventArgs e)
|
|
{
|
|
systemSettings.MoveToReceipt();
|
|
}
|
|
|
|
private void Button2_Click(object sender, EventArgs e)
|
|
{
|
|
if (automatically.Checked)
|
|
{
|
|
Settings.Default.AutomaticallyTax = true;
|
|
}
|
|
else
|
|
{
|
|
Settings.Default.AutomaticallyTax = false;
|
|
}
|
|
if (radioButton1.Checked)
|
|
{
|
|
Settings.Default.CollectTax = true;
|
|
}
|
|
else
|
|
{
|
|
Settings.Default.CollectTax = false;
|
|
}
|
|
Settings.Default.TaxRate = double.Parse(taxRateTXT.Text);
|
|
Settings.Default.TaxAgency = agencyTXT.Text;
|
|
Settings.Default.Save();
|
|
systemSettings.MoveToGeneral();
|
|
}
|
|
|
|
private void Button3_Click(object sender, EventArgs e)
|
|
{
|
|
if (automatically.Checked)
|
|
{
|
|
Settings.Default.AutomaticallyTax = true;
|
|
}
|
|
else
|
|
{
|
|
Settings.Default.AutomaticallyTax = false;
|
|
}
|
|
if (radioButton1.Checked)
|
|
{
|
|
Settings.Default.CollectTax = true;
|
|
}
|
|
else
|
|
{
|
|
Settings.Default.CollectTax = false;
|
|
}
|
|
Settings.Default.TaxRate = double.Parse(taxRateTXT.Text);
|
|
Settings.Default.TaxAgency = agencyTXT.Text;
|
|
Settings.Default.Save();
|
|
systemSettings.Close();
|
|
}
|
|
|
|
private void SalesTax_Load(object sender, EventArgs e)
|
|
{
|
|
tinTxt.Text = Settings.Default.tinNumber;
|
|
if (Settings.Default.CollectTax)
|
|
{
|
|
radioButton1.Checked = true;
|
|
}
|
|
agencyTXT.Text = Settings.Default.TaxAgency;
|
|
taxRateTXT.Text = Settings.Default.TaxRate.ToString();
|
|
if (Settings.Default.AutomaticallyTax)
|
|
{
|
|
automatically.Checked = true;
|
|
}
|
|
}
|
|
|
|
private void RadioButton1_CheckedChanged(object sender, EventArgs e)
|
|
{
|
|
if (radioButton1.Checked)
|
|
{
|
|
taxRateTXT.Enabled = true;
|
|
agencyTXT.Enabled = true;
|
|
automatically.Enabled = true;
|
|
}
|
|
else
|
|
{
|
|
taxRateTXT.Enabled = false;
|
|
agencyTXT.Enabled = false;
|
|
automatically.Enabled = false;
|
|
}
|
|
}
|
|
|
|
private void RadioButton2_CheckedChanged(object sender, EventArgs e)
|
|
{
|
|
if (radioButton2.Checked)
|
|
{
|
|
taxRateTXT.Enabled = false;
|
|
agencyTXT.Enabled = false;
|
|
automatically.Enabled = false;
|
|
}
|
|
else
|
|
{
|
|
taxRateTXT.Enabled = true;
|
|
agencyTXT.Enabled = true;
|
|
automatically.Enabled = true;
|
|
}
|
|
}
|
|
|
|
private void TaxRateTXT_KeyPress(object sender, KeyPressEventArgs e)
|
|
{
|
|
if (e.KeyChar == 46)
|
|
{
|
|
}
|
|
else if (e.KeyChar == 8)
|
|
{
|
|
}
|
|
else if ((e.KeyChar < 48) || (e.KeyChar > 57))
|
|
{
|
|
e.Handled = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|