2010-03-02 17:56:21 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using System.Data.SqlClient;
|
|
|
|
|
using System.Configuration;
|
|
|
|
|
using Tanshu.Accounts.Helpers;
|
|
|
|
|
using Tanshu.Accounts.Contracts;
|
|
|
|
|
using Tanshu.Accounts.BI;
|
|
|
|
|
|
|
|
|
|
namespace Tanshu.Accounts.PointOfSale
|
|
|
|
|
{
|
|
|
|
|
public partial class SaleTaxReportForm : Form
|
|
|
|
|
{
|
|
|
|
|
List<SalesAnalysisBO> det;
|
|
|
|
|
public SaleTaxReportForm()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void dtpStart_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
ShowStatement();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ShowStatement()
|
|
|
|
|
{
|
|
|
|
|
DateTime startDate = Convert.ToDateTime(String.Format("{0:dd-MMM-yyyy} 00:00:00", dtpStart.Value));
|
|
|
|
|
DateTime finishDate = Convert.ToDateTime(String.Format("{0:dd-MMM-yyyy} 23:59:59", dtpFinish.Value));
|
|
|
|
|
|
2014-08-08 12:05:38 +00:00
|
|
|
|
decimal voids = 0, pending = 0, net = 0, vat = 0, serviceTax = 0, nc = 0;
|
|
|
|
|
det = new SalesAnalysisBI().GetSalesTaxReturn(startDate, finishDate, ref voids, ref pending, ref net, ref vat, ref serviceTax, ref nc);
|
2010-03-02 17:56:21 +00:00
|
|
|
|
|
|
|
|
|
//dc.CommandTimeout = 50000;
|
|
|
|
|
dgvSale.AutoGenerateColumns = true;
|
|
|
|
|
dgvSale.DataSource = det;
|
|
|
|
|
dgvSale.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
|
|
|
|
|
dgvSale.Columns[0].Visible = false;
|
|
|
|
|
dgvSale.Columns[1].DefaultCellStyle.Format = "%";
|
|
|
|
|
dgvSale.Columns[2].DefaultCellStyle.Format = "#,##0.00;(#,##0.00);0";
|
|
|
|
|
dgvSale.Columns[3].DefaultCellStyle.Format = "#,##0.00;(#,##0.00);0";
|
|
|
|
|
dgvSale.Columns[4].DefaultCellStyle.Format = "#,##0.00;(#,##0.00);0";
|
|
|
|
|
|
|
|
|
|
// txtFreeSale.Text = String.Format("{0:#,##0.00;(#,##0.00);0}", freeSale);
|
|
|
|
|
txtVoid.Text = String.Format("{0:#,##0.00;(#,##0.00);0}", voids);
|
|
|
|
|
txtPending.Text = String.Format("{0:#,##0.00;(#,##0.00);0}", pending);
|
|
|
|
|
txtNet.Text = String.Format("{0:#,##0.00;(#,##0.00);0}", net);
|
2014-08-08 12:05:38 +00:00
|
|
|
|
txtVat.Text = String.Format("{0:#,##0.00;(#,##0.00);0}", vat);
|
|
|
|
|
txtServiceTax.Text = String.Format("{0:#,##0.00;(#,##0.00);0}", net + serviceTax);
|
2010-03-02 17:56:21 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void dtpFinish_ValueChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
ShowStatement();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Sale_Analysis_Form_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
dtpStart.Value = DateTime.Now;
|
|
|
|
|
dtpFinish.Value = DateTime.Now;
|
|
|
|
|
ShowStatement();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnPrint_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (det != null)
|
|
|
|
|
{
|
|
|
|
|
DateTime startDate = Convert.ToDateTime(String.Format("{0:dd-MMM-yyyy} 00:00:00", dtpStart.Value));
|
|
|
|
|
DateTime finishDate = Convert.ToDateTime(String.Format("{0:dd-MMM-yyyy} 23:59:59", dtpFinish.Value));
|
|
|
|
|
Tanshu.Accounts.Print.Thermal.PrintSale(det, startDate, finishDate);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|