简体   繁体   English

sData中的AccountKey

[英]AccountKey in sData

Myself and two other people that are trying to communicate with Sage Accounting using sData, but perhaps someone has used sData. 我自己和另外两个尝试使用sData与Sage Accounting通信的人,但也许有人使用了sData。

I'm trying to post sData to our Sage server and create a deposit transaction that will show up in the bank reconciliation. 我正在尝试将sData发布到我们的Sage服务器,并创建将在银行对帐单中显示的存款交易。 I've tried tons of different variations, but this is what the sData looks like that I am currently posting to the server. 我尝试了很多不同的变体,但这就是我当前发布到服务器的sData的样子。

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns:atom="http://www.w3.org/2005/Atom"  
        xmlns:xs="http://www.w3.org/2001/XMLSchema"  
        xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005"  
        xmlns="http://www.w3.org/2005/Atom"  
        xmlns:sdata="http://schemas.sage.com/sdata/2008/1"  
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
        xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"  
        xmlns:sync="http://schemas.sage.com/sdata/sync/2008/1"  
        xmlns:sme="http://schemas.sage.com/sdata/sme/2007"  
        xmlns:http="http://schemas.sage.com/sdata/http/2008/1">  
<sdata:payload> 
    <GL_TransactionJournalHeader sdata:uri="/sdata/MasApp/MasContract/TS2/GL_TransactionJournalHeaderSPECIAL()" xmlns="">
        <PostingDate>2018-02-16</PostingDate>
        <SourceJournal>BR</SourceJournal>
        <AcceptOutOfBalance>N</AcceptOutOfBalance>
        <TransactionType>D</TransactionType>
        <JournalDeleted>N</JournalDeleted>
        <JournalComment>If this works it will be a miracle!</JournalComment>
        <JournalType>F</JournalType>
        <Offset>C</Offset>
        <OffsetAccountKey>000000034</OffsetAccountKey>
        <JournalTotal>5.0000</JournalTotal>
        <GL_TransactionJournalDetail>
            <PostingComment>Test line comment</PostingComment>
            <DebitAmount>5.00</DebitAmount>
            <CreditAmount>0.00</CreditAmount>
            <TransactionType>D</TransactionType>
            <AccountKey>000000005</AccountKey>
        </GL_TransactionJournalDetail>
    </GL_TransactionJournalHeader>
</sdata:payload>
</entry>

I've tried posting more than this and less than this. 我尝试发布的内容多于此,少于此。 I've tried adding it in line by line and I always get an error when I add the AccountKey using a valid Sage Account Key. 我尝试逐行添加它,当我使用有效的Sage帐户密钥添加AccountKey时,总是会收到错误消息。 If I use an invalid Account Key the error message says that the account is invalid, this is what the server returns when the account key is valid. 如果我使用了无效的帐户密钥,错误消息将显示该帐户无效,这是服务器在帐户密钥有效时返回的内容

<?xml version="1.0" encoding="utf-8"?>
<sdata:diagnoses xmlns="http://schemas.sage.com/sdata/2008/1" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sdata="http://schemas.sage.com/sdata/2008/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:sync="http://schemas.sage.com/sdata/sync/2008/1" xmlns:sme="http://schemas.sage.com/sdata/sme/2007" xmlns:http="http://schemas.sage.com/sdata/http/2008/1">
    <sdata:diagnosis>
        <sdata:severity>error</sdata:severity>
        <sdata:sdataCode>ApplicationDiagnosis</sdata:sdataCode>
        <sdata:applicationCode />
        <sdata:message> is not on file.Š</sdata:message>
        <sdata:stackTrace />
        <sdata:payloadPath />
    </sdata:diagnosis>
</sdata:diagnoses>

I've seen posts on other forums but the answer was "no one uses sData". 我在其他论坛上看到过帖子,但答案是“没有人使用sData”。 While this is likely true, it doesn't really solve my problem. 虽然这可能是正确的,但并不能真正解决我的问题。 I'm stuck with sData for the time being. 我暂时还停留在sData上。 Has anyone seen this sort of error before and have any suggestions on how to fix it? 有没有人以前见过这种错误,并且对如何解决它有任何建议?

So the error I was getting wasn't complaining about the AccountKey not on file it was complaining about the Bank Code not being included. 因此,我遇到的错误不是在抱怨AccountKey未归档,而是在抱怨银行代码未包括在内。 I added the BankCode and then the DepositNo and the transaction posted successfully. 我添加了BankCode,然后添加了DepositNo,并且交易成功发布。

<sdata:payload> 
    <GL_TransactionJournalHeaderSPECIAL sdata:uri="/sdata/MasApp/MasContract/TS2/GL_TransactionJournalHeaderSPECIAL()" xmlns="">
        <PostingDate>2018-02-16</PostingDate>
        <SourceJournal>BR</SourceJournal>
        <AcceptOutOfBalance>N</AcceptOutOfBalance>
        <TransactionType>D</TransactionType>
        <JournalDeleted>N</JournalDeleted>
        <JournalComment>If this works it will be a miracle!</JournalComment>
        <JournalType>F</JournalType>
        <BankCode>B</BankCode>
        <DepositNo>123</DepositNo>
        <Offset>C</Offset>
        <OffsetAccountKey>000000034</OffsetAccountKey>
        <JournalTotal>5.0000</JournalTotal>
        <GL_TransactionJournalDetail>
            <BankCode>B</BankCode>
            <PostingComment>Test line comment</PostingComment>
            <DebitAmount>5.00</DebitAmount>
            <CreditAmount>0.00</CreditAmount>
            <TransactionType>D</TransactionType>
            <AccountKey>000000005</AccountKey>
        </GL_TransactionJournalDetail>
    </GL_TransactionJournalHeaderSPECIAL>
</sdata:payload>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM