Added Basecode to Product

Added Voucher Type During Printing
Added Discount Report
Fixed Void bill table not getting cleared error
Added PAX to table
Removed Itital Setup button in MainForm as it was not doing anything
This commit is contained in:
unknown
2011-12-05 15:11:02 +05:30
parent 719dbd49d2
commit 964d0a78bf
54 changed files with 2285 additions and 1028 deletions

View File

@ -3,18 +3,15 @@ using System.Collections.Generic;
using System.Windows.Forms;
using Tanshu.Accounts.Repository;
using Tanshu.Accounts.Contracts;
using Tanshu.Accounts.Helpers;
namespace Tanshu.Accounts.PointOfSale
{
public partial class frmSaleAnalysisForm : Form
{
IList<SalesAnalysis> list;
//private static readonly Tanshu.Logging.SqlLogger log = new Tanshu.Logging.SqlLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
IList<SalesAnalysis> _list;
public frmSaleAnalysisForm()
{
InitializeComponent();
//log.Warn(string.Format("Sales Analysis by: {0}", Session.User.Name));
}
private void dtpStart_ValueChanged(object sender, EventArgs e)
@ -24,9 +21,11 @@ namespace Tanshu.Accounts.PointOfSale
private void ShowStatement()
{
list = new SalesAnalysisBI().GetSale(dtpStart.Value, dtpFinish.Value);
if (DateTime.Today.Subtract(dtpStart.Value.Date).Days > 5 && !Session.IsAllowed(RoleConstants.ACCOUNTS_AUDIT))
return;
_list = new SalesAnalysisBI().GetSale(dtpStart.Value, dtpFinish.Value);
dgvSale.AutoGenerateColumns = true;
dgvSale.DataSource = list;
dgvSale.DataSource = _list;
dgvSale.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
dgvSale.Columns[1].DefaultCellStyle.Format = "#,##0.00;(#,##0.00);0";
dgvSale.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
@ -46,11 +45,11 @@ namespace Tanshu.Accounts.PointOfSale
private void btnPrint_Click(object sender, EventArgs e)
{
if (list != null)
if (_list != null)
{
var startDate = dtpStart.Value.Date.AddHours(6);
var finishDate = dtpFinish.Value.Date.AddDays(1).AddHours(5);
Accounts.Print.Thermal.PrintSale(Session.User.Name, list, startDate, finishDate);
Accounts.Print.Thermal.PrintSale(Session.User.Name, _list, startDate, finishDate);
}
}
}