Class Transaction
Represents a transaction
Inheritance
Namespace: Simplic.ERP.Core
Assembly: Simplic.ERP.Core.dll
Syntax
public class Transaction : IMultiTenantCompatible
Constructors
| Improve this Doc View SourceTransaction()
Initializes a new Transaction
Declaration
public Transaction()
Transaction(Transaction)
Initialize new transaction
Declaration
public Transaction(Transaction transaction)
Parameters
Type | Name | Description |
---|---|---|
Transaction | transaction |
Properties
| Improve this Doc View SourceAddonData
Get the addon-data dictionary
Declaration
public IDictionary<string, object> AddonData { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> |
AlternativeTermOfPayment
Gets or sets the time for payment
Declaration
public DateTime? AlternativeTermOfPayment { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> |
AvailableItems
Gets all items that are enabled for calculation
Declaration
public IEnumerable<TransactionItem> AvailableItems { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TransactionItem> |
Balance
Gets or sets the current balance which is paid
Declaration
public PreciseDecimal Balance { get; set; }
Property Value
Type | Description |
---|---|
PreciseDecimal |
Barcode
Declaration
public string Barcode { get; set; }
Property Value
Type | Description |
---|---|
System.String |
BillToText
Gets or sets the billing adress text
Declaration
public string BillToText { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CashDiscountByTax
Gets the cash discounts by tax
Declaration
public IDictionary<Guid, PreciseDecimal> CashDiscountByTax { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.Guid, PreciseDecimal> |
CashDiscountPercentValue
Gets or sets the cash discount percentage value
Declaration
public PreciseDecimal CashDiscountPercentValue { get; set; }
Property Value
Type | Description |
---|---|
PreciseDecimal |
CashDiscountTotal
Gets or sets the total cash discount (skonto)
Declaration
public PreciseDecimal CashDiscountTotal { get; set; }
Property Value
Type | Description |
---|---|
PreciseDecimal |
CreateDate
Gets or sets the build date of this transaction
Declaration
public DateTime CreateDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
CreateTime
Gets or sets the create time
Declaration
public TimeSpan CreateTime { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
CreateUserId
Gets or sets the id who created the transaction
Declaration
public int CreateUserId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
CreateUserName
Gets or sets the username who created this record
Declaration
public string CreateUserName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Currency
Gets or sets the currency
Declaration
public Currency Currency { get; set; }
Property Value
Type | Description |
---|---|
System.Currency |
CurrencyId
Gets or sets the currency id
Declaration
public Guid CurrencyId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
DeliverToText
Gets or sets the delivery adress text
Declaration
public string DeliverToText { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DeliveryContact
Gets the delivery contact
Declaration
public Contact DeliveryContact { get; }
Property Value
Type | Description |
---|---|
Contact |
DeliveryContactId
Gets the delivery contact id
Declaration
public long? DeliveryContactId { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
DeliveryContactPhysicalAddress
Gest or sets the delivery contact physical address
Declaration
public PhysicalAddress DeliveryContactPhysicalAddress { get; set; }
Property Value
Type | Description |
---|---|
PhysicalAddress |
DeliveryContactPhysicalAddressId
Gets or sets the delivery contact physical address id
Declaration
public long? DeliveryContactPhysicalAddressId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
DeliveryDate
Gets or sets the date of delivery
Declaration
public DateTime? DeliveryDate { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> |
DeliveryPersonalAccount
Gets or sets the delivery persoal account
Declaration
public PersonalAccount DeliveryPersonalAccount { get; set; }
Property Value
Type | Description |
---|---|
PersonalAccount |
DeliveryPersonalAccountId
Gets or sets the delivery personal account id
Declaration
public Guid? DeliveryPersonalAccountId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Guid> |
Digits
Gets or sets the digits, 2 by default
Declaration
public int Digits { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
DocumentId
Gets or sets the document id
Declaration
public Guid? DocumentId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Guid> |
DocumentPostalDispachPhysicalAddressId
Gets or sets the document postal dispach physical address id
Declaration
public long? DocumentPostalDispachPhysicalAddressId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
DocumentPostalDispatchPhysicalAddress
Gets or sets the document postal dispatch physical address
Declaration
public PhysicalAddress DocumentPostalDispatchPhysicalAddress { get; set; }
Property Value
Type | Description |
---|---|
PhysicalAddress |
FinancialContact
Gets the financial contact object
Declaration
public Contact FinancialContact { get; }
Property Value
Type | Description |
---|---|
Contact |
FinancialContactId
Gets the financial contact id
Declaration
public long FinancialContactId { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
FinancialPersonalAccount
Gets the financial personal account object
Declaration
public PersonalAccount FinancialPersonalAccount { get; set; }
Property Value
Type | Description |
---|---|
PersonalAccount |
FinancialPersonalAccountId
Gets or sets the financial personal account id
Declaration
public Guid FinancialPersonalAccountId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
FinancialPhysicalAddress
Gets or sets the financial physical address
Declaration
public PhysicalAddress FinancialPhysicalAddress { get; set; }
Property Value
Type | Description |
---|---|
PhysicalAddress |
FinancialPhysicalAddressId
Gets or sets the financial physical address id
Declaration
public long FinancialPhysicalAddressId { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
FinancialYearPeriodId
Gets or sets the id of the financial period
Declaration
public Guid FinancialYearPeriodId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
FinancialYearPeriodWaWiId
Gets or sets the financial year period for merchandise management
Declaration
public Guid FinancialYearPeriodWaWiId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
GlobalTransactionId
Gets or sets the global transaction id
Declaration
public Guid? GlobalTransactionId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Guid> |
Guid
Gets or sets the current transaction id
Declaration
public Guid Guid { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
Ident
Gets or sets a long which orderes all transaction
Declaration
public long Ident { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
InvoiceContact
Gets the invoice contact
Declaration
public Contact InvoiceContact { get; }
Property Value
Type | Description |
---|---|
Contact |
InvoiceContactId
Gets the invoice contact id
Declaration
public long? InvoiceContactId { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
InvoiceContactPhysicalAddress
Gets or sets the invoice contact physical address
Declaration
public PhysicalAddress InvoiceContactPhysicalAddress { get; set; }
Property Value
Type | Description |
---|---|
PhysicalAddress |
InvoiceContactPhysicalAddressId
Gets or sets the invoice contact physical address id
Declaration
public long? InvoiceContactPhysicalAddressId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
InvoicePersonalAccount
Gets or sest the invoice personal account
Declaration
public PersonalAccount InvoicePersonalAccount { get; set; }
Property Value
Type | Description |
---|---|
PersonalAccount |
InvoicePersonalAccountId
Gets or sets the invoice personal account id
Declaration
public Guid? InvoicePersonalAccountId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Guid> |
IsCanceled
Gets or sets the flag if the transaction was canceled
Declaration
public bool IsCanceled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsCancellation
Gets or sets whether the current transaction is an cancellation
Declaration
public bool IsCancellation { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsDeleted
Gets or sets whether the transaction is deleted
Declaration
public bool IsDeleted { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsExported
Gets or sets the exported flag
Declaration
public bool IsExported { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsGrossTransaction
Gets or sets whether it is gross transaction
Declaration
public bool IsGrossTransaction { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsLocked
Gets or sets whether the transaction is locked
Declaration
public bool IsLocked { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsNew
Gets or sets the is new flag
Declaration
public bool IsNew { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsPaid
Gets or sets the is paid flag
Declaration
public bool IsPaid { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsPrinted
Gets or sets whether the transaction was printed
Declaration
public bool IsPrinted { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsRoundFavorTax
Gets or sets the flag how the taxSum is round. True for round the sum of postions,false round the whole sum
Declaration
public bool IsRoundFavorTax { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsTransferredToAccounting
Gets or sets whether the transaction is transfered to accounting
Declaration
public bool IsTransferredToAccounting { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsValid
Gets or sets whether the transaction is valid for
Declaration
public bool IsValid { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Items
Gets a list of transaction positions
Declaration
public IReadOnlyList<TransactionItem> Items { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<TransactionItem> |
ManualVAT
Gets or sets the manual added vat
Declaration
public PreciseDecimal? ManualVAT { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<PreciseDecimal> |
ManualVatDate
Gets or sets the last change date for the manual vat
Declaration
public DateTime ManualVatDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
ManualVATUser
Gets or sets the last user who changed the manual vat
Declaration
public string ManualVATUser { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Notes
Gets or sets the notes
Declaration
public string Notes { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Number
Gets or sets the transaction number
Declaration
public string Number { get; set; }
Property Value
Type | Description |
---|---|
System.String |
PayerContact
Gets the payer contact
Declaration
public Contact PayerContact { get; }
Property Value
Type | Description |
---|---|
Contact |
PayerContactId
Gets tge payer contact id
Declaration
public long? PayerContactId { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
PayerContactPhysicalAddress
Gets or sets the payer contact physical address
Declaration
public PhysicalAddress PayerContactPhysicalAddress { get; set; }
Property Value
Type | Description |
---|---|
PhysicalAddress |
PayerContactPhysicalAddressId
Gets or sets the payer contact physical address id
Declaration
public long? PayerContactPhysicalAddressId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
PayerPersonalAccount
Gets or sets the payer personal account
Declaration
public PersonalAccount PayerPersonalAccount { get; set; }
Property Value
Type | Description |
---|---|
PersonalAccount |
PayerPersonalAccountId
Gets or sets the payer personal account id
Declaration
public Guid? PayerPersonalAccountId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Guid> |
PaymentMethod
Gets or sets the payment method
Declaration
public PaymentMethod PaymentMethod { get; set; }
Property Value
Type | Description |
---|---|
PaymentMethod |
PaymentMethodId
Gets or sets the payment method id
Declaration
public Guid PaymentMethodId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
Period
Gets or sets the financial year period
Declaration
public FinancialYearPeriod Period { get; set; }
Property Value
Type | Description |
---|---|
FinancialYearPeriod |
PeriodByDeliverDate
Gets whether the peridod is selected by the delivery date
Declaration
public bool PeriodByDeliverDate { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
PeriodNumberFiBu
Only for internal use
Declaration
public int PeriodNumberFiBu { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PeriodNumberWaWi
Only for internal use
Declaration
public int PeriodNumberWaWi { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PersonalAccountGeneralLedgerAccountGroup
Gets the personal account general ledger account
Declaration
public PersonalAccountGeneralLedgerGroup PersonalAccountGeneralLedgerAccountGroup { get; }
Property Value
Type | Description |
---|---|
PersonalAccountGeneralLedgerGroup |
PersonalAccountGLAGroupId
Gets or sets the personal account general ledger account id
Declaration
public Guid? PersonalAccountGLAGroupId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Guid> |
PlanningDate
Gets or sets the planning date
Declaration
public DateTime? PlanningDate { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> |
ProhibitTransferToAccounting
Gets or sets whether a transfer to accounting is prohibited.
Declaration
public bool ProhibitTransferToAccounting { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ReferenceNr
Gets or sets the external reference number
Declaration
public string ReferenceNr { get; set; }
Property Value
Type | Description |
---|---|
System.String |
RemovedItems
Gets or sets theh removed items
Declaration
public IList<TransactionItem> RemovedItems { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<TransactionItem> |
RepresentativeGroup
Gets or sets the representative group
Declaration
public RepresentativeGroup RepresentativeGroup { get; set; }
Property Value
Type | Description |
---|---|
RepresentativeGroup |
RepresentativeGroupId
Gets or sets the representative group id
Declaration
public Guid? RepresentativeGroupId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Guid> |
Responsible
Gets the responsible contact
Declaration
public Contact Responsible { get; set; }
Property Value
Type | Description |
---|---|
Contact |
ResponsibleId
Gets or sets the id of the responsible contact
Declaration
public long? ResponsibleId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int64> |
SelectedTenant
Declaration
public OrganizationTenant SelectedTenant { get; set; }
Property Value
Type | Description |
---|---|
OrganizationTenant |
SelectedType
Gets or sets the selected type
Declaration
public ItemType SelectedType { get; set; }
Property Value
Type | Description |
---|---|
ItemType |
Sign
Gets or sets the transaction
Declaration
public short Sign { get; }
Property Value
Type | Description |
---|---|
System.Int16 |
SignedTotalPrice
Gets signed total price
Declaration
public PreciseDecimal SignedTotalPrice { get; }
Property Value
Type | Description |
---|---|
PreciseDecimal |
SignedTotalPriceGross
Gets signed gross price
Declaration
public PreciseDecimal SignedTotalPriceGross { get; }
Property Value
Type | Description |
---|---|
PreciseDecimal |
SignedTotalPriceNet
Gets signed net price
Declaration
public PreciseDecimal SignedTotalPriceNet { get; }
Property Value
Type | Description |
---|---|
PreciseDecimal |
SignedTotalPriceTax
Gets signed total price tax
Declaration
public PreciseDecimal SignedTotalPriceTax { get; }
Property Value
Type | Description |
---|---|
PreciseDecimal |
StandingOder
Gets the standing order configuration
Declaration
public TransactionStandingOrder StandingOder { get; }
Property Value
Type | Description |
---|---|
TransactionStandingOrder |
StandingOrderId
Gets or sets the assigned standing order
Declaration
public Guid? StandingOrderId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Guid> |
State
Gets or sets the current transaction
Declaration
public TransactionConvertState State { get; set; }
Property Value
Type | Description |
---|---|
TransactionConvertState |
Subtype
Gets or sets the sub-type of the transaction
Declaration
public TransactionSubtype Subtype { get; set; }
Property Value
Type | Description |
---|---|
TransactionSubtype |
SubtypeId
Gets or sets the subtype of the transaction
Declaration
public Guid SubtypeId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
SubtypeName
Gets or set the transaction subtype name
Declaration
public string SubtypeName { get; }
Property Value
Type | Description |
---|---|
System.String |
SubtypeNumber
Gets or sets the transaction subtype number
Declaration
public int SubtypeNumber { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
TaxGroupGuid
Gets or sets the tax group for the transaction
Declaration
public Guid? TaxGroupGuid { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Guid> |
TenantId
Gets or sets the current tenant id
Declaration
public Guid TenantId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
Tenants
Gets or sets a list of available tenants
Declaration
public ObservableCollection<OrganizationTenant> Tenants { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<OrganizationTenant> |
TermOfPayment
Gets or sets the terms of payment
Declaration
public PersonalAccountTermOfPayment TermOfPayment { get; set; }
Property Value
Type | Description |
---|---|
PersonalAccountTermOfPayment |
TermOfPaymentId
Gets or sets the id of the selected term of paymanent
Declaration
public Guid? TermOfPaymentId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Guid> |
TotalPrice
Gets or sets the total price without tax
Declaration
public PreciseDecimal TotalPrice { get; set; }
Property Value
Type | Description |
---|---|
PreciseDecimal |
TotalPriceGross
Gets or sets the calculated total price gross
Declaration
public PreciseDecimal TotalPriceGross { get; set; }
Property Value
Type | Description |
---|---|
PreciseDecimal |
TotalPriceNet
Gets or sets the calculated total price net
Declaration
public PreciseDecimal TotalPriceNet { get; set; }
Property Value
Type | Description |
---|---|
PreciseDecimal |
TotalPriceTax
Gets or sets the total price with tax included
Declaration
public PreciseDecimal TotalPriceTax { get; set; }
Property Value
Type | Description |
---|---|
PreciseDecimal |
TransactionDate
Gets or sets the transaction date
Declaration
public DateTime TransactionDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
TransactionPoco
Gets or sets the transaction poco
Declaration
public Transaction TransactionPoco { get; set; }
Property Value
Type | Description |
---|---|
Transaction |
TransactionSum
Declaration
public TransactionSum TransactionSum { get; }
Property Value
Type | Description |
---|---|
TransactionSum |
TransactionYear
FiBu - Only for internal use
Declaration
public ushort TransactionYear { get; set; }
Property Value
Type | Description |
---|---|
System.UInt16 |
TransactionYearWaWi
Only for internal use
Declaration
public int TransactionYearWaWi { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Type
Gets the transaction type object
Declaration
public TransactionType Type { get; set; }
Property Value
Type | Description |
---|---|
TransactionType |
TypeId
Gets or sets the id of the type
Declaration
public Guid TypeId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid |
TypeName
Gets or set the transaction type name
Declaration
public string TypeName { get; }
Property Value
Type | Description |
---|---|
System.String |
TypeNumber
Gets or sets the transaction type number
Declaration
public int TypeNumber { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
UpdateDate
Gets or sets the update date
Declaration
public DateTime UpdateDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
UpdateTime
Gets or sets the update time
Declaration
public TimeSpan UpdateTime { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
UpdateUserId
Gets or sets the user id who changed the transaction
Declaration
public int UpdateUserId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
UpdateUserName
Gets or sets the user name who updated the transaction
Declaration
public string UpdateUserName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceAddFromTransaction(TransactionItem, PreciseDecimal, Boolean, Boolean)
Creates a new transaction item from another transaction item and add depending operation items
Declaration
public AddTransactionItem<TransactionItem> AddFromTransaction(TransactionItem item, PreciseDecimal quantity, bool processOperationItems = true, bool bookQuantity = true)
Parameters
Type | Name | Description |
---|---|---|
TransactionItem | item | Item instance to convert |
PreciseDecimal | quantity | Quantity to transfer |
System.Boolean | processOperationItems | Determines, whether processing items should be added too or not |
System.Boolean | bookQuantity | Determines, whether the quantity should be booked or not |
Returns
Type | Description |
---|---|
AddTransactionItem<TransactionItem> |
Cancel(Boolean, TransactionCancellationOptions)
Cancel the transaction and create a cancellationt transaction. This transaction will be saved if justTest is set to false.
Declaration
public TransactionCanceledResult Cancel(bool justTest = false, TransactionCancellationOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | justTest | If set to true, the transaction will not be changes, just the possibility to change the flag will be tested. |
TransactionCancellationOptions | options |
Returns
Type | Description |
---|---|
TransactionCanceledResult |
ClearItems()
Clear items if not saved yet
Declaration
public void ClearItems()
CopyHeader(Transaction, IList<String>)
Copy values using source fields
Declaration
public void CopyHeader(Transaction source, IList<string> ignoreList)
Parameters
Type | Name | Description |
---|---|---|
Transaction | source | Source transaction |
System.Collections.Generic.IList<System.String> | ignoreList |
CreateItem<T>()
Create a new item in this transaction
Declaration
public AddTransactionItem<T> CreateItem<T>()
where T : TransactionItem
Returns
Type | Description |
---|---|
AddTransactionItem<T> | Instance of an transaction item |
Type Parameters
Name | Description |
---|---|
T |
CreateItem<T>(ItemType)
Create a new item in this transaction
Declaration
public AddTransactionItem<T> CreateItem<T>(ItemType type)
where T : TransactionItem
Parameters
Type | Name | Description |
---|---|---|
ItemType | type |
Returns
Type | Description |
---|---|
AddTransactionItem<T> |
Type Parameters
Name | Description |
---|---|
T |
CreateItem<T>(Guid)
Create a new item in this transaction
Declaration
public AddTransactionItem<T> CreateItem<T>(Guid itemTypeId)
where T : TransactionItem
Parameters
Type | Name | Description |
---|---|---|
System.Guid | itemTypeId |
Returns
Type | Description |
---|---|
AddTransactionItem<T> |
Type Parameters
Name | Description |
---|---|
T |
CreateItemArticle(Guid)
Create a new article item
Declaration
public AddTransactionItem<TransactionItemArticle> CreateItemArticle(Guid articleId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | articleId | Unique article id |
Returns
Type | Description |
---|---|
AddTransactionItem<TransactionItemArticle> | Add status |
CreateItemText(String)
Create a new text item
Declaration
public AddTransactionItem<TransactionItemText> CreateItemText(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Position text |
Returns
Type | Description |
---|---|
AddTransactionItem<TransactionItemText> | Add result |
Delete(Boolean)
Checks whether the current transaction can be deleted and set the delete flag. This transaction will be saved if justTest is set to false.
Declaration
public TransactionDeleteResult Delete(bool justTest = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | justTest | If set to true, the transaction will not be changes, just the possibility to change the flag will be tested. |
Returns
Type | Description |
---|---|
TransactionDeleteResult | Delete result, if the transaction could not be deleted, a state unqueal to 0 will be returned |
DeleteItem(TransactionItem)
Delete a transaction item
Declaration
public TransactionItemDeleteResult DeleteItem(TransactionItem item)
Parameters
Type | Name | Description |
---|---|---|
TransactionItem | item | Item instance |
Returns
Type | Description |
---|---|
TransactionItemDeleteResult | Status, sucess if |
EnsureNumber()
Ensures that the transaction has a valid transaction number. Will be called when saving the transaction
Declaration
public void EnsureNumber()
ExecutePricing()
Executes the pricing for all transaciton items
Declaration
public async Task ExecutePricing()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
GetAddonData<T>(String)
Get addon data and cast to T
Declaration
public T GetAddonData<T>(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Column of the addon data |
Returns
Type | Description |
---|---|
T | Value if exists, else default of T |
Type Parameters
Name | Description |
---|---|
T | Type to return |
GetMaxSortNumber()
Get the maximum sort number
Declaration
public int GetMaxSortNumber()
Returns
Type | Description |
---|---|
System.Int32 |
GetTaxes()
Calculate and return taxes values
Declaration
public IReadOnlyList<TransactionTax> GetTaxes()
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<TransactionTax> | Readonly list of tax values |
GetTermOfPaymentId(PersonalAccount)
Check if there is a term of payment to preset
Declaration
public Guid? GetTermOfPaymentId(PersonalAccount account)
Parameters
Type | Name | Description |
---|---|---|
PersonalAccount | account |
Returns
Type | Description |
---|---|
System.Nullable<System.Guid> |
GetTotalCashDiscountable()
Gets the sum of all cash discountable items
Declaration
public PreciseDecimal GetTotalCashDiscountable()
Returns
Type | Description |
---|---|
PreciseDecimal |
ItemAdded(TransactionItem)
Declaration
public void ItemAdded(TransactionItem addedItem)
Parameters
Type | Name | Description |
---|---|---|
TransactionItem | addedItem |
LoadItems()
Load existing items
Declaration
public IReadOnlyList<TransactionItem> LoadItems()
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<TransactionItem> | Readonly list of items |
Lock(Boolean)
Set the transaction as locked. This transaction will be saved if justTest is set to false.
Declaration
public TransactionLockResult Lock(bool justTest = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | justTest | If set to true, the transaction will not be changes, just the possibility to change the flag will be tested. |
Returns
Type | Description |
---|---|
TransactionLockResult | Lock result, if the transaction could not be locked, a state unqueal to 0 will be returned |
Organize()
Order and organize the complete transaction
Declaration
public void Organize()
Organize(Boolean)
Order and organize the complete transaction
Declaration
public void Organize(bool force)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | force | Ignores IsPrinted, IsLocked, isTransferredToAccounting, IsCanceled |
Paid(Boolean)
Set the transaction as paid. This transaction will be saved if justTest is set to false.
Declaration
public TransactionPaidResult Paid(bool justTest = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | justTest | If set to true, the transaction will not be changes, just the possibility to change the flag will be tested. |
Returns
Type | Description |
---|---|
TransactionPaidResult | Paid result, if the transaction could not be paid, a state unqueal to 0 will be returned |
Printed(Boolean)
Unlock the current transaction
Declaration
public TransactionPrintResult Printed(bool justTest = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | justTest | If set to true, the transaction will not be changes, just the possibility to change the flag will be tested. |
Returns
Type | Description |
---|---|
TransactionPrintResult | Unlock result |
ReCalcSortNumber(TransactionItem, Int32)
calculates the new sortnumbers
Declaration
public void ReCalcSortNumber(TransactionItem changedItem, int oldNumber)
Parameters
Type | Name | Description |
---|---|---|
TransactionItem | changedItem | |
System.Int32 | oldNumber |
RenderAsText()
Gets the transaction as text
Declaration
public string RenderAsText()
Returns
Type | Description |
---|---|
System.String |
SetAddonData(String, Object)
Set addon data
Declaration
public void SetAddonData(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Column name |
System.Object | value | Value |
SetFinancialYear(DateTime)
Sets the financial year by the selected date
Declaration
public void SetFinancialYear(DateTime value)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | value |
TransferToAccounting(Boolean)
Set the transaction as transfered to accounting. This transaction will be saved if justTest is set to false.
Declaration
public TransactionTransferedToAccountingResult TransferToAccounting(bool justTest = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | justTest | If set to true, the transaction will not be changes, just the possibility to change the flag will be tested. |
Returns
Type | Description |
---|---|
TransactionTransferedToAccountingResult | Transfering result, if the transaction could not be transfered, a state unqueal to 0 will be returned |
Unlock(Boolean)
Unlock the current transaction
Declaration
public TransactionUnlockResult Unlock(bool justTest = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | justTest | If set to true, the transaction will not be changes, just the possibility to change the flag will be tested. |
Returns
Type | Description |
---|---|
TransactionUnlockResult | Unlock result |
Events
| Improve this Doc View SourceInternItemChanged
Declaration
public event Transaction.ItemChangedDelegate InternItemChanged
Event Type
Type | Description |
---|---|
Transaction.ItemChangedDelegate |
OnItemListChanged
Declaration
public event Transaction.ItemListChangedDelegate OnItemListChanged
Event Type
Type | Description |
---|---|
Transaction.ItemListChangedDelegate |