<!--
		SIF Implementation Specification (Australia) 3.4.3


		(April 5, 2018)
		
		Infrastructure Version: v3
	-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sifassociation.org/datamodel/au/3.4" targetNamespace="http://www.sifassociation.org/datamodel/au/3.4" elementFormDefault="qualified" version="3.4.3">
  <xs:complexType name="PaymentReceiptType">
    <xs:annotation>
      <xs:appinfo>
        <sifChar />
        <privacyRating>High</privacyRating>
      </xs:appinfo>
      <xs:documentation>
        This object complements the Invoice object, and contains information about the payment of a Invoice object.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="TransactionType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Type of transaction.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:enumeration value="GL receipt" />
            <xs:enumeration value="GL payment" />
            <xs:enumeration value="Creditor receipt" />
            <xs:enumeration value="Creditor payment" />
            <xs:enumeration value="Debtor receipt" />
            <xs:enumeration value="Debtor payment" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="InvoiceRefId" minOccurs="0" nillable="true" type="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>A pointer back to the Invoice object corresponding to this payment. Is omitted for general ledger transactions, creditor receipts and debtor payments.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="VendorInfoRefId" minOccurs="0" nillable="true" type="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>A pointer back to the vendor associated with the Invoice object, if applicable.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DebtorRefId" minOccurs="0" nillable="true" type="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>A pointer back to the debtor associated with the Invoice object, if applicable.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ChargedLocationInfoRefId" minOccurs="0" nillable="true" type="IdRefType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Id of the location billed for this transaction.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TransactionDate" type="xs:date">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Date transaction was made.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TransactionAmount" type="DebitOrCreditAmountType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Amount received.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ReceivedTransactionId" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Memo transaction Id from other vendor software.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="FinancialAccountRefIdList" minOccurs="0" nillable="true" type="FinancialAccountRefIdListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
      <xs:element name="TransactionDescription" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Description of the transaction.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TaxRate" minOccurs="0" nillable="true" type="xs:decimal">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Rate of tax included in the billed amount.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TaxAmount" minOccurs="0" nillable="true" type="MonetaryAmountType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Amount of tax included in the billed amount.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TransactionMethod" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Method through which transaction was made (e.g. cash, credit card). If a receipt is made using two receipt methods (e.g. $20 in cash and $80 on credit), two PaymentReceipt objects are expected to be created, rather than a single object with mixed receipt method.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ChequeNumber" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>The cheque number issued, if paying creditors by cheque.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TransactionNote" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>Note about the receipt or payment.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AccountingPeriod" minOccurs="0" nillable="true" type="LocalIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation>The accounting period against which the transaction is billed.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_Metadata" minOccurs="0" nillable="true" type="SIF_MetadataType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_ExtendedElements" minOccurs="0" nillable="true" type="SIF_ExtendedElementsType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>High</privacyRating>
          </xs:appinfo>
          <xs:documentation />
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="RefId" use="required" type="RefIdType">
      <xs:annotation>
        <xs:appinfo>
          <sifChar>M</sifChar>
          <privacyRating>High</privacyRating>
        </xs:appinfo>
        <xs:documentation>GUID for this payment or receipt. The application that owns this object is responsible for generating this unique Id.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="PaymentReceipt" type="PaymentReceiptType">
    <xs:key name="PaymentReceiptKey1">
      <xs:selector xpath="./PaymentReceipt" />
      <xs:field xpath="@RefId" />
    </xs:key>
  </xs:element>

  <xs:complexType name="PaymentReceiptCollectionType">
    <xs:sequence>
      <xs:element name="PaymentReceipt" type="PaymentReceiptType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="PaymentReceipts" type="PaymentReceiptCollectionType" />

</xs:schema>