[
 {
  "owner": "Administrator", 
  "docstatus": 0, 
  "creation": "2012-10-03 11:26:38", 
  "modified_by": "Administrator", 
  "modified": "2013-01-18 10:38:40"
 }, 
 {
  "doc_type": "Purchase Invoice with write off", 
  "name": "__common__", 
  "doctype": "GL Mapper"
 }, 
 {
  "name": "__common__", 
  "parent": "Purchase Invoice with write off", 
  "doctype": "GL Mapper Detail", 
  "parenttype": "GL Mapper", 
  "parentfield": "fields"
 }, 
 {
  "name": "Purchase Invoice with write off", 
  "doctype": "GL Mapper"
 }, 
 {
  "account": "expense_head", 
  "doctype": "GL Mapper Detail", 
  "company": "parent:company", 
  "debit": "amount", 
  "fiscal_year": "parent:fiscal_year", 
  "against": "parent:credit_to", 
  "voucher_type": "parent:doctype", 
  "credit": "value:0", 
  "table_field": "entries", 
  "transaction_date": "parent:voucher_date", 
  "aging_date": "parent:aging_date", 
  "is_opening": "parent:is_opening", 
  "remarks": "parent:remarks", 
  "posting_date": "parent:posting_date", 
  "voucher_no": "parent:name", 
  "cost_center": "cost_center"
 }, 
 {
  "account": "account_head", 
  "doctype": "GL Mapper Detail", 
  "company": "parent:company", 
  "debit": "value:d.fields.get('category') != 'Valuation' and d.fields.get('add_deduct_tax') == 'Add' and d.fields.get('tax_amount') or 0", 
  "fiscal_year": "parent:fiscal_year", 
  "against": "parent:credit_to", 
  "voucher_type": "parent:doctype", 
  "credit": "value:d.fields.get('category') != 'Valuation' and d.fields.get('add_deduct_tax') == 'Deduct' and d.fields.get('tax_amount') or 0", 
  "table_field": "purchase_tax_details", 
  "transaction_date": "parent:voucher_date", 
  "aging_date": "parent:aging_date", 
  "is_opening": "parent:is_opening", 
  "remarks": "parent:remarks", 
  "posting_date": "parent:posting_date", 
  "voucher_no": "parent:name", 
  "cost_center": "cost_center"
 }, 
 {
  "account": "credit_to", 
  "doctype": "GL Mapper Detail", 
  "against_voucher": "name", 
  "against_voucher_type": "value:'Purchase Invoice'", 
  "company": "company", 
  "debit": "value:0", 
  "fiscal_year": "fiscal_year", 
  "against": "against_expense_account", 
  "voucher_type": "doctype", 
  "credit": "total_amount_to_pay", 
  "transaction_date": "voucher_date", 
  "aging_date": "aging_date", 
  "is_opening": "is_opening", 
  "remarks": "remarks", 
  "posting_date": "posting_date", 
  "voucher_no": "name"
 }, 
 {
  "account": "write_off_account", 
  "doctype": "GL Mapper Detail", 
  "company": "company", 
  "debit": "value:0", 
  "fiscal_year": "fiscal_year", 
  "against": "credit_to", 
  "voucher_type": "doctype", 
  "credit": "write_off_amount", 
  "transaction_date": "voucher_date", 
  "aging_date": "aging_date", 
  "is_opening": "is_opening", 
  "remarks": "remarks", 
  "posting_date": "posting_date", 
  "voucher_no": "name", 
  "cost_center": "write_off_cost_center"
 }
]