Beispiel #1
0
 public static void AddRemove(PlanReceiptOrderPersonalAccount entity)
 {
     if (!RemoveEntities.Contains(entity))
     {
         RemoveEntities.Add(entity);
     }
 }
Beispiel #2
0
        private CreditSlipSpecification FillCreditSlipSpecification(PlanReceiptOrderPersonalAccount x, CreditSlip creditSlip)
        {
            var tax             = _repositoryTax.Specify().Where(a => a.TaxBand == x.PlaneCertificate.TaxBand).Future().First().Value;
            var planCertificate = x.PlaneCertificate;

            var creditSlipSpecification = new CreditSlipSpecification
            {
                CreditSlip = creditSlip,
                NomenclatureNumberModification = planCertificate.ModificationNomenclature,
                TaxBand   = planCertificate.TaxBand,
                PLANQUANT = (decimal)x.CountByDocument,
                FACTQUANT = (decimal)x.CountFact,
                //тут надо смотреть основную единицу измерения и пересчитавать
                PLANQUANTALT  = 0,
                FACTQUANTALT  = 0,
                Price         = (decimal)planCertificate.Price,
                PRICEMEAS     = false,
                PRICECALCRULE = true,
                ACCPRICE      = (decimal)planCertificate.Price,
                ACCPRICEMEAS  = false,
                ACCSUMM       = CreditSlipDomainAlgorithmsOfCalculation.SumWithoutNDS((decimal)x.CountFact, (decimal)planCertificate.Price),
                PLANSUM       = CreditSlipDomainAlgorithmsOfCalculation.SumWithoutNDS((decimal)x.CountByDocument, (decimal)planCertificate.Price),
                PLANSUMTAX    = CreditSlipDomainAlgorithmsOfCalculation.SumWithNDS((decimal)x.CountByDocument, (decimal)planCertificate.Price, tax),
                PLANSUMNDS    = CreditSlipDomainAlgorithmsOfCalculation.SumNDS((decimal)x.CountByDocument, (decimal)planCertificate.Price, tax),
                FACTSUM       = CreditSlipDomainAlgorithmsOfCalculation.SumWithoutNDS((decimal)x.CountFact, (decimal)planCertificate.Price),
                FACTSUMTAX    = CreditSlipDomainAlgorithmsOfCalculation.SumWithNDS((decimal)x.CountFact, (decimal)planCertificate.Price, tax),
                FACTSUMNDS    = CreditSlipDomainAlgorithmsOfCalculation.SumNDS((decimal)x.CountFact, (decimal)planCertificate.Price, tax),
                AUTOCALCSIGN  = true,
                SerNumb       = planCertificate.CertificateQuality.Cast
            };

            creditSlip.CreditSlipSpecifications.Add(creditSlipSpecification);
            return(creditSlipSpecification);
        }
Beispiel #3
0
 public static void AddCreate(PlanReceiptOrderPersonalAccount entity)
 {
     if (!CreateEntities.Contains(entity))
     {
         CreateEntities.Add(entity);
     }
 }
Beispiel #4
0
 public PersonalAccountSetStateSP(
     PlanReceiptOrderPersonalAccount planReceiptOrderPersonalAccount,
     PlanReceiptOrderPersonalAccountState state)
 {
     Rn         = planReceiptOrderPersonalAccount.Rn;
     this.State = state;
 }
 public СloseStateFalling(
     PlanReceiptOrderPersonalAccount entity,
     IRepositoryFactory repositoryFactory,
     IPlanReceiptOrderPersonalAccountState strategy = null)
     : base(entity, repositoryFactory)
 {
     _strategy = strategy;
 }
Beispiel #6
0
        private CreditSlip FillCreditSlip(PlanReceiptOrderPersonalAccount x)
        {
            var planReceiptOrder = CreateEntities[0].PlaneCertificate.PlanReceiptOrder;

            return(new CreditSlip
            {
                //select a.rn into result from acatalog a where a.name = (select 'Склад ' || substr(az.azs_number, 1, 3) from azsazslistmt az where az.rn = nStore) and a.docname = 'IncomingOrders' and a.signs = 1;
                Catalog = new Catalog(28816001),
                LegalPerson = new LegalPerson {
                    Rn = LegalPerson.GPO
                },
                StoreGasStationOilDepot = planReceiptOrder.StoreGasStationOilDepot,
                KindOfWarehouseOperations = new KindOfWarehouseOperations {
                    Rn = KindOfWarehouseOperations.ReceiptFromSuppliersonWarehouse
                },
                TypeOfDocument_INTypeOfDocument = new TypeOfDocument {
                    Rn = TypeOfDocument.CreditSlip
                },
                INDOCDATE = DateTime.Now,
                TypeOfDocument_DIRECTTypeOfDocument = planReceiptOrder.GroundReceiptTypeOfDocument,
                DIRECTDOCNUMB = planReceiptOrder.GroundReceiptDocumentNumb,
                DIRECTDOCDATE = planReceiptOrder.GroundReceiptDocumentDate,
                TypeOfDocument_INVTypeOfDocument = planReceiptOrder.GroundTypeOfDocument,
                INVDOCNUMB = planReceiptOrder.GroundDocumentNumb,
                INVDOCDATE = planReceiptOrder.GroundDocumentDate,
                PricesIncludeTaxes = false,
                CURCOURS = 1,
                CURBASECOURS = 1,
                ACCCOURS = 1,
                ACCBASECOURS = 1,
                FACOURS = 1,
                FABASECOURS = 1,
                NameOfCurrency = new NameOfCurrency {
                    Rn = NameOfCurrency.Rub
                },
                State = CreditSlipState.NotFulfilled,
                Contragent = new Contractor(),
                WorkDate = DateTime.Now,
                Pref = planReceiptOrder.StoreGasStationOilDepot.Number.ShortYear(),
                PersonalAccount = x.PersonalAccount
            });
        }
Beispiel #7
0
        public void Test2()
        {
            var pc  = new PlanCertificate();
            var pro = new PlanReceiptOrder();
            var pa  = new PlanReceiptOrderPersonalAccount();

            //var openStateMachine = new StateMachine<PlanCertificateState, ITrigger>(
            //    () => pc.State,
            //    state => pc.State = state);

//            openStateMachine.Configure(PlanCertificateState.Close)
//                .Permit(
//                    pro.WhenAnyValue(x => x.State)
//                        .Where(state => state == PlanReceiptOrderState.Close)
//                        .Select(_ => Unit.Default),
//                    PlanCertificateState.Close)
//                .Permit(
//                    pro.WhenAnyValue(x => x.State)
//                        .Where(state => state == PlanReceiptOrderState.Confirm)
//                        .Select(_ => Unit.Default),
//                    PlanCertificateState.Confirm);
        }
 protected СonfirmStateBase(PlanReceiptOrderPersonalAccount entity, IRepositoryFactory repositoryFactory)
     : base(entity, repositoryFactory)
 {
 }
 public NotСonfirmState(PlanReceiptOrderPersonalAccount entity, IRepositoryFactory repositoryFactory)
     : base(entity, repositoryFactory)
 {
 }
 protected EntityBase(PlanReceiptOrderPersonalAccount entity, IRepositoryFactory repositoryFactory)
 {
     _repository = repositoryFactory.Create <PlanReceiptOrderPersonalAccount>();
     Entity      = entity;
 }
 public СloseStateEmergy(PlanReceiptOrderPersonalAccount entity, IRepositoryFactory repositoryFactory)
     : base(entity, repositoryFactory)
 {
     _repositoryFactory = repositoryFactory;
 }
 public СonfirmStateEmerge(PlanReceiptOrderPersonalAccount entity, IRepositoryFactory pepositoryFactory)
     : base(entity, pepositoryFactory)
 {
     _pepositoryFactory = pepositoryFactory;
 }