Accounting.Support.GetDefaultCashAccount

From GAB Help
Jump to: navigation, search

Retrieve the Default Cash Account For Currency

-Requires Currency/Cash Accounts set up in System Support > Administration > Company Options (Standard) > Cash Account Maintenance
-Retrieves Cash Account record for IsoCurrencyCode with Default Account flag set True, if not found will retrieve Cash Account record for IsoCurrencyCode with Default Account flag set False.


Required Passed Properties

Company

  • Type - String
  • Size - 3

IsoCurrencyCode

  • Type - String
  • Size - 3

CashAccountType

  • Enum
    • 0 - AccountsPayableOrAccountsReceivable
    • 1 - Payroll

Returned Properties

Status

  • Enum
    • Success
    • CheckInuse
    • DuplicateCheck
    • UpdateFailedForNextCheckNumber
    • Failed
    • MultipleRecords
    • CheckRecordLocked
    • MissingParameters
    • Failed

ReturnIsoCurrencyCode

  • Type - String
  • Size - 3

ReturnAccountNumber

  • Type - String
  • Size - 15

ReturnCashAccountType

  • Type - Enum
    • CheckRegister
    • Manual
    • Quick
    • Refund
    • Payroll

ReturnDescription

  • Type - String
  • Size - 100

ReturnStartingCheckPrefix

  • Prefix only used when option 'Use Extended Check Numbers' is on.
  • Type - String
  • Size - 5

ReturnStartingCheckNumber

  • Type - String
  • Size (option based)
    • 'Use Extended Check Numbers' is ON: 15
    • 'Use Extended Check Numbers' is OFF: 6

ReturnIsDefaultAccount

  • Type - Boolean

ReturnBankAccountNumber

  • Type - String (Encrypted)
  • Size - 40

Example

F.Global.Callwrapper.New("TEST","Accounting.Support.GetDefaultCashAccount")
F.Global.Callwrapper.SetProperty("TEST","Company","10T")
F.Global.Callwrapper.SetProperty("TEST","CallingProgram","CheckTest")
F.Global.Callwrapper.SetProperty("TEST","IsoCurrencyCode", "USD")
F.Global.Callwrapper.SetProperty("TEST","CashAccountType",0)
F.Global.CallWrapper.Run("TEST")

F.Global.Callwrapper.GetProperty("TEST","Status",V.Local.tstatus)
F.Global.Callwrapper.GetProperty("TEST","ReturnIsoCurrencyCode",V.Local.tCurrency)
F.Global.Callwrapper.GetProperty("TEST","ReturnAccountNumber",V.Local.tCashAccountNumber)
F.Global.Callwrapper.GetProperty("TEST","ReturnCashAccountType",V.Local.tCashAcctType)
F.Global.Callwrapper.GetProperty("TEST","ReturnDescription",V.Local.tDesciption)
F.Global.Callwrapper.GetProperty("TEST","ReturnStartingCheckPrefix",V.Local.tStartCheckPrefix)
F.Global.Callwrapper.GetProperty("TEST","ReturnStartingCheckNumber",V.Local.tStartCheckNum)
F.Global.Callwrapper.GetProperty("TEST","ReturnIsDefaultAccount",V.Local.bIsDefaultAccount)
F.Global.Callwrapper.GetProperty("TEST","ReturnBankAccountNumber",V.Local.tBankAccountNumber)


Technical Information

  • Core program: CK0800. Mode 7