<?xml version="1.0" encoding="UTF-8"?>
<!-- this map does NOT post invoices automatically -->
<!-- maps use the same sequence of parameter types as other QSF -->
<!-- Trans:desc can be set by expenses or datebook -->
<qsf-map
xmlns="http://qof.sourceforge.net/">
<definition qof_version="3">
  <define e_type="pilot_expenses">Pilot-link QOF expenses</define>
  <define e_type="pilot_datebook">Pilot-link QOF datebook</define>
  <define e_type="pilot_address">Pilot-link QOF address</define>
  <define e_type="gncInvoice">Invoice</define>
  <define e_type="Trans">Transaction</define>
  <define e_type="gncEntry">Order/Invoice/Bill Entry</define>
  <default name="mileage_rate" type="numeric" value="28/100"/>
  <default name="use_weekday_descriptor" type="boolean" value="true"/>
  <default name="use_discount" type="boolean" value="false"/>
  <default name="tax_included" type="boolean" value="false"/>
  <default name="post_account" type="string" value="Assets:Current Assets:CD account"/>
  <default name="expenses_account" type="string" value="Income:Other Income"/>
  <default name="datebook_account" type="string" value="Income:Locum Income"/>
  <default name="tax_included" type="enum" value="1">GNC_TAXINCLUDED_YES</default>
  <default name="tax_included" type="enum" value="2">GNC_TAXINCLUDED_NO</default>
  <default name="tax_included" type="enum" value="3">GNC_TAXINCLUDED_USEGLOBAL</default>
  <default name="amount_type" type="enum" value="1">GNC_AMT_TYPE_VALUE</default>
  <default name="amount_type" type="enum" value="2">GNC_AMT_TYPE_PERCENT</default>
</definition>
<object type="gncEntry">
  <calculate type="string" value="desc">
    <if boolean="use_weekday_descriptor">
      <set format="%A">expense_date</set>
    </if>
    <else type="qof_expenses">
      <set>expense_vendor</set>
    </else>
  </calculate>
  <calculate type="string" value="action">
    <if type="qof-expenses">
      <set>Material</set>
    </if>
    <else type="qof-datebook">
      <set>Hours</set>
    </else>
  </calculate>
  <calculate type="string" value="notes">
    <set object="qof-expenses">expense_note</set>
  </calculate>
  <calculate type="guid" value="bill-to"/>
  <calculate type="boolean" value="invoice-taxable"/>
  <calculate type="boolean" value="bill-taxable"/>
  <calculate type="boolean" value="billable?"/>
  <calculate type="boolean" value="bill-tax-included"/>
  <calculate type="boolean" value="invoice-tax-included">
    <set>tax_included</set>
  </calculate>
  <calculate type="numeric" value="iprice">
    <if type="string" value="expense_type">
      <equals type="string" value="etMileage">
        <set>mileage_rate</set>
      </equals>
    </if>
  </calculate>
  <calculate type="numeric" value="bprice"/>
  <calculate type="numeric" value="qty">
    <if string="expense_type">
      <equals type="string" value="etMileage">
        <set object="qof-expenses">expense_amount</set>
      </equals>
    </if>
    <else type="string" value="expense_type">
      <set>0/1</set>
    </else>
  </calculate>
  <calculate type="numeric" value="invoice-discount">
    <set>0/1</set>
  </calculate>
  <calculate type="date" value="date-entered">
    <set>qsf_time_now</set>
  </calculate>
  <calculate type="date" value="date">
    <set>qsf_enquiry_date</set>
  </calculate>
  <calculate type="gint32" value="discount-type">
    <set option="amount_type_enum">GNC_AMT_TYPE_PERCENT</set>
  </calculate>
  <calculate type="gint32" value="discount-method">
    <set>2</set>
  </calculate>
  <calculate type="gint32" value="bill-payment-type"/>
</object>
<object type="Trans">
  <calculate type="string" value="num"/>
  <calculate type="string" value="desc"/>
  <calculate type="date" value="date-entered"/>
  <calculate type="date" value="date-posted"/>
  <calculate type="date" value="date-due"/>
  <calculate type="string" value="notes"/>
</object>
<object type="gncInvoice">
  <calculate type="string" value="id"/>
  <calculate type="string" value="billing_id"/>
  <calculate type="string" value="notes"/>
  <calculate type="guid" value="invoice_owner"/>
  <calculate type="guid" value="account"/>
  <calculate type="guid" value="posted_txn"/>
  <calculate type="guid" value="posted_lot"/>
  <calculate type="guid" value="terms"/>
  <calculate type="guid" value="bill-to"/>
  <calculate type="boolean" value="active">
    <set>true</set>
  </calculate>
  <calculate type="date" value="date_opened">
      <set>qsf_enquiry_date</set>
  </calculate>
  <calculate type="date" value="date_posted"/>
</object>
</qsf-map>
