示例#1
0
        private static POSReceiptRow CreateNewPOSReceiptRow(ReceiptType paReceiptType)
        {
            bool          lcTaxApplicable;
            POSReceiptRow lcPOSReceiptRow;

            lcPOSReceiptRow = new POSReceiptRow(EServiceTableManager.GetInstance().GetNewRow(EServiceTableManager.TableType.POSReceipt, true));
            lcTaxApplicable = General.ParseBoolean(ApplicationFrame.GetInstance().ActiveSubscription.ActiveSetting.GetSettingValue(ctSETTaxApplicable), false);

            lcPOSReceiptRow.ReceiptID   = -1;
            lcPOSReceiptRow.ReceiptNo   = GetPOSLastReceiptNo(paReceiptType) + 1;
            lcPOSReceiptRow.ReceiptDate = General.GetCurrentSystemLocalTime();

            if ((lcTaxApplicable) && (paReceiptType == ReceiptType.Sale))
            {
                lcPOSReceiptRow.TaxPercent = General.ParseDecimal(ApplicationFrame.GetInstance().ActiveSubscription.ActiveSetting.GetSettingValue(ctSETTaxPercent), 0);
            }
            else
            {
                lcPOSReceiptRow.TaxPercent = 0;
            }

            lcPOSReceiptRow.TaxInclusive = General.ParseBoolean(ApplicationFrame.GetInstance().ActiveSubscription.ActiveSetting.GetSettingValue(ctSETTaxInclusive), false);
            lcPOSReceiptRow.ReceiptType  = paReceiptType.ToString().ToUpper();
            lcPOSReceiptRow.Status       = Status.Active.ToString().ToUpper();

            return(lcPOSReceiptRow);
        }
示例#2
0
 public static POSReceiptManager CreateInstance(POSReceiptRow paPOSReceiptRow)
 {
     if (paPOSReceiptRow != null)
     {
         return(new POSReceiptManager(paPOSReceiptRow));
     }
     else
     {
         return(null);
     }
 }
示例#3
0
 private POSReceiptManager(POSReceiptRow paPOSReceiptRow)
 {
     clPOSReceiptRow = paPOSReceiptRow;
 }