コード例 #1
0
 public ReportDto(ReportBodyDto body, FiscalSetupDto fiscalSetup, Stream logo, Dictionary <string, string> extras, CultureInfo culture, XDocument metaData = null)
 {
     Body        = body;
     FiscalSetup = fiscalSetup;
     Logo        = logo;
     Extras      = extras;
     if (metaData == null)
     {
         metaData = XDocument.Parse("<Root/>");
     }
     MetaData = metaData;
     Culture  = culture;
 }
コード例 #2
0
 public static FiscalSetupSearchIndex CreateSearchIndex(this FiscalSetupDto fiscalSetup, PartnerDto partner, Func <long, long, IList <object> > getFiscalSetupMetaData)
 {
     return(new FiscalSetupSearchIndex
     {
         Id = fiscalSetup.Id.Value,
         IsDeactivated = fiscalSetup.IsDeactivated,
         ProviderId = fiscalSetup.ProviderId,
         Name = fiscalSetup.Address.Name,
         Street = fiscalSetup.Address.Street,
         PlaceName = fiscalSetup.Address.PlaceName,
         Zip = fiscalSetup.Address.Zip,
         City = fiscalSetup.Address.City,
         CountryName = fiscalSetup.Address.CountryName,
         OrgNumber = fiscalSetup.OrgNumber,
         XenaSubscriptionId = fiscalSetup.XenaSubscriptionId,
         PartnerId = partner?.Id,
         AccountNumber = partner?.AccountNumber,
         CreatedDate = fiscalSetup.CreatedAt.Date.DaysSince1970_01_01(),
         Tags = partner?.Tags ?? new List <string>(),
         MetaData = getFiscalSetupMetaData(fiscalSetup.Id.Value, fiscalSetup.Id.Value)
     });
 }
コード例 #3
0
 public static IEnumerable <LedgerAccountIndex> CreateLedgerSearchIndex(this ArticleGroupDto articleGroup, FiscalSetupDto fiscalSetup)
 {
     return(LedgerAccountIndex.CreateFromArticleGroup(articleGroup, fiscalSetup.DefaultSalesVatId, fiscalSetup.DefaultSalesVatAbbreviation, fiscalSetup.DefaultPurchasingVatId, fiscalSetup.DefaultPurchasingVatAbbreviation));
 }
コード例 #4
0
 public static bool IsAccountant(this FiscalSetupDto fiscalSetup)
 {
     return(FiscalSetupTypes.Accountant.Equals(fiscalSetup.FiscalSetupType, StringComparison.OrdinalIgnoreCase));
 }
コード例 #5
0
 public static bool IsFacade(this FiscalSetupDto fiscalSetup)
 {
     return(FiscalSetupTypes.Facade.Equals(fiscalSetup.FiscalSetupType, StringComparison.OrdinalIgnoreCase));
 }