<?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"/>
  <define e_type="pilot_datebook"/>
  <define e_type="pilot_address"/>
  <define e_type="gncInvoice"/>
  <define e_type="Trans"/>
  <define e_type="gncEntry"/>
  <default name="mileage_rate" type="numeric" value="30/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="pilot_expenses">
      <set>expense_vendor</set>
    </else>
    <else type="pilot_datebook">
      <set>description</set>
    </else>
  </calculate>
  <calculate type="string" value="action">
    <if type="pilot_expenses">
      <set>Material</set>
    </if>
    <else type="pilot_datebook">
      <set>Hours</set>
    </else>
  </calculate>
  <calculate type="string" value="notes">
    <if type="pilot-expenses">
      <set>expense_note</set>
    </if>
    <else type="pilot_datebook">
      <set>note</set>
    </else>
  </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="Mileage">
        <set>mileage_rate</set>
      </equals>
    </if>
  </calculate>
  <calculate type="numeric" value="bprice"/>
  <calculate type="numeric" value="qty">
    <if type="pilot_datebook">
      <set>end_time-start_time</set>
    </if>
    <else type="pilot_expenses">
      <set>expense_amount</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>
