diff --git a/Tanshu.Accounts.Helpers/Tanshu.Accounts.Helpers.csproj b/Tanshu.Accounts.Helpers/Tanshu.Accounts.Helpers.csproj
index 605343d..8409ddb 100644
--- a/Tanshu.Accounts.Helpers/Tanshu.Accounts.Helpers.csproj
+++ b/Tanshu.Accounts.Helpers/Tanshu.Accounts.Helpers.csproj
@@ -94,7 +94,7 @@
{59A6F8B8-12EE-4D8E-BEBB-61CB665A2C17}
Tanshu.Accounts.Contracts
-
+
{B755D152-37C3-47D6-A721-3AD17A8EF316}
Tanshu.Accounts.Repository
diff --git a/Tanshu.Accounts.PointOfSale/App.config b/Tanshu.Accounts.PointOfSale/App.config
index 9f4820b..142bad3 100644
--- a/Tanshu.Accounts.PointOfSale/App.config
+++ b/Tanshu.Accounts.PointOfSale/App.config
@@ -1,7 +1,7 @@
-
+
diff --git a/Tanshu.Accounts.PointOfSale/Tanshu.Accounts.PointOfSale.csproj b/Tanshu.Accounts.PointOfSale/Tanshu.Accounts.PointOfSale.csproj
index a1319cf..3a9da7e 100644
--- a/Tanshu.Accounts.PointOfSale/Tanshu.Accounts.PointOfSale.csproj
+++ b/Tanshu.Accounts.PointOfSale/Tanshu.Accounts.PointOfSale.csproj
@@ -373,7 +373,7 @@
{90C9D02C-91AF-4529-86BE-28320332DDB5}
Tanshu.Accounts.Print
-
+
{B755D152-37C3-47D6-A721-3AD17A8EF316}
Tanshu.Accounts.Repository
diff --git a/Tanshu.Accounts.Print/Tanshu.Accounts.Print.csproj b/Tanshu.Accounts.Print/Tanshu.Accounts.Print.csproj
index e5b1967..7d81075 100644
--- a/Tanshu.Accounts.Print/Tanshu.Accounts.Print.csproj
+++ b/Tanshu.Accounts.Print/Tanshu.Accounts.Print.csproj
@@ -63,7 +63,7 @@
{3E28AAA5-A493-4446-8188-C615245943B4}
Tanshu.Accounts.Helpers
-
+
{B755D152-37C3-47D6-A721-3AD17A8EF316}
Tanshu.Accounts.Repository
diff --git a/Tanshu.Accounts.Print/Thermal.cs b/Tanshu.Accounts.Print/Thermal.cs
index c5e2b32..629bb5a 100644
--- a/Tanshu.Accounts.Print/Thermal.cs
+++ b/Tanshu.Accounts.Print/Thermal.cs
@@ -216,8 +216,8 @@ namespace Tanshu.Accounts.Print
#else
try
{
- Text += printer.CutCode;
- if (!RawPrinterHelper.PrintString(printer.Printer, DocumentName, Text, new[] { ';' }))
+ text += printer.CutCode;
+ if (!RawPrinterHelper.PrintString(printer.Printer, documentName, text, new[] { ';' }))
{
GC.Collect();
MessageBox.Show("Error in PrintRAW Function. Please Report immediately");
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/AdvanceBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/AdvanceBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/AdvanceBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/AdvanceBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/CheckoutBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/CheckoutBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/CheckoutBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/CheckoutBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/CustomerBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/CustomerBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/CustomerBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/CustomerBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/FoodTableBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/FoodTableBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/FoodTableBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/FoodTableBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/ManagementBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/ManagementBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/ManagementBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/ManagementBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/MembershipBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/MembershipBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/MembershipBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/MembershipBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/ModifierBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/ModifierBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/ModifierBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/ModifierBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/PrintLocationBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/PrintLocationBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/PrintLocationBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/PrintLocationBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/ProductBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/ProductBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/ProductBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/ProductBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/ProductGroupBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/ProductGroupBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/ProductGroupBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/ProductGroupBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/ProductGroupModifierBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/ProductGroupModifierBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/ProductGroupModifierBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/ProductGroupModifierBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/RoleBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/RoleBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/RoleBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/RoleBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/SalesAnalysisBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/SalesAnalysisBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/SalesAnalysisBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/SalesAnalysisBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/TaxBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/TaxBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/TaxBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/TaxBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/UserBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/UserBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/UserBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/UserBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/VoucherBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/VoucherBI.cs
similarity index 99%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/VoucherBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/VoucherBI.cs
index bd536da..04feceb 100644
--- a/Tanshu.Accounts.SqlDAO/BusinessLayer/VoucherBI.cs
+++ b/Tanshu.Accounts.Repository/BusinessLayer/VoucherBI.cs
@@ -82,12 +82,14 @@ namespace Tanshu.Accounts.Repository
voucher.Settlements.Add(new VoucherSettlement() { Amount = amount, Settled = SettleOption.Amount });
else
voucher.Settlements.Single(x => x.Settled == SettleOption.Amount).Amount = amount;
+
var roundoff = Math.Round(amount) - amount;
if (voucher.Settlements.Count(x => x.Settled == SettleOption.RoundOff) == 0)
voucher.Settlements.Add(new VoucherSettlement() { Amount = roundoff, Settled = SettleOption.RoundOff });
else
voucher.Settlements.Single(x => x.Settled == SettleOption.RoundOff).Amount = roundoff;
- var balance = voucher.Settlements.Where(x => x.Settled != SettleOption.Unsettled).Sum(x => x.Amount);
+
+ var balance = voucher.Settlements.Where(x => x.Settled != SettleOption.Unsettled).Sum(x => x.Amount) * -1;
if (voucher.Settlements.Count(x => x.Settled == SettleOption.Unsettled) == 0)
voucher.Settlements.Add(new VoucherSettlement() { Amount = balance, Settled = SettleOption.Unsettled });
else if (balance == 0)
diff --git a/Tanshu.Accounts.SqlDAO/BusinessLayer/WaiterBI.cs b/Tanshu.Accounts.Repository/BusinessLayer/WaiterBI.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/BusinessLayer/WaiterBI.cs
rename to Tanshu.Accounts.Repository/BusinessLayer/WaiterBI.cs
diff --git a/Tanshu.Accounts.SqlDAO/DbValues.cs b/Tanshu.Accounts.Repository/DbValues.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/DbValues.cs
rename to Tanshu.Accounts.Repository/DbValues.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/AllowNullConvention.cs b/Tanshu.Accounts.Repository/Fluent/AllowNullConvention.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/AllowNullConvention.cs
rename to Tanshu.Accounts.Repository/Fluent/AllowNullConvention.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/AttributeChecker.cs b/Tanshu.Accounts.Repository/Fluent/AttributeChecker.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/AttributeChecker.cs
rename to Tanshu.Accounts.Repository/Fluent/AttributeChecker.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/CascadeConvention.cs b/Tanshu.Accounts.Repository/Fluent/CascadeConvention.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/CascadeConvention.cs
rename to Tanshu.Accounts.Repository/Fluent/CascadeConvention.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/ClassConvention.cs b/Tanshu.Accounts.Repository/Fluent/ClassConvention.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/ClassConvention.cs
rename to Tanshu.Accounts.Repository/Fluent/ClassConvention.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/EnumConvention.cs b/Tanshu.Accounts.Repository/Fluent/EnumConvention.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/EnumConvention.cs
rename to Tanshu.Accounts.Repository/Fluent/EnumConvention.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/Fixtures.cs b/Tanshu.Accounts.Repository/Fluent/Fixtures.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/Fixtures.cs
rename to Tanshu.Accounts.Repository/Fluent/Fixtures.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/ForeignKeyConvention.cs b/Tanshu.Accounts.Repository/Fluent/ForeignKeyConvention.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/ForeignKeyConvention.cs
rename to Tanshu.Accounts.Repository/Fluent/ForeignKeyConvention.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/FormulaConvention.cs b/Tanshu.Accounts.Repository/Fluent/FormulaConvention.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/FormulaConvention.cs
rename to Tanshu.Accounts.Repository/Fluent/FormulaConvention.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/Inflector.cs b/Tanshu.Accounts.Repository/Fluent/Inflector.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/Inflector.cs
rename to Tanshu.Accounts.Repository/Fluent/Inflector.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/NotNullConvention.cs b/Tanshu.Accounts.Repository/Fluent/NotNullConvention.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/NotNullConvention.cs
rename to Tanshu.Accounts.Repository/Fluent/NotNullConvention.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/PrimaryKeyConvention.cs b/Tanshu.Accounts.Repository/Fluent/PrimaryKeyConvention.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/PrimaryKeyConvention.cs
rename to Tanshu.Accounts.Repository/Fluent/PrimaryKeyConvention.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/QueryStore.cs b/Tanshu.Accounts.Repository/Fluent/QueryStore.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/QueryStore.cs
rename to Tanshu.Accounts.Repository/Fluent/QueryStore.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/SetupStore.cs b/Tanshu.Accounts.Repository/Fluent/SetupStore.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/SetupStore.cs
rename to Tanshu.Accounts.Repository/Fluent/SetupStore.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/StoreConfiguration.cs b/Tanshu.Accounts.Repository/Fluent/StoreConfiguration.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/StoreConfiguration.cs
rename to Tanshu.Accounts.Repository/Fluent/StoreConfiguration.cs
diff --git a/Tanshu.Accounts.SqlDAO/Fluent/UniqueConvention.cs b/Tanshu.Accounts.Repository/Fluent/UniqueConvention.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Fluent/UniqueConvention.cs
rename to Tanshu.Accounts.Repository/Fluent/UniqueConvention.cs
diff --git a/Tanshu.Accounts.SqlDAO/Lifetime/Session.cs b/Tanshu.Accounts.Repository/Lifetime/Session.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Lifetime/Session.cs
rename to Tanshu.Accounts.Repository/Lifetime/Session.cs
diff --git a/Tanshu.Accounts.SqlDAO/Ninject/QueryStore.cs b/Tanshu.Accounts.Repository/Ninject/QueryStore.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Ninject/QueryStore.cs
rename to Tanshu.Accounts.Repository/Ninject/QueryStore.cs
diff --git a/Tanshu.Accounts.SqlDAO/Ninject/SessionRepository.cs b/Tanshu.Accounts.Repository/Ninject/SessionRepository.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Ninject/SessionRepository.cs
rename to Tanshu.Accounts.Repository/Ninject/SessionRepository.cs
diff --git a/Tanshu.Accounts.SqlDAO/Properties/AssemblyInfo.cs b/Tanshu.Accounts.Repository/Properties/AssemblyInfo.cs
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Properties/AssemblyInfo.cs
rename to Tanshu.Accounts.Repository/Properties/AssemblyInfo.cs
diff --git a/Tanshu.Accounts.SqlDAO/Tanshu.Accounts.Repository.csproj b/Tanshu.Accounts.Repository/Tanshu.Accounts.Repository.csproj
similarity index 100%
rename from Tanshu.Accounts.SqlDAO/Tanshu.Accounts.Repository.csproj
rename to Tanshu.Accounts.Repository/Tanshu.Accounts.Repository.csproj
diff --git a/Tanshu.Accounts.sln b/Tanshu.Accounts.sln
index 20402be..feadf9d 100644
--- a/Tanshu.Accounts.sln
+++ b/Tanshu.Accounts.sln
@@ -9,7 +9,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tanshu.Accounts.Helpers", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tanshu.Accounts.Print", "Tanshu.Accounts.Print\Tanshu.Accounts.Print.csproj", "{90C9D02C-91AF-4529-86BE-28320332DDB5}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tanshu.Accounts.Repository", "Tanshu.Accounts.SqlDAO\Tanshu.Accounts.Repository.csproj", "{B755D152-37C3-47D6-A721-3AD17A8EF316}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tanshu.Accounts.Repository", "Tanshu.Accounts.Repository\Tanshu.Accounts.Repository.csproj", "{B755D152-37C3-47D6-A721-3AD17A8EF316}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution