Finally Deployed. Don't know the total amount of changes.
This commit is contained in:
@ -1,7 +1,10 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using Tanshu.Accounts.Repository;
|
||||
using Tanshu.Accounts.Print;
|
||||
using Tanshu.Accounts.Entities;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
@ -15,7 +18,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void CashierCheckoutFormLoad(object sender, EventArgs e)
|
||||
private void CashierCheckoutForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
dtpStart.Format = DateTimePickerFormat.Custom;
|
||||
dtpStart.CustomFormat = "dd-MMM-yyyy";
|
||||
@ -23,42 +26,38 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
dtpFinish.Format = DateTimePickerFormat.Custom;
|
||||
dtpFinish.CustomFormat = "dd-MMM-yyyy";
|
||||
dtpFinish.Value = DateTime.Now.Date;
|
||||
FillUsers();
|
||||
_loading = false;
|
||||
FillUsers();
|
||||
}
|
||||
|
||||
private void FillUsers()
|
||||
{
|
||||
var loading = _loading;
|
||||
_loading = true;
|
||||
cmbCashier.DisplayMember = "Name";
|
||||
cmbCashier.ValueMember = "UserID";
|
||||
using (var bi = new UserBI())
|
||||
cmbCashier.DataSource = bi.ListActive(dtpStart.Value.Date.AddHours(7), dtpFinish.Value.Date.AddDays(1).AddHours(7));
|
||||
_loading = loading;
|
||||
_loading = false;
|
||||
}
|
||||
|
||||
private void CmbCashierSelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
EmployeeStatus();
|
||||
//log.Warn(string.Format("User Checkout: {0} by {1}", coProxy.Cashier, Session.User.Name));
|
||||
ShowStatement();
|
||||
}
|
||||
|
||||
private void EmployeeStatus()
|
||||
private void ShowStatement()
|
||||
{
|
||||
if (_loading || cmbCashier.SelectedValue == null)
|
||||
return;
|
||||
_coProxy = new CheckoutBI((Guid)cmbCashier.SelectedValue, dtpStart.Value, dtpFinish.Value);
|
||||
txtCCReceipts.Text = string.Format("{0:#,##0.00}", _coProxy.CcReceipts);
|
||||
txtNC.Text = string.Format("{0:#,##0.00}", _coProxy.NcReceipts);
|
||||
txtBillToCompany.Text = string.Format("{0:#,##0.00}", _coProxy.BtcReceipts);
|
||||
txtCashReceipts.Text = string.Format("{0:#,##0.00}", _coProxy.CashReceipts);
|
||||
txtVoidsInSystem.Text = string.Format("{0:#,##0.00}", _coProxy.VoidsInSystem);
|
||||
txtDiscounts.Text = string.Format("{0:#,##0.00}", _coProxy.Discount);
|
||||
txtPending.Text = string.Format("{0:#,##0.00}", _coProxy.PendingBills);
|
||||
txtSales.Text = string.Format("{0:#,##0.00}", _coProxy.CashReceipts);
|
||||
txtClosingCash.Text = string.Format("{0:#,##0.00}", _coProxy.ClosingBalance);
|
||||
txtStatus.Text = _coProxy.Status;
|
||||
var list = _coProxy.amounts.ToList() ;
|
||||
dgvSale.DataSource = list;
|
||||
dgvSale.AutoGenerateColumns = true;
|
||||
dgvSale.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
dgvSale.Columns[0].HeaderText = "Item";
|
||||
dgvSale.Columns[1].HeaderText = "Amount";
|
||||
dgvSale.Columns[1].DefaultCellStyle.Format = "#,##0.00;(#,##0.00);0";
|
||||
dgvSale.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
|
||||
}
|
||||
|
||||
private void DtpStartValueChanged(object sender, EventArgs e)
|
||||
@ -71,16 +70,6 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
FillUsers();
|
||||
}
|
||||
|
||||
private void BtnCalculateClick(object sender, EventArgs e)
|
||||
{
|
||||
decimal deposited = 0;
|
||||
if (!decimal.TryParse(txtDeposited.Text, out deposited))
|
||||
deposited = 0;
|
||||
|
||||
_coProxy.Calculate();
|
||||
txtStatus.Text = _coProxy.Status;
|
||||
}
|
||||
|
||||
private void BtnPrintClick(object sender, EventArgs e)
|
||||
{
|
||||
Thermal.PrintClosing(_coProxy);
|
||||
|
||||
Reference in New Issue
Block a user