Finally Deployed. Don't know the total amount of changes.
This commit is contained in:
@ -10,6 +10,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
public partial class BillDetailsForm : Form
|
||||
{
|
||||
IList<BillDetail> _list;
|
||||
bool _loading = true;
|
||||
public BillDetailsForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -22,6 +23,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
|
||||
private void ShowStatement()
|
||||
{
|
||||
if (_loading) return;
|
||||
if (DateTime.Today.Subtract(dtpStart.Value.Date).Days > 5 && !Session.IsAllowed("Accounts Audit"))
|
||||
return;
|
||||
_list = new SalesAnalysisBI().GetBillDetails(dtpStart.Value, dtpFinish.Value);
|
||||
@ -41,6 +43,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
dtpStart.Value = DateTime.Today;
|
||||
dtpFinish.Value = DateTime.Today;
|
||||
_loading = false;
|
||||
ShowStatement();
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,67 +28,16 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label18 = new System.Windows.Forms.Label();
|
||||
this.txtClosingCash = new System.Windows.Forms.TextBox();
|
||||
this.dtpFinish = new System.Windows.Forms.DateTimePicker();
|
||||
this.dtpStart = new System.Windows.Forms.DateTimePicker();
|
||||
this.label17 = new System.Windows.Forms.Label();
|
||||
this.label16 = new System.Windows.Forms.Label();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.btnCalculate = new System.Windows.Forms.Button();
|
||||
this.btnPrint = new System.Windows.Forms.Button();
|
||||
this.txtStatus = new System.Windows.Forms.TextBox();
|
||||
this.txtSales = new System.Windows.Forms.TextBox();
|
||||
this.txtDeposited = new System.Windows.Forms.TextBox();
|
||||
this.txtPending = new System.Windows.Forms.TextBox();
|
||||
this.cmbCashier = new System.Windows.Forms.ComboBox();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.txtPayments = 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();
|
||||
this.txtDiscounts = new System.Windows.Forms.TextBox();
|
||||
this.txtRates = new System.Windows.Forms.TextBox();
|
||||
this.txtAdvanceReceived = new System.Windows.Forms.TextBox();
|
||||
this.txtReceipts = new System.Windows.Forms.TextBox();
|
||||
this.txtOpening = new System.Windows.Forms.TextBox();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.NC = new System.Windows.Forms.Label();
|
||||
this.txtBillToCompany = new System.Windows.Forms.TextBox();
|
||||
this.txtNC = new System.Windows.Forms.TextBox();
|
||||
this.dgvSale = new System.Windows.Forms.DataGridView();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvSale)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label18
|
||||
//
|
||||
this.label18.AutoSize = true;
|
||||
this.label18.Location = new System.Drawing.Point(12, 432);
|
||||
this.label18.Name = "label18";
|
||||
this.label18.Size = new System.Drawing.Size(68, 13);
|
||||
this.label18.TabIndex = 71;
|
||||
this.label18.Text = "Closing Cash";
|
||||
//
|
||||
// txtClosingCash
|
||||
//
|
||||
this.txtClosingCash.Location = new System.Drawing.Point(99, 429);
|
||||
this.txtClosingCash.Name = "txtClosingCash";
|
||||
this.txtClosingCash.ReadOnly = true;
|
||||
this.txtClosingCash.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtClosingCash.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtClosingCash.TabIndex = 55;
|
||||
//
|
||||
// dtpFinish
|
||||
//
|
||||
this.dtpFinish.Location = new System.Drawing.Point(189, 12);
|
||||
@ -105,73 +54,11 @@
|
||||
this.dtpStart.TabIndex = 41;
|
||||
this.dtpStart.ValueChanged += new System.EventHandler(this.DtpStartValueChanged);
|
||||
//
|
||||
// label17
|
||||
//
|
||||
this.label17.AutoSize = true;
|
||||
this.label17.Location = new System.Drawing.Point(12, 328);
|
||||
this.label17.Name = "label17";
|
||||
this.label17.Size = new System.Drawing.Size(85, 13);
|
||||
this.label17.TabIndex = 67;
|
||||
this.label17.Text = "Discounts Given";
|
||||
//
|
||||
// label16
|
||||
//
|
||||
this.label16.AutoSize = true;
|
||||
this.label16.Location = new System.Drawing.Point(12, 354);
|
||||
this.label16.Name = "label16";
|
||||
this.label16.Size = new System.Drawing.Size(81, 13);
|
||||
this.label16.TabIndex = 68;
|
||||
this.label16.Text = "Rates Changed";
|
||||
//
|
||||
// label15
|
||||
//
|
||||
this.label15.AutoSize = true;
|
||||
this.label15.Location = new System.Drawing.Point(12, 406);
|
||||
this.label15.Name = "label15";
|
||||
this.label15.Size = new System.Drawing.Size(53, 13);
|
||||
this.label15.TabIndex = 70;
|
||||
this.label15.Text = "Net Sales";
|
||||
//
|
||||
// label14
|
||||
//
|
||||
this.label14.AutoSize = true;
|
||||
this.label14.Location = new System.Drawing.Point(12, 458);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(82, 13);
|
||||
this.label14.TabIndex = 72;
|
||||
this.label14.Text = "Cash Deposited";
|
||||
//
|
||||
// label13
|
||||
//
|
||||
this.label13.AutoSize = true;
|
||||
this.label13.Location = new System.Drawing.Point(12, 484);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(37, 13);
|
||||
this.label13.TabIndex = 73;
|
||||
this.label13.Text = "Status";
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Location = new System.Drawing.Point(12, 380);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(62, 13);
|
||||
this.label12.TabIndex = 69;
|
||||
this.label12.Text = "Bill Pending";
|
||||
//
|
||||
// btnCalculate
|
||||
//
|
||||
this.btnCalculate.Location = new System.Drawing.Point(12, 507);
|
||||
this.btnCalculate.Name = "btnCalculate";
|
||||
this.btnCalculate.Size = new System.Drawing.Size(287, 23);
|
||||
this.btnCalculate.TabIndex = 39;
|
||||
this.btnCalculate.Text = "&Calculate";
|
||||
this.btnCalculate.UseVisualStyleBackColor = true;
|
||||
this.btnCalculate.Click += new System.EventHandler(this.BtnCalculateClick);
|
||||
//
|
||||
// btnPrint
|
||||
//
|
||||
this.btnPrint.Location = new System.Drawing.Point(12, 536);
|
||||
this.btnPrint.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnPrint.Location = new System.Drawing.Point(15, 262);
|
||||
this.btnPrint.Name = "btnPrint";
|
||||
this.btnPrint.Size = new System.Drawing.Size(287, 23);
|
||||
this.btnPrint.TabIndex = 40;
|
||||
@ -179,40 +66,6 @@
|
||||
this.btnPrint.UseVisualStyleBackColor = true;
|
||||
this.btnPrint.Click += new System.EventHandler(this.BtnPrintClick);
|
||||
//
|
||||
// txtStatus
|
||||
//
|
||||
this.txtStatus.Location = new System.Drawing.Point(99, 481);
|
||||
this.txtStatus.Name = "txtStatus";
|
||||
this.txtStatus.ReadOnly = true;
|
||||
this.txtStatus.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtStatus.TabIndex = 56;
|
||||
//
|
||||
// txtSales
|
||||
//
|
||||
this.txtSales.Location = new System.Drawing.Point(99, 403);
|
||||
this.txtSales.Name = "txtSales";
|
||||
this.txtSales.ReadOnly = true;
|
||||
this.txtSales.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtSales.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtSales.TabIndex = 54;
|
||||
//
|
||||
// txtDeposited
|
||||
//
|
||||
this.txtDeposited.Location = new System.Drawing.Point(99, 455);
|
||||
this.txtDeposited.Name = "txtDeposited";
|
||||
this.txtDeposited.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtDeposited.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtDeposited.TabIndex = 38;
|
||||
//
|
||||
// txtPending
|
||||
//
|
||||
this.txtPending.Location = new System.Drawing.Point(99, 377);
|
||||
this.txtPending.Name = "txtPending";
|
||||
this.txtPending.ReadOnly = true;
|
||||
this.txtPending.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtPending.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtPending.TabIndex = 53;
|
||||
//
|
||||
// cmbCashier
|
||||
//
|
||||
this.cmbCashier.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
@ -241,255 +94,44 @@
|
||||
this.label9.TabIndex = 58;
|
||||
this.label9.Text = "Cashier";
|
||||
//
|
||||
// label8
|
||||
// dgvSale
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(12, 302);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(81, 13);
|
||||
this.label8.TabIndex = 66;
|
||||
this.label8.Text = "Voids in System";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(12, 276);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(82, 13);
|
||||
this.label7.TabIndex = 65;
|
||||
this.label7.Text = "Additional Voids";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(12, 250);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(53, 13);
|
||||
this.label6.TabIndex = 64;
|
||||
this.label6.Text = "Payments";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(12, 224);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(76, 13);
|
||||
this.label5.TabIndex = 63;
|
||||
this.label5.Text = "Cash Receipts";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(12, 146);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(66, 13);
|
||||
this.label4.TabIndex = 62;
|
||||
this.label4.Text = "CC Receipts";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(12, 120);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(78, 13);
|
||||
this.label3.TabIndex = 61;
|
||||
this.label3.Text = "Adv. Received";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(12, 94);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(49, 13);
|
||||
this.label2.TabIndex = 60;
|
||||
this.label2.Text = "Receipts";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 68);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(47, 13);
|
||||
this.label1.TabIndex = 59;
|
||||
this.label1.Text = "Opening";
|
||||
//
|
||||
// txtPayments
|
||||
//
|
||||
this.txtPayments.Location = new System.Drawing.Point(99, 247);
|
||||
this.txtPayments.Name = "txtPayments";
|
||||
this.txtPayments.ReadOnly = true;
|
||||
this.txtPayments.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtPayments.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtPayments.TabIndex = 48;
|
||||
//
|
||||
// txtCashReceipts
|
||||
//
|
||||
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
|
||||
//
|
||||
this.txtCCReceipts.Location = new System.Drawing.Point(99, 143);
|
||||
this.txtCCReceipts.Name = "txtCCReceipts";
|
||||
this.txtCCReceipts.ReadOnly = true;
|
||||
this.txtCCReceipts.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtCCReceipts.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtCCReceipts.TabIndex = 46;
|
||||
//
|
||||
// txtAdditionalVoids
|
||||
//
|
||||
this.txtAdditionalVoids.Location = new System.Drawing.Point(99, 273);
|
||||
this.txtAdditionalVoids.Name = "txtAdditionalVoids";
|
||||
this.txtAdditionalVoids.ReadOnly = true;
|
||||
this.txtAdditionalVoids.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtAdditionalVoids.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtAdditionalVoids.TabIndex = 49;
|
||||
//
|
||||
// txtVoidsInSystem
|
||||
//
|
||||
this.txtVoidsInSystem.Location = new System.Drawing.Point(99, 299);
|
||||
this.txtVoidsInSystem.Name = "txtVoidsInSystem";
|
||||
this.txtVoidsInSystem.ReadOnly = true;
|
||||
this.txtVoidsInSystem.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtVoidsInSystem.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtVoidsInSystem.TabIndex = 50;
|
||||
//
|
||||
// txtDiscounts
|
||||
//
|
||||
this.txtDiscounts.Location = new System.Drawing.Point(99, 325);
|
||||
this.txtDiscounts.Name = "txtDiscounts";
|
||||
this.txtDiscounts.ReadOnly = true;
|
||||
this.txtDiscounts.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtDiscounts.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtDiscounts.TabIndex = 51;
|
||||
//
|
||||
// txtRates
|
||||
//
|
||||
this.txtRates.Location = new System.Drawing.Point(99, 351);
|
||||
this.txtRates.Name = "txtRates";
|
||||
this.txtRates.ReadOnly = true;
|
||||
this.txtRates.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtRates.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtRates.TabIndex = 52;
|
||||
//
|
||||
// txtAdvanceReceived
|
||||
//
|
||||
this.txtAdvanceReceived.Location = new System.Drawing.Point(99, 117);
|
||||
this.txtAdvanceReceived.Name = "txtAdvanceReceived";
|
||||
this.txtAdvanceReceived.ReadOnly = true;
|
||||
this.txtAdvanceReceived.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtAdvanceReceived.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtAdvanceReceived.TabIndex = 45;
|
||||
//
|
||||
// txtReceipts
|
||||
//
|
||||
this.txtReceipts.Location = new System.Drawing.Point(99, 91);
|
||||
this.txtReceipts.Name = "txtReceipts";
|
||||
this.txtReceipts.ReadOnly = true;
|
||||
this.txtReceipts.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtReceipts.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtReceipts.TabIndex = 44;
|
||||
//
|
||||
// txtOpening
|
||||
//
|
||||
this.txtOpening.Location = new System.Drawing.Point(99, 65);
|
||||
this.txtOpening.Name = "txtOpening";
|
||||
this.txtOpening.ReadOnly = true;
|
||||
this.txtOpening.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtOpening.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtOpening.TabIndex = 43;
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Location = new System.Drawing.Point(12, 198);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(79, 13);
|
||||
this.label11.TabIndex = 77;
|
||||
this.label11.Text = "Bill to Company";
|
||||
//
|
||||
// NC
|
||||
//
|
||||
this.NC.AutoSize = true;
|
||||
this.NC.Location = new System.Drawing.Point(12, 172);
|
||||
this.NC.Name = "NC";
|
||||
this.NC.Size = new System.Drawing.Size(58, 13);
|
||||
this.NC.TabIndex = 76;
|
||||
this.NC.Text = "No Charge";
|
||||
//
|
||||
// txtBillToCompany
|
||||
//
|
||||
this.txtBillToCompany.Location = new System.Drawing.Point(99, 195);
|
||||
this.txtBillToCompany.Name = "txtBillToCompany";
|
||||
this.txtBillToCompany.ReadOnly = true;
|
||||
this.txtBillToCompany.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtBillToCompany.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtBillToCompany.TabIndex = 75;
|
||||
//
|
||||
// txtNC
|
||||
//
|
||||
this.txtNC.Location = new System.Drawing.Point(99, 169);
|
||||
this.txtNC.Name = "txtNC";
|
||||
this.txtNC.ReadOnly = true;
|
||||
this.txtNC.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.txtNC.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtNC.TabIndex = 74;
|
||||
this.dgvSale.AllowUserToAddRows = false;
|
||||
this.dgvSale.AllowUserToDeleteRows = false;
|
||||
this.dgvSale.AllowUserToResizeRows = false;
|
||||
this.dgvSale.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.dgvSale.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvSale.Location = new System.Drawing.Point(15, 65);
|
||||
this.dgvSale.MultiSelect = false;
|
||||
this.dgvSale.Name = "dgvSale";
|
||||
this.dgvSale.ReadOnly = true;
|
||||
this.dgvSale.RowHeadersVisible = false;
|
||||
this.dgvSale.RowTemplate.Height = 19;
|
||||
this.dgvSale.RowTemplate.ReadOnly = true;
|
||||
this.dgvSale.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dgvSale.Size = new System.Drawing.Size(287, 187);
|
||||
this.dgvSale.TabIndex = 59;
|
||||
//
|
||||
// CashierCheckoutForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(311, 571);
|
||||
this.Controls.Add(this.label11);
|
||||
this.Controls.Add(this.NC);
|
||||
this.Controls.Add(this.txtBillToCompany);
|
||||
this.Controls.Add(this.txtNC);
|
||||
this.Controls.Add(this.label18);
|
||||
this.Controls.Add(this.txtClosingCash);
|
||||
this.ClientSize = new System.Drawing.Size(311, 297);
|
||||
this.Controls.Add(this.dgvSale);
|
||||
this.Controls.Add(this.dtpFinish);
|
||||
this.Controls.Add(this.dtpStart);
|
||||
this.Controls.Add(this.label17);
|
||||
this.Controls.Add(this.label16);
|
||||
this.Controls.Add(this.label15);
|
||||
this.Controls.Add(this.label14);
|
||||
this.Controls.Add(this.label13);
|
||||
this.Controls.Add(this.label12);
|
||||
this.Controls.Add(this.btnCalculate);
|
||||
this.Controls.Add(this.btnPrint);
|
||||
this.Controls.Add(this.txtStatus);
|
||||
this.Controls.Add(this.txtSales);
|
||||
this.Controls.Add(this.txtDeposited);
|
||||
this.Controls.Add(this.txtPending);
|
||||
this.Controls.Add(this.cmbCashier);
|
||||
this.Controls.Add(this.label10);
|
||||
this.Controls.Add(this.label9);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.txtPayments);
|
||||
this.Controls.Add(this.txtCashReceipts);
|
||||
this.Controls.Add(this.txtCCReceipts);
|
||||
this.Controls.Add(this.txtAdditionalVoids);
|
||||
this.Controls.Add(this.txtVoidsInSystem);
|
||||
this.Controls.Add(this.txtDiscounts);
|
||||
this.Controls.Add(this.txtRates);
|
||||
this.Controls.Add(this.txtAdvanceReceived);
|
||||
this.Controls.Add(this.txtReceipts);
|
||||
this.Controls.Add(this.txtOpening);
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "CashierCheckoutForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Cashier Checkout Form";
|
||||
this.Load += new System.EventHandler(this.CashierCheckoutFormLoad);
|
||||
this.Load += new System.EventHandler(this.CashierCheckoutForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvSale)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -497,46 +139,12 @@
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label18;
|
||||
private System.Windows.Forms.TextBox txtClosingCash;
|
||||
private System.Windows.Forms.DateTimePicker dtpFinish;
|
||||
private System.Windows.Forms.DateTimePicker dtpStart;
|
||||
private System.Windows.Forms.Label label17;
|
||||
private System.Windows.Forms.Label label16;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.Button btnCalculate;
|
||||
private System.Windows.Forms.Button btnPrint;
|
||||
private System.Windows.Forms.TextBox txtStatus;
|
||||
private System.Windows.Forms.TextBox txtSales;
|
||||
private System.Windows.Forms.TextBox txtDeposited;
|
||||
private System.Windows.Forms.TextBox txtPending;
|
||||
private System.Windows.Forms.ComboBox cmbCashier;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox txtPayments;
|
||||
private System.Windows.Forms.TextBox txtCashReceipts;
|
||||
private System.Windows.Forms.TextBox txtCCReceipts;
|
||||
private System.Windows.Forms.TextBox txtAdditionalVoids;
|
||||
private System.Windows.Forms.TextBox txtVoidsInSystem;
|
||||
private System.Windows.Forms.TextBox txtDiscounts;
|
||||
private System.Windows.Forms.TextBox txtRates;
|
||||
private System.Windows.Forms.TextBox txtAdvanceReceived;
|
||||
private System.Windows.Forms.TextBox txtReceipts;
|
||||
private System.Windows.Forms.TextBox txtOpening;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.Label NC;
|
||||
private System.Windows.Forms.TextBox txtBillToCompany;
|
||||
private System.Windows.Forms.TextBox txtNC;
|
||||
private System.Windows.Forms.DataGridView dgvSale;
|
||||
}
|
||||
}
|
||||
@ -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);
|
||||
|
||||
@ -9,11 +9,25 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
public partial class frmSaleAnalysisForm : Form
|
||||
{
|
||||
IList<SalesAnalysis> _list;
|
||||
bool _loading;
|
||||
public frmSaleAnalysisForm()
|
||||
{
|
||||
_loading = true;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void SaleAnalysisForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
dtpStart.Format = DateTimePickerFormat.Custom;
|
||||
dtpStart.CustomFormat = "dd-MMM-yyyy";
|
||||
dtpStart.Value = DateTime.Now.Date;
|
||||
dtpFinish.Format = DateTimePickerFormat.Custom;
|
||||
dtpFinish.CustomFormat = "dd-MMM-yyyy";
|
||||
dtpFinish.Value = DateTime.Now.Date;
|
||||
_loading = false;
|
||||
ShowStatement();
|
||||
}
|
||||
|
||||
private void dtpStart_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ShowStatement();
|
||||
@ -21,6 +35,8 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
|
||||
private void ShowStatement()
|
||||
{
|
||||
if (_loading)
|
||||
return;
|
||||
if (DateTime.Today.Subtract(dtpStart.Value.Date).Days > 5 &&
|
||||
!Session.IsAllowed("Accounts Audit"))
|
||||
return;
|
||||
@ -39,13 +55,6 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
ShowStatement();
|
||||
}
|
||||
|
||||
private void Sale_Analysis_Form_Load(object sender, EventArgs e)
|
||||
{
|
||||
dtpStart.Value = DateTime.Today;
|
||||
dtpFinish.Value = DateTime.Today;
|
||||
ShowStatement();
|
||||
}
|
||||
|
||||
private void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_list != null)
|
||||
|
||||
@ -110,7 +110,7 @@
|
||||
this.Name = "frmSaleAnalysisForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Sale Analysis Form";
|
||||
this.Load += new System.EventHandler(this.Sale_Analysis_Form_Load);
|
||||
this.Load += new System.EventHandler(this.SaleAnalysisForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvSale)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
Reference in New Issue
Block a user