Changed Checkout to correctly reflect cash. Minor updates.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<connectionStrings>
|
||||
<add name="FluentCon" connectionString="Server=frodo;Initial Catalog=Pets;User ID=sa;Password=123456" />
|
||||
<add name="FluentCon" connectionString="Server=Sovereign;Initial Catalog=Pets;User ID=sa;Password=123456" />
|
||||
</connectionStrings>
|
||||
<appSettings>
|
||||
<add key ="Location" value ="Office"/>
|
||||
@ -9,4 +9,13 @@
|
||||
<add key ="LogConnection" value ="connection"/>
|
||||
<add key ="LogLevel" value ="Warn"/>
|
||||
</appSettings>
|
||||
<system.diagnostics>
|
||||
<trace autoflush="true" indentsize="4">
|
||||
<listeners>
|
||||
<add name="myListener" type="System.Diagnostics.TextWriterTraceListener"
|
||||
initializeData="TraceOutput.log" />
|
||||
<remove name="Default" />
|
||||
</listeners>
|
||||
</trace>
|
||||
</system.diagnostics>
|
||||
</configuration>
|
||||
@ -288,7 +288,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
ClearBill();
|
||||
bill.Clear();
|
||||
_billInfo = null;
|
||||
_billInfo = VoucherBI.GetVoucher(voucherID);
|
||||
_billInfo = VoucherBI.Get(voucherID);
|
||||
|
||||
_customer = _billInfo.Customer;
|
||||
_saleForm.ShowInfo(_billInfo.BillID, _billInfo.KotID, _billInfo.CreationDate, _billInfo.Date.Value,
|
||||
@ -352,7 +352,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
if (!string.IsNullOrEmpty(tableName))
|
||||
{
|
||||
var table = new FoodTableBI().GetByName(tableName);
|
||||
var table = new FoodTableBI().Get(tableName);
|
||||
if (table != null && table.VoucherID != 0)
|
||||
{
|
||||
LoadBill(table.VoucherID);
|
||||
@ -366,7 +366,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
var tableID = result.Text.Trim();
|
||||
if ((tableID != "C") && (tableID != "") && (!tableID.Contains(".")))
|
||||
{
|
||||
var table = new FoodTableBI().GetByName(tableName);
|
||||
var table = new FoodTableBI().Get(tableName);
|
||||
if (table != null && table.VoucherID != 0)
|
||||
{
|
||||
LoadBill(table.VoucherID);
|
||||
|
||||
@ -18,22 +18,15 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
|
||||
private User form_userEvent(object sender, UserEventArgs e)
|
||||
{
|
||||
User user = e.User;
|
||||
var user = e.User;
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
using (var form = new UserForm(null))
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
using (var form = new UserForm(user.UserID))
|
||||
{
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
return new User();
|
||||
}
|
||||
@ -66,10 +59,8 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
|
||||
private void btnCustomer_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (var Customer = new CustomersForm(null, ""))
|
||||
{
|
||||
Customer.ShowDialog();
|
||||
}
|
||||
using (var frm = new CustomersForm(null, ""))
|
||||
frm.ShowDialog();
|
||||
}
|
||||
|
||||
private void btnInitial_Click(object sender, EventArgs e)
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.txtPayments = new System.Windows.Forms.TextBox();
|
||||
this.txtAdvanceAdjusted = new System.Windows.Forms.TextBox();
|
||||
this.txtCashReceipts = new System.Windows.Forms.TextBox();
|
||||
this.txtCCReceipts = new System.Windows.Forms.TextBox();
|
||||
this.txtAdditionalVoids = new System.Windows.Forms.TextBox();
|
||||
this.txtVoidsInSystem = new System.Windows.Forms.TextBox();
|
||||
@ -95,7 +95,7 @@
|
||||
this.dtpFinish.Name = "dtpFinish";
|
||||
this.dtpFinish.Size = new System.Drawing.Size(110, 20);
|
||||
this.dtpFinish.TabIndex = 42;
|
||||
this.dtpFinish.ValueChanged += new System.EventHandler(this.dtpFinish_ValueChanged);
|
||||
this.dtpFinish.ValueChanged += new System.EventHandler(this.DtpFinishValueChanged);
|
||||
//
|
||||
// dtpStart
|
||||
//
|
||||
@ -103,7 +103,7 @@
|
||||
this.dtpStart.Name = "dtpStart";
|
||||
this.dtpStart.Size = new System.Drawing.Size(110, 20);
|
||||
this.dtpStart.TabIndex = 41;
|
||||
this.dtpStart.ValueChanged += new System.EventHandler(this.dtpStart_ValueChanged);
|
||||
this.dtpStart.ValueChanged += new System.EventHandler(this.DtpStartValueChanged);
|
||||
//
|
||||
// label17
|
||||
//
|
||||
@ -167,7 +167,7 @@
|
||||
this.btnCalculate.TabIndex = 39;
|
||||
this.btnCalculate.Text = "&Calculate";
|
||||
this.btnCalculate.UseVisualStyleBackColor = true;
|
||||
this.btnCalculate.Click += new System.EventHandler(this.btnCalculate_Click);
|
||||
this.btnCalculate.Click += new System.EventHandler(this.BtnCalculateClick);
|
||||
//
|
||||
// btnPrint
|
||||
//
|
||||
@ -177,7 +177,7 @@
|
||||
this.btnPrint.TabIndex = 40;
|
||||
this.btnPrint.Text = "&Print";
|
||||
this.btnPrint.UseVisualStyleBackColor = true;
|
||||
this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
|
||||
this.btnPrint.Click += new System.EventHandler(this.BtnPrintClick);
|
||||
//
|
||||
// txtStatus
|
||||
//
|
||||
@ -221,7 +221,7 @@
|
||||
this.cmbCashier.Name = "cmbCashier";
|
||||
this.cmbCashier.Size = new System.Drawing.Size(200, 21);
|
||||
this.cmbCashier.TabIndex = 37;
|
||||
this.cmbCashier.SelectedIndexChanged += new System.EventHandler(this.cmbCashier_SelectedIndexChanged);
|
||||
this.cmbCashier.SelectedIndexChanged += new System.EventHandler(this.CmbCashierSelectedIndexChanged);
|
||||
//
|
||||
// label10
|
||||
//
|
||||
@ -273,9 +273,9 @@
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(12, 224);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(73, 13);
|
||||
this.label5.Size = new System.Drawing.Size(76, 13);
|
||||
this.label5.TabIndex = 63;
|
||||
this.label5.Text = "Adv. Adjusted";
|
||||
this.label5.Text = "Cash Receipts";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
@ -322,14 +322,14 @@
|
||||
this.txtPayments.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtPayments.TabIndex = 48;
|
||||
//
|
||||
// txtAdvanceAdjusted
|
||||
// txtCashReceipts
|
||||
//
|
||||
this.txtAdvanceAdjusted.Location = new System.Drawing.Point(99, 221);
|
||||
this.txtAdvanceAdjusted.Name = "txtAdvanceAdjusted";
|
||||
this.txtAdvanceAdjusted.ReadOnly = true;
|
||||
this.txtAdvanceAdjusted.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtAdvanceAdjusted.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtAdvanceAdjusted.TabIndex = 47;
|
||||
this.txtCashReceipts.Location = new System.Drawing.Point(99, 221);
|
||||
this.txtCashReceipts.Name = "txtCashReceipts";
|
||||
this.txtCashReceipts.ReadOnly = true;
|
||||
this.txtCashReceipts.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtCashReceipts.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtCashReceipts.TabIndex = 47;
|
||||
//
|
||||
// txtCCReceipts
|
||||
//
|
||||
@ -439,7 +439,7 @@
|
||||
this.txtNC.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtNC.TabIndex = 74;
|
||||
//
|
||||
// Cashier_Checkout_Form
|
||||
// CashierCheckoutForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
@ -476,7 +476,7 @@
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.txtPayments);
|
||||
this.Controls.Add(this.txtAdvanceAdjusted);
|
||||
this.Controls.Add(this.txtCashReceipts);
|
||||
this.Controls.Add(this.txtCCReceipts);
|
||||
this.Controls.Add(this.txtAdditionalVoids);
|
||||
this.Controls.Add(this.txtVoidsInSystem);
|
||||
@ -489,7 +489,7 @@
|
||||
this.Name = "CashierCheckoutForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Cashier Checkout Form";
|
||||
this.Load += new System.EventHandler(this.Cashier_Checkout_Form_Load);
|
||||
this.Load += new System.EventHandler(this.CashierCheckoutFormLoad);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -525,7 +525,7 @@
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox txtPayments;
|
||||
private System.Windows.Forms.TextBox txtAdvanceAdjusted;
|
||||
private System.Windows.Forms.TextBox txtCashReceipts;
|
||||
private System.Windows.Forms.TextBox txtCCReceipts;
|
||||
private System.Windows.Forms.TextBox txtAdditionalVoids;
|
||||
private System.Windows.Forms.TextBox txtVoidsInSystem;
|
||||
|
||||
@ -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