da929ad036
Breaking Change: Renamed Discontinued to IsActive and added NA field to products. Cleanup: Removed not used attributes Change: RoleConstants changed to simple string Feature: Table Create/Edit/Reorder and Modifier Create/Edit Form Feature: Bills now show the Tax name from the database and not a hack
47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
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("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();
|
|
}
|
|
}
|
|
}
|