public static Docflow.IAccountingDocumentBase CreateUniversalBasic(string comment, Sungero.ExchangeCore.IBoxBase box, Sungero.Parties.ICounterparty counterparty, bool isAdjustment, Sungero.Docflow.IAccountingDocumentBase corrected, Sungero.Exchange.IExchangeDocumentInfo info) { var universalDocument = CreateDocument <IUniversalTransferDocument>(comment, box, counterparty, info); universalDocument.FormalizedServiceType = Docflow.AccountingDocumentBase.FormalizedServiceType.GeneralTransfer; universalDocument.IsAdjustment = isAdjustment; var kind = Docflow.PublicFunctions.DocumentKind.GetNativeDocumentKind(Init.UniversalBasicKind); if (kind != null) { universalDocument.DocumentKind = kind; } if (corrected != null) { universalDocument.Corrected = corrected; universalDocument.LeadingDocument = corrected.LeadingDocument; } return(universalDocument); }
public static FinancialArchive.IOutgoingTaxInvoice CreateOutgoingTaxInvoiceDocument(string comment, Sungero.ExchangeCore.IBoxBase box, Sungero.Parties.ICounterparty counterparty, bool isAdjustment, Sungero.Docflow.IAccountingDocumentBase corrected, Sungero.Exchange.IExchangeDocumentInfo info) { var outgoingTaxInvoice = CreateDocument <IOutgoingTaxInvoice>(comment, box, counterparty, info); outgoingTaxInvoice.FormalizedServiceType = Docflow.AccountingDocumentBase.FormalizedServiceType.Invoice; outgoingTaxInvoice.IsAdjustment = isAdjustment; var kind = Docflow.PublicFunctions.DocumentKind.GetNativeDocumentKind(Init.OutgoingTaxInvoiceKind); if (kind != null) { outgoingTaxInvoice.DocumentKind = kind; } if (corrected != null) { outgoingTaxInvoice.Corrected = corrected; outgoingTaxInvoice.LeadingDocument = corrected.LeadingDocument; } return(outgoingTaxInvoice); }