Esempio n. 1
0
        protected void CloseOverdraft(Renta renta, Wallet mir, SIN sin, bool first = false)
        {
            decimal comission;

            if (renta.FullPrice)
            {
                comission = BillingHelper.GetFinalPrice(renta);
            }
            else
            {
                comission = BillingHelper.CalculateComission(renta);
            }
            //create KPI here
            renta.Sku.Corporation.CurrentKPI += renta.ShopPrice;
            if (first)
            {
                renta.Sku.Corporation.SkuSold += renta.ShopPrice;
            }
            //comission
            AddNewTransfer(mir, renta.Shop.Wallet, comission, $"Рентное начисление: {renta.Sku.Name} в {renta.Shop.Name} от {sin.Passport.PersonName}", false, renta.Id, false);
        }