Link between payments and Transactions

Discussion in 'Developers Forum' started by matthewsteeples, Aug 16, 2011.

  1. matthewsteeples New Member

    Hi,

    I'm trying to do some analysis of the data extracted from the api and I'm not able to find a way of linking transactions to payments.

    Is there a shared ID that I can use to link the two together, or is there another method I should be calling?

    Regards,
    Matthew
  2. DuaneJackson Administrator

    The payment class/object has a property with the invoice number, called "PayInvoice"
  3. matthewsteeples New Member

    Yep I've got that bit, I meant linking the payment to the Transaction entry found in the Bank Account.
  4. DuaneJackson Administrator

    There isnt a transaction in the bank area for it.

    The list of items in the bank area are made up of bank transactions (ie items posted directly to the bank account) plus invoice and receipt payments. And, less commonly, Journal entries.
  5. matthewsteeples New Member

    Sorry, I've not been very clear with what I'm after here.

    I've got the transactions from the bank account (using the GetBankTransactions method) and I have the payments from the invoices (using the GetInvoicePayment method). I'm expecting some of these to be linked together but I can't find anything in the data that links them.

    I would also expect to be able to link them to items in the Nominal Ledger (using the GetNominalLedger method) but all of the IDs in the data returned from this appear to be 0.
  6. DuaneJackson Administrator

    Your expectations are wrong. There isn't anything to link them.

    What are you trying to achieve? I might be able to suggest a better way to get there.
  7. matthewsteeples New Member

    The following data is taken from different methods and is linked together in real life. The payment for the invoice comes out of the bank account and the posting is in the specified nominal accounts. I want to know if there is a way to link these records together from the data available, or whether I'm going to have to do it manually.

    Code:
    <Invoice id="307">
        <AmountPaid>345.0000</AmountPaid>
        <CustomerReference></CustomerReference>
        <DueDate>2009-02-08T00:00:00</DueDate>
        <InvoiceDate>2009-03-07T00:00:00</InvoiceDate>
        <InvoiceDBID>8580062</InvoiceDBID>
        <NetAmount>300.0000</NetAmount>
        <Paid>1</Paid>
        <ProjectID>0</ProjectID>
        <SuppressTotal>0</SuppressTotal>
        <VATAmount>45.0000</VATAmount>
        <Lines>
          <LineItem>
            <ChargeType>3525029</ChargeType>
            <Description>Accrol Papers</Description>
            <LineID>14471028</LineID>
            <ProductID>0</ProductID>
            <ProjID>0</ProjID>
            <Quantity>1.0000</Quantity>
            <Rate>300.0000</Rate>
            <Sort>0</Sort>
            <VatAmount>45.0000</VatAmount>
            <VatRate>17.5000</VatRate>
          </LineItem>
        </Lines>
        <Payments>
          <Payment>
            <PayAccount>116731</PayAccount>
            <PayAmount>345.0000</PayAmount>
            <PayDate>2009-09-14T00:00:00</PayDate>
            <PayID>8417627</PayID>
            <PayInvoice>307</PayInvoice>
            <PayMethod>688109</PayMethod>
            <PayNote></PayNote>
          </Payment>
        </Payments>
    </Invoice>
    Code:
    <BankAccount>
        <AccountCode>1200</AccountCode>
        <AccountID>116731</AccountID>
        <AccountName>Bank Current Account</AccountName>
        <Transactions>
            <Transaction id="8417627">
                <accid>116731</accid>
                <Comment>INV #307: </Comment>
                <CustomerId>0</CustomerId>
                <moneyin>345.0000</moneyin>
                <moneyout>0.0000</moneyout>
                <ProjectID>0</ProjectID>
                <SupplierId>0</SupplierId>
                <TransactionDate>2009-09-14T00:00:00</TransactionDate>
                <TransactionType>3506284</TransactionType>
                <Vatable>0</Vatable>
                <VatAmount>0.0000</VatAmount>
                <VatRate>0.0000</VatRate>
            </Transaction>
        </Transactions>
    </BankAccount>
    Code:
      <Nominal id="3506284">
        <AutoFill>0</AutoFill>
        <balance>0</balance>
        <ClassificationID>3</ClassificationID>
        <ClassificationName>Bank Transaction Type</ClassificationName>
        <Code>1100</Code>
        <credit>0</credit>
        <debit>0</debit>
        <Description></Description>
        <Name>Debtors Control Account</Name>
        <Price>0.0000</Price>
        <TypeID>5</TypeID>
        <TypeName>Current Asset/Liability</TypeName>
        <VATRate>-1.0000</VATRate>
        <Transactions>
            <Transaction id="0">
                <Date>2009-03-07T00:00:00</Date>
                <ID2>0</ID2>
                <ID3>0</ID3>
                <Narrative>Invoice raised</Narrative>
                <Ref1>307</Ref1>
                <Ref2>Accrol Papers</Ref2>
                <Ref3>Accrol Papers</Ref3>
                <Type>1</Type>
                <Value>-345.0000</Value>
            </Transaction>
            ...
            <Transaction id="0">
                <Date>2009-09-14T00:00:00</Date>
                <ID2>0</ID2>
                <ID3>0</ID3>
                <Narrative>Payment received</Narrative>
                <Ref1>307</Ref1>
                <Ref2>Accrol Papers</Ref2>
                <Ref3>Accrol Papers</Ref3>
                <Type>1</Type>
                <Value>345.0000</Value>
          </Transaction>
        </Transactions>
    </Nominal>

    Code:
    <Nominal id="3525029">
        <AutoFill>0</AutoFill>
        <balance>0</balance>
        <ClassificationID>1</ClassificationID>
        <ClassificationName>Sales Type</ClassificationName>
        <Code>4000</Code>
        <credit>0</credit>
        <debit>0</debit>
        <Description></Description>
        <Name>Sales</Name>
        <Price>0.0000</Price>
        <TypeID>1</TypeID>
        <TypeName>Turnover</TypeName>
        <VATRate>-1.0000</VATRate>
        <Transactions>
            <Transaction id="0">
                <Date>2009-03-07T00:00:00</Date>
                <ID2>0</ID2>
                <ID3>0</ID3>
                <Narrative>Accrol Papers</Narrative>
                <Ref1>307</Ref1>
                <Ref2>Accrol Papers</Ref2>
                <Ref3>Accrol Papers</Ref3>
                <Type>1</Type>
                <Value>300.0000</Value>
            </Transaction>
        </Transactions>
    </Nominal>
    Code:
    <Nominal id="3506283">
        <AutoFill>0</AutoFill>
        <balance>0</balance>
        <ClassificationID>3</ClassificationID>
        <ClassificationName>Bank Transaction Type</ClassificationName>
        <Code>2200</Code>
        <credit>0</credit>
        <debit>0</debit>
        <Description></Description>
        <Name>Sales Tax Control Account</Name>
        <Price>0.0000</Price>
        <TypeID>5</TypeID>
        <TypeName>Current Asset/Liability</TypeName>
        <VATRate>-1.0000</VATRate>
        <Transactions>
            <Transaction id="0">
                <Date>2009-03-07T00:00:00</Date>
                <ID2>0</ID2>
                <ID3>0</ID3>
                <Narrative></Narrative>
                <Ref1>307</Ref1>
                <Ref2>Accrol Papers</Ref2>
                <Ref3>Accrol Papers</Ref3>
                <Type>1</Type>
                <Value>45.0000</Value>
            </Transaction>
        </Transactions>
    </Nominal>
    Basically I want to find the linked information so that it can be analysed all together rather than analysing each component individually. I don't want the same records to be flagged up more than once.

Share This Page