Moved numpad control to Tanshu.Common. Billing feature complete. Delete not working as expected
Signed-off-by: unknown <tanshu@.(none)>
This commit is contained in:
@ -1,60 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Tanshu.Accounts.Helpers;
|
||||
using System.Data.SqlClient;
|
||||
using System.Configuration;
|
||||
using Tanshu.Accounts.Repository;
|
||||
using Tanshu.Accounts.Contracts;
|
||||
using Tanshu.Accounts.Entities;
|
||||
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
public partial class AdjustAdvanceForm : Form
|
||||
{
|
||||
bool loading = true;
|
||||
public AdjustAdvanceForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private void AdjustAdvancesForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
dtpFrom.Format = DateTimePickerFormat.Custom;
|
||||
dtpFrom.CustomFormat = "dd-MMM-yyyy";
|
||||
dtpFrom.Value = DateTime.Now;
|
||||
dtpTo.Format = DateTimePickerFormat.Custom;
|
||||
dtpTo.CustomFormat = "dd-MMM-yyyy";
|
||||
dtpTo.Value = DateTime.Now;
|
||||
loading = false;
|
||||
FillDataGrid();
|
||||
}
|
||||
private void FillDataGrid()
|
||||
{
|
||||
dgExpenses.DataSource = new AdvanceBI().GetAdvances(dtpFrom.Value, dtpTo.Value, false);
|
||||
}
|
||||
private void dtpFrom_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!loading)
|
||||
FillDataGrid();
|
||||
}
|
||||
|
||||
private void btnSelect_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var item = (Advance)dgExpenses.SelectedRows[0].DataBoundItem;
|
||||
txtCashier.Text = item.CashierIn.Name;
|
||||
txtNarration.Tag = item.AdvanceID;
|
||||
txtNarration.Text = item.Narration;
|
||||
txtAmount.Text = item.Amount.ToString();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void btnAdjust_Click(object sender, EventArgs e)
|
||||
{
|
||||
new AdvanceBI().Adjust((int)txtNarration.Tag, Session.User.UserID);
|
||||
FillDataGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,270 +0,0 @@
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
partial class AdjustAdvanceForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.btnAdjust = new System.Windows.Forms.Button();
|
||||
this.btnSelect = new System.Windows.Forms.Button();
|
||||
this.Label7 = new System.Windows.Forms.Label();
|
||||
this.txtNarration = new System.Windows.Forms.TextBox();
|
||||
this.txtAmount = new System.Windows.Forms.TextBox();
|
||||
this.lblAmount = new System.Windows.Forms.Label();
|
||||
this.txtCashier = new System.Windows.Forms.TextBox();
|
||||
this.Label5 = new System.Windows.Forms.Label();
|
||||
this.txtVoid = new System.Windows.Forms.TextBox();
|
||||
this.txtAmt = new System.Windows.Forms.TextBox();
|
||||
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.dtpTo = new System.Windows.Forms.DateTimePicker();
|
||||
this.dtpFrom = new System.Windows.Forms.DateTimePicker();
|
||||
this.dgExpenses = new System.Windows.Forms.DataGridView();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgExpenses)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnAdjust
|
||||
//
|
||||
this.btnAdjust.Location = new System.Drawing.Point(142, 113);
|
||||
this.btnAdjust.Name = "btnAdjust";
|
||||
this.btnAdjust.Size = new System.Drawing.Size(75, 21);
|
||||
this.btnAdjust.TabIndex = 111;
|
||||
this.btnAdjust.Text = "&Adjust";
|
||||
this.btnAdjust.Click += new System.EventHandler(this.btnAdjust_Click);
|
||||
//
|
||||
// btnSelect
|
||||
//
|
||||
this.btnSelect.Location = new System.Drawing.Point(61, 113);
|
||||
this.btnSelect.Name = "btnSelect";
|
||||
this.btnSelect.Size = new System.Drawing.Size(75, 21);
|
||||
this.btnSelect.TabIndex = 110;
|
||||
this.btnSelect.Text = "&Select";
|
||||
this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click);
|
||||
//
|
||||
// Label7
|
||||
//
|
||||
this.Label7.AutoSize = true;
|
||||
this.Label7.Location = new System.Drawing.Point(6, 92);
|
||||
this.Label7.Name = "Label7";
|
||||
this.Label7.Size = new System.Drawing.Size(50, 13);
|
||||
this.Label7.TabIndex = 109;
|
||||
this.Label7.Text = "Narration";
|
||||
//
|
||||
// txtNarration
|
||||
//
|
||||
this.txtNarration.Location = new System.Drawing.Point(61, 90);
|
||||
this.txtNarration.Name = "txtNarration";
|
||||
this.txtNarration.ReadOnly = true;
|
||||
this.txtNarration.Size = new System.Drawing.Size(330, 20);
|
||||
this.txtNarration.TabIndex = 108;
|
||||
//
|
||||
// txtAmount
|
||||
//
|
||||
this.txtAmount.Location = new System.Drawing.Point(61, 68);
|
||||
this.txtAmount.Name = "txtAmount";
|
||||
this.txtAmount.ReadOnly = true;
|
||||
this.txtAmount.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtAmount.TabIndex = 107;
|
||||
//
|
||||
// lblAmount
|
||||
//
|
||||
this.lblAmount.AutoSize = true;
|
||||
this.lblAmount.Location = new System.Drawing.Point(11, 71);
|
||||
this.lblAmount.Name = "lblAmount";
|
||||
this.lblAmount.Size = new System.Drawing.Size(43, 13);
|
||||
this.lblAmount.TabIndex = 106;
|
||||
this.lblAmount.Text = "Amount";
|
||||
//
|
||||
// txtCashier
|
||||
//
|
||||
this.txtCashier.Location = new System.Drawing.Point(61, 47);
|
||||
this.txtCashier.Name = "txtCashier";
|
||||
this.txtCashier.ReadOnly = true;
|
||||
this.txtCashier.Size = new System.Drawing.Size(330, 20);
|
||||
this.txtCashier.TabIndex = 105;
|
||||
//
|
||||
// Label5
|
||||
//
|
||||
this.Label5.AutoSize = true;
|
||||
this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label5.Location = new System.Drawing.Point(56, 501);
|
||||
this.Label5.Name = "Label5";
|
||||
this.Label5.Size = new System.Drawing.Size(40, 16);
|
||||
this.Label5.TabIndex = 104;
|
||||
this.Label5.Text = "Void";
|
||||
//
|
||||
// txtVoid
|
||||
//
|
||||
this.txtVoid.BackColor = System.Drawing.Color.Black;
|
||||
this.txtVoid.ForeColor = System.Drawing.Color.Lime;
|
||||
this.txtVoid.Location = new System.Drawing.Point(112, 499);
|
||||
this.txtVoid.Name = "txtVoid";
|
||||
this.txtVoid.ReadOnly = true;
|
||||
this.txtVoid.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtVoid.TabIndex = 103;
|
||||
this.txtVoid.Text = "0.00";
|
||||
this.txtVoid.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
//
|
||||
// txtAmt
|
||||
//
|
||||
this.txtAmt.BackColor = System.Drawing.Color.Black;
|
||||
this.txtAmt.ForeColor = System.Drawing.Color.Lime;
|
||||
this.txtAmt.Location = new System.Drawing.Point(281, 500);
|
||||
this.txtAmt.Name = "txtAmt";
|
||||
this.txtAmt.ReadOnly = true;
|
||||
this.txtAmt.Size = new System.Drawing.Size(110, 20);
|
||||
this.txtAmt.TabIndex = 102;
|
||||
this.txtAmt.Text = "0.00";
|
||||
this.txtAmt.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
//
|
||||
// Label4
|
||||
//
|
||||
this.Label4.AutoSize = true;
|
||||
this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label4.Location = new System.Drawing.Point(232, 502);
|
||||
this.Label4.Name = "Label4";
|
||||
this.Label4.Size = new System.Drawing.Size(44, 16);
|
||||
this.Label4.TabIndex = 101;
|
||||
this.Label4.Text = "Total";
|
||||
//
|
||||
// Label3
|
||||
//
|
||||
this.Label3.AutoSize = true;
|
||||
this.Label3.Location = new System.Drawing.Point(13, 52);
|
||||
this.Label3.Name = "Label3";
|
||||
this.Label3.Size = new System.Drawing.Size(42, 13);
|
||||
this.Label3.TabIndex = 100;
|
||||
this.Label3.Text = "Cashier";
|
||||
//
|
||||
// Label2
|
||||
//
|
||||
this.Label2.AutoSize = true;
|
||||
this.Label2.Location = new System.Drawing.Point(171, 18);
|
||||
this.Label2.Name = "Label2";
|
||||
this.Label2.Size = new System.Drawing.Size(20, 13);
|
||||
this.Label2.TabIndex = 97;
|
||||
this.Label2.Text = "To";
|
||||
//
|
||||
// Label1
|
||||
//
|
||||
this.Label1.AutoSize = true;
|
||||
this.Label1.Location = new System.Drawing.Point(21, 18);
|
||||
this.Label1.Name = "Label1";
|
||||
this.Label1.Size = new System.Drawing.Size(30, 13);
|
||||
this.Label1.TabIndex = 95;
|
||||
this.Label1.Text = "From";
|
||||
//
|
||||
// dtpTo
|
||||
//
|
||||
this.dtpTo.Location = new System.Drawing.Point(191, 18);
|
||||
this.dtpTo.Name = "dtpTo";
|
||||
this.dtpTo.Size = new System.Drawing.Size(90, 20);
|
||||
this.dtpTo.TabIndex = 98;
|
||||
//
|
||||
// dtpFrom
|
||||
//
|
||||
this.dtpFrom.Location = new System.Drawing.Point(61, 18);
|
||||
this.dtpFrom.Name = "dtpFrom";
|
||||
this.dtpFrom.Size = new System.Drawing.Size(90, 20);
|
||||
this.dtpFrom.TabIndex = 96;
|
||||
this.dtpFrom.ValueChanged += new System.EventHandler(this.dtpFrom_ValueChanged);
|
||||
//
|
||||
// dgExpenses
|
||||
//
|
||||
this.dgExpenses.AllowUserToAddRows = false;
|
||||
this.dgExpenses.AllowUserToDeleteRows = false;
|
||||
this.dgExpenses.AllowUserToResizeRows = false;
|
||||
this.dgExpenses.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.dgExpenses.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgExpenses.Location = new System.Drawing.Point(13, 140);
|
||||
this.dgExpenses.Name = "dgExpenses";
|
||||
this.dgExpenses.ReadOnly = true;
|
||||
this.dgExpenses.RowHeadersVisible = false;
|
||||
this.dgExpenses.RowTemplate.Height = 19;
|
||||
this.dgExpenses.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dgExpenses.Size = new System.Drawing.Size(378, 356);
|
||||
this.dgExpenses.TabIndex = 112;
|
||||
//
|
||||
// AdjustAdvanceForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(402, 536);
|
||||
this.Controls.Add(this.dgExpenses);
|
||||
this.Controls.Add(this.btnAdjust);
|
||||
this.Controls.Add(this.btnSelect);
|
||||
this.Controls.Add(this.Label7);
|
||||
this.Controls.Add(this.txtNarration);
|
||||
this.Controls.Add(this.txtAmount);
|
||||
this.Controls.Add(this.lblAmount);
|
||||
this.Controls.Add(this.txtCashier);
|
||||
this.Controls.Add(this.Label5);
|
||||
this.Controls.Add(this.txtVoid);
|
||||
this.Controls.Add(this.txtAmt);
|
||||
this.Controls.Add(this.Label4);
|
||||
this.Controls.Add(this.Label3);
|
||||
this.Controls.Add(this.Label2);
|
||||
this.Controls.Add(this.Label1);
|
||||
this.Controls.Add(this.dtpTo);
|
||||
this.Controls.Add(this.dtpFrom);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "AdjustAdvanceForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Payment Details";
|
||||
this.Load += new System.EventHandler(this.AdjustAdvancesForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgExpenses)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
internal System.Windows.Forms.Button btnAdjust;
|
||||
internal System.Windows.Forms.Button btnSelect;
|
||||
internal System.Windows.Forms.Label Label7;
|
||||
internal System.Windows.Forms.TextBox txtNarration;
|
||||
internal System.Windows.Forms.TextBox txtAmount;
|
||||
internal System.Windows.Forms.Label lblAmount;
|
||||
internal System.Windows.Forms.TextBox txtCashier;
|
||||
internal System.Windows.Forms.Label Label5;
|
||||
internal System.Windows.Forms.TextBox txtVoid;
|
||||
internal System.Windows.Forms.TextBox txtAmt;
|
||||
internal System.Windows.Forms.Label Label4;
|
||||
internal System.Windows.Forms.Label Label3;
|
||||
internal System.Windows.Forms.Label Label2;
|
||||
internal System.Windows.Forms.Label Label1;
|
||||
internal System.Windows.Forms.DateTimePicker dtpTo;
|
||||
internal System.Windows.Forms.DateTimePicker dtpFrom;
|
||||
private System.Windows.Forms.DataGridView dgExpenses;
|
||||
|
||||
}
|
||||
}
|
||||
@ -19,7 +19,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
#region InputBox
|
||||
if (discount == -1)
|
||||
{
|
||||
InputBoxResult result = InputBox.Show("Discount Rate", "Discount", "0", InputBox_Validating);
|
||||
InputBoxResult result = InputBox.Show("Discount", "0", InputBox_Validating);
|
||||
if (result.OK)
|
||||
{
|
||||
if (!decimal.TryParse(result.Text, out discount))
|
||||
@ -32,7 +32,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
#endregion
|
||||
|
||||
#region Max Discount
|
||||
decimal maxDiscount = new SaleVoucherBI().GetProductDiscountLimit(productID);
|
||||
decimal maxDiscount = SaleVoucherBI.GetProductDiscountLimit(productID);
|
||||
if ((discount > maxDiscount) && customer.CustomerID != 1)
|
||||
{
|
||||
MessageBox.Show(string.Format("Maximum discount for this product is {0:P}", maxDiscount), "Excessive Discount", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
@ -59,7 +59,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
public static BillInventory AddProductToGrid(int productID, BindingSource bindingSource, OrderedDictionary<BillItemKey, BillInventory> bill)
|
||||
{
|
||||
BillInventory product;
|
||||
if ((!bill.ContainsKey(new BillItemKey(productID, true))) && (!bill.ContainsKey(new BillItemKey(productID, false))))
|
||||
if ((!bill.ContainsKey(new BillItemKey(productID, false))) && (!bill.ContainsKey(new BillItemKey(productID, true))))
|
||||
{
|
||||
//No new or old
|
||||
product = AddNewProduct(productID, bindingSource, bill);
|
||||
@ -106,7 +106,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
private static BillInventory AddNewProduct(int productID, BindingSource bindingSource, OrderedDictionary<BillItemKey, BillInventory> bill)
|
||||
{
|
||||
BillItemKey key = new BillItemKey(productID, true);
|
||||
BillInventory product = new SaleVoucherBI().GetDefaultSaleBillItem(productID);
|
||||
BillInventory product = SaleVoucherBI.GetDefaultSaleBillItem(productID);
|
||||
product.Quantity = 1;
|
||||
bill.Add(key, product);
|
||||
bindingSource.DataSource = bill.Values;
|
||||
@ -131,7 +131,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
#region Prompt
|
||||
if (prompt)
|
||||
{
|
||||
InputBoxResult result = InputBox.Show("Enter Quantity", "Quantity", (product.Quantity + 1).ToString(), InputBox_Validating);
|
||||
InputBoxResult result = InputBox.Show("Quantity", (product.Quantity + 1).ToString(), InputBox_Validating);
|
||||
if (result.OK)
|
||||
{
|
||||
if (!decimal.TryParse(result.Text, out quantity))
|
||||
@ -206,7 +206,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
if (amount == -1)
|
||||
{
|
||||
InputBoxResult result = InputBox.Show("Enter Amount", "Amount", (product.Value).ToString(), InputBox_Validating);
|
||||
InputBoxResult result = InputBox.Show("Amount", (product.Value).ToString(), InputBox_Validating);
|
||||
if (result.OK)
|
||||
{
|
||||
amount = Convert.ToDecimal(result.Text);
|
||||
|
||||
@ -1,481 +0,0 @@
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
partial class Cashier_Checkout_Form
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </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.txtAdvanceAdjusted = 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.SuspendLayout();
|
||||
//
|
||||
// label18
|
||||
//
|
||||
this.label18.AutoSize = true;
|
||||
this.label18.Location = new System.Drawing.Point(12, 380);
|
||||
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, 377);
|
||||
this.txtClosingCash.Name = "txtClosingCash";
|
||||
this.txtClosingCash.ReadOnly = true;
|
||||
this.txtClosingCash.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtClosingCash.TabIndex = 55;
|
||||
//
|
||||
// dtpFinish
|
||||
//
|
||||
this.dtpFinish.Location = new System.Drawing.Point(189, 12);
|
||||
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);
|
||||
//
|
||||
// dtpStart
|
||||
//
|
||||
this.dtpStart.Location = new System.Drawing.Point(15, 11);
|
||||
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);
|
||||
//
|
||||
// label17
|
||||
//
|
||||
this.label17.AutoSize = true;
|
||||
this.label17.Location = new System.Drawing.Point(12, 276);
|
||||
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, 302);
|
||||
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, 354);
|
||||
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, 406);
|
||||
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, 432);
|
||||
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, 328);
|
||||
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, 455);
|
||||
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.btnCalculate_Click);
|
||||
//
|
||||
// btnPrint
|
||||
//
|
||||
this.btnPrint.Location = new System.Drawing.Point(12, 484);
|
||||
this.btnPrint.Name = "btnPrint";
|
||||
this.btnPrint.Size = new System.Drawing.Size(287, 23);
|
||||
this.btnPrint.TabIndex = 40;
|
||||
this.btnPrint.Text = "&Print";
|
||||
this.btnPrint.UseVisualStyleBackColor = true;
|
||||
this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
|
||||
//
|
||||
// txtStatus
|
||||
//
|
||||
this.txtStatus.Location = new System.Drawing.Point(99, 429);
|
||||
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, 351);
|
||||
this.txtSales.Name = "txtSales";
|
||||
this.txtSales.ReadOnly = true;
|
||||
this.txtSales.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtSales.TabIndex = 54;
|
||||
this.txtSales.TextChanged += new System.EventHandler(this.txtSales_TextChanged);
|
||||
//
|
||||
// txtDeposited
|
||||
//
|
||||
this.txtDeposited.Location = new System.Drawing.Point(99, 403);
|
||||
this.txtDeposited.Name = "txtDeposited";
|
||||
this.txtDeposited.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtDeposited.TabIndex = 38;
|
||||
//
|
||||
// txtPending
|
||||
//
|
||||
this.txtPending.Location = new System.Drawing.Point(99, 325);
|
||||
this.txtPending.Name = "txtPending";
|
||||
this.txtPending.ReadOnly = true;
|
||||
this.txtPending.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtPending.TabIndex = 53;
|
||||
//
|
||||
// cmbCashier
|
||||
//
|
||||
this.cmbCashier.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbCashier.FormattingEnabled = true;
|
||||
this.cmbCashier.Location = new System.Drawing.Point(99, 38);
|
||||
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);
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(128, 15);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(54, 13);
|
||||
this.label10.TabIndex = 57;
|
||||
this.label10.Text = "<- Date ->";
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(12, 41);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(42, 13);
|
||||
this.label9.TabIndex = 58;
|
||||
this.label9.Text = "Cashier";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(12, 250);
|
||||
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, 224);
|
||||
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, 198);
|
||||
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, 172);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(73, 13);
|
||||
this.label5.TabIndex = 63;
|
||||
this.label5.Text = "Adv. Adjusted";
|
||||
//
|
||||
// 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, 195);
|
||||
this.txtPayments.Name = "txtPayments";
|
||||
this.txtPayments.ReadOnly = true;
|
||||
this.txtPayments.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtPayments.TabIndex = 48;
|
||||
//
|
||||
// txtAdvanceAdjusted
|
||||
//
|
||||
this.txtAdvanceAdjusted.Location = new System.Drawing.Point(99, 169);
|
||||
this.txtAdvanceAdjusted.Name = "txtAdvanceAdjusted";
|
||||
this.txtAdvanceAdjusted.ReadOnly = true;
|
||||
this.txtAdvanceAdjusted.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtAdvanceAdjusted.TabIndex = 47;
|
||||
//
|
||||
// txtCCReceipts
|
||||
//
|
||||
this.txtCCReceipts.Location = new System.Drawing.Point(99, 143);
|
||||
this.txtCCReceipts.Name = "txtCCReceipts";
|
||||
this.txtCCReceipts.ReadOnly = true;
|
||||
this.txtCCReceipts.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtCCReceipts.TabIndex = 46;
|
||||
//
|
||||
// txtAdditionalVoids
|
||||
//
|
||||
this.txtAdditionalVoids.Location = new System.Drawing.Point(99, 221);
|
||||
this.txtAdditionalVoids.Name = "txtAdditionalVoids";
|
||||
this.txtAdditionalVoids.ReadOnly = true;
|
||||
this.txtAdditionalVoids.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtAdditionalVoids.TabIndex = 49;
|
||||
//
|
||||
// txtVoidsInSystem
|
||||
//
|
||||
this.txtVoidsInSystem.Location = new System.Drawing.Point(99, 247);
|
||||
this.txtVoidsInSystem.Name = "txtVoidsInSystem";
|
||||
this.txtVoidsInSystem.ReadOnly = true;
|
||||
this.txtVoidsInSystem.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtVoidsInSystem.TabIndex = 50;
|
||||
//
|
||||
// txtDiscounts
|
||||
//
|
||||
this.txtDiscounts.Location = new System.Drawing.Point(99, 273);
|
||||
this.txtDiscounts.Name = "txtDiscounts";
|
||||
this.txtDiscounts.ReadOnly = true;
|
||||
this.txtDiscounts.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtDiscounts.TabIndex = 51;
|
||||
//
|
||||
// txtRates
|
||||
//
|
||||
this.txtRates.Location = new System.Drawing.Point(99, 299);
|
||||
this.txtRates.Name = "txtRates";
|
||||
this.txtRates.ReadOnly = true;
|
||||
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.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.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.Size = new System.Drawing.Size(200, 20);
|
||||
this.txtOpening.TabIndex = 43;
|
||||
//
|
||||
// Cashier_Checkout_Form
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(311, 519);
|
||||
this.Controls.Add(this.label18);
|
||||
this.Controls.Add(this.txtClosingCash);
|
||||
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.txtAdvanceAdjusted);
|
||||
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 = "Cashier_Checkout_Form";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Cashier Checkout Form";
|
||||
this.Load += new System.EventHandler(this.Cashier_Checkout_Form_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#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 txtAdvanceAdjusted;
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -1,94 +0,0 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Tanshu.Accounts.Repository;
|
||||
using Tanshu.Accounts.Print;
|
||||
using Tanshu.Accounts.Helpers;
|
||||
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
public partial class Cashier_Checkout_Form : Form
|
||||
{
|
||||
CheckoutBI coProxy;
|
||||
//private static readonly Tanshu.Logging.SqlLogger log = new Tanshu.Logging.SqlLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
public Cashier_Checkout_Form()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Cashier_Checkout_Form_Load(object sender, EventArgs e)
|
||||
{
|
||||
dtpStart.Format = DateTimePickerFormat.Custom;
|
||||
dtpStart.CustomFormat = "dd-MMM-yyyy HH:mm:ss";
|
||||
dtpStart.Value = DateTime.Now;
|
||||
dtpFinish.Format = DateTimePickerFormat.Custom;
|
||||
dtpFinish.CustomFormat = "dd-MMM-yyyy HH:mm:ss";
|
||||
dtpFinish.Value = DateTime.Now;
|
||||
FillUsers();
|
||||
}
|
||||
|
||||
private void FillUsers()
|
||||
{
|
||||
cmbCashier.DisplayMember = "Name";
|
||||
cmbCashier.ValueMember = "UserID";
|
||||
cmbCashier.DataSource = UserBI.GetUsers();
|
||||
}
|
||||
|
||||
private void cmbCashier_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
EmployeeStatus();
|
||||
//log.Warn(string.Format("User Checkout: {0} by {1}", coProxy.Cashier, Session.User.Name));
|
||||
}
|
||||
|
||||
private void EmployeeStatus()
|
||||
{
|
||||
if (cmbCashier.SelectedValue == null)
|
||||
return;
|
||||
dtpStart.Value = Convert.ToDateTime(String.Format("{0:dd-MMM-yyyy} 00:00:00", dtpStart.Value));
|
||||
dtpFinish.Value = Convert.ToDateTime(String.Format("{0:dd-MMM-yyyy} 23:59:59", dtpFinish.Value));
|
||||
|
||||
coProxy = new CheckoutBI((int)cmbCashier.SelectedValue, dtpStart.Value, dtpFinish.Value);
|
||||
txtOpening.Text = coProxy.Opening.ToString();
|
||||
txtReceipts.Text = coProxy.Receipts.ToString();
|
||||
txtAdvanceReceived.Text = coProxy.AdvanceReceipts.ToString();
|
||||
txtCCReceipts.Text = coProxy.CCReceipts.ToString();
|
||||
txtAdvanceAdjusted.Text = coProxy.AdvanceAdjusted.ToString();
|
||||
txtPayments.Text = coProxy.CashPayments.ToString();
|
||||
txtAdditionalVoids.Text = coProxy.AdditionalVoids.ToString();
|
||||
txtVoidsInSystem.Text = coProxy.VoidsInSystem.ToString();
|
||||
txtPending.Text = coProxy.PendingBills.ToString();
|
||||
txtSales.Text = coProxy.NetSales.ToString();
|
||||
txtClosingCash.Text = coProxy.ClosingBalance.ToString();
|
||||
txtStatus.Text = coProxy.Status;
|
||||
}
|
||||
|
||||
private void dtpStart_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
EmployeeStatus();
|
||||
}
|
||||
|
||||
private void dtpFinish_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
EmployeeStatus();
|
||||
}
|
||||
|
||||
private void btnCalculate_Click(object sender, EventArgs e)
|
||||
{
|
||||
decimal deposited = 0;
|
||||
if (!decimal.TryParse(txtDeposited.Text, out deposited))
|
||||
deposited = 0;
|
||||
|
||||
coProxy.Calculate(deposited, 0);
|
||||
txtStatus.Text = coProxy.Status;
|
||||
}
|
||||
|
||||
private void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
Thermal.PrintClosing(coProxy);
|
||||
}
|
||||
|
||||
private void txtSales_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
111
Tanshu.Accounts.PointOfSale/Sales/DiscountForm.Designer.cs
generated
Normal file
111
Tanshu.Accounts.PointOfSale/Sales/DiscountForm.Designer.cs
generated
Normal file
@ -0,0 +1,111 @@
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
partial class DiscountForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.numpadControl1 = new Tanshu.Common.KeyboardControl.NumpadControl();
|
||||
this.txtAmount = new System.Windows.Forms.TextBox();
|
||||
this.flpModifier = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.numpadControl1);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.txtAmount);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.flpModifier);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(619, 492);
|
||||
this.splitContainer1.SplitterDistance = 230;
|
||||
this.splitContainer1.TabIndex = 2;
|
||||
//
|
||||
// numpadControl1
|
||||
//
|
||||
this.numpadControl1.Location = new System.Drawing.Point(3, 29);
|
||||
this.numpadControl1.Name = "numpadControl1";
|
||||
this.numpadControl1.Size = new System.Drawing.Size(224, 224);
|
||||
this.numpadControl1.TabIndex = 1;
|
||||
//
|
||||
// txtAmount
|
||||
//
|
||||
this.txtAmount.Location = new System.Drawing.Point(3, 3);
|
||||
this.txtAmount.Name = "txtAmount";
|
||||
this.txtAmount.Size = new System.Drawing.Size(224, 20);
|
||||
this.txtAmount.TabIndex = 0;
|
||||
this.txtAmount.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAmount_KeyDown);
|
||||
//
|
||||
// flpModifier
|
||||
//
|
||||
this.flpModifier.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.flpModifier.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.flpModifier.Location = new System.Drawing.Point(0, 0);
|
||||
this.flpModifier.Name = "flpModifier";
|
||||
this.flpModifier.Size = new System.Drawing.Size(385, 492);
|
||||
this.flpModifier.TabIndex = 6;
|
||||
//
|
||||
// DiscountForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(619, 492);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "DiscountForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Discount";
|
||||
this.Load += new System.EventHandler(this.DiscountForm_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private Tanshu.Common.KeyboardControl.NumpadControl numpadControl1;
|
||||
private System.Windows.Forms.TextBox txtAmount;
|
||||
private System.Windows.Forms.FlowLayoutPanel flpModifier;
|
||||
|
||||
}
|
||||
}
|
||||
73
Tanshu.Accounts.PointOfSale/Sales/DiscountForm.cs
Normal file
73
Tanshu.Accounts.PointOfSale/Sales/DiscountForm.cs
Normal file
@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Tanshu.Accounts.Entities;
|
||||
using Tanshu.Accounts.Contracts;
|
||||
using Tanshu.Accounts.SqlDAO;
|
||||
using Tanshu.Accounts.Helpers;
|
||||
using Tanshu.Common.KeyboardControl;
|
||||
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
public partial class DiscountForm : Form
|
||||
{
|
||||
private IList<ProductGroup> source;
|
||||
private IList<UnselectableCheckbox> list;
|
||||
private IList<int> selection;
|
||||
decimal discount;
|
||||
public DiscountForm(IList<ProductGroup> source)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.source = source;
|
||||
list = new List<UnselectableCheckbox>();
|
||||
selection = new List<int>();
|
||||
}
|
||||
|
||||
private void button_Click(object sender, EventArgs e)
|
||||
{
|
||||
CheckBox button = sender as CheckBox;
|
||||
if (button == null)
|
||||
return;
|
||||
var pg = (ProductGroup)button.Tag;
|
||||
if (button.CheckState == CheckState.Checked)
|
||||
selection.Add(pg.ProductGroupID);
|
||||
else
|
||||
selection.Remove(pg.ProductGroupID);
|
||||
}
|
||||
public decimal Selection(out IList<int> list)
|
||||
{
|
||||
list = selection;
|
||||
return discount;
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void DiscountForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
ControlFactory.GenerateGroups(ref flpModifier, ref list, new Point(75, 75), source, new ButtonClickDelegate(button_Click));
|
||||
}
|
||||
|
||||
private void txtAmount_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Return && decimal.TryParse(txtAmount.Text, out discount) && discount >= 0 && discount <= 100)
|
||||
{
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
else if (e.KeyCode == Keys.Escape)
|
||||
{
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,83 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Tanshu.Accounts.Helpers;
|
||||
using Tanshu.Accounts.Print;
|
||||
using Tanshu.Accounts.Contracts;
|
||||
using Tanshu.Accounts.Repository;
|
||||
using Tanshu.Accounts.Entities;
|
||||
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
public partial class RecieveAdvanceForm : Form
|
||||
{
|
||||
bool loading = true;
|
||||
public RecieveAdvanceForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Convert.ToDecimal(txtAmount.Text) == 0)
|
||||
return;
|
||||
Advance adv = new Advance();
|
||||
adv.Narration = txtNarration.Text;
|
||||
adv.Amount = Convert.ToDecimal(txtAmount.Text.Trim());
|
||||
adv.CashierIn = UserBI.GetUser((int)txtCashier.Tag);
|
||||
adv.DateIn = DateTime.Now;
|
||||
new AdvanceBI().Insert(adv);
|
||||
GridBind();
|
||||
PrintAdvances();
|
||||
}
|
||||
|
||||
|
||||
private void RecieveAdvanceForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
dtpFrom.Format = DateTimePickerFormat.Custom;
|
||||
dtpFrom.CustomFormat = "dd-MMM-yyyy";
|
||||
dtpFrom.Value = DateTime.Now;
|
||||
dtpTo.Format = DateTimePickerFormat.Custom;
|
||||
dtpTo.CustomFormat = "dd-MMM-yyyy";
|
||||
dtpTo.Value = DateTime.Now;
|
||||
txtCashier.Text = Session.User.Name;
|
||||
txtCashier.Tag = Session.User.UserID;
|
||||
loading = false;
|
||||
GridBind();
|
||||
}
|
||||
|
||||
private void GridBind()
|
||||
{
|
||||
var advance = new AdvanceBI().GetAdvances(dtpFrom.Value, dtpTo.Value, true);
|
||||
dgExpenses.DataSource = advance;
|
||||
}
|
||||
|
||||
private void dtpFrom_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!loading)
|
||||
GridBind();
|
||||
}
|
||||
private void PrintAdvances()
|
||||
{
|
||||
Thermal.PrintAdvance(Session.User.Name, txtAmount.Text.Trim(), txtNarration.Text.Trim());
|
||||
}
|
||||
private string AddDate(string SqlStringP, DateTime FromDate, DateTime ToDate)
|
||||
{
|
||||
return SqlStringP.Replace("$From$", string.Format(FromDate.ToString(), "dd-MMM-yyyy" + " 05:00:00")).Replace("$To$", string.Format(ToDate.ToString(), "dd-MMM-yyyy" + " 23:59:59"));
|
||||
}
|
||||
|
||||
private void txtAmount_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void txtAmount_Leave(object sender, EventArgs e)
|
||||
{
|
||||
if (txtAmount.Text.Trim() == "")
|
||||
{
|
||||
txtAmount.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,258 +0,0 @@
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
partial class RecieveAdvanceForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.btnAdd = new System.Windows.Forms.Button();
|
||||
this.Label7 = new System.Windows.Forms.Label();
|
||||
this.txtNarration = new System.Windows.Forms.TextBox();
|
||||
this.txtAmount = new System.Windows.Forms.TextBox();
|
||||
this.lblAmount = new System.Windows.Forms.Label();
|
||||
this.txtCashier = new System.Windows.Forms.TextBox();
|
||||
this.Label5 = new System.Windows.Forms.Label();
|
||||
this.txtVoid = new System.Windows.Forms.TextBox();
|
||||
this.txtAmt = new System.Windows.Forms.TextBox();
|
||||
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.dtpTo = new System.Windows.Forms.DateTimePicker();
|
||||
this.dtpFrom = new System.Windows.Forms.DateTimePicker();
|
||||
this.dgExpenses = new System.Windows.Forms.DataGridView();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgExpenses)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnAdd
|
||||
//
|
||||
this.btnAdd.Location = new System.Drawing.Point(60, 115);
|
||||
this.btnAdd.Name = "btnAdd";
|
||||
this.btnAdd.Size = new System.Drawing.Size(75, 21);
|
||||
this.btnAdd.TabIndex = 109;
|
||||
this.btnAdd.Text = "&Add";
|
||||
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
|
||||
//
|
||||
// Label7
|
||||
//
|
||||
this.Label7.AutoSize = true;
|
||||
this.Label7.Location = new System.Drawing.Point(12, 92);
|
||||
this.Label7.Name = "Label7";
|
||||
this.Label7.Size = new System.Drawing.Size(50, 13);
|
||||
this.Label7.TabIndex = 108;
|
||||
this.Label7.Text = "Narration";
|
||||
//
|
||||
// txtNarration
|
||||
//
|
||||
this.txtNarration.Location = new System.Drawing.Point(68, 89);
|
||||
this.txtNarration.Name = "txtNarration";
|
||||
this.txtNarration.Size = new System.Drawing.Size(322, 20);
|
||||
this.txtNarration.TabIndex = 107;
|
||||
//
|
||||
// txtAmount
|
||||
//
|
||||
this.txtAmount.Location = new System.Drawing.Point(68, 64);
|
||||
this.txtAmount.Name = "txtAmount";
|
||||
this.txtAmount.Size = new System.Drawing.Size(92, 20);
|
||||
this.txtAmount.TabIndex = 106;
|
||||
this.txtAmount.Text = "0";
|
||||
this.txtAmount.TextChanged += new System.EventHandler(this.txtAmount_TextChanged);
|
||||
this.txtAmount.Leave += new System.EventHandler(this.txtAmount_Leave);
|
||||
//
|
||||
// lblAmount
|
||||
//
|
||||
this.lblAmount.AutoSize = true;
|
||||
this.lblAmount.Location = new System.Drawing.Point(19, 67);
|
||||
this.lblAmount.Name = "lblAmount";
|
||||
this.lblAmount.Size = new System.Drawing.Size(43, 13);
|
||||
this.lblAmount.TabIndex = 105;
|
||||
this.lblAmount.Text = "Amount";
|
||||
//
|
||||
// txtCashier
|
||||
//
|
||||
this.txtCashier.Location = new System.Drawing.Point(68, 38);
|
||||
this.txtCashier.Name = "txtCashier";
|
||||
this.txtCashier.ReadOnly = true;
|
||||
this.txtCashier.Size = new System.Drawing.Size(322, 20);
|
||||
this.txtCashier.TabIndex = 104;
|
||||
//
|
||||
// Label5
|
||||
//
|
||||
this.Label5.AutoSize = true;
|
||||
this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label5.Location = new System.Drawing.Point(78, 505);
|
||||
this.Label5.Name = "Label5";
|
||||
this.Label5.Size = new System.Drawing.Size(40, 16);
|
||||
this.Label5.TabIndex = 103;
|
||||
this.Label5.Text = "Void";
|
||||
//
|
||||
// txtVoid
|
||||
//
|
||||
this.txtVoid.BackColor = System.Drawing.Color.Black;
|
||||
this.txtVoid.ForeColor = System.Drawing.Color.Lime;
|
||||
this.txtVoid.Location = new System.Drawing.Point(124, 504);
|
||||
this.txtVoid.Name = "txtVoid";
|
||||
this.txtVoid.ReadOnly = true;
|
||||
this.txtVoid.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtVoid.TabIndex = 102;
|
||||
this.txtVoid.Text = "0.00";
|
||||
this.txtVoid.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
//
|
||||
// txtAmt
|
||||
//
|
||||
this.txtAmt.BackColor = System.Drawing.Color.Black;
|
||||
this.txtAmt.ForeColor = System.Drawing.Color.Lime;
|
||||
this.txtAmt.Location = new System.Drawing.Point(280, 504);
|
||||
this.txtAmt.Name = "txtAmt";
|
||||
this.txtAmt.ReadOnly = true;
|
||||
this.txtAmt.Size = new System.Drawing.Size(110, 20);
|
||||
this.txtAmt.TabIndex = 101;
|
||||
this.txtAmt.Text = "0.00";
|
||||
this.txtAmt.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
//
|
||||
// Label4
|
||||
//
|
||||
this.Label4.AutoSize = true;
|
||||
this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Label4.Location = new System.Drawing.Point(230, 505);
|
||||
this.Label4.Name = "Label4";
|
||||
this.Label4.Size = new System.Drawing.Size(44, 16);
|
||||
this.Label4.TabIndex = 100;
|
||||
this.Label4.Text = "Total";
|
||||
//
|
||||
// Label3
|
||||
//
|
||||
this.Label3.AutoSize = true;
|
||||
this.Label3.Location = new System.Drawing.Point(20, 41);
|
||||
this.Label3.Name = "Label3";
|
||||
this.Label3.Size = new System.Drawing.Size(42, 13);
|
||||
this.Label3.TabIndex = 99;
|
||||
this.Label3.Text = "Cashier";
|
||||
//
|
||||
// Label2
|
||||
//
|
||||
this.Label2.AutoSize = true;
|
||||
this.Label2.Location = new System.Drawing.Point(197, 18);
|
||||
this.Label2.Name = "Label2";
|
||||
this.Label2.Size = new System.Drawing.Size(20, 13);
|
||||
this.Label2.TabIndex = 96;
|
||||
this.Label2.Text = "To";
|
||||
//
|
||||
// Label1
|
||||
//
|
||||
this.Label1.AutoSize = true;
|
||||
this.Label1.Location = new System.Drawing.Point(32, 18);
|
||||
this.Label1.Name = "Label1";
|
||||
this.Label1.Size = new System.Drawing.Size(30, 13);
|
||||
this.Label1.TabIndex = 94;
|
||||
this.Label1.Text = "From";
|
||||
//
|
||||
// dtpTo
|
||||
//
|
||||
this.dtpTo.Location = new System.Drawing.Point(223, 12);
|
||||
this.dtpTo.Name = "dtpTo";
|
||||
this.dtpTo.Size = new System.Drawing.Size(167, 20);
|
||||
this.dtpTo.TabIndex = 97;
|
||||
//
|
||||
// dtpFrom
|
||||
//
|
||||
this.dtpFrom.Location = new System.Drawing.Point(68, 11);
|
||||
this.dtpFrom.Name = "dtpFrom";
|
||||
this.dtpFrom.Size = new System.Drawing.Size(121, 20);
|
||||
this.dtpFrom.TabIndex = 95;
|
||||
this.dtpFrom.ValueChanged += new System.EventHandler(this.dtpFrom_ValueChanged);
|
||||
//
|
||||
// dgExpenses
|
||||
//
|
||||
this.dgExpenses.AllowUserToAddRows = false;
|
||||
this.dgExpenses.AllowUserToDeleteRows = false;
|
||||
this.dgExpenses.AllowUserToResizeRows = false;
|
||||
this.dgExpenses.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.dgExpenses.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells;
|
||||
this.dgExpenses.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgExpenses.Location = new System.Drawing.Point(12, 142);
|
||||
this.dgExpenses.Name = "dgExpenses";
|
||||
this.dgExpenses.ReadOnly = true;
|
||||
this.dgExpenses.RowHeadersVisible = false;
|
||||
this.dgExpenses.RowTemplate.Height = 19;
|
||||
this.dgExpenses.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dgExpenses.Size = new System.Drawing.Size(378, 356);
|
||||
this.dgExpenses.TabIndex = 110;
|
||||
//
|
||||
// RecieveAdvanceForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(402, 536);
|
||||
this.Controls.Add(this.dgExpenses);
|
||||
this.Controls.Add(this.btnAdd);
|
||||
this.Controls.Add(this.Label7);
|
||||
this.Controls.Add(this.txtNarration);
|
||||
this.Controls.Add(this.txtAmount);
|
||||
this.Controls.Add(this.lblAmount);
|
||||
this.Controls.Add(this.txtCashier);
|
||||
this.Controls.Add(this.Label5);
|
||||
this.Controls.Add(this.txtVoid);
|
||||
this.Controls.Add(this.txtAmt);
|
||||
this.Controls.Add(this.Label4);
|
||||
this.Controls.Add(this.Label3);
|
||||
this.Controls.Add(this.Label2);
|
||||
this.Controls.Add(this.Label1);
|
||||
this.Controls.Add(this.dtpTo);
|
||||
this.Controls.Add(this.dtpFrom);
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "RecieveAdvanceForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Received Advance";
|
||||
this.Load += new System.EventHandler(this.RecieveAdvanceForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgExpenses)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
internal System.Windows.Forms.Button btnAdd;
|
||||
internal System.Windows.Forms.Label Label7;
|
||||
internal System.Windows.Forms.TextBox txtNarration;
|
||||
internal System.Windows.Forms.TextBox txtAmount;
|
||||
internal System.Windows.Forms.Label lblAmount;
|
||||
internal System.Windows.Forms.TextBox txtCashier;
|
||||
internal System.Windows.Forms.Label Label5;
|
||||
internal System.Windows.Forms.TextBox txtVoid;
|
||||
internal System.Windows.Forms.TextBox txtAmt;
|
||||
internal System.Windows.Forms.Label Label4;
|
||||
internal System.Windows.Forms.Label Label3;
|
||||
internal System.Windows.Forms.Label Label2;
|
||||
internal System.Windows.Forms.Label Label1;
|
||||
internal System.Windows.Forms.DateTimePicker dtpTo;
|
||||
internal System.Windows.Forms.DateTimePicker dtpFrom;
|
||||
private System.Windows.Forms.DataGridView dgExpenses;
|
||||
}
|
||||
}
|
||||
@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@ -1,98 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Tanshu.Accounts.Repository;
|
||||
using Tanshu.Accounts.Contracts;
|
||||
using Tanshu.Accounts.Helpers;
|
||||
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
public partial class frmSaleAnalysisForm : Form
|
||||
{
|
||||
int? details = null;
|
||||
IList<SalesAnalysis> det;
|
||||
//private static readonly Tanshu.Logging.SqlLogger log = new Tanshu.Logging.SqlLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
public frmSaleAnalysisForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
//log.Warn(string.Format("Sales Analysis by: {0}", Session.User.Name));
|
||||
}
|
||||
|
||||
private void dtpStart_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ShowStatement();
|
||||
}
|
||||
|
||||
private void ShowStatement()
|
||||
{
|
||||
DateTime startDate = Convert.ToDateTime(String.Format("{0:dd-MMM-yyyy} 00:00:00", dtpStart.Value));
|
||||
DateTime finishDate = Convert.ToDateTime(String.Format("{0:dd-MMM-yyyy} 23:59:59", dtpFinish.Value));
|
||||
|
||||
if (details.HasValue)
|
||||
{
|
||||
var list = new SalesAnalysisBI().GetSaleDetail(startDate, finishDate, details.Value);
|
||||
dgvSale.AutoGenerateColumns = true;
|
||||
dgvSale.DataSource = list;
|
||||
dgvSale.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
dgvSale.Columns[2].DefaultCellStyle.Format = "#,##0.00;(#,##0.00);0";
|
||||
dgvSale.Columns[3].DefaultCellStyle.Format = "#,##0.00;(#,##0.00);0";
|
||||
}
|
||||
else
|
||||
{
|
||||
det = new SalesAnalysisBI().GetSale(startDate, finishDate);
|
||||
dgvSale.AutoGenerateColumns = true;
|
||||
dgvSale.DataSource = det;
|
||||
dgvSale.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
|
||||
dgvSale.Columns[0].Visible = false;
|
||||
dgvSale.Columns[2].DefaultCellStyle.Format = "#,##0.00;(#,##0.00);0";
|
||||
dgvSale.Columns[3].DefaultCellStyle.Format = "#,##0.00;(#,##0.00);0";
|
||||
}
|
||||
|
||||
|
||||
decimal freeSale = 0, voids = 0, pending = 0, net = 0, tax = 0;
|
||||
new SalesAnalysisBI().GetAdditionalInfo(ref freeSale, ref voids, ref pending, ref net, ref tax, startDate, finishDate);
|
||||
|
||||
txtVoid.Text = String.Format("{0:#,##0.00;(#,##0.00);0}", voids);
|
||||
txtPending.Text = String.Format("{0:#,##0.00;(#,##0.00);0}", pending);
|
||||
txtNet.Text = String.Format("{0:#,##0.00;(#,##0.00);0}", net);
|
||||
txtTax.Text = String.Format("{0:#,##0.00;(#,##0.00);0}", tax);
|
||||
txtGross.Text = String.Format("{0:#,##0.00;(#,##0.00);0}", net + tax);
|
||||
}
|
||||
|
||||
private void dtpFinish_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
ShowStatement();
|
||||
}
|
||||
|
||||
private void Sale_Analysis_Form_Load(object sender, EventArgs e)
|
||||
{
|
||||
dtpStart.Value = DateTime.Today;
|
||||
dtpFinish.Value = DateTime.Today;
|
||||
ShowStatement();
|
||||
}
|
||||
|
||||
private void dgvSale_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!details.HasValue)
|
||||
details = ((SalesAnalysis)dgvSale.SelectedRows[0].DataBoundItem).TypeID;
|
||||
else
|
||||
details = null;
|
||||
ShowStatement();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{ throw ex; }
|
||||
}
|
||||
|
||||
private void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (det != null)
|
||||
{
|
||||
DateTime startDate = Convert.ToDateTime(String.Format("{0:dd-MMM-yyyy} 00:00:00", dtpStart.Value));
|
||||
DateTime finishDate = Convert.ToDateTime(String.Format("{0:dd-MMM-yyyy} 23:59:59", dtpFinish.Value));
|
||||
Accounts.Print.Thermal.PrintSale(Session.User.Name, det, startDate, finishDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,240 +0,0 @@
|
||||
namespace Tanshu.Accounts.PointOfSale
|
||||
{
|
||||
partial class frmSaleAnalysisForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.txtNet = new System.Windows.Forms.TextBox();
|
||||
this.txtTax = new System.Windows.Forms.TextBox();
|
||||
this.txtGross = new System.Windows.Forms.TextBox();
|
||||
this.txtPending = new System.Windows.Forms.TextBox();
|
||||
this.txtVoid = new System.Windows.Forms.TextBox();
|
||||
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.dgvSale = new System.Windows.Forms.DataGridView();
|
||||
this.dtpFinish = new System.Windows.Forms.DateTimePicker();
|
||||
this.dtpStart = new System.Windows.Forms.DateTimePicker();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.btnPrint = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvSale)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtNet
|
||||
//
|
||||
this.txtNet.Location = new System.Drawing.Point(224, 487);
|
||||
this.txtNet.Name = "txtNet";
|
||||
this.txtNet.ReadOnly = true;
|
||||
this.txtNet.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtNet.TabIndex = 17;
|
||||
//
|
||||
// txtTax
|
||||
//
|
||||
this.txtTax.Location = new System.Drawing.Point(330, 487);
|
||||
this.txtTax.Name = "txtTax";
|
||||
this.txtTax.ReadOnly = true;
|
||||
this.txtTax.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtTax.TabIndex = 18;
|
||||
//
|
||||
// txtGross
|
||||
//
|
||||
this.txtGross.Location = new System.Drawing.Point(436, 487);
|
||||
this.txtGross.Name = "txtGross";
|
||||
this.txtGross.ReadOnly = true;
|
||||
this.txtGross.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtGross.TabIndex = 19;
|
||||
//
|
||||
// txtPending
|
||||
//
|
||||
this.txtPending.Location = new System.Drawing.Point(118, 487);
|
||||
this.txtPending.Name = "txtPending";
|
||||
this.txtPending.ReadOnly = true;
|
||||
this.txtPending.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtPending.TabIndex = 16;
|
||||
//
|
||||
// txtVoid
|
||||
//
|
||||
this.txtVoid.Location = new System.Drawing.Point(12, 487);
|
||||
this.txtVoid.Name = "txtVoid";
|
||||
this.txtVoid.ReadOnly = true;
|
||||
this.txtVoid.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtVoid.TabIndex = 15;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(115, 471);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(70, 13);
|
||||
this.label5.TabIndex = 24;
|
||||
this.label5.Text = "Pending Sale";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(12, 471);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(52, 13);
|
||||
this.label4.TabIndex = 23;
|
||||
this.label4.Text = "Void Sale";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(327, 471);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(25, 13);
|
||||
this.label3.TabIndex = 26;
|
||||
this.label3.Text = "Tax";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(433, 471);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(58, 13);
|
||||
this.label2.TabIndex = 27;
|
||||
this.label2.Text = "Gross Sale";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(221, 471);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(48, 13);
|
||||
this.label1.TabIndex = 25;
|
||||
this.label1.Text = "Net Sale";
|
||||
//
|
||||
// dgvSale
|
||||
//
|
||||
this.dgvSale.AllowUserToAddRows = false;
|
||||
this.dgvSale.AllowUserToDeleteRows = false;
|
||||
this.dgvSale.AllowUserToResizeRows = false;
|
||||
this.dgvSale.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvSale.Location = new System.Drawing.Point(12, 41);
|
||||
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(524, 427);
|
||||
this.dgvSale.TabIndex = 14;
|
||||
this.dgvSale.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSale_CellDoubleClick);
|
||||
//
|
||||
// dtpFinish
|
||||
//
|
||||
this.dtpFinish.CustomFormat = "dd-MMM-yyyy";
|
||||
this.dtpFinish.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.dtpFinish.Location = new System.Drawing.Point(168, 12);
|
||||
this.dtpFinish.Name = "dtpFinish";
|
||||
this.dtpFinish.Size = new System.Drawing.Size(90, 20);
|
||||
this.dtpFinish.TabIndex = 21;
|
||||
this.dtpFinish.ValueChanged += new System.EventHandler(this.dtpFinish_ValueChanged);
|
||||
//
|
||||
// dtpStart
|
||||
//
|
||||
this.dtpStart.CustomFormat = "dd-MMM-yyyy";
|
||||
this.dtpStart.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.dtpStart.Location = new System.Drawing.Point(12, 12);
|
||||
this.dtpStart.Name = "dtpStart";
|
||||
this.dtpStart.Size = new System.Drawing.Size(90, 20);
|
||||
this.dtpStart.TabIndex = 20;
|
||||
this.dtpStart.ValueChanged += new System.EventHandler(this.dtpStart_ValueChanged);
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(108, 16);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(54, 13);
|
||||
this.label10.TabIndex = 22;
|
||||
this.label10.Text = "<- Date ->";
|
||||
//
|
||||
// btnPrint
|
||||
//
|
||||
this.btnPrint.Location = new System.Drawing.Point(461, 12);
|
||||
this.btnPrint.Name = "btnPrint";
|
||||
this.btnPrint.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnPrint.TabIndex = 28;
|
||||
this.btnPrint.Text = "Print";
|
||||
this.btnPrint.UseVisualStyleBackColor = true;
|
||||
this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
|
||||
//
|
||||
// frmSaleAnalysisForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(548, 519);
|
||||
this.Controls.Add(this.btnPrint);
|
||||
this.Controls.Add(this.txtNet);
|
||||
this.Controls.Add(this.txtTax);
|
||||
this.Controls.Add(this.txtGross);
|
||||
this.Controls.Add(this.txtPending);
|
||||
this.Controls.Add(this.txtVoid);
|
||||
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.dgvSale);
|
||||
this.Controls.Add(this.dtpFinish);
|
||||
this.Controls.Add(this.dtpStart);
|
||||
this.Controls.Add(this.label10);
|
||||
this.MaximizeBox = false;
|
||||
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);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvSale)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox txtNet;
|
||||
private System.Windows.Forms.TextBox txtTax;
|
||||
private System.Windows.Forms.TextBox txtGross;
|
||||
private System.Windows.Forms.TextBox txtPending;
|
||||
private System.Windows.Forms.TextBox txtVoid;
|
||||
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.DataGridView dgvSale;
|
||||
private System.Windows.Forms.DateTimePicker dtpFinish;
|
||||
private System.Windows.Forms.DateTimePicker dtpStart;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.Button btnPrint;
|
||||
}
|
||||
}
|
||||
@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
365
Tanshu.Accounts.PointOfSale/Sales/SalesForm.Designer.cs
generated
365
Tanshu.Accounts.PointOfSale/Sales/SalesForm.Designer.cs
generated
@ -29,8 +29,9 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.txtDiscount = new System.Windows.Forms.TextBox();
|
||||
this.Label12 = new System.Windows.Forms.Label();
|
||||
@ -41,21 +42,22 @@
|
||||
this.txtGrossTax = new System.Windows.Forms.TextBox();
|
||||
this.dgvProducts = new System.Windows.Forms.DataGridView();
|
||||
this.Display = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.printedDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.additionalDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.bindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.pnlBilling = new System.Windows.Forms.Panel();
|
||||
this.flpMain = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.flpGroup = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.flpActions = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.btnQuantity = new System.Windows.Forms.Button();
|
||||
this.btnRate = new System.Windows.Forms.Button();
|
||||
this.btnDiscount = new System.Windows.Forms.Button();
|
||||
this.btnModifier = new System.Windows.Forms.Button();
|
||||
this.btnWaiter = new System.Windows.Forms.Button();
|
||||
this.btnPrintKot = new System.Windows.Forms.Button();
|
||||
this.btnPrintBill = new System.Windows.Forms.Button();
|
||||
this.btnClear = new System.Windows.Forms.Button();
|
||||
this.btnVoid = new System.Windows.Forms.Button();
|
||||
this.btnSettle = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.txtServiceCharge = new System.Windows.Forms.TextBox();
|
||||
this.btnWaiter = new System.Windows.Forms.Button();
|
||||
this.btnClear = new System.Windows.Forms.Button();
|
||||
this.btnRate = new System.Windows.Forms.Button();
|
||||
this.btnPrintKot = new System.Windows.Forms.Button();
|
||||
this.btnPrintBill = new System.Windows.Forms.Button();
|
||||
this.btnVoid = new System.Windows.Forms.Button();
|
||||
this.btnDiscount = new System.Windows.Forms.Button();
|
||||
this.btnQuantity = new System.Windows.Forms.Button();
|
||||
this.txtTableID = new System.Windows.Forms.TextBox();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
@ -69,18 +71,18 @@
|
||||
this.txtBillID = new System.Windows.Forms.TextBox();
|
||||
this.txtKotID = new System.Windows.Forms.TextBox();
|
||||
this.btnCustomer = new System.Windows.Forms.Button();
|
||||
this.printedDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.additionalDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.bindingSource = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.bsWaiter = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.bsPending = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.btnModifier = new System.Windows.Forms.Button();
|
||||
this.flpActions = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.flpGroup = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.flpMain = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.btnDelete = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvProducts)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit();
|
||||
this.pnlBilling.SuspendLayout();
|
||||
this.flpActions.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bsWaiter)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bsPending)).BeginInit();
|
||||
this.flpActions.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label7
|
||||
@ -183,6 +185,7 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.dgvProducts.AutoGenerateColumns = false;
|
||||
this.dgvProducts.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCellsExceptHeader;
|
||||
this.dgvProducts.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCellsExceptHeaders;
|
||||
this.dgvProducts.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dgvProducts.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.Display,
|
||||
@ -204,36 +207,13 @@
|
||||
// Display
|
||||
//
|
||||
this.Display.DataPropertyName = "Display";
|
||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.Display.DefaultCellStyle = dataGridViewCellStyle1;
|
||||
this.Display.HeaderText = "Display";
|
||||
this.Display.Name = "Display";
|
||||
this.Display.ReadOnly = true;
|
||||
this.Display.Width = 5;
|
||||
//
|
||||
// printedDataGridViewTextBoxColumn
|
||||
//
|
||||
this.printedDataGridViewTextBoxColumn.DataPropertyName = "Printed";
|
||||
dataGridViewCellStyle5.Format = "N2";
|
||||
this.printedDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle5;
|
||||
this.printedDataGridViewTextBoxColumn.HeaderText = "Printed";
|
||||
this.printedDataGridViewTextBoxColumn.Name = "printedDataGridViewTextBoxColumn";
|
||||
this.printedDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.printedDataGridViewTextBoxColumn.Width = 5;
|
||||
//
|
||||
// additionalDataGridViewTextBoxColumn
|
||||
//
|
||||
this.additionalDataGridViewTextBoxColumn.DataPropertyName = "Additional";
|
||||
dataGridViewCellStyle6.Format = "N2";
|
||||
dataGridViewCellStyle6.NullValue = null;
|
||||
this.additionalDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle6;
|
||||
this.additionalDataGridViewTextBoxColumn.HeaderText = "Additional";
|
||||
this.additionalDataGridViewTextBoxColumn.Name = "additionalDataGridViewTextBoxColumn";
|
||||
this.additionalDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.additionalDataGridViewTextBoxColumn.Width = 5;
|
||||
//
|
||||
// bindingSource
|
||||
//
|
||||
this.bindingSource.DataSource = typeof(Tanshu.Accounts.Contracts.BillInventory);
|
||||
//
|
||||
// pnlBilling
|
||||
//
|
||||
this.pnlBilling.AutoSize = true;
|
||||
@ -271,9 +251,136 @@
|
||||
this.pnlBilling.Size = new System.Drawing.Size(982, 688);
|
||||
this.pnlBilling.TabIndex = 121;
|
||||
//
|
||||
// flpMain
|
||||
//
|
||||
this.flpMain.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.flpMain.Location = new System.Drawing.Point(390, 54);
|
||||
this.flpMain.Name = "flpMain";
|
||||
this.flpMain.Size = new System.Drawing.Size(511, 552);
|
||||
this.flpMain.TabIndex = 159;
|
||||
//
|
||||
// flpGroup
|
||||
//
|
||||
this.flpGroup.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.flpGroup.Location = new System.Drawing.Point(901, 0);
|
||||
this.flpGroup.Name = "flpGroup";
|
||||
this.flpGroup.Size = new System.Drawing.Size(81, 607);
|
||||
this.flpGroup.TabIndex = 158;
|
||||
//
|
||||
// flpActions
|
||||
//
|
||||
this.flpActions.Controls.Add(this.btnQuantity);
|
||||
this.flpActions.Controls.Add(this.btnRate);
|
||||
this.flpActions.Controls.Add(this.btnDelete);
|
||||
this.flpActions.Controls.Add(this.btnDiscount);
|
||||
this.flpActions.Controls.Add(this.btnModifier);
|
||||
this.flpActions.Controls.Add(this.btnWaiter);
|
||||
this.flpActions.Controls.Add(this.btnPrintKot);
|
||||
this.flpActions.Controls.Add(this.btnPrintBill);
|
||||
this.flpActions.Controls.Add(this.btnClear);
|
||||
this.flpActions.Controls.Add(this.btnVoid);
|
||||
this.flpActions.Controls.Add(this.btnSettle);
|
||||
this.flpActions.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.flpActions.Location = new System.Drawing.Point(0, 607);
|
||||
this.flpActions.Name = "flpActions";
|
||||
this.flpActions.Size = new System.Drawing.Size(982, 81);
|
||||
this.flpActions.TabIndex = 157;
|
||||
//
|
||||
// btnQuantity
|
||||
//
|
||||
this.btnQuantity.Location = new System.Drawing.Point(3, 3);
|
||||
this.btnQuantity.Name = "btnQuantity";
|
||||
this.btnQuantity.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnQuantity.TabIndex = 141;
|
||||
this.btnQuantity.Text = "Quantity - F2";
|
||||
this.btnQuantity.UseVisualStyleBackColor = true;
|
||||
this.btnQuantity.Click += new System.EventHandler(this.btnQuantity_Click);
|
||||
//
|
||||
// btnRate
|
||||
//
|
||||
this.btnRate.Location = new System.Drawing.Point(84, 3);
|
||||
this.btnRate.Name = "btnRate";
|
||||
this.btnRate.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnRate.TabIndex = 146;
|
||||
this.btnRate.Text = "&Rate";
|
||||
this.btnRate.UseVisualStyleBackColor = true;
|
||||
this.btnRate.Click += new System.EventHandler(this.btnRate_Click);
|
||||
//
|
||||
// btnDiscount
|
||||
//
|
||||
this.btnDiscount.Location = new System.Drawing.Point(246, 3);
|
||||
this.btnDiscount.Name = "btnDiscount";
|
||||
this.btnDiscount.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnDiscount.TabIndex = 142;
|
||||
this.btnDiscount.Text = "Discount - F3";
|
||||
this.btnDiscount.UseVisualStyleBackColor = true;
|
||||
this.btnDiscount.Click += new System.EventHandler(this.btnDiscount_Click);
|
||||
//
|
||||
// btnModifier
|
||||
//
|
||||
this.btnModifier.Location = new System.Drawing.Point(327, 3);
|
||||
this.btnModifier.Name = "btnModifier";
|
||||
this.btnModifier.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnModifier.TabIndex = 156;
|
||||
this.btnModifier.Text = "Modifier";
|
||||
this.btnModifier.UseVisualStyleBackColor = true;
|
||||
this.btnModifier.Click += new System.EventHandler(this.btnModifier_Click);
|
||||
//
|
||||
// btnWaiter
|
||||
//
|
||||
this.btnWaiter.Location = new System.Drawing.Point(408, 3);
|
||||
this.btnWaiter.Name = "btnWaiter";
|
||||
this.btnWaiter.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnWaiter.TabIndex = 150;
|
||||
this.btnWaiter.Text = "Select Waiter - F5";
|
||||
this.btnWaiter.UseVisualStyleBackColor = true;
|
||||
this.btnWaiter.Click += new System.EventHandler(this.btnWaiter_Click);
|
||||
//
|
||||
// btnPrintKot
|
||||
//
|
||||
this.btnPrintKot.Location = new System.Drawing.Point(489, 3);
|
||||
this.btnPrintKot.Name = "btnPrintKot";
|
||||
this.btnPrintKot.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnPrintKot.TabIndex = 145;
|
||||
this.btnPrintKot.Text = "Print KOT - F12";
|
||||
this.btnPrintKot.UseVisualStyleBackColor = true;
|
||||
this.btnPrintKot.Click += new System.EventHandler(this.btnPrintKot_Click);
|
||||
//
|
||||
// btnPrintBill
|
||||
//
|
||||
this.btnPrintBill.Location = new System.Drawing.Point(570, 3);
|
||||
this.btnPrintBill.Name = "btnPrintBill";
|
||||
this.btnPrintBill.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnPrintBill.TabIndex = 144;
|
||||
this.btnPrintBill.Text = "Print Bill - F11";
|
||||
this.btnPrintBill.UseVisualStyleBackColor = true;
|
||||
this.btnPrintBill.Click += new System.EventHandler(this.btnPrintBill_Click);
|
||||
//
|
||||
// btnClear
|
||||
//
|
||||
this.btnClear.Location = new System.Drawing.Point(651, 3);
|
||||
this.btnClear.Name = "btnClear";
|
||||
this.btnClear.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnClear.TabIndex = 148;
|
||||
this.btnClear.Text = "Clear - Esc";
|
||||
this.btnClear.UseVisualStyleBackColor = true;
|
||||
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
|
||||
//
|
||||
// btnVoid
|
||||
//
|
||||
this.btnVoid.Location = new System.Drawing.Point(732, 3);
|
||||
this.btnVoid.Name = "btnVoid";
|
||||
this.btnVoid.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnVoid.TabIndex = 143;
|
||||
this.btnVoid.Text = "Void Bill";
|
||||
this.btnVoid.UseVisualStyleBackColor = true;
|
||||
this.btnVoid.Click += new System.EventHandler(this.btnVoid_Click);
|
||||
//
|
||||
// btnSettle
|
||||
//
|
||||
this.btnSettle.Location = new System.Drawing.Point(732, 3);
|
||||
this.btnSettle.Location = new System.Drawing.Point(813, 3);
|
||||
this.btnSettle.Name = "btnSettle";
|
||||
this.btnSettle.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnSettle.TabIndex = 155;
|
||||
@ -302,86 +409,6 @@
|
||||
this.txtServiceCharge.TabIndex = 153;
|
||||
this.txtServiceCharge.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
|
||||
//
|
||||
// btnWaiter
|
||||
//
|
||||
this.btnWaiter.Location = new System.Drawing.Point(327, 3);
|
||||
this.btnWaiter.Name = "btnWaiter";
|
||||
this.btnWaiter.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnWaiter.TabIndex = 150;
|
||||
this.btnWaiter.Text = "Select Waiter - F5";
|
||||
this.btnWaiter.UseVisualStyleBackColor = true;
|
||||
this.btnWaiter.Click += new System.EventHandler(this.btnWaiter_Click);
|
||||
//
|
||||
// btnClear
|
||||
//
|
||||
this.btnClear.Location = new System.Drawing.Point(570, 3);
|
||||
this.btnClear.Name = "btnClear";
|
||||
this.btnClear.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnClear.TabIndex = 148;
|
||||
this.btnClear.Text = "Clear - Esc";
|
||||
this.btnClear.UseVisualStyleBackColor = true;
|
||||
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
|
||||
//
|
||||
// btnRate
|
||||
//
|
||||
this.btnRate.Location = new System.Drawing.Point(84, 3);
|
||||
this.btnRate.Name = "btnRate";
|
||||
this.btnRate.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnRate.TabIndex = 146;
|
||||
this.btnRate.Text = "&Rate";
|
||||
this.btnRate.UseVisualStyleBackColor = true;
|
||||
this.btnRate.Click += new System.EventHandler(this.btnRate_Click);
|
||||
//
|
||||
// btnPrintKot
|
||||
//
|
||||
this.btnPrintKot.Location = new System.Drawing.Point(408, 3);
|
||||
this.btnPrintKot.Name = "btnPrintKot";
|
||||
this.btnPrintKot.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnPrintKot.TabIndex = 145;
|
||||
this.btnPrintKot.Text = "Print KOT - F12";
|
||||
this.btnPrintKot.UseVisualStyleBackColor = true;
|
||||
this.btnPrintKot.Click += new System.EventHandler(this.btnPrintKot_Click);
|
||||
//
|
||||
// btnPrintBill
|
||||
//
|
||||
this.btnPrintBill.Location = new System.Drawing.Point(489, 3);
|
||||
this.btnPrintBill.Name = "btnPrintBill";
|
||||
this.btnPrintBill.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnPrintBill.TabIndex = 144;
|
||||
this.btnPrintBill.Text = "Print Bill - F11";
|
||||
this.btnPrintBill.UseVisualStyleBackColor = true;
|
||||
this.btnPrintBill.Click += new System.EventHandler(this.btnPrintBill_Click);
|
||||
//
|
||||
// btnVoid
|
||||
//
|
||||
this.btnVoid.Location = new System.Drawing.Point(651, 3);
|
||||
this.btnVoid.Name = "btnVoid";
|
||||
this.btnVoid.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnVoid.TabIndex = 143;
|
||||
this.btnVoid.Text = "Void Bill";
|
||||
this.btnVoid.UseVisualStyleBackColor = true;
|
||||
this.btnVoid.Click += new System.EventHandler(this.btnVoid_Click);
|
||||
//
|
||||
// btnDiscount
|
||||
//
|
||||
this.btnDiscount.Location = new System.Drawing.Point(165, 3);
|
||||
this.btnDiscount.Name = "btnDiscount";
|
||||
this.btnDiscount.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnDiscount.TabIndex = 142;
|
||||
this.btnDiscount.Text = "Discount - F3";
|
||||
this.btnDiscount.UseVisualStyleBackColor = true;
|
||||
this.btnDiscount.Click += new System.EventHandler(this.btnDiscount_Click);
|
||||
//
|
||||
// btnQuantity
|
||||
//
|
||||
this.btnQuantity.Location = new System.Drawing.Point(3, 3);
|
||||
this.btnQuantity.Name = "btnQuantity";
|
||||
this.btnQuantity.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnQuantity.TabIndex = 141;
|
||||
this.btnQuantity.Text = "Quantity - F2";
|
||||
this.btnQuantity.UseVisualStyleBackColor = true;
|
||||
this.btnQuantity.Click += new System.EventHandler(this.btnQuantity_Click);
|
||||
//
|
||||
// txtTableID
|
||||
//
|
||||
this.txtTableID.Location = new System.Drawing.Point(390, 28);
|
||||
@ -495,6 +522,31 @@
|
||||
this.btnCustomer.UseVisualStyleBackColor = true;
|
||||
this.btnCustomer.Click += new System.EventHandler(this.btnCustomer_Click);
|
||||
//
|
||||
// printedDataGridViewTextBoxColumn
|
||||
//
|
||||
this.printedDataGridViewTextBoxColumn.DataPropertyName = "Printed";
|
||||
dataGridViewCellStyle2.Format = "N2";
|
||||
this.printedDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.printedDataGridViewTextBoxColumn.HeaderText = "Printed";
|
||||
this.printedDataGridViewTextBoxColumn.Name = "printedDataGridViewTextBoxColumn";
|
||||
this.printedDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.printedDataGridViewTextBoxColumn.Width = 5;
|
||||
//
|
||||
// additionalDataGridViewTextBoxColumn
|
||||
//
|
||||
this.additionalDataGridViewTextBoxColumn.DataPropertyName = "Additional";
|
||||
dataGridViewCellStyle3.Format = "N2";
|
||||
dataGridViewCellStyle3.NullValue = null;
|
||||
this.additionalDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.additionalDataGridViewTextBoxColumn.HeaderText = "Additional";
|
||||
this.additionalDataGridViewTextBoxColumn.Name = "additionalDataGridViewTextBoxColumn";
|
||||
this.additionalDataGridViewTextBoxColumn.ReadOnly = true;
|
||||
this.additionalDataGridViewTextBoxColumn.Width = 5;
|
||||
//
|
||||
// bindingSource
|
||||
//
|
||||
this.bindingSource.DataSource = typeof(Tanshu.Accounts.Contracts.BillInventory);
|
||||
//
|
||||
// bsWaiter
|
||||
//
|
||||
this.bsWaiter.DataSource = typeof(Tanshu.Accounts.Entities.Waiter);
|
||||
@ -503,51 +555,15 @@
|
||||
//
|
||||
this.bsPending.DataSource = typeof(Tanshu.Accounts.Contracts.PendingBills);
|
||||
//
|
||||
// btnModifier
|
||||
// btnDelete
|
||||
//
|
||||
this.btnModifier.Location = new System.Drawing.Point(246, 3);
|
||||
this.btnModifier.Name = "btnModifier";
|
||||
this.btnModifier.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnModifier.TabIndex = 156;
|
||||
this.btnModifier.Text = "Modifier";
|
||||
this.btnModifier.UseVisualStyleBackColor = true;
|
||||
this.btnModifier.Click += new System.EventHandler(this.btnModifier_Click);
|
||||
//
|
||||
// flpActions
|
||||
//
|
||||
this.flpActions.Controls.Add(this.btnQuantity);
|
||||
this.flpActions.Controls.Add(this.btnRate);
|
||||
this.flpActions.Controls.Add(this.btnDiscount);
|
||||
this.flpActions.Controls.Add(this.btnModifier);
|
||||
this.flpActions.Controls.Add(this.btnWaiter);
|
||||
this.flpActions.Controls.Add(this.btnPrintKot);
|
||||
this.flpActions.Controls.Add(this.btnPrintBill);
|
||||
this.flpActions.Controls.Add(this.btnClear);
|
||||
this.flpActions.Controls.Add(this.btnVoid);
|
||||
this.flpActions.Controls.Add(this.btnSettle);
|
||||
this.flpActions.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.flpActions.Location = new System.Drawing.Point(0, 607);
|
||||
this.flpActions.Name = "flpActions";
|
||||
this.flpActions.Size = new System.Drawing.Size(982, 81);
|
||||
this.flpActions.TabIndex = 157;
|
||||
//
|
||||
// flpGroup
|
||||
//
|
||||
this.flpGroup.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.flpGroup.Location = new System.Drawing.Point(901, 0);
|
||||
this.flpGroup.Name = "flpGroup";
|
||||
this.flpGroup.Size = new System.Drawing.Size(81, 607);
|
||||
this.flpGroup.TabIndex = 158;
|
||||
//
|
||||
// flpMain
|
||||
//
|
||||
this.flpMain.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.flpMain.Location = new System.Drawing.Point(390, 54);
|
||||
this.flpMain.Name = "flpMain";
|
||||
this.flpMain.Size = new System.Drawing.Size(511, 552);
|
||||
this.flpMain.TabIndex = 159;
|
||||
this.btnDelete.Location = new System.Drawing.Point(165, 3);
|
||||
this.btnDelete.Name = "btnDelete";
|
||||
this.btnDelete.Size = new System.Drawing.Size(75, 75);
|
||||
this.btnDelete.TabIndex = 157;
|
||||
this.btnDelete.Text = "Delete";
|
||||
this.btnDelete.UseVisualStyleBackColor = true;
|
||||
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
|
||||
//
|
||||
// SalesForm
|
||||
//
|
||||
@ -564,12 +580,12 @@
|
||||
this.Load += new System.EventHandler(this.SalesForm_Load);
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SalesForm_KeyDown);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dgvProducts)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource)).EndInit();
|
||||
this.pnlBilling.ResumeLayout(false);
|
||||
this.pnlBilling.PerformLayout();
|
||||
this.flpActions.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bsWaiter)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bsPending)).EndInit();
|
||||
this.flpActions.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -610,9 +626,6 @@
|
||||
private System.Windows.Forms.Button btnVoid;
|
||||
private System.Windows.Forms.Button btnRate;
|
||||
private System.Windows.Forms.Button btnClear;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Display;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn printedDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn additionalDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.Button btnWaiter;
|
||||
internal System.Windows.Forms.Label label1;
|
||||
internal System.Windows.Forms.TextBox txtServiceCharge;
|
||||
@ -621,6 +634,10 @@
|
||||
private System.Windows.Forms.Button btnModifier;
|
||||
private System.Windows.Forms.FlowLayoutPanel flpGroup;
|
||||
private System.Windows.Forms.FlowLayoutPanel flpMain;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Display;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn printedDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn additionalDataGridViewTextBoxColumn;
|
||||
private System.Windows.Forms.Button btnDelete;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -19,8 +19,6 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
BillController billController;
|
||||
List<Button> buttonList = new List<Button>();
|
||||
List<Button> buttonHeads = new List<Button>();
|
||||
int page = 0;
|
||||
int pageSize = 6;
|
||||
|
||||
public SalesForm(BillController billController)
|
||||
{
|
||||
@ -167,7 +165,6 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
buttonHeads = new List<Button>();
|
||||
if (state == SaleFormState.Billing)
|
||||
{
|
||||
page = 0;
|
||||
var list = new ProductGroupBI().GetProductGroups();
|
||||
ControlFactory.GenerateGroups(ref flpGroup, ref buttonHeads, new Point(75, 75), 0, list, new ButtonClickDelegate(productTypeButton_Click));
|
||||
}
|
||||
@ -227,7 +224,7 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
if (start < 0)
|
||||
start = 0;
|
||||
var list = new FoodTableBI().GetFoodTables();
|
||||
ControlFactory.GenerateTables(ref flpGroup, ref buttonHeads, new Point(75, 75), start, list, new ButtonClickDelegate(tableButton_Click));
|
||||
ControlFactory.GenerateTables(ref flpMain, ref buttonHeads, new Point(75, 75), start, list, new ButtonClickDelegate(tableButton_Click));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -281,8 +278,10 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
}
|
||||
private void btnDiscount_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dgvProducts.Rows.Count > 0)
|
||||
billController.SetDiscount(billController.CurrentProduct, -1);
|
||||
billController.ShowDiscount();
|
||||
|
||||
//if (dgvProducts.Rows.Count > 0)
|
||||
// billController.SetDiscount(billController.CurrentProduct, -1);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -415,9 +414,15 @@ namespace Tanshu.Accounts.PointOfSale
|
||||
private void btnModifier_Click(object sender, EventArgs e)
|
||||
{
|
||||
var item = billController.CurrentProduct;
|
||||
var id = ProductBI.GetProduct(item.ProductID).ProductGroup.ProductGroupID;
|
||||
var id = new ProductGroupBI().GetProductGroupOfProduct(item.ProductID).ProductGroupID;
|
||||
billController.ShowModifiers(id, item);
|
||||
}
|
||||
|
||||
private void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (dgvProducts.Rows.Count > 0)
|
||||
billController.ProductRemove(billController.CurrentProduct);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -123,12 +123,6 @@
|
||||
<metadata name="bindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="Display.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="bindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="bsWaiter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>148, 17</value>
|
||||
</metadata>
|
||||
|
||||
Reference in New Issue
Block a user