Multiple settlement options. Upgrade SQL Script included.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
partial class Cashier_Checkout_Form
|
||||
partial class CashierCheckoutForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
@ -486,7 +486,7 @@
|
||||
this.Controls.Add(this.txtReceipts);
|
||||
this.Controls.Add(this.txtOpening);
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "Cashier_Checkout_Form";
|
||||
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);
|
||||
|
||||
@ -6,14 +6,14 @@ using Tanshu.Accounts.Helpers;
|
||||
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
public partial class Cashier_Checkout_Form : Form
|
||||
public partial class CashierCheckoutForm : Form
|
||||
{
|
||||
CheckoutBI coProxy;
|
||||
bool loading;
|
||||
CheckoutBI _coProxy;
|
||||
bool _loading;
|
||||
//private static readonly Tanshu.Logging.SqlLogger log = new Tanshu.Logging.SqlLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
public Cashier_Checkout_Form()
|
||||
public CashierCheckoutForm()
|
||||
{
|
||||
loading = true;
|
||||
_loading = true;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
@ -21,19 +21,19 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
dtpStart.Format = DateTimePickerFormat.Custom;
|
||||
dtpStart.CustomFormat = "dd-MMM-yyyy";
|
||||
dtpStart.Value = DateTime.Now;
|
||||
dtpStart.Value = DateTime.Now.Date;
|
||||
dtpFinish.Format = DateTimePickerFormat.Custom;
|
||||
dtpFinish.CustomFormat = "dd-MMM-yyyy";
|
||||
dtpFinish.Value = DateTime.Now;
|
||||
dtpFinish.Value = DateTime.Now.Date;
|
||||
FillUsers();
|
||||
loading = false;
|
||||
_loading = false;
|
||||
}
|
||||
|
||||
private void FillUsers()
|
||||
{
|
||||
cmbCashier.DisplayMember = "Name";
|
||||
cmbCashier.ValueMember = "UserID";
|
||||
cmbCashier.DataSource = UserBI.GetUsers();
|
||||
cmbCashier.DataSource = UserBI.ListActive(dtpStart.Value.Date.AddHours(7), dtpFinish.Value.Date.AddDays(1).AddHours(7));
|
||||
}
|
||||
|
||||
private void cmbCashier_SelectedIndexChanged(object sender, EventArgs e)
|
||||
@ -44,24 +44,24 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
|
||||
private void EmployeeStatus()
|
||||
{
|
||||
if (loading || cmbCashier.SelectedValue == null)
|
||||
if (_loading || cmbCashier.SelectedValue == null)
|
||||
return;
|
||||
coProxy = new CheckoutBI((int)cmbCashier.SelectedValue, dtpStart.Value, dtpFinish.Value);
|
||||
txtOpening.Text = string.Format("{0:#,##0.00}", coProxy);
|
||||
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);
|
||||
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);
|
||||
txtClosingCash.Text = string.Format("{0:#,##0.00}", coProxy.ClosingBalance);
|
||||
txtStatus.Text = coProxy.Status;
|
||||
_coProxy = new CheckoutBI((int)cmbCashier.SelectedValue, dtpStart.Value, dtpFinish.Value);
|
||||
txtOpening.Text = string.Format("{0:#,##0.00}", _coProxy);
|
||||
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);
|
||||
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);
|
||||
txtClosingCash.Text = string.Format("{0:#,##0.00}", _coProxy.ClosingBalance);
|
||||
txtStatus.Text = _coProxy.Status;
|
||||
}
|
||||
|
||||
private void dtpStart_ValueChanged(object sender, EventArgs e)
|
||||
@ -80,13 +80,13 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
if (!decimal.TryParse(txtDeposited.Text, out deposited))
|
||||
deposited = 0;
|
||||
|
||||
coProxy.Calculate(deposited, 0);
|
||||
txtStatus.Text = coProxy.Status;
|
||||
_coProxy.Calculate(deposited, 0);
|
||||
txtStatus.Text = _coProxy.Status;
|
||||
}
|
||||
|
||||
private void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
Thermal.PrintClosing(coProxy);
|
||||
Thermal.PrintClosing(_coProxy);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -8,14 +8,12 @@ using System.Linq;
|
||||
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
public partial class frmSaleDetail : Form
|
||||
public partial class FrmSaleDetail : Form
|
||||
{
|
||||
IList<SalesAnalysisDetail> list;
|
||||
//private static readonly Tanshu.Logging.SqlLogger log = new Tanshu.Logging.SqlLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
public frmSaleDetail()
|
||||
IList<SalesAnalysisDetail> _list;
|
||||
public FrmSaleDetail()
|
||||
{
|
||||
InitializeComponent();
|
||||
//log.Warn(string.Format("Sales Analysis by: {0}", Session.User.Name));
|
||||
}
|
||||
|
||||
private void dtpStart_ValueChanged(object sender, EventArgs e)
|
||||
@ -25,9 +23,9 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
|
||||
private void ShowStatement()
|
||||
{
|
||||
list = new SalesAnalysisBI().GetSaleDetail(dtpStart.Value, dtpFinish.Value).ToList();
|
||||
_list = new SalesAnalysisBI().GetSaleDetail(dtpStart.Value, dtpFinish.Value).ToList();
|
||||
dgvSale.AutoGenerateColumns = true;
|
||||
dgvSale.DataSource = list;
|
||||
dgvSale.DataSource = _list;
|
||||
dgvSale.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
dgvSale.Columns[1].DefaultCellStyle.Format = "#,##0.00;(#,##0.00);0";
|
||||
dgvSale.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight;
|
||||
@ -49,12 +47,11 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
|
||||
private void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (list != null)
|
||||
{
|
||||
var startDate = dtpStart.Value.Date.AddHours(6);
|
||||
var finishDate = dtpFinish.Value.Date.AddDays(1).AddHours(5);
|
||||
Accounts.Print.Thermal.PrintSale(Session.User.Name, list, startDate, finishDate);
|
||||
}
|
||||
if (_list == null)
|
||||
return;
|
||||
var startDate = dtpStart.Value.Date.AddHours(6);
|
||||
var finishDate = dtpFinish.Value.Date.AddDays(1).AddHours(5);
|
||||
Print.Thermal.PrintSale(Session.User.Name, _list, startDate, finishDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
partial class frmSaleDetail
|
||||
partial class FrmSaleDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
@ -107,7 +107,7 @@
|
||||
this.Controls.Add(this.dtpStart);
|
||||
this.Controls.Add(this.label10);
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "frmSaleDetail";
|
||||
this.Name = "FrmSaleDetail";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Sale Detail";
|
||||
this.Load += new System.EventHandler(this.Sale_Analysis_Form_Load);
|
||||
|
||||
Reference in New Issue
Block a user