Fully Working build with Different print locations and table loading. Pending: Bill Settlement, Modifiers, etc.

This commit is contained in:
unknown
2011-01-17 20:25:43 +05:30
parent 76cd512ebc
commit 3ea5fc75ab
43 changed files with 81708 additions and 148 deletions

View File

@ -10,6 +10,13 @@ using System.Threading;
namespace Tanshu.Accounts.PointOfSale
{
public enum SettleOptions
{
Cash = 1,
CreditCard = 2,
NoCharge = 3,
Cancel = 4
}
public static class BillHelperFunctions
{
#region Discount

View File

@ -0,0 +1,103 @@
namespace Tanshu.Accounts.PointOfSale
{
partial class BillSettleForm
{
/// <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.btnCash = new System.Windows.Forms.Button();
this.btnCreditCard = new System.Windows.Forms.Button();
this.btnNC = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btnCash
//
this.btnCash.Location = new System.Drawing.Point(12, 12);
this.btnCash.Name = "btnCash";
this.btnCash.Size = new System.Drawing.Size(75, 75);
this.btnCash.TabIndex = 0;
this.btnCash.Text = "Cash";
this.btnCash.UseVisualStyleBackColor = true;
this.btnCash.Click += new System.EventHandler(this.btnCash_Click);
//
// btnCreditCard
//
this.btnCreditCard.Location = new System.Drawing.Point(93, 12);
this.btnCreditCard.Name = "btnCreditCard";
this.btnCreditCard.Size = new System.Drawing.Size(75, 75);
this.btnCreditCard.TabIndex = 1;
this.btnCreditCard.Text = "Credit Card";
this.btnCreditCard.UseVisualStyleBackColor = true;
this.btnCreditCard.Click += new System.EventHandler(this.btnCreditCard_Click);
//
// btnNC
//
this.btnNC.Location = new System.Drawing.Point(174, 12);
this.btnNC.Name = "btnNC";
this.btnNC.Size = new System.Drawing.Size(75, 75);
this.btnNC.TabIndex = 2;
this.btnNC.Text = "No Charge";
this.btnNC.UseVisualStyleBackColor = true;
this.btnNC.Click += new System.EventHandler(this.btnNC_Click);
//
// btnCancel
//
this.btnCancel.Location = new System.Drawing.Point(255, 12);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 75);
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// BillSettleForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(342, 99);
this.ControlBox = false;
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnNC);
this.Controls.Add(this.btnCreditCard);
this.Controls.Add(this.btnCash);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.MaximizeBox = false;
this.Name = "BillSettleForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Settle Bill";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnCash;
private System.Windows.Forms.Button btnCreditCard;
private System.Windows.Forms.Button btnNC;
private System.Windows.Forms.Button btnCancel;
}
}

View File

@ -0,0 +1,47 @@
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;
namespace Tanshu.Accounts.PointOfSale
{
public partial class BillSettleForm : Form
{
private SettleOptions settleOptions = SettleOptions.Cancel;
public BillSettleForm()
{
InitializeComponent();
}
private void btnCash_Click(object sender, EventArgs e)
{
settleOptions = SettleOptions.Cash;
}
private void btnCreditCard_Click(object sender, EventArgs e)
{
settleOptions = SettleOptions.CreditCard;
}
private void btnNC_Click(object sender, EventArgs e)
{
settleOptions = SettleOptions.NoCharge;
}
private void btnCancel_Click(object sender, EventArgs e)
{
settleOptions = SettleOptions.Cancel;
}
public SettleOptions optionChosen
{
get
{
return settleOptions;
}
}
}
}

View File

@ -0,0 +1,120 @@
<?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>

View File

@ -83,7 +83,7 @@ namespace Tanshu.Accounts.PointOfSale
private void btnPrint_Click(object sender, EventArgs e)
{
Thermal.PrintClosing(Session.printer(), coProxy);
Thermal.PrintClosing(coProxy);
}
private void txtSales_TextChanged(object sender, EventArgs e)

View File

@ -58,7 +58,7 @@ namespace Tanshu.Accounts.PointOfSale
}
private void PrintAdvances()
{
Thermal.PrintAdvance(Session.printer(), Session.User.Name, txtAmount.Text.Trim(), txtNarration.Text.Trim());
Thermal.PrintAdvance(Session.User.Name, txtAmount.Text.Trim(), txtNarration.Text.Trim());
}
private string AddDate(string SqlStringP, DateTime FromDate, DateTime ToDate)
{

View File

@ -91,7 +91,7 @@ namespace Tanshu.Accounts.PointOfSale
{
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.printer(), Session.User.Name, det, startDate, finishDate);
Accounts.Print.Thermal.PrintSale(Session.User.Name, det, startDate, finishDate);
}
}
}

View File

@ -29,8 +29,8 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = 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();
this.label7 = new System.Windows.Forms.Label();
this.txtDiscount = new System.Windows.Forms.TextBox();
this.Label12 = new System.Windows.Forms.Label();
@ -45,6 +45,10 @@
this.additionalDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.bindingSource = new System.Windows.Forms.BindingSource(this.components);
this.pnlBilling = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.txtServiceCharge = new System.Windows.Forms.TextBox();
this.btnNext = new System.Windows.Forms.Button();
this.btnPrevious = new System.Windows.Forms.Button();
this.btnWaiter = new System.Windows.Forms.Button();
this.txtCode = new System.Windows.Forms.TextBox();
this.btnClear = new System.Windows.Forms.Button();
@ -69,8 +73,7 @@
this.btnCustomer = new System.Windows.Forms.Button();
this.bsWaiter = new System.Windows.Forms.BindingSource(this.components);
this.bsPending = new System.Windows.Forms.BindingSource(this.components);
this.btnPrevious = new System.Windows.Forms.Button();
this.btnNext = new System.Windows.Forms.Button();
this.btnSettle = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dgvProducts)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit();
this.pnlBilling.SuspendLayout();
@ -82,7 +85,7 @@
//
this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(12, 537);
this.label7.Location = new System.Drawing.Point(12, 511);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(49, 13);
this.label7.TabIndex = 112;
@ -92,7 +95,7 @@
// txtDiscount
//
this.txtDiscount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtDiscount.Location = new System.Drawing.Point(363, 534);
this.txtDiscount.Location = new System.Drawing.Point(64, 508);
this.txtDiscount.Name = "txtDiscount";
this.txtDiscount.ReadOnly = true;
this.txtDiscount.Size = new System.Drawing.Size(120, 20);
@ -104,7 +107,7 @@
this.Label12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.Label12.AutoSize = true;
this.Label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Label12.Location = new System.Drawing.Point(12, 591);
this.Label12.Location = new System.Drawing.Point(222, 565);
this.Label12.Name = "Label12";
this.Label12.Size = new System.Drawing.Size(36, 13);
this.Label12.TabIndex = 116;
@ -114,7 +117,7 @@
// txtGrossAmount
//
this.txtGrossAmount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtGrossAmount.Location = new System.Drawing.Point(363, 560);
this.txtGrossAmount.Location = new System.Drawing.Point(64, 534);
this.txtGrossAmount.Name = "txtGrossAmount";
this.txtGrossAmount.ReadOnly = true;
this.txtGrossAmount.Size = new System.Drawing.Size(120, 20);
@ -127,7 +130,7 @@
this.txtAmount.BackColor = System.Drawing.Color.Black;
this.txtAmount.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtAmount.ForeColor = System.Drawing.Color.Transparent;
this.txtAmount.Location = new System.Drawing.Point(363, 586);
this.txtAmount.Location = new System.Drawing.Point(264, 560);
this.txtAmount.Name = "txtAmount";
this.txtAmount.ReadOnly = true;
this.txtAmount.Size = new System.Drawing.Size(120, 22);
@ -139,7 +142,7 @@
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(12, 563);
this.label6.Location = new System.Drawing.Point(12, 537);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(46, 13);
this.label6.TabIndex = 108;
@ -150,7 +153,7 @@
//
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(12, 505);
this.label5.Location = new System.Drawing.Point(220, 537);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(36, 13);
this.label5.TabIndex = 110;
@ -160,7 +163,7 @@
// txtGrossTax
//
this.txtGrossTax.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtGrossTax.Location = new System.Drawing.Point(363, 508);
this.txtGrossTax.Location = new System.Drawing.Point(264, 534);
this.txtGrossTax.Name = "txtGrossTax";
this.txtGrossTax.ReadOnly = true;
this.txtGrossTax.Size = new System.Drawing.Size(120, 20);
@ -207,8 +210,8 @@
// printedDataGridViewTextBoxColumn
//
this.printedDataGridViewTextBoxColumn.DataPropertyName = "Printed";
dataGridViewCellStyle3.Format = "N2";
this.printedDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle1.Format = "N2";
this.printedDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle1;
this.printedDataGridViewTextBoxColumn.HeaderText = "Printed";
this.printedDataGridViewTextBoxColumn.Name = "printedDataGridViewTextBoxColumn";
this.printedDataGridViewTextBoxColumn.ReadOnly = true;
@ -217,9 +220,9 @@
// additionalDataGridViewTextBoxColumn
//
this.additionalDataGridViewTextBoxColumn.DataPropertyName = "Additional";
dataGridViewCellStyle4.Format = "N2";
dataGridViewCellStyle4.NullValue = null;
this.additionalDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle2.Format = "N2";
dataGridViewCellStyle2.NullValue = null;
this.additionalDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle2;
this.additionalDataGridViewTextBoxColumn.HeaderText = "Additional";
this.additionalDataGridViewTextBoxColumn.Name = "additionalDataGridViewTextBoxColumn";
this.additionalDataGridViewTextBoxColumn.ReadOnly = true;
@ -233,6 +236,9 @@
//
this.pnlBilling.AutoSize = true;
this.pnlBilling.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.pnlBilling.Controls.Add(this.btnSettle);
this.pnlBilling.Controls.Add(this.label1);
this.pnlBilling.Controls.Add(this.txtServiceCharge);
this.pnlBilling.Controls.Add(this.btnNext);
this.pnlBilling.Controls.Add(this.btnPrevious);
this.pnlBilling.Controls.Add(this.btnWaiter);
@ -272,6 +278,47 @@
this.pnlBilling.Size = new System.Drawing.Size(982, 688);
this.pnlBilling.TabIndex = 121;
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(235, 511);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(21, 13);
this.label1.TabIndex = 154;
this.label1.Text = "SC";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// txtServiceCharge
//
this.txtServiceCharge.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtServiceCharge.Location = new System.Drawing.Point(264, 508);
this.txtServiceCharge.Name = "txtServiceCharge";
this.txtServiceCharge.ReadOnly = true;
this.txtServiceCharge.Size = new System.Drawing.Size(120, 20);
this.txtServiceCharge.TabIndex = 153;
this.txtServiceCharge.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
//
// btnNext
//
this.btnNext.Location = new System.Drawing.Point(890, 596);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(80, 80);
this.btnNext.TabIndex = 152;
this.btnNext.Text = "Next";
this.btnNext.UseVisualStyleBackColor = true;
this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
//
// btnPrevious
//
this.btnPrevious.Location = new System.Drawing.Point(890, 12);
this.btnPrevious.Name = "btnPrevious";
this.btnPrevious.Size = new System.Drawing.Size(80, 80);
this.btnPrevious.TabIndex = 151;
this.btnPrevious.Text = "Previous";
this.btnPrevious.UseVisualStyleBackColor = true;
this.btnPrevious.Click += new System.EventHandler(this.btnPrevious_Click);
//
// btnWaiter
//
this.btnWaiter.Location = new System.Drawing.Point(255, 610);
@ -480,25 +527,15 @@
//
this.bsPending.DataSource = typeof(Tanshu.Accounts.Contracts.PendingBillsBO);
//
// btnPrevious
// btnSettle
//
this.btnPrevious.Location = new System.Drawing.Point(890, 12);
this.btnPrevious.Name = "btnPrevious";
this.btnPrevious.Size = new System.Drawing.Size(80, 80);
this.btnPrevious.TabIndex = 151;
this.btnPrevious.Text = "Previous";
this.btnPrevious.UseVisualStyleBackColor = true;
this.btnPrevious.Click += new System.EventHandler(this.btnPrevious_Click);
//
// btnNext
//
this.btnNext.Location = new System.Drawing.Point(890, 596);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(80, 80);
this.btnNext.TabIndex = 152;
this.btnNext.Text = "Next";
this.btnNext.UseVisualStyleBackColor = true;
this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
this.btnSettle.Location = new System.Drawing.Point(498, 610);
this.btnSettle.Name = "btnSettle";
this.btnSettle.Size = new System.Drawing.Size(75, 75);
this.btnSettle.TabIndex = 155;
this.btnSettle.Text = "Settle Bill";
this.btnSettle.UseVisualStyleBackColor = true;
this.btnSettle.Click += new System.EventHandler(this.btnSettle_Click);
//
// SalesForm
//
@ -567,6 +604,9 @@
private System.Windows.Forms.Button btnWaiter;
private System.Windows.Forms.Button btnNext;
private System.Windows.Forms.Button btnPrevious;
internal System.Windows.Forms.Label label1;
internal System.Windows.Forms.TextBox txtServiceCharge;
private System.Windows.Forms.Button btnSettle;
}
}

View File

@ -146,6 +146,7 @@ namespace Tanshu.Accounts.PointOfSale
this.btnWaiter.Tag = null;
txtGrossTax.Text = "0.00";
txtDiscount.Text = "0.00";
txtServiceCharge.Text = "0.00";
txtGrossAmount.Text = "0.00";
txtAmount.Text = "0.00";
bindingSource.DataSource = bill.Values;
@ -200,12 +201,13 @@ namespace Tanshu.Accounts.PointOfSale
txtTableID.Text = tableName;
ChangeFormState(SaleFormState.Billing);
}
public void ShowAmount(decimal grossTax, decimal discount, decimal grossAmount, decimal amount, List<SalesBillItemBO> bill)
public void ShowAmount(decimal discountAmount, decimal grossAmount, decimal serviceChargeAmount, decimal taxAmount, decimal valueAmount, List<SalesBillItemBO> bill)
{
txtGrossTax.Text = string.Format("{0:#0.00}", grossTax);
txtDiscount.Text = string.Format("{0:#0.00}", discount);
txtGrossTax.Text = string.Format("{0:#0.00}", taxAmount);
txtDiscount.Text = string.Format("{0:#0.00}", discountAmount);
txtServiceCharge.Text = string.Format("{0:#0.00}", serviceChargeAmount);
txtGrossAmount.Text = string.Format("{0:#0.00}", grossAmount);
txtAmount.Text = string.Format("{0:#0.00}", Math.Round(amount));
txtAmount.Text = string.Format("{0:#0.00}", Math.Round(valueAmount));
bindingSource.DataSource = bill;
dgvProducts.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.DisplayedCells);
}
@ -380,6 +382,11 @@ namespace Tanshu.Accounts.PointOfSale
ControlFactory.GenerateButtons(ref pnlBilling, ref buttonHeads, new Rectangle(889, 90, 85, 498), 1, pageSize, 2, page, list, new ButtonClickDelegate(productTypeButton_Click));
}
#endregion
private void btnSettle_Click(object sender, EventArgs e)
{
billController.SettleBill();
}
}
}

View File

@ -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>