Feature: Added Machine Locations so that setting the location in the config file is not needed.

Feature: Settings database table added to store string based settings.
         It is right now used to store bill header and footer.
         Hard Coded header/footer removed from file.
Feature: Tax Analysis form created to easily show the tax calculation.
Feature: Management form uses background workers.  Dont' know if it is functional though.
Chore: Reorder Table form moved to masters from sales folder.
Refactor: ManagementBI and SalesAnalysisBI
This commit is contained in:
tanshu
2016-01-04 10:52:01 +05:30
parent 0456135497
commit caf9b3106c
37 changed files with 1893 additions and 507 deletions

View File

@ -40,8 +40,38 @@ namespace Tanshu.Accounts.PointOfSale
if (DateTime.Today.Subtract(dtpStart.Value.Date).Days > 5 &&
!Session.IsAllowed("Accounts Audit"))
return;
var start = dtpStart.Value.Date.AddHours(6);
var finish = dtpFinish.Value.Date.AddDays(1).AddHours(5);
_list = new List<SalesAnalysis>();
if (finish > start)
{
var bi = new SalesAnalysisBI();
var list = new List<SalesAnalysis>();
list.AddRange(bi.GetSale(start, finish));
list.Add(new SalesAnalysis() { GroupType = " -- ", Amount = 0 });
list.AddRange(bi.GetSettlements(start, finish));
list.Add(new SalesAnalysis() { GroupType = " -- ", Amount = 0 });
var sc = bi.GetServiceCharge(start, finish);
if (sc != null)
list.Add(sc);
foreach (var item in bi.GetServiceTax(start, finish))
{
if (item.TaxAmount != 0)
{
list.Add(new SalesAnalysis() { GroupType = item.Name, Amount = item.TaxAmount });
}
}
foreach (var item in bi.GetVat(start, finish))
{
if (item.TaxAmount != 0)
{
list.Add(new SalesAnalysis() { GroupType = item.Name, Amount = item.TaxAmount });
}
}
_list = list;
}
_list = new SalesAnalysisBI().GetSaleAnalysis(dtpStart.Value, dtpFinish.Value);
dgvSale.AutoGenerateColumns = true;
dgvSale.DataSource = _list;