private void InsertOfficialReceipt(string accountCode, string accountTitle, decimal amount) { var or = new OfficialReceipt { MemberCode = MemberCode, MemberName = MemberName, AccountCode = accountCode, AccountTitle = accountTitle }; if (accountCode == GlobalSettings.CodeOfCashOnHand) { // insert denomination details or.Debit = amount; #region --- Cash CashAndCheckBreakDown --- if (CashAndCheckDenomimation != null) { //JEA: Since deno09 is not available (0.50), I use it as lieu to 200 or.Deno01 = CashAndCheckDenomimation.Deno01; //1000 or.Deno02 = CashAndCheckDenomimation.Deno02; //500 or.Deno03 = CashAndCheckDenomimation.Deno03; //100 or.Deno04 = CashAndCheckDenomimation.Deno04; //50 or.Deno05 = CashAndCheckDenomimation.Deno05; //20 or.Deno06 = CashAndCheckDenomimation.Deno06; //10 or.Deno07 = CashAndCheckDenomimation.Deno07; //5 or.Deno08 = CashAndCheckDenomimation.Deno08; //1 or.Deno09 = CashAndCheckDenomimation.Deno09; //.5 -> 200 or.Deno10 = CashAndCheckDenomimation.Deno10; //.25 #endregion --- Cash CashAndCheckBreakDown --- #region --- Check CashAndCheckBreakDown --- or.BankName1 = CashAndCheckDenomimation.BankName1; or.BankDate1 = CashAndCheckDenomimation.BankDate1; or.BankCheck1 = CashAndCheckDenomimation.BankCheck1; or.BankAmount1 = CashAndCheckDenomimation.BankAmount1; or.BankName2 = CashAndCheckDenomimation.BankName2; or.BankDate2 = CashAndCheckDenomimation.BankDate2; or.BankCheck2 = CashAndCheckDenomimation.BankCheck2; or.BankAmount2 = CashAndCheckDenomimation.BankAmount2; or.BankName3 = CashAndCheckDenomimation.BankName3; or.BankDate3 = CashAndCheckDenomimation.BankDate3; or.BankCheck3 = CashAndCheckDenomimation.BankCheck3; or.BankAmount3 = CashAndCheckDenomimation.BankAmount3; or.BankName4 = CashAndCheckDenomimation.BankName4; or.BankDate4 = CashAndCheckDenomimation.BankDate4; or.BankCheck4 = CashAndCheckDenomimation.BankCheck4; or.BankAmount4 = CashAndCheckDenomimation.BankAmount4; or.BankName5 = CashAndCheckDenomimation.BankName5; or.BankDate5 = CashAndCheckDenomimation.BankDate5; or.BankCheck5 = CashAndCheckDenomimation.BankCheck5; or.BankAmount5 = CashAndCheckDenomimation.BankAmount5; } #endregion or.AmountInWords = AmountInWords; or.Amount = TotalAmount; } else { or.Credit = amount; } or.VoucherDate = VoucherDate; or.VoucherNo = VoucherNumber; or.VoucherType = VoucherTypes.OR; or.Collector = CollectorName; or.IsPosted = true; if (accountCode == GlobalSettings.CodeOfTimeDeposit) { if (TimeDepositDetail != null) { or.TimeDepositDetails = TimeDepositDetail; } } or.Create(); }