<?xml version="1.0" encoding="utf-8"?>
<AisMenuItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/AisMenuItem.xsd">
	<Action>stat</Action>
	<SecondAction></SecondAction>
	<Ico></Ico>
  <Label>
    <L1>Tax</L1>
    <L2>Taxes</L2>
  </Label>
  <Description>
    <L1>Tax list</L1>
    <L2>Liste des taxes</L2>
  </Description>
  <Stat>
    <FileMajorVersion>1</FileMajorVersion>
    <FileMinorVersion>0</FileMinorVersion>
    <Parameters>
      <Parameter>
        <Name>tax_code</Name>
        <Type>string</Type>
        <Label>
          <L1>Tax</L1>
          <L2>Taxe</L2>
        </Label>
        <Combo>stat_params.spar_tax_code</Combo>
        <LabelWidth>200</LabelWidth>
        <TotalWidth>800</TotalWidth>
      </Parameter>
      <Parameter>
        <Name>taxent_id</Name>
        <Type>int</Type>
        <Label>
          <L1>Tax entity</L1>
          <L2>Organisme de taxation</L2>
        </Label>
        <Combo>stat_params.spar_taxent_id</Combo>
        <LabelWidth>200</LabelWidth>
        <TotalWidth>800</TotalWidth>
      </Parameter>
      <Parameter>
        <Name>valeur_from</Name>
        <Type>decimal4</Type>
        <Label>
          <L1>Minimal value</L1>
          <L2>Valeur mini</L2>
        </Label>
        <LabelWidth>200</LabelWidth>
        <TotalWidth>300</TotalWidth>
      </Parameter>
      <Parameter>
        <Name>valeur_to</Name>
        <Type>decimal4</Type>
        <Label>
          <L1>Maximal value</L1>
          <L2>Valeur maxi</L2>
        </Label>
        <LabelWidth>200</LabelWidth>
        <TotalWidth>300</TotalWidth>
      </Parameter>
    </Parameters>
    <SQL>
      select	
            [Code taxe] = nmtax_tax_code,
            [Taxe] = nmtax_l1,
            [Organisme] = a.act_internal_reference,
            [Date d'effet] = acctax_tax_date_setup,
            [Valeur] = acctax_tax_value,
            [Valeur fixe] = acctax_fixed_value,
            [Incluse dans le net] = acctax_net_included,
            [Devise] = acctax_payout_currency_code
      from	acc_taxes
            inner join nm_taxes on nmtax_tax_code = acctax_tax_code
            inner join act_actors a on act_actor_id = nmtax_taxent_id
      where ( @tax_code = '' or nmtax_tax_code = @tax_code)
      and   ( @taxent_id is null or nmtax_taxent_id = @taxent_id)
      and   ( acctax_tax_value between isnull(@valeur_from, 0) and isnull(@valeur_to, 1000) )
      order by nmtax_tax_code, acctax_tax_date_setup
    </SQL>
	</Stat>

</AisMenuItem>