Exemple #1
0
        public bool SetStateReceipt(IdReceipt pIdReceipt, eStateReceipt pStateReceipt)
        {
            if (pIdReceipt == null)
            {
                pIdReceipt = curRecipt;
            }
            var receipt = new Receipt(pIdReceipt)
            {
                StateReceipt = pStateReceipt, DateReceipt = DateTime.Now, UserCreate = GetUserIdbyWorkPlace(pIdReceipt.IdWorkplace)
            };

            return(db.CloseReceipt(receipt));
        }
Exemple #2
0
        public bool UpdateReceiptFiscalNumber(IdReceipt receiptId, string pFiscalNumber, decimal pSumFiscal = 0, DateTime pDateFiscal = default(DateTime))
        {
            if (pDateFiscal == default(DateTime))
            {
                pDateFiscal = DateTime.Now;
            }
            var receipt = new Receipt(receiptId);

            receipt.NumberReceipt = pFiscalNumber;
            receipt.StateReceipt  = eStateReceipt.Print;
            receipt.UserCreate    = GetUserIdbyWorkPlace(receiptId.IdWorkplace);
            receipt.SumFiscal     = pSumFiscal;
            receipt.DateReceipt   = pDateFiscal;

            DateTime Ldc = receiptId.DTPeriod;

            WDB_SQLite ldb = (Ldc == DateTime.Now.Date ? db : new WDB_SQLite(Ldc));

            var Res = ldb.CloseReceipt(receipt);

            curRecipt = receipt;
            return(Res);
        }