Exemple #1
0
 public void Delete(Data.AccountingDocument document)
 {
     try
     {
         document.AISDeleted = true;
         this.SubmitChanges();
     }
     catch
     {
         throw;
     }
 }
Exemple #2
0
        /// <summary>
        ///  ثبت سند خودکار برای فاکتور فروش
        /// </summary>
        /// <param name="storeOrder"></param>
        public void SaveAutomaticDocumentForSaleInvoice(Data.StoreOrder storeOrder)
        {
            try
            {
                var document = new Data.AccountingDocument()
                {
                    ADCode        = this.GetNextCode(),
                    ADType        = Common.Constants.DocumentType.SaleInvoice,
                    ADDate        = storeOrder.ODate,
                    ADDescription = storeOrder.ODescription,
                    AIdStatus     = Common.Constants.DocumentStatus.TemporaryApproved,
                    AISDeleted    = false
                };

                this.Save(document);

                Business.GetAccountingArticleBusiness().SaveAutomaticForSaleInvoice(storeOrder, document);
            }
            catch
            {
                throw;
            }
        }