#IF(#WebserviceError)
{WebserviceError}
#ENDIF #WITH_ERROR(#FormError) #IF (#FormError)
#LOOP(#FormErrors.Form.SageOneConfig.Errors) #IF(#Reason EQ "ledger_account_not_found")

{LedgerAccountNotFound}

#ELSE

{LedgerAccountNotNumber}

#ENDIF #ENDLOOP
#ENDIF #ENDWITH_ERROR

{MarketingHeadLine0}

{Marketing0}

{MarketingHeadLine1}

{Marketing1}

{MarketingHeadLine2}

{Marketing2}

{MarketingHeadLine3}

{Marketing3}

#IF(#ConnectionStatus EQ #SAGE_SHOP_STATUS_DISCONNECTED AND #DEFINED(#ConnectUrl) AND #ConnectUrl NE "")

{HeadLineSageInfo}:

{ConnectWithSage} {ConnectLink} #ELSE

{Info}:

  1. {Info1}
  2. {Info2} {SageOneAdmintrationLink}
  3. {Info3}
#ENDIF

{Status}

#LOCAL("IsShopConnected", #ConnectionStatus EQ #SAGE_SHOP_STATUS_CONNECTED) #LOCAL("IsShopIdle",#SynchronizationStatus EQ #SAGE_SYNC_STATUS_IDLE) #IF(#IsShopConnected AND NOT #WebserviceError)

{SageOneIsConnected}

{Disconnect} #ELSE

{SageOneIsNotConnected}

#ENDIF
#LOCAL("LedgerAccountInvoiceValue", #INPUT.LedgerAccountInvoice) #IF(NOT #LedgerAccountInvoiceValue) #SET("LedgerAccountInvoiceValue", #LedgerAccountInvoice) #ENDIF #IF(NOT #LedgerAccountInvoiceValue) #SET("LedgerAccountInvoiceValue", "") #ENDIF
{LedgerAccountInvoice} {MandatoryStar} #ENDLOCAL
{LastSynchronisation} #IF(#DEFINED(#LastSuccessfulSynchronization) AND #LastSuccessfulSynchronization NE "") #LastSuccessfulSynchronization[datetime] #ELSE {Never} #ENDIF #IF(#IsShopConnected AND NOT #WebserviceError) #IF(#IsShopIdle) #ELSE #ENDIF #ELSE #ENDIF
#IF(#IsShopConnected AND #IsShopIdle AND NOT #WebserviceError) #ELSE #ENDIF
#ENDLOCAL #REM IsShopIdle #ENDREM #ENDLOCAL #REM IsShopConnected #ENDREM