Changed Checkout to correctly reflect cash. Minor updates.
This commit is contained in:
@ -2,7 +2,6 @@
|
||||
using System.Windows.Forms;
|
||||
using Tanshu.Accounts.Repository;
|
||||
using Tanshu.Accounts.Print;
|
||||
using Tanshu.Accounts.Helpers;
|
||||
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
@ -10,14 +9,13 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
CheckoutBI _coProxy;
|
||||
bool _loading;
|
||||
//private static readonly Tanshu.Logging.SqlLogger log = new Tanshu.Logging.SqlLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
public CashierCheckoutForm()
|
||||
{
|
||||
_loading = true;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Cashier_Checkout_Form_Load(object sender, EventArgs e)
|
||||
private void CashierCheckoutFormLoad(object sender, EventArgs e)
|
||||
{
|
||||
dtpStart.Format = DateTimePickerFormat.Custom;
|
||||
dtpStart.CustomFormat = "dd-MMM-yyyy";
|
||||
@ -31,12 +29,15 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
|
||||
private void FillUsers()
|
||||
{
|
||||
var loading = _loading;
|
||||
_loading = true;
|
||||
cmbCashier.DisplayMember = "Name";
|
||||
cmbCashier.ValueMember = "UserID";
|
||||
cmbCashier.DataSource = UserBI.ListActive(dtpStart.Value.Date.AddHours(7), dtpFinish.Value.Date.AddDays(1).AddHours(7));
|
||||
_loading = loading;
|
||||
}
|
||||
|
||||
private void cmbCashier_SelectedIndexChanged(object sender, EventArgs e)
|
||||
private void CmbCashierSelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
EmployeeStatus();
|
||||
//log.Warn(string.Format("User Checkout: {0} by {1}", coProxy.Cashier, Session.User.Name));
|
||||
@ -47,34 +48,34 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
if (_loading || cmbCashier.SelectedValue == null)
|
||||
return;
|
||||
_coProxy = new CheckoutBI((int)cmbCashier.SelectedValue, dtpStart.Value, dtpFinish.Value);
|
||||
txtOpening.Text = string.Format("{0:#,##0.00}", _coProxy);
|
||||
txtOpening.Text = string.Format("{0:#,##0.00}", _coProxy.Opening);
|
||||
txtReceipts.Text = string.Format("{0:#,##0.00}", _coProxy.Receipts);
|
||||
txtAdvanceReceived.Text = string.Format("{0:#,##0.00}", _coProxy.AdvanceReceipts);
|
||||
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);
|
||||
txtAdvanceAdjusted.Text = string.Format("{0:#,##0.00}", _coProxy.AdvanceAdjusted);
|
||||
txtCashReceipts.Text = string.Format("{0:#,##0.00}", _coProxy.CashReceipts);
|
||||
txtPayments.Text = string.Format("{0:#,##0.00}", _coProxy.CashPayments);
|
||||
txtAdditionalVoids.Text = string.Format("{0:#,##0.00}", _coProxy.AdditionalVoids);
|
||||
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.NetSales);
|
||||
txtSales.Text = string.Format("{0:#,##0.00}", _coProxy.CashReceipts);
|
||||
txtClosingCash.Text = string.Format("{0:#,##0.00}", _coProxy.ClosingBalance);
|
||||
txtStatus.Text = _coProxy.Status;
|
||||
}
|
||||
|
||||
private void dtpStart_ValueChanged(object sender, EventArgs e)
|
||||
private void DtpStartValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
EmployeeStatus();
|
||||
FillUsers();
|
||||
}
|
||||
|
||||
private void dtpFinish_ValueChanged(object sender, EventArgs e)
|
||||
private void DtpFinishValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
EmployeeStatus();
|
||||
FillUsers();
|
||||
}
|
||||
|
||||
private void btnCalculate_Click(object sender, EventArgs e)
|
||||
private void BtnCalculateClick(object sender, EventArgs e)
|
||||
{
|
||||
decimal deposited = 0;
|
||||
if (!decimal.TryParse(txtDeposited.Text, out deposited))
|
||||
@ -84,7 +85,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
txtStatus.Text = _coProxy.Status;
|
||||
}
|
||||
|
||||
private void btnPrint_Click(object sender, EventArgs e)
|
||||
private void BtnPrintClick(object sender, EventArgs e)
|
||||
{
|
||||
Thermal.PrintClosing(_coProxy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user