Misc. forgot all changes

Working on Cashier Checkout
This commit is contained in:
unknown
2011-02-05 01:00:55 +05:30
parent 0f323f8fab
commit 1400f42989
32 changed files with 4591 additions and 255 deletions

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="connection" connectionString="Server=.;Initial Catalog=PeithoSales;User ID=sa;Password=123456" />
<add name="FluentCon" connectionString="Server=.;Initial Catalog=Pets;User ID=sa;Password=123456" />
</connectionStrings>
<appSettings>

View File

@ -368,6 +368,7 @@ namespace Tanshu.Accounts.PointOfSale
}
}
bill.Remove(new BillItemKey(billInventory.ProductID, billInventory.Printed == 0));
bill.ReCompact();
ShowAmount();
}

View File

@ -5,6 +5,7 @@ using System.Windows.Forms;
using System.Threading;
using Tanshu.Accounts.Helpers;
using Tanshu.Accounts.Repository;
using Tanshu.Accounts.Entities;
namespace Tanshu.Accounts.PointOfSale
{
@ -17,7 +18,6 @@ namespace Tanshu.Accounts.PointOfSale
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//log.Warn("Application Started");
Application.Run(new MainForm());
//log.Warn("Application Closed");

View File

@ -65,12 +65,16 @@
this.txtAdvanceReceived = new System.Windows.Forms.TextBox();
this.txtReceipts = new System.Windows.Forms.TextBox();
this.txtOpening = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.NC = new System.Windows.Forms.Label();
this.txtBillToCompany = new System.Windows.Forms.TextBox();
this.txtNC = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(12, 380);
this.label18.Location = new System.Drawing.Point(12, 432);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(68, 13);
this.label18.TabIndex = 71;
@ -78,9 +82,10 @@
//
// txtClosingCash
//
this.txtClosingCash.Location = new System.Drawing.Point(99, 377);
this.txtClosingCash.Location = new System.Drawing.Point(99, 429);
this.txtClosingCash.Name = "txtClosingCash";
this.txtClosingCash.ReadOnly = true;
this.txtClosingCash.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtClosingCash.Size = new System.Drawing.Size(200, 20);
this.txtClosingCash.TabIndex = 55;
//
@ -103,7 +108,7 @@
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(12, 276);
this.label17.Location = new System.Drawing.Point(12, 328);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(85, 13);
this.label17.TabIndex = 67;
@ -112,7 +117,7 @@
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(12, 302);
this.label16.Location = new System.Drawing.Point(12, 354);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(81, 13);
this.label16.TabIndex = 68;
@ -121,7 +126,7 @@
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(12, 354);
this.label15.Location = new System.Drawing.Point(12, 406);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(53, 13);
this.label15.TabIndex = 70;
@ -130,7 +135,7 @@
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(12, 406);
this.label14.Location = new System.Drawing.Point(12, 458);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(82, 13);
this.label14.TabIndex = 72;
@ -139,7 +144,7 @@
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(12, 432);
this.label13.Location = new System.Drawing.Point(12, 484);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(37, 13);
this.label13.TabIndex = 73;
@ -148,7 +153,7 @@
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(12, 328);
this.label12.Location = new System.Drawing.Point(12, 380);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(62, 13);
this.label12.TabIndex = 69;
@ -156,7 +161,7 @@
//
// btnCalculate
//
this.btnCalculate.Location = new System.Drawing.Point(12, 455);
this.btnCalculate.Location = new System.Drawing.Point(12, 507);
this.btnCalculate.Name = "btnCalculate";
this.btnCalculate.Size = new System.Drawing.Size(287, 23);
this.btnCalculate.TabIndex = 39;
@ -166,7 +171,7 @@
//
// btnPrint
//
this.btnPrint.Location = new System.Drawing.Point(12, 484);
this.btnPrint.Location = new System.Drawing.Point(12, 536);
this.btnPrint.Name = "btnPrint";
this.btnPrint.Size = new System.Drawing.Size(287, 23);
this.btnPrint.TabIndex = 40;
@ -176,7 +181,7 @@
//
// txtStatus
//
this.txtStatus.Location = new System.Drawing.Point(99, 429);
this.txtStatus.Location = new System.Drawing.Point(99, 481);
this.txtStatus.Name = "txtStatus";
this.txtStatus.ReadOnly = true;
this.txtStatus.Size = new System.Drawing.Size(200, 20);
@ -184,25 +189,28 @@
//
// txtSales
//
this.txtSales.Location = new System.Drawing.Point(99, 351);
this.txtSales.Location = new System.Drawing.Point(99, 403);
this.txtSales.Name = "txtSales";
this.txtSales.ReadOnly = true;
this.txtSales.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtSales.Size = new System.Drawing.Size(200, 20);
this.txtSales.TabIndex = 54;
this.txtSales.TextChanged += new System.EventHandler(this.txtSales_TextChanged);
//
// txtDeposited
//
this.txtDeposited.Location = new System.Drawing.Point(99, 403);
this.txtDeposited.Location = new System.Drawing.Point(99, 455);
this.txtDeposited.Name = "txtDeposited";
this.txtDeposited.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtDeposited.Size = new System.Drawing.Size(200, 20);
this.txtDeposited.TabIndex = 38;
//
// txtPending
//
this.txtPending.Location = new System.Drawing.Point(99, 325);
this.txtPending.Location = new System.Drawing.Point(99, 377);
this.txtPending.Name = "txtPending";
this.txtPending.ReadOnly = true;
this.txtPending.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtPending.Size = new System.Drawing.Size(200, 20);
this.txtPending.TabIndex = 53;
//
@ -237,7 +245,7 @@
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(12, 250);
this.label8.Location = new System.Drawing.Point(12, 302);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(81, 13);
this.label8.TabIndex = 66;
@ -246,7 +254,7 @@
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(12, 224);
this.label7.Location = new System.Drawing.Point(12, 276);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(82, 13);
this.label7.TabIndex = 65;
@ -255,7 +263,7 @@
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(12, 198);
this.label6.Location = new System.Drawing.Point(12, 250);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(53, 13);
this.label6.TabIndex = 64;
@ -264,7 +272,7 @@
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(12, 172);
this.label5.Location = new System.Drawing.Point(12, 224);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(73, 13);
this.label5.TabIndex = 63;
@ -308,17 +316,19 @@
//
// txtPayments
//
this.txtPayments.Location = new System.Drawing.Point(99, 195);
this.txtPayments.Location = new System.Drawing.Point(99, 247);
this.txtPayments.Name = "txtPayments";
this.txtPayments.ReadOnly = true;
this.txtPayments.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtPayments.Size = new System.Drawing.Size(200, 20);
this.txtPayments.TabIndex = 48;
//
// txtAdvanceAdjusted
//
this.txtAdvanceAdjusted.Location = new System.Drawing.Point(99, 169);
this.txtAdvanceAdjusted.Location = new System.Drawing.Point(99, 221);
this.txtAdvanceAdjusted.Name = "txtAdvanceAdjusted";
this.txtAdvanceAdjusted.ReadOnly = true;
this.txtAdvanceAdjusted.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtAdvanceAdjusted.Size = new System.Drawing.Size(200, 20);
this.txtAdvanceAdjusted.TabIndex = 47;
//
@ -327,38 +337,43 @@
this.txtCCReceipts.Location = new System.Drawing.Point(99, 143);
this.txtCCReceipts.Name = "txtCCReceipts";
this.txtCCReceipts.ReadOnly = true;
this.txtCCReceipts.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtCCReceipts.Size = new System.Drawing.Size(200, 20);
this.txtCCReceipts.TabIndex = 46;
//
// txtAdditionalVoids
//
this.txtAdditionalVoids.Location = new System.Drawing.Point(99, 221);
this.txtAdditionalVoids.Location = new System.Drawing.Point(99, 273);
this.txtAdditionalVoids.Name = "txtAdditionalVoids";
this.txtAdditionalVoids.ReadOnly = true;
this.txtAdditionalVoids.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtAdditionalVoids.Size = new System.Drawing.Size(200, 20);
this.txtAdditionalVoids.TabIndex = 49;
//
// txtVoidsInSystem
//
this.txtVoidsInSystem.Location = new System.Drawing.Point(99, 247);
this.txtVoidsInSystem.Location = new System.Drawing.Point(99, 299);
this.txtVoidsInSystem.Name = "txtVoidsInSystem";
this.txtVoidsInSystem.ReadOnly = true;
this.txtVoidsInSystem.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtVoidsInSystem.Size = new System.Drawing.Size(200, 20);
this.txtVoidsInSystem.TabIndex = 50;
//
// txtDiscounts
//
this.txtDiscounts.Location = new System.Drawing.Point(99, 273);
this.txtDiscounts.Location = new System.Drawing.Point(99, 325);
this.txtDiscounts.Name = "txtDiscounts";
this.txtDiscounts.ReadOnly = true;
this.txtDiscounts.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtDiscounts.Size = new System.Drawing.Size(200, 20);
this.txtDiscounts.TabIndex = 51;
//
// txtRates
//
this.txtRates.Location = new System.Drawing.Point(99, 299);
this.txtRates.Location = new System.Drawing.Point(99, 351);
this.txtRates.Name = "txtRates";
this.txtRates.ReadOnly = true;
this.txtRates.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtRates.Size = new System.Drawing.Size(200, 20);
this.txtRates.TabIndex = 52;
//
@ -367,6 +382,7 @@
this.txtAdvanceReceived.Location = new System.Drawing.Point(99, 117);
this.txtAdvanceReceived.Name = "txtAdvanceReceived";
this.txtAdvanceReceived.ReadOnly = true;
this.txtAdvanceReceived.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtAdvanceReceived.Size = new System.Drawing.Size(200, 20);
this.txtAdvanceReceived.TabIndex = 45;
//
@ -375,6 +391,7 @@
this.txtReceipts.Location = new System.Drawing.Point(99, 91);
this.txtReceipts.Name = "txtReceipts";
this.txtReceipts.ReadOnly = true;
this.txtReceipts.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtReceipts.Size = new System.Drawing.Size(200, 20);
this.txtReceipts.TabIndex = 44;
//
@ -383,14 +400,55 @@
this.txtOpening.Location = new System.Drawing.Point(99, 65);
this.txtOpening.Name = "txtOpening";
this.txtOpening.ReadOnly = true;
this.txtOpening.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtOpening.Size = new System.Drawing.Size(200, 20);
this.txtOpening.TabIndex = 43;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(12, 198);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(79, 13);
this.label11.TabIndex = 77;
this.label11.Text = "Bill to Company";
//
// NC
//
this.NC.AutoSize = true;
this.NC.Location = new System.Drawing.Point(12, 172);
this.NC.Name = "NC";
this.NC.Size = new System.Drawing.Size(58, 13);
this.NC.TabIndex = 76;
this.NC.Text = "No Charge";
//
// txtBillToCompany
//
this.txtBillToCompany.Location = new System.Drawing.Point(99, 195);
this.txtBillToCompany.Name = "txtBillToCompany";
this.txtBillToCompany.ReadOnly = true;
this.txtBillToCompany.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtBillToCompany.Size = new System.Drawing.Size(200, 20);
this.txtBillToCompany.TabIndex = 75;
//
// txtNC
//
this.txtNC.Location = new System.Drawing.Point(99, 169);
this.txtNC.Name = "txtNC";
this.txtNC.ReadOnly = true;
this.txtNC.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.txtNC.Size = new System.Drawing.Size(200, 20);
this.txtNC.TabIndex = 74;
//
// 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.ClientSize = new System.Drawing.Size(311, 571);
this.Controls.Add(this.label11);
this.Controls.Add(this.NC);
this.Controls.Add(this.txtBillToCompany);
this.Controls.Add(this.txtNC);
this.Controls.Add(this.label18);
this.Controls.Add(this.txtClosingCash);
this.Controls.Add(this.dtpFinish);
@ -477,5 +535,9 @@
private System.Windows.Forms.TextBox txtAdvanceReceived;
private System.Windows.Forms.TextBox txtReceipts;
private System.Windows.Forms.TextBox txtOpening;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label NC;
private System.Windows.Forms.TextBox txtBillToCompany;
private System.Windows.Forms.TextBox txtNC;
}
}

View File

@ -47,17 +47,20 @@ namespace Tanshu.Accounts.PointOfSale
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();
txtOpening.Text = string.Format("{0:#,##0.00}", coProxy);
txtReceipts.Text = string.Format("{0:#,##0.00}", coProxy.Receipts);
txtAdvanceReceived.Text = string.Format("{0:#,##0.00}", coProxy.AdvanceReceipts);
txtCCReceipts.Text = string.Format("{0:#,##0.00}", coProxy.CCReceipts);
txtNC.Text = string.Format("{0:#,##0.00}", coProxy.NCReceipts);
txtBillToCompany.Text = string.Format("{0:#,##0.00}", coProxy.BTCReceipts);
txtAdvanceAdjusted.Text = string.Format("{0:#,##0.00}", coProxy.AdvanceAdjusted);
txtPayments.Text = string.Format("{0:#,##0.00}", coProxy.CashPayments);
txtAdditionalVoids.Text = string.Format("{0:#,##0.00}", coProxy.AdditionalVoids);
txtVoidsInSystem.Text = string.Format("{0:#,##0.00}", coProxy.VoidsInSystem);
txtPending.Text = string.Format("{0:#,##0.00}", coProxy.PendingBills);
txtSales.Text = string.Format("{0:#,##0.00}", coProxy.NetSales);
txtClosingCash.Text = string.Format("{0:#,##0.00}", coProxy.ClosingBalance
);
txtStatus.Text = coProxy.Status;
}

View File

@ -170,7 +170,7 @@ namespace Tanshu.Accounts.PointOfSale
}
else
{
ControlFactory.GenerateTables(ref flpMain, ref buttonHeads, new Point(75, 75), 0, new FoodTableBI().GetFoodTables(), new ButtonClickDelegate(tableButton_Click));
ControlFactory.GenerateTables(ref flpMain, ref buttonHeads, new Point(75, 75), 0, new FoodTableBI().List(), new ButtonClickDelegate(tableButton_Click));
}
}
@ -223,7 +223,7 @@ namespace Tanshu.Accounts.PointOfSale
int start = item.FoodTableID;
if (start < 0)
start = 0;
var list = new FoodTableBI().GetFoodTables();
var list = new FoodTableBI().List();
ControlFactory.GenerateTables(ref flpMain, ref buttonHeads, new Point(75, 75), start, list, new ButtonClickDelegate(tableButton_Click));
}
else

View File

@ -55,6 +55,10 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Include\Fluent\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="Castle.Windsor, Version=2.5.1.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Include\Windsor\Castle.Windsor.dll</HintPath>
</Reference>
<Reference Include="FluentNHibernate, Version=1.2.0.694, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Include\Fluent\FluentNHibernate.dll</HintPath>
@ -101,7 +105,6 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Include\Tanshu.Common.dll</HintPath>
</Reference>
<Reference Include="Tanshu.Common.KeyboardControl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<Reference Include="Tanshu.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fd89fe1d2351f8b5, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Include\Tanshu.Data.dll</HintPath>