Pregunta

Invoice in QB online can easily be assigned a 'class', which helps to divide up income / expenses.

These classes are likely a "ReferenceType", as Classes are pre-defined list. I don't see any way to update this field via IPP. Am I missing something? I see that you can set the ClassRef for each individual line, but isn't this something different?

Any clarification is much appreciated. Thank you!

¿Fue útil?

Solución

Agreed there is a problem and both answers above are correct depending on what version of QBO you are hitting.

Looking at a Classic QBO company file, classes are at the line level and not at the invoice level.

But if you look at Harmony QBO company file (new format), classes are at the invoice level and not line level.

I have submitted bugs to QBO and for the docs to add clarifications.

Otros consejos

First make sure you are a Plus subscriber and have Classes enabled in your company preferences.

You can set a class ref on every invoice line. It is basically a ReferenceType. Here is an example with a class used in an invoice.

<Invoice domain="QBO" sparse="false">
  <Id>89</Id>
  <SyncToken>0</SyncToken>
  <MetaData>
    <CreateTime>2014-01-23T10:40:56-08:00</CreateTime>
    <LastUpdatedTime>2014-01-23T10:40:56-08:00</LastUpdatedTime>
  </MetaData>
  <DocNumber>1001</DocNumber>
  <TxnDate>2014-01-23</TxnDate>
  <Line>
    <Id>1</Id>
    <LineNum>1</LineNum>
    <Description>sales description</Description>
    <Amount>100.00</Amount>
    <DetailType>SalesItemLineDetail</DetailType>
    <SalesItemLineDetail>
      <ItemRef name="Sales">1</ItemRef>
      <ClassRef name="class3">300500000000000000102</ClassRef>
      <UnitPrice>100</UnitPrice>
      <Qty>1</Qty>
      <TaxCodeRef>NON</TaxCodeRef>
    </SalesItemLineDetail>
  </Line>
  <Line>
    <Amount>100.00</Amount>
    <DetailType>SubTotalLineDetail</DetailType>
    <SubTotalLineDetail />
  </Line>
  <CustomerRef name="foobar">17</CustomerRef>
  <SalesTermRef>3</SalesTermRef>
  <DueDate>2014-02-22</DueDate>
  <TotalAmt>100.00</TotalAmt>
  <ApplyTaxAfterDiscount>false</ApplyTaxAfterDiscount>
  <PrintStatus>NeedToPrint</PrintStatus>
  <EmailStatus>NotSet</EmailStatus>
  <Balance>100.00</Balance>
  <Deposit>0</Deposit>
  <AllowIPNPayment>false</AllowIPNPayment>
  <AllowOnlinePayment>false</AllowOnlinePayment>
  <AllowOnlineCreditCardPayment>false</AllowOnlineCreditCardPayment>
  <AllowOnlineACHPayment>false</AllowOnlineACHPayment>
</Invoice>

ClassRef can appear at either transaction level or line level based on the Class Tracking setting of setting in Company preferences and the state the setting was in when the invoice was created. The docs need to be corrected.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top