Exemplo n.º 1
0
        private void CheckOnInputInAccountingWithExport(BillDemand billDemand)
        {
            if (BillDemandBuinessService.IsBillDemandSkipInAccountingState(billDemand.Id))
            {
                return;
            }
            if (!billDemand.FilialId.HasValue || !SecurityEntityService.CheckThatSomebodyHasRoleInFilial(BudgetRole.Accountant, billDemand.FilialId.Value, billDemand.BudgetId))
            {
                var parameters = GetDefaultParameters(billDemand);
                if (billDemand.FilialId.HasValue && billDemand.Filial != null)
                {
                    parameters.Add("$FILIALNAME$", billDemand.Filial.Name);
                }
                else
                {
                    parameters.Add("$FILIALNAME$", "Не определено");
                }

                EmailService.SendEmail("BD_NOT_FOUND_ACCOUNTANT", parameters);
            }
        }