SWAPI – Invoice Change Query.

 

InvoiceChangeQuery has been modified to include additional information, including,

·         whether the “invoice” is a quote or invoice (IsSaleEst)

·         the Sale Type for each item on the invoice (SaleType)

 

IsSaleEst values

False

Invoice

True

Quote

 

SaleType values

AGRPB

Agreement periodic billing line item

AGRNEW

Line item for sale of new agreement

AGRREN

Line item for sale of a renewal agreement

AGRVST

Line item for agreement visit performed

DISC

Discount

{user-defined}

Values can also include any number of additional user-defined Sale Types codes

Invoice Change Query

Here is a request/response example.  Additions are highlighted in yellow.

Sample Request

<SessionRequest Version="string" SessionID="{7588E489-7E99-4F68-A3C8-F3E86BD92241}" RequestID="string">

  <InvoiceChangeQuery Filter="string" Max="string" OrderBy="string" StyleNo="string" StyleOptions="string" PageSize="string" PageNo="string">

    <ChangedSince>dateTime</ChangedSince>

  </InvoiceChangeQuery>

</SessionRequest>

Sample Response

<?xml version="1.0"?>

<InvoiceChangeQueryData RequestID="string">

  <InvoiceChangeQueryRecord>

    <InvoiceID>integer</InvoiceID>

    <InvoiceDate>dateTime</InvoiceDate>

    <BillingAccountID>integer</BillingAccountID>

    <LocationID>integer</LocationID>

    <InvoiceNo>string(10)</InvoiceNo>

    <JobNo>string(10)</JobNo>

    <JobClass>string(15)</JobClass>

    <JobType>string(6)</JobType>

    <JobLeadSource>string(6)</JobLeadSource>

    <JobLeadSourceType>string(16)</JobLeadSourceType>

    <JobDepartment>string(2)</JobDepartment>

    <InvoiceDepartment>string(2)</InvoiceDepartment>

    <InvoiceSubTotal>float</InvoiceSubTotal>

    <InvoiceTotalAmount>float</InvoiceTotalAmount>

    <InvoiceNetBalance>float</InvoiceNetBalance>

    < IsSaleEst >boolean</IsSaleEst>

    <dsInvoiceChangeItemList>

      <dsInvoiceChangeItem>

        <InvoiceID>integer</InvoiceID>

        <ItemNumber>string(15)</ItemNumber>

        <Quantity>float</Quantity>

        <UnitPrice>float</UnitPrice>

        <TotalSale>float</TotalSale>

        <DiscountAmount>float</DiscountAmount>

        <TotalAfterDiscount>float</TotalAfterDiscount>

        <ChargeTo>string(1)</ChargeTo>

        <SaleType>string(6)</SaleType>

      </dsInvoiceChangeItem>

    </dsInvoiceChangeItemList>

  </InvoiceChangeQueryRecord>

</InvoiceChangeQueryData>