/**
   * @see
   *     org.kuali.kfs.module.ar.document.service.AccountsReceivableTaxService#isCustomerInvoiceDetailTaxable(org.kuali.kfs.module.ar.document.CustomerInvoiceDocument,
   *     org.kuali.kfs.module.ar.businessobject.CustomerInvoiceDetail)
   */
  @Override
  public boolean isCustomerInvoiceDetailTaxable(
      CustomerInvoiceDocument customerInvoiceDocument,
      CustomerInvoiceDetail customerInvoiceDetail) {

    // check if sales tax is enabled
    if (!parameterService.getParameterValueAsBoolean(
        KfsParameterConstants.ACCOUNTS_RECEIVABLE_DOCUMENT.class,
        ArConstants.ENABLE_SALES_TAX_IND)) {
      return false;
    }

    // check if customer is tax exempt
    if (ObjectUtils.isNotNull(customerInvoiceDocument.getCustomer())) {
      if (customerInvoiceDocument.getCustomer().isCustomerTaxExemptIndicator()) {
        return false;
      }
    }

    // check item if the taxable indicator is checked
    if (!customerInvoiceDetail.isTaxableIndicator()) {
      return false;
    }

    // check item if item is taxable
    /*
    if( StringUtils.isNotEmpty(customerInvoiceDetail.getInvoiceItemCode()) ){
        Map<String, String> criteria = new HashMap<String, String>();
        criteria.put("invoiceItemCode", customerInvoiceDetail.getInvoiceItemCode());
        criteria.put("chartOfAccountsCode", customerInvoiceDocument.getAccountsReceivableDocumentHeader().getProcessingChartOfAccountCode());
        criteria.put("organizationCode", customerInvoiceDocument.getAccountsReceivableDocumentHeader().getProcessingOrganizationCode());
        CustomerInvoiceItemCode customerInvoiceItemCode = (CustomerInvoiceItemCode) businessObjectService.findByPrimaryKey(CustomerInvoiceItemCode.class, criteria);

        if (ObjectUtils.isNotNull(customerInvoiceItemCode) && !customerInvoiceItemCode.isTaxableIndicator()){
            return false;
        }
    }
    */

    // if address of billing org's postal code isn't the same as shipping address, return false???

    return true;
  }