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:
46
Tanshu.Accounts.PointOfSale/Reports/DiscountReportForm.cs
Normal file
46
Tanshu.Accounts.PointOfSale/Reports/DiscountReportForm.cs
Normal file
@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Tanshu.Accounts.Repository;
|
||||
using Tanshu.Accounts.Contracts;
|
||||
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
public partial class DiscountReportForm : Form
|
||||
{
|
||||
IList<SalesAnalysis> _list;
|
||||
public DiscountReportForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void dtpStart_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ShowStatement();
|
||||
}
|
||||
|
||||
private void ShowStatement()
|
||||
{
|
||||
if (DateTime.Today.Subtract(dtpStart.Value.Date).Days > 5 && !Session.IsAllowed(RoleConstants.ACCOUNTS_AUDIT))
|
||||
return;
|
||||
_list = new SalesAnalysisBI().DiscountReport(dtpStart.Value, dtpFinish.Value);
|
||||
dgvSale.AutoGenerateColumns = true;
|
||||
dgvSale.DataSource = _list;
|
||||
dgvSale.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
dgvSale.Columns[1].DefaultCellStyle.Format = "#,##0.00;(#,##0.00);0";
|
||||
dgvSale.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
|
||||
}
|
||||
|
||||
private void dtpFinish_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ShowStatement();
|
||||
}
|
||||
|
||||
private void Sale_Analysis_Form_Load(object sender, EventArgs e)
|
||||
{
|
||||
dtpStart.Value = DateTime.Today;
|
||||
dtpFinish.Value = DateTime.Today;
|
||||
ShowStatement();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user