diff --git a/Sql/Changes 2013.11.29.sql b/Sql/Changes 2013.11.29.sql new file mode 100644 index 0000000..a2999ce --- /dev/null +++ b/Sql/Changes 2013.11.29.sql @@ -0,0 +1,58 @@ +BEGIN TRANSACTION +ALTER TABLE dbo.Inventory DROP CONSTRAINT FK_Inventory_Products; +ALTER TABLE dbo.Inventory DROP CONSTRAINT FK_Inventory_Vouchers; +ALTER TABLE dbo.Inventory DROP CONSTRAINT DF_Inventory_Discount; +CREATE TABLE dbo.Tmp_Inventory ( + InventoryID uniqueidentifier NOT NULL, + VoucherID uniqueidentifier NOT NULL, + ProductID uniqueidentifier NOT NULL, + Quantity decimal(18, 5) NOT NULL, + Rate decimal(18, 5) NOT NULL, + Vat decimal(18, 5) NOT NULL, + ServiceTax decimal(18, 5) NOT NULL, + Discount decimal(18, 5) NOT NULL, + Amount AS ((([Quantity]*[Rate])*((1)+[ServiceTax]+[Vat]))*((1)-[Discount])) + ); +ALTER TABLE dbo.Tmp_Inventory ADD CONSTRAINT DF_Inventory_Discount DEFAULT ((0)) FOR Discount; +IF EXISTS(SELECT * FROM dbo.Inventory) + EXEC('INSERT INTO dbo.Tmp_Inventory (InventoryID, VoucherID, ProductID, Quantity, Rate, Vat, ServiceTax, Discount) + SELECT InventoryID, VoucherID, ProductID, Quantity, Rate, Tax, 0, Discount FROM dbo.Inventory WITH (HOLDLOCK TABLOCKX)'); +DROP TABLE dbo.Inventory; +EXECUTE sp_rename N'dbo.Tmp_Inventory', N'Inventory', 'OBJECT'; +ALTER TABLE dbo.Inventory ADD CONSTRAINT PK_Inventory PRIMARY KEY CLUSTERED (InventoryID); +ALTER TABLE dbo.Inventory ADD CONSTRAINT FK_Inventory_Vouchers FOREIGN KEY (VoucherID) REFERENCES dbo.Vouchers (VoucherID); +ALTER TABLE dbo.Inventory ADD CONSTRAINT FK_Inventory_Products FOREIGN KEY (ProductID) REFERENCES dbo.Products (ProductID); +ALTER TABLE dbo.Vouchers DROP CONSTRAINT IX_Vouchers_Code_Type; +ALTER TABLE dbo.Vouchers ADD CONSTRAINT IX_Vouchers_Code UNIQUE NONCLUSTERED (Code); +ALTER TABLE dbo.Ledgers DROP CONSTRAINT FK_Ledgers_CostCenters; +ALTER TABLE dbo.Products DROP CONSTRAINT FK_Products_Ledgers_Sale; +ALTER TABLE dbo.Products DROP CONSTRAINT FK_Products_Ledgers_Purchase; +ALTER TABLE dbo.ComplexProducts DROP CONSTRAINT FK_ComplexProducts_Products; +ALTER TABLE dbo.Customers DROP CONSTRAINT FK_Customers_Ledgers; +DROP TABLE dbo.ComplexProducts; +ALTER TABLE dbo.Products DROP COLUMN timestamp; +ALTER TABLE dbo.Products DROP COLUMN PurchasePrice; +ALTER TABLE dbo.Products DROP COLUMN SaleLedgerID; +ALTER TABLE dbo.Products DROP COLUMN PurchaseLedgerID; +ALTER TABLE dbo.Waiters DROP COLUMN timestamp; +ALTER TABLE dbo.Vouchers DROP COLUMN Ref; +ALTER TABLE dbo.Vouchers DROP COLUMN Type; +ALTER TABLE dbo.Vouchers DROP COLUMN timestamp; +ALTER TABLE dbo.SaleVoucher DROP COLUMN timestamp; +ALTER TABLE dbo.Users DROP COLUMN timestamp; +ALTER TABLE dbo.Customers DROP COLUMN LedgerID; +ALTER TABLE dbo.Customers DROP COLUMN timestamp; +ALTER TABLE dbo.ProductTypes DROP COLUMN timestamp; +ALTER TABLE dbo.Roles DROP COLUMN timestamp; +ALTER TABLE dbo.Tax DROP COLUMN timestamp; +ALTER TABLE dbo.UserRoles DROP COLUMN timestamp; +DROP TABLE CostCenters; +DROP TABLE Ledgers; +exec sp_rename 'dbo.ProductTypes', 'ProductGroups'; +exec sp_rename 'dbo.ProductGroups.ProductTypeID', 'ProductGroupID', 'COLUMN'; +exec sp_rename 'dbo.Products.ProductTypeID', 'ProductGroupID', 'COLUMN'; +exec sp_rename 'dbo.Products.PurchaseTaxID', 'ServiceTaxID', 'COLUMN'; +exec sp_rename 'dbo.Products.SaleTaxID', 'VatID', 'COLUMN'; +COMMIT + +-- ROLLBACK \ No newline at end of file diff --git a/Tanshu.Accounts.BI/AdvanceBI.cs b/Tanshu.Accounts.BI/AdvanceBI.cs index 5aaec84..fde0083 100644 --- a/Tanshu.Accounts.BI/AdvanceBI.cs +++ b/Tanshu.Accounts.BI/AdvanceBI.cs @@ -5,11 +5,10 @@ using Tanshu.Accounts.Contracts; namespace Tanshu.Accounts.BI { - public class AdvanceBI : IAdvanceBI + public class AdvanceBI { public void Insert(AdvanceBO advance) { - using (var connection = new SqlDAO.SqlConnectionDAO()) { using (var dao = new SqlDAO.AdvanceDAO(connection)) diff --git a/Tanshu.Accounts.BI/CustomerBI.cs b/Tanshu.Accounts.BI/CustomerBI.cs index 6ab6aa7..e34ba8a 100644 --- a/Tanshu.Accounts.BI/CustomerBI.cs +++ b/Tanshu.Accounts.BI/CustomerBI.cs @@ -4,20 +4,8 @@ using Tanshu.Accounts.Contracts; namespace Tanshu.Accounts.BI { - public class CustomerBI : ICustomerBI + public class CustomerBI { - - public List GetCustomerLedgers() - { - - using (var connection = new SqlDAO.SqlConnectionDAO()) - { - using (var dao = new SqlDAO.CustomerDAO(connection)) - { - return dao.GetCustomerLedgers(); - } - } - } public CustomerBO GetCustomer(Guid customerID) { diff --git a/Tanshu.Accounts.BI/LedgerBI.cs b/Tanshu.Accounts.BI/LedgerBI.cs deleted file mode 100644 index bb5fdb2..0000000 --- a/Tanshu.Accounts.BI/LedgerBI.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using Tanshu.Accounts.Contracts; - -namespace Tanshu.Accounts.BI -{ - public class LedgerBI : ILedgerBI - { - public LedgerBO GetLedger(Guid ledgerID) - { - - using (var connection = new SqlDAO.SqlConnectionDAO()) - { - using (var dao = new SqlDAO.LedgerDAO(connection)) - { - return dao.GetLedger(ledgerID); - } - } - } - public LedgerBO GetLedgerByName(string name) - { - - using (var connection = new SqlDAO.SqlConnectionDAO()) - { - using (var dao = new SqlDAO.LedgerDAO(connection)) - { - return dao.GetLedger(name); - } - } - } - public bool Insert(LedgerBO ledger) - { - - using (var connection = new SqlDAO.SqlConnectionDAO()) - { - using (var dao = new SqlDAO.LedgerDAO(connection)) - { - return dao.Insert(ledger); - } - } - } - public bool Update(LedgerBO ledger) - { - - using (var connection = new SqlDAO.SqlConnectionDAO()) - { - using (var dao = new SqlDAO.LedgerDAO(connection)) - { - return dao.Update(ledger); - } - } - } - public List GetLedgers() - { - - using (var connection = new SqlDAO.SqlConnectionDAO()) - { - using (var dao = new SqlDAO.LedgerDAO(connection)) - { - return dao.GetLedgers(); - } - } - } - public List GetLedgersOfType(char type) - { - - using (var connection = new SqlDAO.SqlConnectionDAO()) - { - using (var dao = new SqlDAO.LedgerDAO(connection)) - { - return dao.GetLedgers(type); - } - } - } - } -} diff --git a/Tanshu.Accounts.BI/MembershipBI.cs b/Tanshu.Accounts.BI/MembershipBI.cs index a37e701..8534314 100644 --- a/Tanshu.Accounts.BI/MembershipBI.cs +++ b/Tanshu.Accounts.BI/MembershipBI.cs @@ -3,7 +3,7 @@ using Tanshu.Accounts.Contracts; namespace Tanshu.Accounts.BI { - public class MembershipBI : IMembershipBI + public class MembershipBI { public bool ValidateUser(string name, string password) { diff --git a/Tanshu.Accounts.BI/PaymentBI.cs b/Tanshu.Accounts.BI/PaymentBI.cs index 38e9fad..5d79f7d 100644 --- a/Tanshu.Accounts.BI/PaymentBI.cs +++ b/Tanshu.Accounts.BI/PaymentBI.cs @@ -4,7 +4,7 @@ using Tanshu.Accounts.Contracts; namespace Tanshu.Accounts.BI { - public class PaymentBI : IPaymentBI + public class PaymentBI { public void Insert(PaymentBO payment) { diff --git a/Tanshu.Accounts.BI/ProductBI.cs b/Tanshu.Accounts.BI/ProductBI.cs index 24334a0..b33b77f 100644 --- a/Tanshu.Accounts.BI/ProductBI.cs +++ b/Tanshu.Accounts.BI/ProductBI.cs @@ -4,7 +4,7 @@ using Tanshu.Accounts.Contracts; namespace Tanshu.Accounts.BI { - public class ProductBI : IProductBI + public class ProductBI { public bool Insert(ProductBO product) { @@ -61,17 +61,6 @@ namespace Tanshu.Accounts.BI } } } - public decimal GetProductStock(DateTime date, Guid productID, Guid? voucherID) - { - - using (var connection = new SqlDAO.SqlConnectionDAO()) - { - using (var dao = new SqlDAO.ProductDAO(connection)) - { - return dao.GetProductStock(date, productID, voucherID); - } - } - } public List GetProducts() { @@ -115,14 +104,25 @@ namespace Tanshu.Accounts.BI filter.Add("Type", ""); return GetFilteredProducts(filter); } - public List GetProductTypes() + public List GetProductGroups() { - + using (var connection = new SqlDAO.SqlConnectionDAO()) { using (var dao = new SqlDAO.ProductDAO(connection)) { - return dao.GetProductTypes(); + return dao.GetProductGroups(); + } + } + } + public List GetTaxes() + { + + using (var connection = new SqlDAO.SqlConnectionDAO()) + { + using (var dao = new SqlDAO.ProductDAO(connection)) + { + return dao.GetTaxes(); } } } diff --git a/Tanshu.Accounts.BI/SaleVoucherBI.cs b/Tanshu.Accounts.BI/SaleVoucherBI.cs index f58fb4c..41fed8f 100644 --- a/Tanshu.Accounts.BI/SaleVoucherBI.cs +++ b/Tanshu.Accounts.BI/SaleVoucherBI.cs @@ -4,7 +4,7 @@ using Tanshu.Accounts.Contracts; namespace Tanshu.Accounts.BI { - public class SaleVoucherBI : ISaleVoucherBI + public class SaleVoucherBI { public SalesBillItemBO GetDefaultSaleBillItem(Guid productID) { diff --git a/Tanshu.Accounts.BI/SalesAnalysisBI.cs b/Tanshu.Accounts.BI/SalesAnalysisBI.cs index 0fe685b..702ca93 100644 --- a/Tanshu.Accounts.BI/SalesAnalysisBI.cs +++ b/Tanshu.Accounts.BI/SalesAnalysisBI.cs @@ -4,16 +4,16 @@ using Tanshu.Accounts.Contracts; namespace Tanshu.Accounts.BI { - public class SalesAnalysisBI : ISalesAnalysisBI + public class SalesAnalysisBI { - public List GetSaleDetail(DateTime startDate, DateTime finishDate, Guid costCenterID) + public List GetSaleDetail(DateTime startDate, DateTime finishDate, Guid productGroupID) { using (var connection = new SqlDAO.SqlConnectionDAO()) { using (var dao = new SqlDAO.SalesAnalysisDAO(connection)) { - return dao.GetSaleDetail(startDate, finishDate, costCenterID); + return dao.GetSaleDetail(startDate, finishDate, productGroupID); } } } @@ -29,14 +29,14 @@ namespace Tanshu.Accounts.BI } } } - public void GetAdditionalInfo(ref decimal freeSale, ref decimal voids, ref decimal pending, ref decimal net, ref decimal tax, DateTime startDate, DateTime finishDate) + public decimal GetFreeSale(DateTime startDate, DateTime finishDate) { using (var connection = new SqlDAO.SqlConnectionDAO()) { using (var dao = new SqlDAO.SalesAnalysisDAO(connection)) { - dao.GetAdditionalInfo(ref freeSale, ref voids, ref pending, ref net, ref tax, startDate, finishDate); + return dao.GetFreeSale(startDate, finishDate); } } } diff --git a/Tanshu.Accounts.BI/Tanshu.Accounts.BI.csproj b/Tanshu.Accounts.BI/Tanshu.Accounts.BI.csproj index 233aa65..edb25ac 100644 --- a/Tanshu.Accounts.BI/Tanshu.Accounts.BI.csproj +++ b/Tanshu.Accounts.BI/Tanshu.Accounts.BI.csproj @@ -69,7 +69,6 @@ - diff --git a/Tanshu.Accounts.BI/UserBI.cs b/Tanshu.Accounts.BI/UserBI.cs index c1230db..993c2d8 100644 --- a/Tanshu.Accounts.BI/UserBI.cs +++ b/Tanshu.Accounts.BI/UserBI.cs @@ -4,7 +4,7 @@ using Tanshu.Accounts.Contracts; namespace Tanshu.Accounts.BI { - public class UserBI : IUserBI + public class UserBI { public UserBO GetUser(Guid userID) { diff --git a/Tanshu.Accounts.BI/WaiterBI.cs b/Tanshu.Accounts.BI/WaiterBI.cs index 8266a01..a649262 100644 --- a/Tanshu.Accounts.BI/WaiterBI.cs +++ b/Tanshu.Accounts.BI/WaiterBI.cs @@ -4,7 +4,7 @@ using Tanshu.Accounts.Contracts; namespace Tanshu.Accounts.BI { - public class WaiterBI : IWaiterBI + public class WaiterBI { public bool Insert(WaiterBO waiter) { diff --git a/Tanshu.Accounts.Contracts/Data Contracts/AdvanceBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/AdvanceBO.cs index 0c4b4de..42bed13 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/AdvanceBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/AdvanceBO.cs @@ -3,22 +3,14 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] public class AdvanceBO { - [DataMember] public Guid AdvanceID { get; set; } - [DataMember] public decimal Amount { get; set; } - [DataMember] public string Narration { get; set; } - [DataMember] public Guid CashierIn { get; set; } - [DataMember] public DateTime DateIn { get; set; } - [DataMember] public Guid? CashierOut { get; set; } - [DataMember] public DateTime? DateOut { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/AdvanceDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/AdvanceDisplayBO.cs index b3ae081..c127876 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/AdvanceDisplayBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/AdvanceDisplayBO.cs @@ -3,10 +3,9 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] public class AdvanceDisplayBO : AdvanceBO { - [DataMember] public string Cashier { get; set; } + public string UserOut { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/ComplexProductBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/ComplexProductBO.cs deleted file mode 100644 index 7f70ad2..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/ComplexProductBO.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class ComplexProductBO - { - [DataMember] - public Guid ComplexProductID { get; set; } - [DataMember] - public Guid ProductID { get; set; } - [DataMember] - public int Code { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public string Units { get; set; } - [DataMember] - public decimal SalePrice { get; set; } - [DataMember] - public Guid SaleTaxID { get; set; } - [DataMember] - public decimal Quantity { get; set; } - [DataMember] - public byte[] timestamp { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/CostCenterBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/CostCenterBO.cs deleted file mode 100644 index 38d3562..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/CostCenterBO.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class CostCenterBO - { - [DataMember] - public Guid CostCenterID { get; set; } - [DataMember] - public int Code { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public byte[] timestamp { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/CustomerBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/CustomerBO.cs index da5bc1b..95fdc89 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/CustomerBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/CustomerBO.cs @@ -3,27 +3,22 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] + public class CustomerBO { - [DataMember] + public Guid CustomerID { get; set; } - [DataMember] + public int Code { get; set; } - [DataMember] + public string Name { get; set; } - [DataMember] - public Guid LedgerID { get; set; } - [DataMember] + public string Address { get; set; } - [DataMember] + public bool Important { get; set; } - [DataMember] + public string Phone { get; set; } - [DataMember] + public string Remarks { get; set; } - [DataMember] - public byte[] timestamp { get; set; } - } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/InventoryBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/InventoryBO.cs index f34a2f4..afb8bb9 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/InventoryBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/InventoryBO.cs @@ -3,19 +3,17 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] + public class InventoryBO { - [DataMember] + public Guid InventoryID { get; set; } - [DataMember] + public Guid VoucherID { get; set; } - [DataMember] + public Guid ProductID { get; set; } - [DataMember] - public Guid? ComplexProductID { get; set; } private decimal quantity; - [DataMember] + public decimal Quantity { get { return quantity; } @@ -27,7 +25,7 @@ namespace Tanshu.Accounts.Contracts } } private decimal rate; - [DataMember] + public decimal Rate { get { return rate; } @@ -38,20 +36,31 @@ namespace Tanshu.Accounts.Contracts CalculateAmount(); } } - decimal tax; - [DataMember] - public decimal Tax + decimal vat; + + public decimal Vat { - get { return tax; } + get { return vat; } set { - tax = value; if (amount != null) + vat = value; if (amount != null) + CalculateAmount(); + } + } + decimal serviceTax; + + public decimal ServiceTax + { + get { return serviceTax; } + set + { + serviceTax = value; if (amount != null) CalculateAmount(); } } decimal discount; - [DataMember] + public decimal Discount { get { return discount; } @@ -63,7 +72,7 @@ namespace Tanshu.Accounts.Contracts } decimal? amount; - [DataMember] + public decimal Amount { get @@ -75,16 +84,7 @@ namespace Tanshu.Accounts.Contracts } private void CalculateAmount() { - amount = quantity * rate * (1 + tax) * (1 - discount); + amount = quantity * rate * (1 + vat + serviceTax) * (1 - discount); } - [DataMember] - public bool IsRateFinal { get; set; } - [DataMember] - public bool RateFinal - { - get { return IsRateFinal; } - } - [DataMember] - public byte[] timestamp { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/InventoryDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/InventoryDisplayBO.cs index 8ca836c..e42a2f7 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/InventoryDisplayBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/InventoryDisplayBO.cs @@ -3,10 +3,10 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] + public class InventoryDisplayBO : InventoryBO { - [DataMember] + public string ProductName { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/JournalBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/JournalBO.cs deleted file mode 100644 index ddbd45a..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/JournalBO.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class JournalBO - { - [DataMember] - public Guid JournalID { get; set; } - [DataMember] - public Guid VoucherID { get; set; } - [DataMember] - public Guid LedgerID { get; set; } - [DataMember] - public Guid CostCenterID { get; set; } - [DataMember] - public decimal Amount { get; set; } - private int debit; - [DataMember] - public int Debit - { - get { return debit; } - set - { - if ((value == 1) || (value == -1)) - debit = value; - else - throw new ArgumentException("Debit can only be -1 or 1"); - } - } - [DataMember] - public decimal SignedAmount - { - get { return Amount * Debit; } - } - [DataMember] - public byte[] timestamp { get; set; } - - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/JournalDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/JournalDisplayBO.cs deleted file mode 100644 index e0225e4..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/JournalDisplayBO.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class JournalDisplayBO : JournalBO - { - [DataMember] - public string LedgerName { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/LedgerBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/LedgerBO.cs deleted file mode 100644 index 3e5faf2..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/LedgerBO.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class LedgerBO - { - [DataMember] - public Guid LedgerID { get; set; } - [DataMember] - public int Code { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public virtual char Type { get; set; } - [DataMember] - public Guid ParentLedgerID { get; set; } - [DataMember] - public Guid CostCenterID { get; set; } - [DataMember] - public bool IsActive { get; set; } - [DataMember] - public byte[] timestamp { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/LedgerDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/LedgerDisplayBO.cs deleted file mode 100644 index a3c6c95..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/LedgerDisplayBO.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class LedgerDisplayBO : LedgerBO - { - [DataMember] - public string CostCenter { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/LedgerTypeBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/LedgerTypeBO.cs deleted file mode 100644 index 5cea3f1..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/LedgerTypeBO.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class LedgerTypeBO - { - [DataMember] - public char TypeID { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public int SortOrder { get; set; } - [DataMember] - public short Debit { get; set; } - [DataMember] - public byte Location { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/PaymentBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/PaymentBO.cs index b9b45ac..ac30b41 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/PaymentBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/PaymentBO.cs @@ -3,21 +3,14 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] public class PaymentBO { - [DataMember] public Guid PaymentID { get; set; } - [DataMember] public DateTime Date { get; set; } - [DataMember] public string Type { get; set; } - [DataMember] public Guid CashierID { get; set; } - [DataMember] public decimal Amount { get; set; } - [DataMember] public string Narration { get; set; } - + } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/PaymentDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/PaymentDisplayBO.cs index f13ce59..f35e527 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/PaymentDisplayBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/PaymentDisplayBO.cs @@ -3,10 +3,8 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] public class PaymentDisplayBO : PaymentBO { - [DataMember] public string Cashier { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/PaymentSheetBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/PaymentSheetBO.cs deleted file mode 100644 index 6d49ef0..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/PaymentSheetBO.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class PaymentSheetBO - { - [DataMember] - public Guid SalaryPaymentID { get; set; } - [DataMember] - public Guid LedgerID { get; set; } - [DataMember] - public Guid VoucherID { get; set; } - [DataMember] - public decimal Opening { get; set; } - [DataMember] - public decimal Salary { get; set; } - [DataMember] - public decimal Total - { - get { return Opening + Salary; } - } - [DataMember] - public int Paid { get; set; } - [DataMember] - public decimal Closing - { - get { return (Opening + Salary) - Paid; } - } - [DataMember] - public byte[] timestamp { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/PaymentSheetDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/PaymentSheetDisplayBO.cs deleted file mode 100644 index 4e6325f..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/PaymentSheetDisplayBO.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class PaymentSheetDisplayBO : PaymentSheetBO - { - [DataMember] - public string Name { get; set; } - [DataMember] - public string Department { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/ProductBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/ProductBO.cs index da4163d..8023d55 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/ProductBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/ProductBO.cs @@ -3,40 +3,19 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] public class ProductBO { - [DataMember] public Guid ProductID { get; set; } - [DataMember] public int Code { get; set; } - [DataMember] public string Name { get; set; } - [DataMember] public string Units { get; set; } - [DataMember] - public Guid ProductTypeID { get; set; } - [DataMember] - public Guid SaleLedgerID { get; set; } - [DataMember] - public Guid SaleTaxID { get; set; } - [DataMember] + public Guid ProductGroupID { get; set; } + public Guid VatID { get; set; } public decimal SalePrice { get; set; } - [DataMember] - public Guid PurchaseLedgerID { get; set; } - [DataMember] - public Guid PurchaseTaxID { get; set; } - [DataMember] - public decimal PurchasePrice { get; set; } - [DataMember] + public Guid ServiceTaxID { get; set; } public bool Discontinued { get; set; } - [DataMember] public decimal MinimumLevel { get; set; } - [DataMember] public decimal MaximumLevel { get; set; } - [DataMember] - public byte[] timestamp { get; set; } - [DataMember] public int SortOrder { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/ProductDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/ProductDisplayBO.cs index 330ae33..1fcd6b0 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/ProductDisplayBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/ProductDisplayBO.cs @@ -3,12 +3,9 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] public class ProductDisplayBO : ProductBO { - [DataMember] public decimal Price { get; set; } - [DataMember] public string Type { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/ProductDisplaySmallBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/ProductDisplaySmallBO.cs index 21fca42..3c1b102 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/ProductDisplaySmallBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/ProductDisplaySmallBO.cs @@ -3,18 +3,12 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] public class ProductDisplaySmallBO { - [DataMember] public int Code { get; set; } - [DataMember] public string Name { get; set; } - [DataMember] public decimal Price { get; set; } - [DataMember] public string Category { get; set; } - [DataMember] public Guid ProductID { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/ProductTypeBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/ProductGroupBO.cs similarity index 51% rename from Tanshu.Accounts.Contracts/Data Contracts/ProductTypeBO.cs rename to Tanshu.Accounts.Contracts/Data Contracts/ProductGroupBO.cs index 2a9252e..4d20356 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/ProductTypeBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/ProductGroupBO.cs @@ -3,20 +3,12 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] - public class ProductTypeBO + public class ProductGroupBO { - [DataMember] - public Guid ProductTypeID { get; set; } - [DataMember] + public Guid ProductGroupID { get; set; } public string Name { get; set; } - [DataMember] public decimal DiscountLimit { get; set; } - [DataMember] public bool IsForSale { get; set; } - [DataMember] public bool IsForPurchae { get; set; } - [DataMember] - public byte[] timestamp { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/RequirementBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/RequirementBO.cs deleted file mode 100644 index a58f6ab..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/RequirementBO.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class RequirementBO - { - [DataMember] - public Guid RequirementID { get; set; } - [DataMember] - public Guid LedgerID { get; set; } - [DataMember] - public DateTime Date { get; set; } - [DataMember] - public Guid ProductID { get; set; } - [DataMember] - public decimal Requirement { get; set; } - [DataMember] - public string Remarks { get; set; } - [DataMember] - public byte Status { get; set; } - // Status 0 - Pending, 1 - Ordered, 2 - Cancelled, 3 - Fulfilled - [DataMember] - public DateTime StatusDate { get; set; } - [DataMember] - public decimal Stock { get; set; } - [DataMember] - public decimal Price { get; set; } - [DataMember] - public decimal Ordered { get; set; } - [DataMember] - public decimal OrderRate { get; set; } - [DataMember] - public decimal OrderAmount - { - get - { - return Ordered * OrderRate; - } - } - [DataMember] - public byte[] timestamp { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/RequirementDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/RequirementDisplayBO.cs deleted file mode 100644 index 6becbf1..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/RequirementDisplayBO.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class RequirementDisplayBO : RequirementBO - { - [DataMember] - public string Product { get; set; } - [DataMember] - public string Ledger { get; set; } - [DataMember] - public string StatusDisplay - { - get - { - if (base.Status == 0) - return "Pending"; - else if (base.Status == 1) - return "Ordered"; - else if (base.Status == 2) - return "Cancelled"; - else if (base.Status == 3) - return "Fulfilled"; - else - throw new ArgumentException("Status message is invalid"); - } - } - [DataMember] - public decimal OrderTotal { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/SalarySheetBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/SalarySheetBO.cs deleted file mode 100644 index 2abab05..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/SalarySheetBO.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class SalarySheetBO - { - [DataMember] - public Guid SalarySheetID { get; set; } - [DataMember] - public Guid VoucherID { get; set; } - [DataMember] - public Guid LedgerID { get; set; } - [DataMember] - public int Salary { get; set; } - [DataMember] - public decimal WorkingDays { get; set; } - [DataMember] - public decimal Present { get; set; } - [DataMember] - public decimal Offs { get; set; } - [DataMember] - public decimal Overtime { get; set; } - [DataMember] - public int Deductions { get; set; } - [DataMember] - public int TotalSalary - { - get - { - decimal amount = 0; - - // Salary - amount = (Present + Offs + Overtime) * Salary / WorkingDays; - - // Less Deductions - amount -= Deductions; - - // Roundoff - amount = Math.Round(amount); - - return Convert.ToInt32(amount); - } - - } - [DataMember] - public string Remarks { get; set; } - [DataMember] - public byte[] timestamp { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/SalarySheetDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/SalarySheetDisplayBO.cs deleted file mode 100644 index d1bef2e..0000000 --- a/Tanshu.Accounts.Contracts/Data Contracts/SalarySheetDisplayBO.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Runtime.Serialization; - -namespace Tanshu.Accounts.Contracts -{ - [DataContract] - public class SalarySheetDisplayBO : SalarySheetBO - { - [DataMember] - public int Code { get; set; } - [DataMember] - public string Name { get; set; } - [DataMember] - public string CostCenter { get; set; } - [DataMember] - public int CurrentSalary { get; set; } - [DataMember] - public bool IsComputed { get; set; } - } -} diff --git a/Tanshu.Accounts.Contracts/Data Contracts/SaleVoucherBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/SaleVoucherBO.cs index 1327a1f..3bd5b92 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/SaleVoucherBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/SaleVoucherBO.cs @@ -16,6 +16,5 @@ namespace Tanshu.Accounts.Contracts public bool Printed { get; set; } public DateTime? Alarm { get; set; } public string KotID { get; set; } - public byte[] SaleTimestamp { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/SalesAnalysisBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/SalesAnalysisBO.cs index 994ad02..2257a3a 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/SalesAnalysisBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/SalesAnalysisBO.cs @@ -1,42 +1,27 @@ using System; using System.Runtime.Serialization; - namespace Tanshu.Accounts.Contracts { - [DataContract] public class SalesAnalysisBO { - [DataMember] - public Guid TypeID { get; set; } - [DataMember] - public string Section { get; set; } - [DataMember] - public decimal Quantity { get; set; } - [DataMember] - public decimal Gross { get; set; } - [DataMember] + public Guid ProductGroupID { get; set; } + public string Name { get; set; } public decimal Net { get; set; } + public decimal Vat { get; set; } + public decimal ServiceTax { get; set; } } - [DataContract] public class SalesAnalysisDetailBO { - [DataMember] public string Section { get; set; } - [DataMember] public string Product { get; set; } - [DataMember] public decimal Quantity { get; set; } - [DataMember] public decimal Amount { get; set; } } - [DataContract] public class SettlementReportBO { - [DataMember] public PaidStatus Status { get; set; } - [DataMember] public decimal Amount { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/SalesBillItemBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/SalesBillItemBO.cs index 89d591e..96e879d 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/SalesBillItemBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/SalesBillItemBO.cs @@ -3,16 +3,16 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] + public class SalesBillItemBO { - [DataMember] + public Guid productID; - [DataMember] + public string Name { get; set; } private decimal price; - [DataMember] + public decimal Price { get { return price; } @@ -26,7 +26,7 @@ namespace Tanshu.Accounts.Contracts } private decimal quantity = 1; - [DataMember] + public decimal Quantity { get { return quantity; } @@ -40,7 +40,7 @@ namespace Tanshu.Accounts.Contracts } private decimal discount = 0; - [DataMember] + public decimal Discount { get { return discount; } @@ -55,14 +55,31 @@ namespace Tanshu.Accounts.Contracts } } - [DataMember] - public decimal Tax { get; set; } - public decimal TaxAmount + public decimal Vat { get; set; } + + public decimal VatAmount { get { - return quantity * price * Tax * (1 - discount); + return quantity * price * Vat * (1 - discount); + } + } + + public decimal ServiceTax { get; set; } + + public decimal ServiceTaxAmount + { + get + { + return quantity * price * ServiceTax * (1 - discount); + } + } + public decimal TotalTax + { + get + { + return quantity * price * (Vat + ServiceTax) * (1 - discount); } } @@ -83,7 +100,7 @@ namespace Tanshu.Accounts.Contracts } private decimal printed = 0; - [DataMember] + public decimal Printed { get { return printed; } @@ -95,14 +112,14 @@ namespace Tanshu.Accounts.Contracts printed = value; } } - [DataMember] + public string location; public decimal Value { get { - return price * quantity * (1 - discount) * (1 + Tax); + return price * quantity * (1 - discount) * (1 + Vat + ServiceTax ); } } public decimal Additional @@ -113,7 +130,7 @@ namespace Tanshu.Accounts.Contracts } } - [DataMember] + public bool isNew = true; public string Display @@ -122,7 +139,7 @@ namespace Tanshu.Accounts.Contracts { string output = string.Format("{0} @ Rs. {1:#.##}", Name, price); if (discount != 0) - output += string.Format(" - {0:#.##%}", discount); + output += string.Format(" - {0:#.##%}", discount); return output; } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/TaxBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/TaxBO.cs index 52b5fd6..0e6e429 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/TaxBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/TaxBO.cs @@ -3,18 +3,11 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] public class TaxBO { - [DataMember] public Guid TaxID { get; set; } - [DataMember] public string Name { get; set; } - [DataMember] public decimal Rate { get; set; } - [DataMember] public char Type { get; set; } - [DataMember] - private byte[] timestamp { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/UserBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/UserBO.cs index 42c3c95..8db5e61 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/UserBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/UserBO.cs @@ -3,18 +3,11 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] public class UserBO { - [DataMember] public Guid UserID { get; set; } - [DataMember] public string Name { get; set; } - [DataMember] public string Password { get; set; } - [DataMember] public bool LockedOut { get; set; } - [DataMember] - public byte[] timestamp { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/VerificationBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/VerificationBO.cs index 68083c8..706451d 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/VerificationBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/VerificationBO.cs @@ -3,25 +3,16 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] public class VerificationBO { - [DataMember] public Guid VerificationID { get; set; } - [DataMember] public Guid VoucherID { get; set; } - [DataMember] public Guid ProductID { get; set; } - [DataMember] public decimal ActualQuantity { get; set; } - [DataMember] public decimal ComputedQuantity { get; set; } - [DataMember] public decimal LostQuantity { get { return ComputedQuantity - ActualQuantity; } } - [DataMember] - public byte[] Timestamp { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/VerificationDisplayBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/VerificationDisplayBO.cs index bb46713..8df296d 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/VerificationDisplayBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/VerificationDisplayBO.cs @@ -3,10 +3,8 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] public class VerificationDisplayBO : VerificationBO { - [DataMember] public string ProductName { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/VoucherBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/VoucherBO.cs index 415f2f4..725bd73 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/VoucherBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/VoucherBO.cs @@ -3,28 +3,22 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] + public class VoucherBO { - [DataMember] + public Guid VoucherID { get; set; } - [DataMember] + public int Code { get; set; } - [DataMember] - public string Ref { get; set; } - [DataMember] + public DateTime? Date { get; set; } - [DataMember] + public string Narration { get; set; } - [DataMember] + public Guid UserID { get; set; } - [DataMember] + public DateTime CreationDate { get; set; } - [DataMember] + public DateTime LastEditDate { get; set; } - [DataMember] - public char Type { get; set; } - [DataMember] - public byte[] timestamp { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Data Contracts/WaiterBO.cs b/Tanshu.Accounts.Contracts/Data Contracts/WaiterBO.cs index 1eb2c81..0df5c12 100644 --- a/Tanshu.Accounts.Contracts/Data Contracts/WaiterBO.cs +++ b/Tanshu.Accounts.Contracts/Data Contracts/WaiterBO.cs @@ -3,16 +3,10 @@ using System.Runtime.Serialization; namespace Tanshu.Accounts.Contracts { - [DataContract] public class WaiterBO { - [DataMember] public Guid WaiterID { get; set; } - [DataMember] public int Code { get; set; } - [DataMember] public string Name { get; set; } - [DataMember] - public byte[] timestamp { get; set; } } } diff --git a/Tanshu.Accounts.Contracts/Service Contracts/AdvanceBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/AdvanceBI.cs deleted file mode 100644 index 45fb870..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/AdvanceBI.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.ServiceModel; -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface IAdvanceBI - { - [OperationContract] - void Insert(AdvanceBO advance); - [OperationContract] - List GetAdvances(DateTime fromDate, DateTime toDate, bool all); - [OperationContract] - void Adjust(Guid advanceID, Guid userID); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/CheckoutBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/CheckoutBI.cs deleted file mode 100644 index b618016..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/CheckoutBI.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using System.Data.SqlClient; -using System.ServiceModel; -using System.Runtime.Serialization; - - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface ICheckoutBI - { - #region Properties - [DataMember] - decimal Opening { get; } - [DataMember] - decimal Receipts { get; } - [DataMember] - decimal AdvanceReceipts { get; } - [DataMember] - decimal CCReceipts { get; } - [DataMember] - decimal AdvanceAdjusted { get; } - [DataMember] - decimal CashPayments { get; } - [DataMember] - decimal AdditionalVoids { get; } - [DataMember] - decimal VoidsInSystem { get; } - [DataMember] - decimal PendingBills { get; } - [DataMember] - decimal NetSales { get; } - [DataMember] - decimal ClosingBalance { get; } - [DataMember] - decimal RetainedOvernight { get; } - [DataMember] - decimal CashDeposited { get; } // - [DataMember] - decimal Excess { get; } // - [DataMember] - string Status { get; } // - [DataMember] - string Cashiers { get; } // - [DataMember] - Guid CashierID { get; } // - [DataMember] - string Cashier { get; } // - [DataMember] - DateTime StartDate { get; } // - [DataMember] - DateTime FinishDate { get; } // - - [DataMember] - string PendingString { get; } - [DataMember] - string CCString { get; } - [DataMember] - string VoidsString { get; } - [DataMember] - string DiscountString { get; } - [DataMember] - string Manager { get; } - #endregion - - [OperationContract] - void Init(Guid cashier, DateTime startDate, DateTime finishDate); - [OperationContract] - void Calculate(decimal cashDeposited, decimal retainedOvernight); - } - -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/CustomerBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/CustomerBI.cs deleted file mode 100644 index f3f32da..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/CustomerBI.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -//using System.Linq; -using System.Text; -using System.ServiceModel; -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface ICustomerBI - { - [OperationContract] - List GetCustomerLedgers(); - [OperationContract] - CustomerBO GetCustomer(Guid customerID); - [OperationContract] - List GetFilteredCustomers(Dictionary filter); - [OperationContract] - List GetCustomers(); - [OperationContract] - List GetSingleCustomers(Guid customerID); - [OperationContract] - bool Update(CustomerBO customer); - [OperationContract] - bool Delete(Guid customerID); - [OperationContract] - bool Insert(CustomerBO customer); - } - -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/LedgerBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/LedgerBI.cs deleted file mode 100644 index c06df99..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/LedgerBI.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.ServiceModel; - -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface ILedgerBI - { - [OperationContract] - LedgerBO GetLedger(Guid ledgerID); - [OperationContract] - LedgerBO GetLedgerByName(string name); - [OperationContract] - bool Insert(LedgerBO ledger); - [OperationContract] - bool Update(LedgerBO ledger); - [OperationContract] - List GetLedgers(); - [OperationContract] - List GetLedgersOfType(char type); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/MembershipBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/MembershipBI.cs deleted file mode 100644 index 7c9761b..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/MembershipBI.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -//using System.Linq; -using System.Text; -using System.Data.SqlClient; -using System.ServiceModel; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface IMembershipBI - { - [OperationContract] - bool ValidateUser(string name, string password); - [OperationContract] - void AddUsersToRoles(string[] usernames, string[] roleNames); - [OperationContract] - string[] GetAllRoles(); - [OperationContract] - string[] GetRolesForUser(string username); - [OperationContract] - bool IsUserInRole(string username, string roleName); - [OperationContract] - void RemoveUsersFromRoles(string[] usernames, string[] roleNames); - [OperationContract] - UserBO GetUserFromName(string name); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/PaymentBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/PaymentBI.cs deleted file mode 100644 index ea9a9cc..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/PaymentBI.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.ServiceModel; - -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface IPaymentBI - { - [OperationContract] - void Insert(PaymentBO payment); - [OperationContract] - List GetPayments(Guid? userID, DateTime fromDate, DateTime toDate); - [OperationContract] - void Delete(Guid paymentID); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/ProductBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/ProductBI.cs deleted file mode 100644 index a8e3cb2..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/ProductBI.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.ServiceModel; -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface IProductBI - { - [OperationContract] - bool Insert(ProductBO product); - [OperationContract] - bool Update(ProductBO product); - [OperationContract] - bool Delete(Guid productID); - [OperationContract] - ProductBO GetProductFromName(string nameAndUnits); - [OperationContract] - ProductBO GetProduct(Guid productID); - [OperationContract] - decimal GetProductStock(DateTime date, Guid productID, Guid? voucherID); - [OperationContract] - List GetProducts(); - [OperationContract] - List GetFilteredProducts(Dictionary filter); - [OperationContract] - List GetProductTypes(); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/SaleVoucherBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/SaleVoucherBI.cs deleted file mode 100644 index ec507b1..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/SaleVoucherBI.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.SqlClient; -using System.ServiceModel; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface ISaleVoucherBI - { - [OperationContract] - SalesBillItemBO GetDefaultSaleBillItem(Guid productID); - [OperationContract] - decimal GetProductDiscountLimit(Guid productID); - [OperationContract] - bool IsBillPrinted(Guid voucherID); - [OperationContract] - bool Insert(SaleVoucherBO saleVoucher, List inventory); - [OperationContract] - bool Update(SaleVoucherBO saleVoucher, List inventory); - [OperationContract] - bool GetSaleVoucher(Guid voucherID, ref SaleVoucherBO voucherSale, ref List iList); - - [OperationContract] - List GetPendingBills(PendingType list, int floor); - [OperationContract] - Guid? GetPendingVoucherID(string tableID, int floor); - [OperationContract] - List SaleInventory(Dictionary.ValueCollection list, Guid? voucherID); - [OperationContract] - void SetAlarm(Guid voucherID, DateTime? alarmTime); - [OperationContract] - void VoidBill(Guid voucherID, string reason, Guid userID); - [OperationContract] - void DeclareBillsPaid(Guid userID, List billList, PaidStatus paidStatus); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/SalesAnalysisBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/SalesAnalysisBI.cs deleted file mode 100644 index 44120ab..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/SalesAnalysisBI.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -//using System.Linq; -using System.Text; -using System.Data.SqlClient; -using System.ServiceModel; - - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface ISalesAnalysisBI - { - [OperationContract] - List GetSaleDetail(DateTime startDate, DateTime finishDate, Guid costCenterID); - [OperationContract] - List GetSale(DateTime startDate, DateTime finishDate); - [OperationContract] - void GetAdditionalInfo(ref decimal freeSale, ref decimal voids, ref decimal pending, ref decimal net, ref decimal tax, DateTime startDate, DateTime finishDate); - [OperationContract] - List GetSalesTaxReturn(DateTime startDate, DateTime finishDate, ref decimal freeSale, ref decimal voids, ref decimal pending, ref decimal net, ref decimal tax); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/UserBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/UserBI.cs deleted file mode 100644 index 25e78bf..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/UserBI.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.ServiceModel; -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface IUserBI - { - [OperationContract] - UserBO GetUser(Guid userID); - [OperationContract] - bool ChangePassword(UserBO userData, string newPassword); - [OperationContract] - List GetUsers(); - [OperationContract] - bool UserExists(string userName); - [OperationContract] - bool Insert(UserBO user); - [OperationContract] - bool Update(UserBO user); - [OperationContract] - bool Delete(Guid userID); - } -} diff --git a/Tanshu.Accounts.Contracts/Service Contracts/WaiterBI.cs b/Tanshu.Accounts.Contracts/Service Contracts/WaiterBI.cs deleted file mode 100644 index 7a11979..0000000 --- a/Tanshu.Accounts.Contracts/Service Contracts/WaiterBI.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.ServiceModel; -using System.Data.SqlClient; - -namespace Tanshu.Accounts.Contracts -{ - [ServiceContract] - public interface IWaiterBI - { - [OperationContract] - bool Insert(WaiterBO waiter); - [OperationContract] - bool Update(WaiterBO waiter); - [OperationContract] - WaiterBO GetWaiter(Guid waiterID); - [OperationContract] - bool Delete(Guid waiterID); - [OperationContract] - List GetWaiters(); - } -} diff --git a/Tanshu.Accounts.Contracts/Tanshu.Accounts.Contracts.csproj b/Tanshu.Accounts.Contracts/Tanshu.Accounts.Contracts.csproj index 2f4b77e..61f4bc7 100644 --- a/Tanshu.Accounts.Contracts/Tanshu.Accounts.Contracts.csproj +++ b/Tanshu.Accounts.Contracts/Tanshu.Accounts.Contracts.csproj @@ -56,52 +56,28 @@ - - - - - - - - - - - - - - + - - - - - - - - - - -